API Docs

Each free account allows you to have a total of 100 database objects. Deleted items do not count towards your total. If you would like more, just contact us.

Authentication #

Authentication uses token/bearer auth. To generage a new API token, simply log into the web app and create a new key in the API Keys section. Then send it in your request headers in the form:

Authorization: Bearer YOUR_API_KEY

GET /api/v1/probe #

Test route. Get the current server time as Unix epoch (or Unix time or POSIX time or Unix timestamp). Epoch is the number of seconds that have elapsed since January 1, 1970.

Endpoint URL

https://crudapi.co.uk/api/v1/probe

Example request

curl -X GET https://crudapi.co.uk/api/v1/probe -H "Content-Type: application/json" -H "Authorization: Bearer YOUR_API_KEY"

Example response

                    Status: 200 OK
                
                    {
                        "time":1636111123.355878
                    }
                

Response fields

Name Type Description
time number Server time in UTC. Epoch in seconds.

POST /api/v1/{data_type} #

Create new data objects with a specific {data_type}. {data_type} can be anything you wish (except probe). Data objects are always sent as a list of objects.

Endpoint URL

https://crudapi.co.uk/api/v1/{data_type}

Example request

curl -X POST https://crudapi.co.uk/api/v1/task -H "Content-Type: application/json" -H "Authorization: Bearer YOUR_API_KEY" -d '[{"title": "My first task", "completed": false}]'

Example response

                    Status: 201 OK
                
                    {
                        "items": [
                            {
                                "_created": 1636112613.207888,
                                "_data_type": "task",
                                "_is_deleted": false,
                                "_modified": 1636112613.207898,
                                "_self_link": "https://crudapi.co.uk/api/v1/task/c54ff081-f858-4e5b-8041-4c22f153c926",
                                "_user": "baeb6fd4-f196-485f-9130-d5455ad16074",
                                "_uuid": "c54ff081-f858-4e5b-8041-4c22f153c926",
                                "completed": false,
                                "title": "My first task"
                            }
                        ]
                    }
                

Note: all server fields begin with _ and are not user editable. They can be modified by the server.

If you reach your allowance you will receive the following and a 413 status code. Request an allowance increase or delete some objects.

                    {
                        "allowance": 100,
                        "error": "data limit reached",
                        "items": 100
                    }
                

Response fields

Name Type Description
_created number Epoch in seconds the object was created (UTC).
_data_type string Data type specified when creating the object.
_is_deleted boolean Server side flag.
_modified number Epoch in seconds the object was last modified (UTC).
_self_link string URL for this object. You can use this to update and delete the object.
_user string Your unique user UUID (Universally Unique ID).
_uuid string Data objects UUID (Universally Unique ID).
completed boolean User specified data field sent to the server.
title string User specified data field sent to the server.

GET /api/v1/{data_type} #

Get all data objects with a specific {data_type}. Data objects are retruned as a list.

Endpoint URL

https://crudapi.co.uk/api/v1/{data_type}

Example request

curl -X GET https://crudapi.co.uk/api/v1/task -H "Content-Type: application/json" -H "Authorization: Bearer YOUR_API_KEY"'

Parameters

Name Type In Description
cursor string query Optional pagination cursor.

Example response

                    Status: 200 OK
                
                    {
                        "cursor": null,
                        "items":[
                            {
                                "_created": 1636112613.207888,
                                "_data_type": "task",
                                "_is_deleted": false,
                                "_modified": 1636112613.207898,
                                "_self_link": "https://crudapi.co.uk/api/v1/task/c54ff081-f858-4e5b-8041-4c22f153c926",
                                "_user": "baeb6fd4-f196-485f-9130-d5455ad16074",
                                "_uuid": "c54ff081-f858-4e5b-8041-4c22f153c926",
                                "completed": false,
                                "title": "My first task"
                            }
                        ],
                        "next_page": null
                    }
                    
                

Note: all server fields begin with _ and are not user editable. They can be modified by the server.

Response fields

Name Type Description
cursor string or null Pagination cursor. Get items returns a maximum of 100 items. If there are more than 100 items a cursor string will be added. This can be used to retrieve more items.
next_page string or null Convenience parameter for fetching the next page of data. Null is no more items to fetch.
_created number Epoch in seconds the object was created (UTC).
_data_type string Data type specified when creating the object.
_is_deleted boolean Server side flag.
_modified number Epoch in seconds the object was last modified (UTC).
_self_link string URL for this object. You can use this to update and delete the object.
_user string Your unique user UUID (Universally Unique ID).
_uuid string Data objects UUID (Universally Unique ID).
completed boolean User specified data field sent to the server.
title string User specified data field sent to the server.

PUT /api/v1/{data_type} #

Update data objects. Data objects are always sent as a list of objects. Only the _uuid and data fields you wish to update are required, however you can send all data fields if you wish.

Endpoint URL

https://crudapi.co.uk/api/v1/{data_type}

Example request

curl -X PUT https://crudapi.co.uk/api/v1/task -H "Content-Type: application/json" -H "Authorization: Bearer YOUR_API_KEY" -d '[{"_uuid": "c54ff081-f858-4e5b-8041-4c22f153c926", "completed": true}]'

Example response

                    Status: 200 OK
                
                    {
                        "items": [
                            {
                                "_created": 1636112613.207888,
                                "_data_type": "task",
                                "_is_deleted": false,
                                "_modified": 1636116434.934499,
                                "_self_link": "https://crudapi.co.uk/api/v1/task/c54ff081-f858-4e5b-8041-4c22f153c926",
                                "_user": "baeb6fd4-f196-485f-9130-d5455ad16074",
                                "_uuid": "c54ff081-f858-4e5b-8041-4c22f153c926",
                                "completed": true,
                                "title": "My first task"
                            }
                        ]
                    }
                

Note: all server fields begin with _ and are not user editable. They can be modified by the server.

Response fields

Name Type Description
_created number Epoch in seconds the object was created (UTC).
_data_type string Data type specified when creating the object.
_is_deleted boolean Server side flag.
_modified number Epoch in seconds the object was last modified (UTC).
_self_link string URL for this object. You can use this to update and delete the object.
_user string Your unique user UUID (Universally Unique ID).
_uuid string Data objects UUID (Universally Unique ID).
completed boolean User specified data field sent to the server.
title string User specified data field sent to the server.

DELETE /api/v1/{data_type} #

Delete data objects. Data objects are always sent as a list of objects. Only the _uuid is required, however you can send the entire data object if you wish.

Endpoint URL

https://crudapi.co.uk/api/v1/{data_type}

Example request

curl -X DELETE https://crudapi.co.uk/api/v1/task -H "Content-Type: application/json" -H "Authorization: Bearer YOUR_API_KEY" -d '[{"_uuid": "c54ff081-f858-4e5b-8041-4c22f153c926"}]'

Example response

                    Status: 200 OK
                
                    {
                        "items": [
                            {
                                "_created":1636112613.207888,
                                "_data_type":"task",
                                "_is_deleted":true,
                                "_modified":1636116434.934499,
                                "_self_link":"https://crudapi.co.uk/api/v1/task/c54ff081-f858-4e5b-8041-4c22f153c926",
                                "_user":"baeb6fd4-f196-485f-9130-d5455ad16074",
                                "_uuid":"c54ff081-f858-4e5b-8041-4c22f153c926",
                                "completed":true,
                                "title":"My edited task"
                            }
                        ]
                    }
                

Note: all server fields begin with _ and are not user editable. They can be modified by the server.

Response fields

Name Type Description
_created number Epoch in seconds the object was created (UTC).
_data_type string Data type specified when creating the object.
_is_deleted boolean Server side flag.
_modified number Epoch in seconds the object was last modified (UTC).
_self_link string URL for this object. You can use this to update and delete the object.
_user string Your unique user UUID (Universally Unique ID).
_uuid string Data objects UUID (Universally Unique ID).
completed boolean User specified data field sent to the server.
title string User specified data field sent to the server.

GET /api/v1/{data_type}/{uuid} #

Get a specific data object by {data_type} and {uuid}. After creating an object, this is the objects _self_link. The data object is returned as a single JSON object.

Endpoint URL

https://crudapi.co.uk/api/v1/{data_type}/{uuid}

Example request

curl -X GET https://crudapi.co.uk/api/v1/task/c54ff081-f858-4e5b-8041-4c22f153c926 -H "Content-Type: application/json" -H "Authorization: Bearer YOUR_API_KEY"

Example response

                    Status: 200 OK
                
                    {
                        "_created": 1636112613.207888,
                        "_data_type": "task",
                        "_is_deleted": false,
                        "_modified": 1636116434.934499,
                        "_self_link": "https://crudapi.co.uk/api/v1/task/c54ff081-f858-4e5b-8041-4c22f153c926",
                        "_user": "baeb6fd4-f196-485f-9130-d5455ad16074",
                        "_uuid": "c54ff081-f858-4e5b-8041-4c22f153c926",
                        "completed": true,
                        "title": "My first task"
                    }
                

Note: all server fields begin with _ and are not user editable. They can be modified by the server.

Response fields

Name Type Description
_created number Epoch in seconds the object was created (UTC).
_data_type string Data type specified when creating the object.
_is_deleted boolean Server side flag.
_modified number Epoch in seconds the object was last modified (UTC).
_self_link string URL for this object. You can use this to update and delete the object.
_user string Your unique user UUID (Universally Unique ID).
_uuid string Data objects UUID (Universally Unique ID).
completed boolean User specified data field sent to the server.
title string User specified data field sent to the server.

PUT /api/v1/{data_type}/{uuid} #

Update a specific data object by {data_type} and {uuid}. After creating an object, this is the objects _self_link. The data object is sent and returned as a single JSON object.

Endpoint URL

https://crudapi.co.uk/api/v1/{data_type}/{uuid}

Example request

curl -X PUT https://crudapi.co.uk/api/v1/task/c54ff081-f858-4e5b-8041-4c22f153c926 -H "Content-Type: application/json" -H "Authorization: Bearer YOUR_API_KEY" -d '{"title": "My edited task"}'

Example response

                    Status: 200 OK
                
                    {
                        "_created": 1636112613.207888,
                        "_data_type": "task",
                        "_is_deleted": false,
                        "_modified": 1636116434.934499,
                        "_self_link": "https://crudapi.co.uk/api/v1/task/c54ff081-f858-4e5b-8041-4c22f153c926",
                        "_user": "baeb6fd4-f196-485f-9130-d5455ad16074",
                        "_uuid": "c54ff081-f858-4e5b-8041-4c22f153c926",
                        "completed": true,
                        "title": "My edited task"
                    }
                

Note: all server fields begin with _ and are not user editable. They can be modified by the server.

Response fields

Name Type Description
_created number Epoch in seconds the object was created (UTC).
_data_type string Data type specified when creating the object.
_is_deleted boolean Server side flag.
_modified number Epoch in seconds the object was last modified (UTC).
_self_link string URL for this object. You can use this to update and delete the object.
_user string Your unique user UUID (Universally Unique ID).
_uuid string Data objects UUID (Universally Unique ID).
completed boolean User specified data field sent to the server.
title string User specified data field sent to the server.

DELETE /api/v1/{data_type}/{uuid} #

Delete a specific data object by {data_type} and {uuid}. After creating an object, this is the objects _self_link. The data object is returned as a single JSON object.

Endpoint URL

https://crudapi.co.uk/api/v1/{data_type}

Example request

curl -X DELETE https://crudapi.co.uk/api/v1/task/c54ff081-f858-4e5b-8041-4c22f153c926 -H "Content-Type: application/json" -H "Authorization: Bearer YOUR_API_KEY"

Example response

                    Status: 200 OK
                
                    {
                        "_created": 1636112613.207888,
                        "_data_type": "task",
                        "_is_deleted": true,
                        "_modified": 1636116434.934499,
                        "_self_link": "https://crudapi.co.uk/api/v1/task/c54ff081-f858-4e5b-8041-4c22f153c926",
                        "_user": "baeb6fd4-f196-485f-9130-d5455ad16074",
                        "_uuid": "c54ff081-f858-4e5b-8041-4c22f153c926",
                        "completed": true,
                        "title": "My edited task"
                    }
                

Note: all server fields begin with _ and are not user editable. They can be modified by the server. Once deleted an object cannot be recovered.

Response fields

Name Type Description
_created number Epoch in seconds the object was created (UTC).
_data_type string Data type specified when creating the object.
_is_deleted boolean Server side flag.
_modified number Epoch in seconds the object was last modified (UTC).
_self_link string URL for this object. You can use this to update and delete the object.
_user string Your unique user UUID (Universally Unique ID).
_uuid string Data objects UUID (Universally Unique ID).
completed boolean User specified data field sent to the server.
title string User specified data field sent to the server.

“Everything should be made as simple as possible, but not simpler.” - Albert Einstein