Help Search

Browse all resources

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

GET /resources.json?api-version=v2

Request Parameters

The endpoint takes the following parameters

Param Description Required Type
api-version The API version to target No string
contain[] Controls the fields that must be returned Array
contain[creator] Whether or not to include the resource creator No Boolean
contain[favorite] Whether or not to include the favorite detail for this resource No Boolean
contain[modifier] Whether or not to include the modifier detail for this resource No Boolean
contain[permission] Whether or not to include the permission detail for this resource No Boolean
contain[tag] Whether or not to include the tags for this resource No Boolean
order[] How should the results be sorted. For example Resource.modified DESC No String

Possible responses

Code Description
200 OK
Request went through. The response payload will contain a list of resources.
400 Bad Request
When either of the order parameters are invalid.
403 Authentication Failure
The user making the request is not authenticated.

Examples

Filtered request

It is possible to adjust the request response for example to

  • include creator, favorite, modifier, permission and tag
  • Sort DESC by resource modification datetime
  • Using api-version v2

Such request will look like this:

GET /resources.json?api-version=v2
        &contain[creator]=1
        &contain[favorite]=1
        &contain[modifier]=1
        &contain[permission]=1
        &contain[tag]=1
        &order[]=Resource.modified DESC

Success response

A successful response will have an array of json objects. Each representing a single resource. Something like this example below

{
    "header": {
        "id": "886a798f-11cd-4340-b488-70e57d56f5db",
        "status": "success",
        "servertime": 1555054043,
        "title": "app_resources_index_success",
        "action": "c506210f-7866-5691-8fc1-58772e8f49f1",
        "message": "The operation was successful.",
        "url": "\/resources.json?contain%5Bcreator%5D=1\u0026contain%5Bfavorite%5D=1\u0026contain%5Bmodifier%5D=1\u0026contain%5Bpermission%5D=1\u0026contain%5Btag%5D=1\u0026order%5B%5D=Resource.modified+DESC\u0026silentLoading=false\u0026api-version=v2",
        "code": 200
    },
    "body": [
        {
            "id": "daaf057e-7fc3-5537-a8a9-e8c151890878",
            "name": "cakephp",
            "username": "cake",
            "uri": "cakephp.org",
            "description": "The rapid and tasty php development framework",
            "deleted": false,
            "created": "2019-04-04T10:05:58+00:00",
            "modified": "2019-04-11T08:53:06+00:00",
            "created_by": "f848277c-5398-58f8-a82a-72397af2d450",
            "modified_by": "f848277c-5398-58f8-a82a-72397af2d450",
            "favorite": null,
            "modifier": {
                "id": "f848277c-5398-58f8-a82a-72397af2d450",
                "role_id": "a58de6d3-f52c-5080-b79b-a601a647ac85",
                "username": "ada@passbolt.com",
                "active": true,
                "deleted": false,
                "created": "2019-02-04T12:05:44+00:00",
                "modified": "2019-03-04T12:05:44+00:00",
                "last_logged_in": ""
            },
            "creator": {
                "id": "f848277c-5398-58f8-a82a-72397af2d450",
                "role_id": "a58de6d3-f52c-5080-b79b-a601a647ac85",
                "username": "ada@passbolt.com",
                "active": true,
                "deleted": false,
                "created": "2019-02-04T12:05:44+00:00",
                "modified": "2019-03-04T12:05:44+00:00",
                "last_logged_in": ""
            },
            "tags": [
                {
                    "id": "9a2d0c7e-8bf6-5a85-a733-ea737d9fdea2",
                    "slug": "#bravo",
                    "is_shared": true
                },
                {
                    "id": "54d4d6e4-982e-5b50-a739-313104c800df",
                    "slug": "firefox",
                    "is_shared": false
                },
                {
                    "id": "14ae2fc4-a235-588f-8f19-98cce08808aa",
                    "slug": "fox-trot",
                    "is_shared": false
                },
                {
                    "id": "0507cbbb-eb14-5121-9105-05380dbe64ff",
                    "slug": "\u092a\u0930\u0926\u0947\u0936\u0940-\u092a\u0930\u0926\u0947\u0936\u0940",
                    "is_shared": false
                }
            ],
            "permission": {
                "id": "972bf3fc-0d5b-579c-9097-56d86394c255",
                "aco": "Resource",
                "aco_foreign_key": "daaf057e-7fc3-5537-a8a9-e8c151890878",
                "aro": "User",
                "aro_foreign_key": "f848277c-5398-58f8-a82a-72397af2d450",
                "type": 15,
                "created": "2019-04-04T12:06:00+00:00",
                "modified": "2019-04-04T12:06:00+00:00"
            }
        },
        {
            "id": "ecf0ed85-3bfc-5f45-b11d-74e9a86aa313",
            "name": "Grogle",
            "username": "googleusername",
            "uri": "http:\/\/fr.groland.wikia.com\/wiki\/Grogle",
            "description": "",
            "deleted": false,
            "created": "2019-04-04T12:05:58+00:00",
            "modified": "2019-04-11T07:23:00+00:00",
            "created_by": "f848277c-5398-58f8-a82a-72397af2d450",
            "modified_by": "f848277c-5398-58f8-a82a-72397af2d450",
            "favorite": null,
            "modifier": {
                "id": "f848277c-5398-58f8-a82a-72397af2d450",
                "role_id": "a58de6d3-f52c-5080-b79b-a601a647ac85",
                "username": "ada@passbolt.com",
                "active": true,
                "deleted": false,
                "created": "2019-02-04T12:05:44+00:00",
                "modified": "2019-03-04T12:05:44+00:00",
                "last_logged_in": ""
            },
            "creator": {
                "id": "f848277c-5398-58f8-a82a-72397af2d450",
                "role_id": "a58de6d3-f52c-5080-b79b-a601a647ac85",
                "username": "ada@passbolt.com",
                "active": true,
                "deleted": false,
                "created": "2019-02-04T12:05:44+00:00",
                "modified": "2019-03-04T12:05:44+00:00",
                "last_logged_in": ""
            },
            "tags": [
                {
                    "id": "9a2d0c7e-8bf6-5a85-a733-ea737d9fdea2",
                    "slug": "#bravo",
                    "is_shared": true
                },
                {
                    "id": "1c8afebc-7e23-51bd-a0b6-2e695afeb32f",
                    "slug": "#charlie",
                    "is_shared": true
                },
                {
                    "id": "54d4d6e4-982e-5b50-a739-313104c800df",
                    "slug": "firefox",
                    "is_shared": false
                },
                {
                    "id": "14ae2fc4-a235-588f-8f19-98cce08808aa",
                    "slug": "fox-trot",
                    "is_shared": false
                }
            ],
            "permission": {
                "id": "36366a82-3d75-5e0e-97d3-0437ad4ee2cf",
                "aco": "Resource",
                "aco_foreign_key": "ecf0ed85-3bfc-5f45-b11d-74e9a86aa313",
                "aro": "User",
                "aro_foreign_key": "f848277c-5398-58f8-a82a-72397af2d450",
                "type": 15,
                "created": "2019-04-04T12:06:01+00:00",
                "modified": "2019-04-04T12:06:01+00:00"
            }
        }
    ]
}

Last updated

This article was last updated on April 23rd, 2019.

If you are familiar with the high level API concepts and only looking for the endpoint implementation details, there is a repository with the latest OpenAPI 2.0 specifications (compatible with Swagger).

OpenAPI Specs