Intray API

Please find the api endpoints at localhost:7777.

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": [
        "PermitGetAccountInfo"
    ],
    "addAccessKeyName": "Example Text"
}
{
    "addAccessKeyPermissions": [
        "PermitAdd"
    ],
    "addAccessKeyName": "Example Text"
}

Response:

{
    "accessKeyCreatedKey": "a5b3198cad9ea06d8e1b5d76b7768dd2",
    "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": [
        "PermitGetAccountInfo"
    ]
}
{
    "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:

{
    "subscribed": null,
    "admin": false,
    "uuid": "00000000-0000-0000-0000-000000000000",
    "created": "2018-02-10T00:00:42Z",
    "count": 42,
    "username": "Example Text",
    "last-login": null
}
{
    "subscribed": "2018-02-10T00:00:42Z",
    "admin": false,
    "uuid": "00000000-0000-0000-0000-000000000000",
    "created": "2018-02-10T00:00:42Z",
    "count": 42,
    "username": "Example Text",
    "last-login": null
}
{
    "subscribed": null,
    "admin": true,
    "uuid": "00000000-0000-0000-0000-000000000000",
    "created": "2018-02-10T00:00:42Z",
    "count": 42,
    "username": "Example Text",
    "last-login": null
}
{
    "subscribed": "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": null
}
{
    "subscribed": 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"
}

POST /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

Request:

{
    "old-passphrase": "Example Text",
    "new-passphrase": "Example Text"
}

Response:

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"
    },
    "created": "2018-02-10T00:00:42Z",
    "id": "00000000-0000-0000-0000-000000000000"
}

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"
        },
        "created": "2018-02-10T00:00:42Z",
        "id": "00000000-0000-0000-0000-000000000000"
    }
]
[
    {
        "contents": {
            "data": "SGVsbG8gV29ybGQh",
            "type": "text"
        },
        "created": "2018-02-10T00:00:42Z",
        "id": "00000000-0000-0000-0000-000000000000"
    },
    {
        "contents": {
            "data": "SGVsbG8gV29ybGQh",
            "type": "text"
        },
        "created": "2018-02-10T00:00:42Z",
        "id": "00000000-0000-0000-0000-000000000000"
    }
]
[
    {
        "contents": {
            "data": "SGVsbG8gV29ybGQh",
            "type": "text"
        },
        "created": "2018-02-10T00:00:42Z",
        "id": "00000000-0000-0000-0000-000000000000"
    },
    {
        "contents": {
            "data": "SGVsbG8gV29ybGQh",
            "type": "text"
        },
        "created": "2018-02-10T00:00:42Z",
        "id": "00000000-0000-0000-0000-000000000000"
    },
    {
        "contents": {
            "data": "SGVsbG8gV29ybGQh",
            "type": "text"
        },
        "created": "2018-02-10T00:00:42Z",
        "id": "00000000-0000-0000-0000-000000000000"
    }
]
[
    {
        "contents": {
            "data": "SGVsbG8gV29ybGQh",
            "type": "text"
        },
        "created": "2018-02-10T00:00:42Z",
        "id": "00000000-0000-0000-0000-000000000000"
    },
    {
        "contents": {
            "data": "SGVsbG8gV29ybGQh",
            "type": "text"
        },
        "created": "2018-02-10T00:00:42Z",
        "id": "00000000-0000-0000-0000-000000000000"
    },
    {
        "contents": {
            "data": "SGVsbG8gV29ybGQh",
            "type": "text"
        },
        "created": "2018-02-10T00:00:42Z",
        "id": "00000000-0000-0000-0000-000000000000"
    },
    {
        "contents": {
            "data": "SGVsbG8gV29ybGQh",
            "type": "text"
        },
        "created": "2018-02-10T00:00:42Z",
        "id": "00000000-0000-0000-0000-000000000000"
    }
]

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"
    },
    "created": "2018-02-10T00:00:42Z",
    "id": "00000000-0000-0000-0000-000000000000"
}

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": [],
    "added": {},
    "synced": []
}
{
    "undeleted": [
        "00000000-0000-0000-0000-000000000000"
    ],
    "added": {},
    "synced": []
}
{
    "undeleted": [],
    "added": {
        "0": {
            "contents": {
                "data": "SGVsbG8gV29ybGQh",
                "type": "text"
            },
            "created": "2018-02-10T00:00:42Z"
        }
    },
    "synced": []
}
{
    "undeleted": [],
    "added": {},
    "synced": [
        "00000000-0000-0000-0000-000000000000"
    ]
}
{
    "undeleted": [
        "00000000-0000-0000-0000-000000000000"
    ],
    "added": {
        "0": {
            "contents": {
                "data": "SGVsbG8gV29ybGQh",
                "type": "text"
            },
            "created": "2018-02-10T00:00:42Z"
        }
    },
    "synced": []
}

Response:

{
    "client-added": {},
    "server-deleted": [],
    "server-added": {},
    "client-deleted": []
}
{
    "client-added": {},
    "server-deleted": [
        "00000000-0000-0000-0000-000000000000"
    ],
    "server-added": {},
    "client-deleted": []
}
{
    "client-added": {},
    "server-deleted": [],
    "server-added": {},
    "client-deleted": [
        "00000000-0000-0000-0000-000000000000"
    ]
}
{
    "client-added": {},
    "server-deleted": [],
    "server-added": {
        "00000000-0000-0000-0000-000000000000": {
            "contents": {
                "data": "SGVsbG8gV29ybGQh",
                "type": "text"
            },
            "created": "2018-02-10T00:00:42Z"
        }
    },
    "client-deleted": []
}
{
    "client-added": {},
    "server-deleted": [
        "00000000-0000-0000-0000-000000000000"
    ],
    "server-added": {},
    "client-deleted": [
        "00000000-0000-0000-0000-000000000000"
    ]
}

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"
]
[
    "PermitGetAccountInfo"
]
[
    "PermitAdd"
]

GET /pricing

Response:

null
{
    "trial-period": 30,
    "plan": "plan_FiN2Zsdv0DP0kh",
    "max-items-free": 5,
    "publishable-key": "pk_test_zV5qVP1IQTjE9QYulRZpfD8C00cqGOnQ91",
    "currency": "chf",
    "price": 100
}

POST /register

Request:

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

Response: