Skip to main content

List the AppMirror resources for an app

Contributors

GET /accounts/{account_id}/k8s/v1/apps/{app_id}/appMirrors

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}}

app_id

string

path

True

ID of the containing app resource

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: appMirror_1.1_get_response_body, array[]]

True

metadata

type_astra_metadata_list

True

Example response
{
  "type": "application/astra-appMirrors",
  "version": "1.1",
  "items": [
    {
      "type": "application/astra-appMirror",
      "version": "1.1",
      "id": "f1c98c2e-6391-42d3-8b21-3e75dac048a3",
      "sourceAppID": "efd639b6-fc92-4112-8841-0c0ab7890ae0",
      "sourceClusterID": "5789e026-c2e2-41e9-ab00-9766bcfa8951",
      "destinationAppID": "cd7b6d91-fc19-4983-a754-9a7bb4d80a7b",
      "destinationClusterID": "c5d023a9-4061-4a8a-bfbf-3be11ff06226",
      "namespaceMapping": [
        {
          "clusterID": "5789e026-c2e2-41e9-ab00-9766bcfa8951",
          "namespaces": [
            "ns1-src",
            "ns2-src"
          ]
        },
        {
          "clusterID": "c5d023a9-4061-4a8a-bfbf-3be11ff06226",
          "namespaces": [
            "ns1-dest",
            "ns2-dest"
          ]
        }
      ],
      "state": "established",
      "stateTransitions": [
        {
          "from": "establishing",
          "to": [
            "established",
            "deleting"
          ]
        },
        {
          "from": "established",
          "to": [
            "failingOver",
            "deleting"
          ]
        },
        {
          "from": "failingOver",
          "to": [
            "failedOver",
            "deleting"
          ]
        },
        {
          "from": "failedOver",
          "to": [
            "establishing",
            "deleting"
          ]
        },
        {
          "from": "deleting",
          "to": [
            "deleted"
          ]
        }
      ],
      "stateDesired": "established",
      "stateAllowed": [
        "failedOver",
        "deleted"
      ],
      "stateDetails": [
        {
          "type": "https://astra.netapp.io/stateDetails/1",
          "title": "AppMirror relationship established",
          "detail": "The AppMirror relationship has been successfully established."
        }
      ],
      "healthState": "normal",
      "healthStateTransitions": [
        {
          "from": "indeterminate",
          "to": [
            "normal",
            "warning",
            "critical"
          ]
        },
        {
          "from": "normal",
          "to": [
            "indeterminate",
            "warning",
            "critical"
          ]
        },
        {
          "from": "warning",
          "to": [
            "indeterminate",
            "normal",
            "critical"
          ]
        },
        {
          "from": "critical",
          "to": [
            "indeterminate",
            "normal",
            "warning"
          ]
        }
      ],
      "healthStateDetails": [
        {
          "type": "https://astra.netapp.io/stateDetails/2",
          "title": "SnapMirror syncing successfully",
          "detail": "All SnapMirror relationships are synchronizing as expected."
        }
      ],
      "metadata": {
        "labels": [],
        "creationTimestamp": "2020-08-06T12:24:52.256624Z",
        "modificationTimestamp": "2020-08-06T12:24:52.256624Z",
        "createdBy": "11c0cfa1-4f27-4ef7-a21c-cb452fc5c9aa"
      }
    },
    {
      "type": "application/astra-appMirror",
      "version": "1.1",
      "id": "114633f0-5b59-4bd7-adce-a9ba4423a1bd",
      "sourceAppID": "eaf8b854-211d-460a-ac18-d093d8e2ac70",
      "sourceClusterID": "fcb27b51-ebb7-40ca-b8f1-1d23ebd06889",
      "destinationAppID": "e829c5e0-750f-44ad-a684-aee85be2c2bb",
      "destinationClusterID": "fcb27b51-ebb7-40ca-b8f1-1d23ebd06889",
      "namespaceMapping": [
        {
          "clusterID": "fcb27b51-ebb7-40ca-b8f1-1d23ebd06889",
          "namespaces": [
            "app-namespace"
          ],
          "role": "source"
        },
        {
          "clusterID": "fcb27b51-ebb7-40ca-b8f1-1d23ebd06889",
          "namespaces": [
            "destination-app-namespace"
          ],
          "role": "destination"
        }
      ],
      "storageClasses": [
        {
          "storageClassName": "destination-sc",
          "clusterID": "fcb27b51-ebb7-40ca-b8f1-1d23ebd06889",
          "role": "destination"
        }
      ],
      "state": "established",
      "stateTransitions": [
        {
          "from": "establishing",
          "to": [
            "established",
            "deleting"
          ]
        },
        {
          "from": "established",
          "to": [
            "failingOver",
            "deleting"
          ]
        },
        {
          "from": "failingOver",
          "to": [
            "failedOver",
            "deleting"
          ]
        },
        {
          "from": "failedOver",
          "to": [
            "establishing",
            "deleting"
          ]
        }
      ],
      "stateDesired": "established",
      "stateAllowed": [
        "failedOver",
        "deleted"
      ],
      "stateDetails": [],
      "transferState": "idle",
      "transferStateTransitions": [
        {
          "from": "transferring",
          "to": [
            "idle"
          ]
        },
        {
          "from": "idle",
          "to": [
            "transferring"
          ]
        }
      ],
      "transferStateDetails": [
        {
          "type": "https://astra.netapp.io/stateDetails/24",
          "title": "Snapshot replication completed",
          "detail": "A snapshot was replicated to the destination.",
          "additionalDetails": {
            "completionTime": "2023-07-06T22:46:39Z",
            "snapshotID": "ae60820d-e963-4eab-8bb3-9159e9f012f0",
            "startTime": "2023-07-06T22:46:08Z"
          }
        }
      ],
      "healthState": "normal",
      "healthStateTransitions": [],
      "healthStateDetails": [
        {
          "type": "https://astra.netapp.io/stateDetails/24",
          "title": "Snapshot replication completed",
          "detail": "A snapshot was replicated to the destination.",
          "additionalDetails": {
            "completionTime": "2023-07-06T22:46:39Z",
            "snapshotID": "ae60820d-e963-4eab-8bb3-9159e9f012f0",
            "startTime": "2023-07-06T22:46:08Z"
          }
        }
      ],
      "metadata": {
        "labels": [],
        "creationTimestamp": "2023-07-06T22:45:24Z",
        "modificationTimestamp": "2023-07-06T22:45:24Z",
        "createdBy": "cc420827-f968-4da7-9e72-df8a0fd52f94"
      }
    }
  ],
  "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

namespaceMapping

Name Type Required Description

clusterID

string

False

Identifier of the cluster for which the namespaces are specified. Defined values are:

  • Conforms to the Astra Identifier Schema

namespaces

array[string]

False

List of namespaces to use on the cluster. Correlated with the other cluster namespace list by index. Defined values are:

  • Minimum length: 1

  • Maximum length: 63

  • Conforms to the DNS 1123 Label Schema

role

string

False

The initial role for this namespace definition. This parameter is optional except for when a same-cluster replication configuration is used. Defined values are:

  • "source"

  • "destination"

storageClasses

Name Type Required Description

clusterID

string

False

Identifier of the cluster for which the storage class is specified. Defined values are:

  • Conforms to the Astra Identifier Schema

storageClassName

string

False

Name of the storage class to use when creating PVCs on the cluster specified in "clusterID". Defined values are:

  • Minimum length: 1

  • Maximum length: 255

role

string

False

The initial role for this storage class definition. This parameter is optional except for when a same-cluster replication configuration is used. Defined values are:

  • "source"

  • "destination"

type_astra_stateTransition

Name Type Required Description

from

string

True

to

array[string]

True

additionalDetails

type_astra_stateDetail

Name Type Required Description

type

string

True

title

string

True

detail

string

True

additionalDetails

additionalDetails

False

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 create, a metadata object will be created with no labels. 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

appMirror_1.1_get_response_body

Name Type Required Description

type

string

True

Media type of the resource. Defined values are:

  • "application/astra-appMirror"

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

sourceAppID

string

True

Identifier of the source application. Only updated when swapping the sourceAppID with the destinationAppID. Defined values are:

  • Conforms to the Astra Identifier Schema

sourceClusterID

string

True

Identifier of the managed cluster hosting the source application. This field is read-only and is determined based on the host cluster of the source application. If provided in an update, it must match the cluster ID of the source application, so it can only change when swapping the sourceAppID with destinationAppID. Defined values are:

  • Conforms to the Astra Identifier Schema

destinationAppID

string

False

Identifier of the destination application. Cannot be provided on create because a new app ID will be generated as part of relationship initialization. Can only be updated when swapping sourceAppID with the destinationAppID. Defined values are:

  • Conforms to the Astra Identifier Schema

destinationClusterID

string

True

Identifier of the managed cluster to host the destination application. Must be provided on create because it determines what cluster the destination application will be created on. If provided on update, it must match the cluster ID of the destination application, so it can only change when swapping sourceAppID with destinationAppID. Defined values are:

  • Conforms to the Astra Identifier Schema

namespaceMapping

array[namespaceMapping]

False

The namespace or namespaces to use when creating the destination application, corresponding to the namespaces of the source application. Each JSON object contains the fields "clusterID" and "namespaces", where the "clusterID" value is the JSON string ID of the source or destination cluster, and the "namespaces" value is a JSON array of JSON strings. There must be exactly one JSON object for each cluster, and the namespaces will be correlated by index. If not provided, the same namespace from the source cluster will be used in the destination cluster. Defined values are:

  • Minimum length: 0

  • Maximum length: 2

storageClasses

array[storageClasses]

False

The storage class to be used on the destination cluster when creating new Persistent Volume Claims (PVCs). Each JSON object contains the fields "clusterID" and "storageClassName", where the "clusterID" value is the JSON string ID of the source or destination cluster, and the "storageClassName" is the storage class to use when creating PVCs on that cluster. If not provided or if the value is missing for a cluster, the default storage class will be used for that cluster. Defined values are:

  • Minimum length: 0

  • Maximum length: 2

state

string

True

The state of the relationship. Defined values are:

  • "establishing" - The relationship is being created.

  • "established" - The relationship is created.

  • "failingOver" - Failover of the application to the destination cluster is in progress.

  • "failedOver" - Failover of the application to the destination cluster has completed.

  • "deleting" - Resources created by the relationship are being cleaned up.

  • "deleted" - The relationship was cleaned up and deleted.

stateTransitions

array[type_astra_stateTransition]

False

Permitted state transitions. The following state transitions are possible for this resource:

  • "establishing": "established", "deleting"

  • "established": "failingOver", "deleting"

  • "failingOver": "failedOver", "deleting"

  • "failedOver": "establishing", "deleting"

  • "deleting": "deleted"

  • "deleted":

stateDesired

string

True

The desired state for the relationship. At creation, the only valid value is "established". Defined values are:

  • "established" - The relationship is created.

  • "failedOver" - Failover of the application to the destination cluster has completed.

  • "deleted" - The relationship was successfully cleaned up and deleted.

stateAllowed

array[string]

False

States that can be requested in a given state. The following states can be requested in each defined state:

  • "establishing": "established", "deleted"

  • "established": "failedOver", "deleted"

  • "failingOver": "failedOver", "deleted"

  • "failedOver": "established", "deleted"

  • "deleting": "deleted"

  • "deleted": "deleted"

stateDetails

array[type_astra_stateDetail]

True

Additional details about the current state, including why the current state was reached. If no details are available, this array will be empty. Defined values are:

  • Minimum Items: 0

transferState

string

False

State of the current or most recent snapshot transfer. Defined values are:

  • "transferring" - A new snapshot was created and is now being replicated to the destination cluster. This state also covers the transfers that have failed on previous attempts and are being continually retried.

  • "idle" - There is currently no transfer in progress.

transferStateTransitions

array[type_astra_stateTransition]

False

Permitted state transitions from a given defined state. The following state transitions are possible for this resource:

  • "transferring": "idle"

  • "idle": "transferring"

transferStateDetails

array[type_astra_stateDetail]

False

Additional details about the current state including why the current state was reached. If no details are available, this array will be empty. Defined values are:

  • Minimum Items: 0

healthState

string

True

Health state of the resource. Defined values are:

  • "indeterminate" - The health of the resource cannot be determined (for example, due to lack of connectivity)

  • "normal" - The resource has no known issues and can provide services in accordance with the interface specification

  • "warning" - The resource has known issues that do not prevent it providing services in accordance with the interface specification

  • "critical" - The resource has known issues that prevent it from providing services in accordance with the interface specification

healthStateTransitions

array[type_astra_stateTransition]

True

Permitted state transitions from a given defined state. The following state transitions are possible for this resource:

  • "indeterminate": "normal", "warning", "critical"

  • "normal": "indeterminate", "warning", "critical"

  • "warning": "indeterminate", "normal", "critical"

  • "critical": "indeterminate", "normal", "warning"

healthStateDetails

array[type_astra_stateDetail]

True

Additional details about the current state including why the current state was reached. If no details are available, this array will be empty. Defined values are:

  • Minimum Items: 0

metadata

type_astra_metadata_update

True

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

  • Conforms to the Astra Metadata Schema If not specified on create, a metadata object will be created with no labels. If not specified on update, the metadata object's labels, creationTimestamp and createdBy, will be preserved without modification.

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