Skip to main content
A newer release of this product is available.

List all tasks

Contributors

GET /accounts/{account_id}/core/v1/tasks

Returns a JSON array of all matching resources in the collection. If individual fields are specified in the request, the items JSON array will contain the fields requested for each matching resource in the order specified.

Parameters

Name Type In Required Description

account_id

string

path

True

ID of the containing account resource

  • example: {{.Account}}

include

string

query

False

Indicates which fields should be returned when listing a collection.

URL examples: "include=id", "include=id,name"

OpenAPI examples: "id"

limit

string

query

False

Indicates the maximum number of resources to return when listing a collection.

URL examples: "limit=2"

OpenAPI examples: "2"

filter

string

query

False

Indicates which fields should be matched in order to return a resource when listing a collection.

Supported operators are:

  • eq - Equality

  • lt/gt - Less than/Greater than

  • lte/gte - Less than or equals to/Greater than or equals to

URL example: "filter=field%20eq%20%27value%27"

OpenAPI examples: "field eq 'value'"

Response

Status: 200, Returns a JSON array of all matching resources in the collection. If individual fields are specified in the request, the items JSON array will contain the fields requested for each matching resource in the order specified.
Name Type Required Description

items

array[Any of: task_1.1_get_response_body, array[]]

True

metadata

type_astra_metadata_list

True

Example response
{
  "type": "application/astra-tasks",
  "version": "1.1",
  "items": [
    {
      "type": "application/astra-task",
      "version": "1.0",
      "id": "ae1e6561-9e22-406c-8a5a-762f4604da00",
      "name": "astra.backup.prep",
      "summary": "Backup preparation",
      "description": "Task to prepare for the application backup",
      "service": "nautilus",
      "parentTaskID": "9cc8c321-6af1-406c-8158-2c6582c247f8",
      "userID": "abda967f-cd2c-4237-908e-99266648c553",
      "resourceID": "626a0978-d55f-4841-8b7c-dc0c0f592c6f",
      "resourceURI": "/accounts/fdaa655c-15ab-4d34-aa61-1e9098e67be0/k8s/v1/apps/7c8bef49-697e-4fb4-810c-675cef4cf6c9/appSnaps/5cb608f9-571b-492e-a520-5bfb900a9b9c",
      "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/5cb608f9-571b-492e-a520-5bfb900a9b9c",
        "/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/5cb608f9-571b-492e-a520-5bfb900a9b9c"
      ],
      "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",
      "metadata": {
        "labels": [],
        "creationTimestamp": "2020-08-06T12:24:52.256624Z",
        "modificationTimestamp": "2020-08-06T12:24:52.256624Z",
        "createdBy": "00000000-0000-0000-0000-000000000000"
      }
    },
    {
      "type": "application/astra-task",
      "version": "1.0",
      "id": "bc1e6561-9e22-406c-8a5a-762f4604da00",
      "name": "astra.backup",
      "summary": "Backup",
      "description": "Task to take a Backup for an application",
      "service": "nautilus",
      "userID": "abda967f-cd2c-4237-908e-99266648c553",
      "resourceID": "736a0978-d55f-4841-8b7c-dc0c0f592c6f",
      "resourceURI": "/accounts/fdaa655c-15ab-4d34-aa61-1e9098e67be0/k8s/v1/apps/7c8bef49-697e-4fb4-810c-675cef4cf6c9/appBackups/736a0978-d55f-4841-8b7c-dc0c0f592c6f",
      "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/appBackups/736a0978-d55f-4841-8b7c-dc0c0f592c6f",
        "/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/appBackups/736a0978-d55f-4841-8b7c-dc0c0f592c6f"
      ],
      "state": "completed",
      "stateTransitions": [
        {
          "from": "running",
          "to": [
            "paused",
            "cancelled"
          ]
        },
        {
          "from": "paused",
          "to": [
            "running",
            "cancelled"
          ]
        }
      ],
      "stateDetails": [],
      "orderHint": 0,
      "percentDone": 100,
      "startTime": "2020-08-06T12:24:52.256624Z",
      "endTime": "2020-08-06T12:26:52.256624Z",
      "metadata": {
        "labels": [],
        "creationTimestamp": "2020-08-06T12:24:52.256624Z",
        "modificationTimestamp": "2020-08-06T12:24:52.256624Z",
        "createdBy": "00000000-0000-0000-0000-000000000000"
      }
    }
  ],
  "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

True

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

True

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

True

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

True

status

string

True

correlationID

string

False

Example error response
{
  "type": "https://astra.netapp.io/problems/2",
  "title": "Collection not found",
  "detail": "The collection specified in the request URI wasn't found.",
  "status": "404"
}

Definitions

See Definitions

type_astra_stateTransition

Name Type Required Description

from

string

True

to

array[string]

True

type_astra_stateDetail

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

Client and service-specified metadata associated with the resource. Defined values are:

  • Conforms to the Astra Metadata Schema

Name Type Required Description

labels

array[type_astra_label]

True

creationTimestamp

string

True

modificationTimestamp

string

True

createdBy

string

True

modifiedBy

string

False

task_1.1_get_response_body

Name Type Required Description

type

string

True

Media type of the resource. Defined values are:

  • "application/astra-task"

version

string

True

Version of the resource. Defined values are:

  • "1.0"

  • "1.1"

id

string

True

Globally unique identifier of the resource. Defined values are:

  • Conforms to the UUIDv4 Schema

name

string

True

JSON string containing a dot notation (.) hierarchical name for the task. Defined values are:

  • Minimum length: 3

  • Maximum length: 127

  • Defined regex is: "^[a-z])(\.([a-z])+$"

summary

string

True

JSON string containing the short-form summary of the task. Defined values are:

  • Minimum length: 3

  • Maximum length: 63

description

string

True

JSON string containing a description of the task. Defined values are:

  • Minimum length: 1

  • Maximum length: 511

service

string

False

JSON string containing the name of the service that is managing the task. Defined values are:

  • Minimum length: 1

  • Maximum length: 31

parentTaskID

string

False

JSON string containing a globally unique identifier of a parent task of the task. Defined values are:

  • Conforms to the Astra Identifier Schema

userID

string

False

JSON string containing the user ID associated with a task. Only included for tasks associated with user-initiated actions. Defined values are:

  • Conforms to the Astra Identifier Schema

resourceID

string

True

JSON string containing a globally unique identifier of the resource associated with the task. Defined values are:

  • Conforms to the Astra Identifier Schema

resourceURI

string

True

JSON string containing the URI associated with the task. Defined values are:

  • Minimum length: 3

  • Maximum length: 4095

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:

  • Minimum length: 3

  • Maximum length: 4095

state

string

True

JSON string containing a value indicating the operational state of the task. Defined values are:

  • "notStarted" - The task has not started executing.

  • "running" - The task is running.

  • "completed" - The task has completed.

  • "pausing" - The task was requested to pause.

  • "paused" - The task is paused.

  • "cancelling" - The task was requested to cancel.

  • "cancelled" - The task is cancelled.

  • "failed" - The task has failed.

  • Minimum length: 1

  • Maximum length: 31

stateTransitions

array[type_astra_stateTransition]

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.

  • Minimum length: 1

  • Maximum length: 31 For example: "stateTransitions" : [ { "from": "running", "to": ["paused", "cancelled"] }, { "from": "paused", "to": ["running", "cancelled"] }, ]

stateDetails

array[type_astra_stateDetail]

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.

  • Minimum Items: 0

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:

  • Conforms to the ISO-8601 Date Time Schema

endTime

string

False

JSON string containing the timestamp indicating when the task ended. Defined values are:

  • Conforms to the ISO-8601 Date Time Schema

cancelTime

string

False

JSON string containing the timestamp indicating when the task was cancelled. Defined values are:

  • Conforms to the ISO-8601 Date Time Schema

metadata

type_astra_metadata

True

Client and service-specified metadata associated with the resource. Defined values are:

  • Conforms to the Astra Metadata Schema

type_astra_metadata_list

Name Type Required Description

continue

string

False

count

number

False

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