Sodarcache REST API Documentation
This document contains the HTTP REST API documentation for the sodarcache
app. For general information on REST API usage in SODAR Core, see
REST API Overview.
Sodarcache REST API Versioning
- Media Type
application/vnd.bihealth.sodar-core.sodarcache+json
- Current Version
2.0
- Accepted Versions
2.0
- Header Example
Accept: application/vnd.bihealth.sodar-core.sodarcache+json; version=x.y
Sodarcache REST API Views
- class sodarcache.views_api.CacheItemRetrieveAPIView(**kwargs)[source]
Retrieve a cache item along with its data. Returns 404 if cache item is not set.
URL:
/cache/api/retrieve/{Project.sodar_uuid}/{app_name}/{item_name}
Methods:
GET
Returns:
project
: Project UUID (string)app_name
: Name of app to which the item belongs (string)name
: Item name (string)data
: Item data (JSON)date_modified
: Item modification datetime (YYYY-MM-DDThh:mm:ssZ)user
: UUID of user who created the item (string)
Version Changes:
2.0
: Returnuser
as UUID instead ofSODARUserSerializer
dict
- class sodarcache.views_api.CacheItemDateRetrieveAPIView(**kwargs)[source]
Retrieve timestamp of the last update to a cache item. Returns 404 if cache item is not set.
URL:
/cache/api/retrieve/date/{Project.sodar_uuid}/{app_name}/{item_name}
Methods:
GET
Returns:
update_time
: Update timestamp in seconds since epoch (integer)
- class sodarcache.views_api.CacheItemSetAPIView(**kwargs)[source]
Create or update a cache item. Replaces an existing item with the same project, app name and item name if previously set. Returns 200 on both a successful creation and update.
URL:
/cache/api/set/{Project.sodar_uuid}/{app_name}/{item_name}
Methods:
POST
Parameters:
data
: Full item data to be set (JSON)
Sodarcache REST API Version Changes
v2.0
CacheItemRetrieveAPIView
Return
user
as UUID instead ofSODARUserSerializer
dict