Help Search

Resources Types

The API allows you to know more about the schema of a given resource and it’s associated secret.

In passbolt, passwords are split into two different entities: Resources (the metada in clear) and Secrets (the encrypted data). The resource types define what is included in the resource and what is included in the secret. This definition, that is part of the resource type, takes the form of JSON schemas.

Since passbolt is end-to-end encrypted the server cannot validate the content of the secrets. Therefore, it is the responsibility of the clients to check if the secret is deserializable according to the resource type schema associated with the resource and to choose how to handle that case.

The Resource Type object

Attribute Type Description Format
id String Unique ID of the resource type in UUID format. UUID
slug String A machine and human readable identifier for the resource type. Example: "password-string"
description String A human readable description of the purpose of the resource type. Example: "The original passbolt resource type, where the secret is a non empty string"
definition String A description of the schema, e.g. properties and rules. [JSON schemas](https://json-schema.org/).
created String Datetime when the resource type was created ISO 8601Datetime format
2014-02-01T09:28:56.321-10:00
modified String Datetime when the resource type was last modified ISO 8601 Datetime format
2014-02-01T09:28:56.321-10:00

For example this is the “legacy” default resource type definition, compatible with Passbolt since v1 up to v3:

{
    "resource":{
        "type":"object",
        "required":["name"],
        "properties":{
            "name":{
                "type":"string",
                "maxLength":64
            },
            "username":{
                "anyOf":[
                    {"type":"string","maxLength":64},
                    {"type":"null"}]
                },
            "uri":{
                "anyOf":[
                    {"type":"string","maxLength":1024},
                    {"type":"null"}]
                },
            "description":{
                "anyOf":[
                    {"type":"string","maxLength":10000},
                    {"type":"null"}
                ]
            }
        }
    },
    "secret":{
        "type":"string",
        "maxLength":4064
    }
}

Last updated

This article was last updated on May 26th, 2021.

For another perspective on the API you browse the OpenAPI 2.0 specifications using the dedicated API reference site (Swagger UI).

API Reference

You can also find the latest OpenAPI 2.0 specifications directly on the dedicated repository.

OpenAPI Specs repository
🍪   Do you accept cookies for statistical purposes? (Read more) Accept No thanks!