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

Retrieve a namespace

Contributors

GET /accounts/{account_id}/topology/v1/namespaces/{namespace_id}

Returns the stored Namespace API resource in the JSON response body.

Parameters

Name Type In Required Description

account_id

string

path

True

ID of the containing account resource

  • example: {{.Account}}

namespace_id

string

path

True

ID of the namespace collection to list

Response

Status: 200, Returns the stored Namespace API resource in the JSON response body.
Name Type Required Description

type

string

True

Media type of the resource. Defined values are:

  • "application/astra-namespace"

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 value indicating the name of the namespace. Defined values are:

  • Minimum length: 1

  • Maximum length: 255

namespaceState

string

True

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

  • "discovered" - The namespace has been found in the cluster

  • "removed" - The namespace has been deleted from the cluster, or the cluster is not managed but there might be resources referring to the namespace

namespaceStateDetails

array[type_astra_stateDetails]

True

JSON array of JSON objects that lists additional details about why "state" transitioned into "state a", "state b", or "state c". If no details are available, this array will be empty. Defined values are:

  • Minimum items: 0

kubernetesLabels

array[type_astra_label]

False

JSON array of JSON objects, each containing a Kubernetes label associated with the namespace. Defined values are:

  • Conforms to the Kubernetes Label Array Schema

clusterID

string

True

JSON string containing a globally unique identifier of the cluster that the namespace is contained in. Defined values are:

  • Conforms to the Astra Identifier Schema

systemType

string

False

JSON string that denotes that the namespace is a type of system namespace. This field identifies what type of system namespace, if any, the namespace is (version 1.1 only). Defined values are:

  • "kubernetes" - A generic Kubernetes (K8s) system namespace, for example, "kube-system"

  • "netapp" - A NetApp system namespace, for example, "trident" or "netapp-monitoring"

  • "openshift" - An OpenShift system namespace, for example, "openshift-monitoring"

  • "rke" - A Rancher namespace, for example, "cattle-logging"

  • "other" - Common system namespaces that don't necessarily fit elsewhere, for example, "ingress-nginx", "tekton-system"

links

array[links]

True

JSON array of JSON objects, each indicating a link relationship associated with the resource. Defined values are:

  • Minimum items: 2

metadata

type_astra_metadata

True

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

  • Conforms to the Astra Metadata Schema

Example response
{
  "type": "application/astra-namespace",
  "version": "1.1",
  "id": "2de811a6-ce8f-512c-9c3a-9585ca66de22",
  "name": "kube-system",
  "namespaceState": "discovered",
  "namespaceStateDetails": [
    {
      "type": "https://astra.netapp.io/stateDetails/9",
      "title": "Namespace Discovered",
      "detail": "The namespace was discovered in the indicated managed cluster"
    }
  ],
  "kubernetesLabels": [
    {
      "name": "app.kubernetes.io/environment",
      "value": "dev"
    }
  ],
  "clusterID": "0f284377-e5dc-4dcd-bacd-3197f2b8a347",
  "systemType": "kubernetes",
  "links": [
    {
      "rel": "canonical",
      "href": "https://www.astra.io/accounts/0b311ae7-d89a-4a11-a52c-1349ca090415/topology/v1/namespaces/7d451d2f-196e-4234-aee9-7e2376047e63"
    },
    {
      "rel": "collection",
      "href": "https://www.astra.io/accounts/0b311ae7-d89a-4a11-a52c-1349ca090415/topology/v1/clouds/e0490197-872e-4de8-9287-b04a938e801f/clusters/0f284377-e5dc-4dcd-bacd-3197f2b8a347/namespaces"
    }
  ],
  "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/2",
  "title": "Collection not found",
  "detail": "The collection specified in the request URI wasn't found.",
  "status": "404"
}

Definitions

See Definitions

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

Name Type Required Description

rel

string

True

JSON string containing the type of relation that the link indicates. Defined values are:

  • "canonical" - The preferred link for accessing the resource

  • "collection" - The collection that the resource belongs to

href

string

True

JSON string containing the link. Defined values are:

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

invalidParams

Name Type Required Description

name

string

True

Name of the invalid query parameter

reason

string

True

Reason why the query parameter is invalid