A typical APS resource looks like this:

{
    "aps":
    {
        "type": "http://egordeeva.de/seatsmanager/user/1.0",
        "id": "69ccef78-690a-4128-b638-2814bc5835a7",
        "status": "aps:ready",
        "revision": 3,
        "modified": "2015-01-09T03:48:07Z",
        "schema": "/aps/2/types/93",
        "package":
        {
            "id": "fe1d017b-e5a9-4fe4-b475-48bf76739b92",
            "href": "/aps/2/packages/fe1d017b-e5a9-4fe4-b475-48bf76739b92"
        }
    },
    "email": "wqerwqe@asfsdaffad.com",
    "fieldone": "sfa",
    "user":
    {
        "aps":
        {
            "link": "strong",
            "href": "/aps/2/resources/6a253dd7-3830-4783-ba25-567865b11da7",
            "id": "6a253dd7-3830-4783-ba25-567865b11da7"
        }
    },
    "organization":
    {
        "aps":
        {
            "link": "strong",
            "href": "/aps/2/resources/b3347ea2-446a-49b6-b367-2bf9ccf78a02",
            "id": "b3347ea2-446a-49b6-b367-2bf9ccf78a02"
        }
    }
}

schema for this resource:

{
    "apsVersion": "2.0",
    "name": "users",
    "id": "http://egordeeva.de/seatsmanager/user/1.0",
    "implements": [
        "http://aps-standard.org/types/core/resource/1.0"
    ],
    "properties": {
        "email": {
            "type": "string",
            "title": "Email"
        },
        "fieldone": {
            "type": "string",
            "title": "fieldone"
        },
        "fieldtwo": {
            "type": "array",
            "items": {
                "type": "string"
            },
            "title": "fieldtwo"
        }
    },
    "operations": {
        "configure": {
            "verb": "PUT",
            "path": "/"
        }
    },
    "relations": {
        "organization": {
            "type": "http://egordeeva.de/seatsmanager/organization/1.0",
            "required": true,
            "collection": false
        },
        "user": {
            "type": "http://aps-standard.org/types/core/service-user/1.0",
            "required": true,
            "collection": false
        }
    }
}

APS type is used as a schema for each of the resources created based on this type, this way we can ensure a resource will have all of the required properties, APS controller will prohibit creating a resource that does not match the schema.

Each of the types may have:

Resources are available on APS bus using APS API

  • each resource can be queried by its id

GET /aps/2/resources/546f693f-c762-4d5a-8d48-58997ee495a4

  • a list of resources can be queried using a relation

GET /aps/2/resources/546f693f-c762-4d5a-8d48-58997ee495a4/accounts

  • or a type

GET /aps/2/resources?implementing(http://egordeeva.de/seatsmanager/user/1.0)

Query language (RQL) specifics are described in documentation.

Internal content