Help Search

View a resource type

To fetch a resource type user has access to, make the following request:

GET /resource-types/<UUID>.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.
400 Bad request
For example if the resource type id is not a uuid.
404 Not found
If the resource type is not found, if it does not exist or have been deleted.
403 Authentication Failure
The user making the request is not authenticated.

Success response

A successful response will return a resoruce type. It will look something like this example:

GET /resource-types/600f5f81-d99f-4763-80fc-5168561010d7.json
{
    "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"
    }
}

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!