Help Search

Browse all resource types

To fetch a list of all the resource types user has access to, make the following request:

GET /resource-types.json

Request Parameters

The endpoint does not take any additional parameter.

Possible responses

Code Description
200 OK
Request went through. The response payload will contain a list of resources.
403 Authentication Failure
The user making the request is not authenticated.
404 Not found
If resource type plugin is not enabled.

Success response

A successful response will have an array of json objects with each representing a single resource. It will look something like this example:

{
    "header": {
        "id": "600f5f81-d99f-4763-80fc-5168561010d7",
        "status": "success",
        "servertime": 1622043241,
        "action": "e2aa01a9-84ec-55f8-aaed-24ee23259339",
        "message": "The operation was successful.",
        "url": "\/resource-types.json",
        "code": 200
    },
    "body": [
        {
            "id": "669f8c64-242a-59fb-92fc-81f660975fd3",
            "slug": "password-string",
            "name": "Simple password",
            "description": "The original passbolt resource type, where the secret is a non empty string.",
            "definition": {
                "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": 4096
                }
            },
            "created": "2021-05-05T11:06:31+00:00",
            "modified": "2021-05-05T11:06:31+00:00"
        },
        {
            "id": "a28a04cd-6f53-518a-967c-9963bf9cec51",
            "slug": "password-and-description",
            "name": "Password with description",
            "description": "A resource with the password and the description encrypted.",
            "definition": {
                "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"
                                }
                            ]
                        }
                    }
                },
                "secret": {
                    "type": "object",
                    "required": [
                        "password"
                    ],
                    "properties": {
                        "password": {
                            "type": "string",
                            "maxLength": 4096
                        },
                        "description": {
                            "anyOf": [
                                {
                                    "type": "string",
                                    "maxLength": 10000
                                },
                                {
                                    "type": "null"
                                }
                            ]
                        }
                    }
                }
            },
            "created": "2021-05-05T11:06:31+00:00",
            "modified": "2021-05-05T11:06:31+00:00"
        }
    ]
}

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!