Retrieve a task
GET /accounts/{account_id}/core/v1/tasks/{task_id}
Returns the stored Task API resource in the JSON response body.
Parameters
Name | Type | In | Required | Description |
---|---|---|---|---|
account_id |
string |
path |
True |
ID of the containing account resource
|
task_id |
string |
path |
True |
ID of the task collection to list |
Response
Status: 200, Returns the stored Task API resource in the JSON response body.
Name | Type | Required | Description |
---|---|---|---|
type |
string |
True |
Media type of the resource. Defined values are:
|
version |
string |
True |
Version of the resource. Defined values are:
|
id |
string |
True |
Globally unique identifier of the resource. Defined values are:
|
name |
string |
True |
JSON string containing a dot notation (.) hierarchical name for the task. Defined values are:
|
summary |
string |
True |
JSON string containing the short-form summary of the task. Defined values are:
|
description |
string |
True |
JSON string containing a description of the task. Defined values are:
|
service |
string |
False |
JSON string containing the name of the service that is managing the task. Defined values are:
|
parentTaskID |
string |
False |
JSON string containing a globally unique identifier of a parent task of the task. Defined values are:
|
resourceID |
string |
True |
JSON string containing a globally unique identifier of the resource associated with the task. Defined values are:
|
resourceURI |
string |
True |
JSON string containing the URI associated with the task. Defined values are:
|
resourceCollectionURI |
array[string] |
True |
JSON array of JSON strings, each indicating the fully-expanded access URL of the resource associated with the task. Defined values are:
|
state |
string |
True |
JSON string containing a value indicating the operational state of the task. Defined values are:
|
stateTransitions |
array[type_astra_stateTransitions] |
True |
JSON array of JSON objects, each representing the set of permitted state transitions from a given defined state. Each JSON object contains the fields "from" and "to", where the "from" value is the name of a state, and the "to" value is an array of permitted destination states.
|
stateDetails |
array[type_astra_stateDetails] |
True |
JSON array of JSON objects that lists additional details about the current "state". This field indicates when there are conditions or errors that prevent the actual state from matching the desired state. If no details are available, this array will be empty.
|
orderHint |
number |
False |
JSON number representing the order of subtasks. This field can be used by the client to sort subtasks from smallest to largest. |
percentDone |
number |
False |
JSON number containing the percentage complete for a running task. When the task is completed, this is set to "100". |
startTime |
string |
False |
JSON string containing the timestamp indicating when the task started. Defined values are:
|
endTime |
string |
False |
JSON string containing the timestamp indicating when the task ended. Defined values are:
|
cancelTime |
string |
False |
JSON string containing the timestamp indicating when the task was cancelled. Defined values are:
|
metadata |
True |
Client and service-specified metadata associated with the resource. Defined values are:
|
Example response
{
"type": "application/astra-task",
"version": "1.0",
"id": "b1c006b2-2ebf-5dfb-994e-e807c184ac0a",
"name": "astra.backup.prep",
"summary": "Backup preparation",
"description": "Task to prepare for the application backup",
"service": "nautilus",
"parentTaskID": "9cc8c321-6af1-406c-8158-2c6582c247f8",
"resourceID": "626a0978-d55f-4841-8b7c-dc0c0f592c6f",
"resourceURI": "/accounts/fdaa655c-15ab-4d34-aa61-1e9098e67be0/k8s/v1/apps/7c8bef49-697e-4fb4-810c-675cef4cf6c9/appSnaps/2b6dafc3-2172-4431-a482-6306b2703130",
"resourceCollectionURI": [
"/accounts/fdaa655c-15ab-4d34-aa61-1e9098e67be0/topology/v1/clouds/0df3f1a0-7203-4c12-aabf-a7bee6302671/clusters/dfd9de2d-6f0b-437b-a737-c8f7f176cd14/namespaces/f8b58091-4b9c-4c64-9b40-018dbaf7c5de/apps/f670bf11-8850-44bd-b330-815af6186a06/appSnaps/2b6dafc3-2172-4431-a482-6306b2703130",
"/accounts/fdaa655c-15ab-4d34-aa61-1e9098e67be0/topology/v1/clouds/0df3f1a0-7203-4c12-aabf-a7bee6302671/clusters/dfd9de2d-6f0b-437b-a737-c8f7f176cd14/namespaces/923708f8-0435-45b5-8c00-fbdef3ffaf25/apps/f670bf11-8850-44bd-b330-815af6186a06/appSnaps/2b6dafc3-2172-4431-a482-6306b2703130"
],
"state": "running",
"stateTransitions": [
{
"from": "running",
"to": [
"paused",
"cancelled"
]
},
{
"from": "paused",
"to": [
"running",
"cancelled"
]
}
],
"stateDetails": [],
"orderHint": 0,
"percentDone": 20.25,
"startTime": "2020-08-06T12:24:52.256624Z",
"endTime": "2020-08-06T12:26:52.256624Z",
"metadata": {
"labels": [],
"creationTimestamp": "2022-10-06T20:58:16.305662Z",
"modificationTimestamp": "2022-10-06T20:58:16.305662Z",
"createdBy": "8f84cf09-8036-51e4-b579-bd30cb07b269"
}
}
Response
Status: 401, Unauthorized
Name | Type | Required | Description |
---|---|---|---|
type |
string |
True |
|
title |
string |
True |
|
detail |
string |
False |
|
status |
string |
True |
|
correlationID |
string |
False |
Example response
{
"type": "https://astra.netapp.io/problems/3",
"title": "Missing bearer token",
"detail": "The request is missing the required bearer token.",
"status": "401"
}
Response
Status: 400, Bad request
Name | Type | Required | Description |
---|---|---|---|
type |
string |
True |
|
title |
string |
True |
|
detail |
string |
False |
|
status |
string |
True |
|
correlationID |
string |
False |
|
invalidParams |
array[invalidParams] |
False |
List of invalid query parameters |
Example response
{
"type": "https://astra.netapp.io/problems/5",
"title": "Invalid query parameters",
"detail": "The supplied query parameters are invalid.",
"status": "400"
}
Response
Status: 403, Forbidden
Name | Type | Required | Description |
---|---|---|---|
type |
string |
True |
|
title |
string |
True |
|
detail |
string |
False |
|
status |
string |
True |
|
correlationID |
string |
False |
Example response
{
"type": "https://astra.netapp.io/problems/11",
"title": "Operation not permitted",
"detail": "The requested operation isn't permitted.",
"status": "403"
}
Error
Status: 404, Not found
Name | Type | Required | Description |
---|---|---|---|
type |
string |
True |
|
title |
string |
True |
|
detail |
string |
False |
|
status |
string |
True |
|
correlationID |
string |
False |
Example error response
{
"type": "https://astra.netapp.io/problems/1",
"title": "Resource not found",
"detail": "The resource specified in the request URI wasn't found.",
"status": "404"
}
Definitions
See Definitions
type_astra_stateTransitions
Name | Type | Required | Description |
---|---|---|---|
from |
string |
True |
|
to |
array[string] |
True |
type_astra_stateDetails
Name | Type | Required | Description |
---|---|---|---|
type |
string |
True |
|
title |
string |
True |
|
detail |
string |
True |
type_astra_label
Name | Type | Required | Description |
---|---|---|---|
name |
string |
True |
|
value |
string |
True |
type_astra_metadata_update
Client and service-specified metadata associated with the resource. Defined values are:
-
Conforms to the Astra Metadata Schema If not specified on update, the metadata object's labels, creationTimestamp and createdBy, will be preserved without modification.
Name | Type | Required | Description |
---|---|---|---|
labels |
array[type_astra_label] |
False |
|
creationTimestamp |
string |
False |
|
modificationTimestamp |
string |
False |
|
createdBy |
string |
False |
|
modifiedBy |
string |
False |
invalidParams
Name | Type | Required | Description |
---|---|---|---|
name |
string |
True |
Name of the invalid query parameter |
reason |
string |
True |
Reason why the query parameter is invalid |