Help Search

Browse all Resources

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

GET /resources.json

Request Parameters

The endpoint takes the following parameters

Param Description Required Type
filter[ ] Controls the fields that could be returned No Array
filter[is-favorite] Return the results that are marked as favorite No Boolean
filter[is-shared-with-group] Return the results that are shared with the given Group UUID No UUID
filter[is-owned-by-me] Return the results that are owned by me No Boolean
filter[is-shared-with-me] Return the results that are shared with me No Boolean
filter[has-id][ ] Return the results for the given resource UUID(s) No UUID
contain[ ] Controls the fields that must be returned No Array
contain[creator] Whether or not to include the resource creator No Boolean
contain[modifier] Whether or not to include the modifier detail for this resource No Boolean
contain[favorite] Whether or not to include the favorite 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 ASC|DESC

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
  • Filter by is-favorite, is-shared-with-group, is-owned-by-me, is-shared-with-me and has-id

Such a request will look like this:

GET /resources.json?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 with each representing a single resource. It will look something like this example:

{
    "header": {
        "id": "886a798f-11cd-4340-b488-70e57d56f5db",
        "status": "success",
        "servertime": 1555054043,
        "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",
        "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",
            "resource_type_id": "e2aa01a9-84ec-55f8-aaed-24ee23259339",
            "favorite": null,
            "modifier": {
                "id": "f848277c-5398-58f8-a82a-72397af2d450",
                "role_id": "a58de6d3-f52c-5080-b79b-a601a647ac85",
                "username": "[email protected]",
                "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": "[email protected]",
                "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",
            "resource_type_id": "e2aa01a9-84ec-55f8-aaed-24ee23259339",
            "favorite": null,
            "modifier": {
                "id": "f848277c-5398-58f8-a82a-72397af2d450",
                "role_id": "a58de6d3-f52c-5080-b79b-a601a647ac85",
                "username": "[email protected]",
                "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": "[email protected]",
                "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 January 25th, 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!