Intray API

GET /

Response:

Documentation (In HTML).

GET /access-key

Authentication

This part of the API is protected by JSON Web Tokens (JWTs)

Clients must supply the following data A JWT Token signed with this server's key

Response:

[]
[
    {
        "uuid": "00000000-0000-0000-0000-000000000000",
        "created": "2018-02-10T00:00:42Z",
        "name": "Example Text",
        "permissions": []
    }
]
[
    {
        "uuid": "00000000-0000-0000-0000-000000000000",
        "created": "2018-02-10T00:00:42Z",
        "name": "Example Text",
        "permissions": []
    },
    {
        "uuid": "00000000-0000-0000-0000-000000000000",
        "created": "2018-02-10T00:00:42Z",
        "name": "Example Text",
        "permissions": []
    }
]
[
    {
        "uuid": "00000000-0000-0000-0000-000000000000",
        "created": "2018-02-10T00:00:42Z",
        "name": "Example Text",
        "permissions": [
            "PermitAdd"
        ]
    }
]
[
    {
        "uuid": "00000000-0000-0000-0000-000000000000",
        "created": "2018-02-10T00:00:42Z",
        "name": "Example Text",
        "permissions": []
    },
    {
        "uuid": "00000000-0000-0000-0000-000000000000",
        "created": "2018-02-10T00:00:42Z",
        "name": "Example Text",
        "permissions": []
    },
    {
        "uuid": "00000000-0000-0000-0000-000000000000",
        "created": "2018-02-10T00:00:42Z",
        "name": "Example Text",
        "permissions": []
    }
]

POST /access-key

Authentication

This part of the API is protected by JSON Web Tokens (JWTs)

Clients must supply the following data A JWT Token signed with this server's key

Request:

{
    "addAccessKeyPermissions": [],
    "addAccessKeyName": "Example Text"
}
{
    "addAccessKeyPermissions": [
        "PermitAdd"
    ],
    "addAccessKeyName": "Example Text"
}
{
    "addAccessKeyPermissions": [
        "PermitShow"
    ],
    "addAccessKeyName": "Example Text"
}
{
    "addAccessKeyPermissions": [
        "PermitAdd"
    ],
    "addAccessKeyName": "Example Text"
}

Response:

{
    "accessKeyCreatedKey": "2e3b7faf620aeeab133f0f4ca9838626",
    "accessKeyCreatedCreatedTimestamp": "2018-02-10T00:00:42Z",
    "accessKeyCreatedUUID": "00000000-0000-0000-0000-000000000000"
}

DELETE /access-key/:uuid

Authentication

This part of the API is protected by JSON Web Tokens (JWTs)

Clients must supply the following data A JWT Token signed with this server's key

Captures:

Response:

GET /access-key/:uuid

Authentication

This part of the API is protected by JSON Web Tokens (JWTs)

Clients must supply the following data A JWT Token signed with this server's key

Captures:

Response:

{
    "uuid": "00000000-0000-0000-0000-000000000000",
    "created": "2018-02-10T00:00:42Z",
    "name": "Example Text",
    "permissions": []
}
{
    "uuid": "00000000-0000-0000-0000-000000000000",
    "created": "2018-02-10T00:00:42Z",
    "name": "Example Text",
    "permissions": [
        "PermitAdd"
    ]
}
{
    "uuid": "00000000-0000-0000-0000-000000000000",
    "created": "2018-02-10T00:00:42Z",
    "name": "Example Text",
    "permissions": [
        "PermitShow"
    ]
}
{
    "uuid": "00000000-0000-0000-0000-000000000000",
    "created": "2018-02-10T00:00:42Z",
    "name": "Example Text",
    "permissions": [
        "PermitAdd"
    ]
}

DELETE /account

Authentication

This part of the API is protected by JSON Web Tokens (JWTs)

Clients must supply the following data A JWT Token signed with this server's key

Response:

GET /account

Authentication

This part of the API is protected by JSON Web Tokens (JWTs)

Clients must supply the following data A JWT Token signed with this server's key

Response:

{
    "admin": false,
    "uuid": "00000000-0000-0000-0000-000000000000",
    "created": "2018-02-10T00:00:42Z",
    "count": 42,
    "username": "Example Text",
    "last-login": null
}
{
    "admin": true,
    "uuid": "00000000-0000-0000-0000-000000000000",
    "created": "2018-02-10T00:00:42Z",
    "count": 42,
    "username": "Example Text",
    "last-login": null
}
{
    "admin": false,
    "uuid": "00000000-0000-0000-0000-000000000000",
    "created": "2018-02-10T00:00:42Z",
    "count": 42,
    "username": "Example Text",
    "last-login": "2018-02-10T00:00:42Z"
}
{
    "admin": true,
    "uuid": "00000000-0000-0000-0000-000000000000",
    "created": "2018-02-10T00:00:42Z",
    "count": 42,
    "username": "Example Text",
    "last-login": "2018-02-10T00:00:42Z"
}

POST /intray/item

Authentication

This part of the API is protected by JSON Web Tokens (JWTs)

Clients must supply the following data A JWT Token signed with this server's key

Request:

{
    "data": "SGVsbG8gV29ybGQh",
    "type": "text"
}

Response:

"00000000-0000-0000-0000-000000000000"

DELETE /intray/item/:uuid

Authentication

This part of the API is protected by JSON Web Tokens (JWTs)

Clients must supply the following data A JWT Token signed with this server's key

Captures:

Response:

GET /intray/item/:uuid

Authentication

This part of the API is protected by JSON Web Tokens (JWTs)

Clients must supply the following data A JWT Token signed with this server's key

Captures:

Response:

{
    "contents": {
        "data": "SGVsbG8gV29ybGQh",
        "type": "text"
    },
    "id": "00000000-0000-0000-0000-000000000000",
    "timestamp": "2018-02-10T00:00:42Z"
}

GET /intray/items

Authentication

This part of the API is protected by JSON Web Tokens (JWTs)

Clients must supply the following data A JWT Token signed with this server's key

Response:

[]
[
    {
        "contents": {
            "data": "SGVsbG8gV29ybGQh",
            "type": "text"
        },
        "id": "00000000-0000-0000-0000-000000000000",
        "timestamp": "2018-02-10T00:00:42Z"
    }
]
[
    {
        "contents": {
            "data": "SGVsbG8gV29ybGQh",
            "type": "text"
        },
        "id": "00000000-0000-0000-0000-000000000000",
        "timestamp": "2018-02-10T00:00:42Z"
    },
    {
        "contents": {
            "data": "SGVsbG8gV29ybGQh",
            "type": "text"
        },
        "id": "00000000-0000-0000-0000-000000000000",
        "timestamp": "2018-02-10T00:00:42Z"
    }
]
[
    {
        "contents": {
            "data": "SGVsbG8gV29ybGQh",
            "type": "text"
        },
        "id": "00000000-0000-0000-0000-000000000000",
        "timestamp": "2018-02-10T00:00:42Z"
    },
    {
        "contents": {
            "data": "SGVsbG8gV29ybGQh",
            "type": "text"
        },
        "id": "00000000-0000-0000-0000-000000000000",
        "timestamp": "2018-02-10T00:00:42Z"
    },
    {
        "contents": {
            "data": "SGVsbG8gV29ybGQh",
            "type": "text"
        },
        "id": "00000000-0000-0000-0000-000000000000",
        "timestamp": "2018-02-10T00:00:42Z"
    }
]
[
    {
        "contents": {
            "data": "SGVsbG8gV29ybGQh",
            "type": "text"
        },
        "id": "00000000-0000-0000-0000-000000000000",
        "timestamp": "2018-02-10T00:00:42Z"
    },
    {
        "contents": {
            "data": "SGVsbG8gV29ybGQh",
            "type": "text"
        },
        "id": "00000000-0000-0000-0000-000000000000",
        "timestamp": "2018-02-10T00:00:42Z"
    },
    {
        "contents": {
            "data": "SGVsbG8gV29ybGQh",
            "type": "text"
        },
        "id": "00000000-0000-0000-0000-000000000000",
        "timestamp": "2018-02-10T00:00:42Z"
    },
    {
        "contents": {
            "data": "SGVsbG8gV29ybGQh",
            "type": "text"
        },
        "id": "00000000-0000-0000-0000-000000000000",
        "timestamp": "2018-02-10T00:00:42Z"
    }
]

GET /intray/show-item

Authentication

This part of the API is protected by JSON Web Tokens (JWTs)

Clients must supply the following data A JWT Token signed with this server's key

Response:

null
{
    "contents": {
        "data": "SGVsbG8gV29ybGQh",
        "type": "text"
    },
    "id": "00000000-0000-0000-0000-000000000000",
    "timestamp": "2018-02-10T00:00:42Z"
}

GET /intray/size

Authentication

This part of the API is protected by JSON Web Tokens (JWTs)

Clients must supply the following data A JWT Token signed with this server's key

Response:

42

POST /intray/sync

Authentication

This part of the API is protected by JSON Web Tokens (JWTs)

Clients must supply the following data A JWT Token signed with this server's key

Request:

{
    "undeleted": [],
    "unsynced": [],
    "synced": []
}
{
    "undeleted": [
        "00000000-0000-0000-0000-000000000000"
    ],
    "unsynced": [],
    "synced": []
}
{
    "undeleted": [],
    "unsynced": [
        {
            "value": {
                "data": "SGVsbG8gV29ybGQh",
                "type": "text"
            },
            "added": "2018-02-10T00:00:42Z"
        }
    ],
    "synced": []
}
{
    "undeleted": [],
    "unsynced": [],
    "synced": [
        "00000000-0000-0000-0000-000000000000"
    ]
}
{
    "undeleted": [
        "00000000-0000-0000-0000-000000000000"
    ],
    "unsynced": [
        {
            "value": {
                "data": "SGVsbG8gV29ybGQh",
                "type": "text"
            },
            "added": "2018-02-10T00:00:42Z"
        }
    ],
    "synced": []
}

Response:

{
    "new": [],
    "deleted": [],
    "added": []
}
{
    "new": [],
    "deleted": [
        "00000000-0000-0000-0000-000000000000"
    ],
    "added": []
}
{
    "new": [],
    "deleted": [],
    "added": [
        {
            "created": "2018-02-10T00:00:42Z",
            "value": {
                "data": "SGVsbG8gV29ybGQh",
                "type": "text"
            },
            "id": "00000000-0000-0000-0000-000000000000",
            "synced": "2018-02-10T00:00:42Z"
        }
    ]
}
{
    "new": [
        {
            "created": "2018-02-10T00:00:42Z",
            "value": {
                "data": "SGVsbG8gV29ybGQh",
                "type": "text"
            },
            "id": "00000000-0000-0000-0000-000000000000",
            "synced": "2018-02-10T00:00:42Z"
        }
    ],
    "deleted": [],
    "added": []
}
{
    "new": [],
    "deleted": [
        "00000000-0000-0000-0000-000000000000"
    ],
    "added": [
        {
            "created": "2018-02-10T00:00:42Z",
            "value": {
                "data": "SGVsbG8gV29ybGQh",
                "type": "text"
            },
            "id": "00000000-0000-0000-0000-000000000000",
            "synced": "2018-02-10T00:00:42Z"
        }
    ]
}

GET /intray/uuids

Authentication

This part of the API is protected by JSON Web Tokens (JWTs)

Clients must supply the following data A JWT Token signed with this server's key

Response:

[]
[
    "00000000-0000-0000-0000-000000000000"
]
[
    "00000000-0000-0000-0000-000000000000",
    "00000000-0000-0000-0000-000000000000"
]
[
    "00000000-0000-0000-0000-000000000000",
    "00000000-0000-0000-0000-000000000000",
    "00000000-0000-0000-0000-000000000000"
]
[
    "00000000-0000-0000-0000-000000000000",
    "00000000-0000-0000-0000-000000000000",
    "00000000-0000-0000-0000-000000000000",
    "00000000-0000-0000-0000-000000000000"
]

POST /login

Request:

{
    "username": "Example Text",
    "password": "Example Text"
}

Response:

GET /permissions

Authentication

This part of the API is protected by JSON Web Tokens (JWTs)

Clients must supply the following data A JWT Token signed with this server's key

Response:

[]
[
    "PermitAdd"
]
[
    "PermitShow"
]
[
    "PermitAdd"
]

POST /register

Request:

{
    "name": "Example Text",
    "password": "Example Text"
}

Response: