diff --git a/index.html b/index.html index 72167e4dc..14fdba66d 100644 --- a/index.html +++ b/index.html @@ -258,6 +258,26 @@
All PUT and POST requests should set Content-Type: application/vnd.api+json; version=1
or Content-Type: application/json
. You will receive a 415 Unsupported Media Type
without one of those two headers.
All PUT and DELETE requests should set the If-Match
header to the value of the ETag
header of the request where the resource was originally retrieved. You will receive a 428 Precondition Required
without the header and a 412 Precondition Failed
if the etags do not match.
{
+ "aggregations": [
+ {
+ "id": "1",
+ "href": "/aggregations/1",
+ "created_at": "2024-05-22T22:52:59.173Z",
+ "updated_at": "2024-05-22T22:52:59.181Z",
+ "uuid": "557ebcfa3c29496787336bfbd7c4d856",
+ "task_id": "9c963646-e7cd-4c5a-8749-c97086d416bd",
+ "status": "completed",
+ "links": {
+ "workflow": "2",
+ "user": "2"
+ }
+ }
+ ],
+ "links": {
+ "aggregations.workflow": {
+ "href": "/workflows/{aggregations.workflow}",
+ "type": "workflows"
+ },
+ "aggregations.user": {
+ "href": "/users/{aggregations.user}",
+ "type": "users"
+ }
+ }
+}
+
A single Aggregation resource object. This represents the automated aggregation by the external service by a user of a single workflow via the online Aggregation service.
+ +An Aggregation has the following attributes:
+ +Attribute | +Type | +Description | +
---|---|---|
id | +integer | +read-only | +
workflow_id | +integer | +read-only | +
project_id | +integer | +read-only | +
created_at | +string | +read-only | +
updated_at | +string | +read-only | +
user_id | +integer | +read-only | +
uuid | +string | +The unique identifier of the aggregation run, used in the URLs of output files | +
task_id | +string | +The Celery task ID, used to query the status of the backgrounded task on the aggregation service | +
status | +integer | +created, pending, completed, failed | +
GET /api/aggregations HTTP/1.1
+Accept: application/vnd.api+json; version=1
+Content-Type: application/json
+
Only lists aggregations where the active user has has edit permissions on the related project.
+ +Any of the scopes may be further filtered using the project_id, workflow_id +and user_id parameters.
+GET /api/aggregations/123 HTTP/1.1
+Accept: application/vnd.api+json; version=1
+Content-Type: application/json
+
A User may only retrieve Aggregations they have permission to access.
+id
(required, integer) ... integer id of the resource to retrievePOST /api/aggregations HTTP/1.1
+Accept: application/vnd.api+json; version=1
+Content-Type: application/json
+
+{
+ "aggregations": {
+ "links": {
+ "user": "3",
+ "workflow": "2"
+ }
+ }
+}
+
Creating a new Aggregation will initiate a new batch aggregation run. +A call out to the Aggregation Service is made and the newly created Aggregation resource +is updated with the Aggregation Service's Celery background task ID so that its status can be checked.
+PUT /api/aggregations/123 HTTP/1.1
+Accept: application/vnd.api+json; version=1
+Content-Type: application/json
+
+{
+ "aggregations": {
+ "uuid": "557ebcfa3c29496787336bfbd7c4d856",
+ "status": "completed"
+ }
+}
+
Aggregations are updated by the Aggregation Service when a run has succeeded or failed. A successful run +will send a request to this endpoint and update the UUID generated by that run. This UUID is a 32-character +lowercase hexadecimal string and can be used to construct the URL to download that run's output data.
+ +The status can also be updated via this route (see the aggregations model) and can be the only attribute included.
+DELETE /api/Aggregations/123 HTTP/1.1
+Accept: application/vnd.api+json; version=1
+Content-Type: application/json
+
A user may destroy an Aggregation by ID if they have destroy permissions for the parent project.
{
"classifications": [{
"id": 1001,