pydo.functions.get_namespace()

Description

Gets the namespace details for the given namespace UUID. To get namespace details, send a GET request to /v2/functions/namespaces/$NAMESPACE_ID with no parameters.

Parameters

Name Type Required Description Default Value
namespace_id string True The ID of the namespace to be managed.

Request Sample

import os
from pydo import Client

client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN"))

resp = client.functions.get_namespace(namespace_id="aff93af3")

Responses

See the API spec for this endpoint to view additional detail on responses, headers, parameters, and more.

A JSON response object with a key called namespace. The object contains the properties associated with the namespace.

Click to expand an example response.
{
  "namespace": {
    "api_host": "https://api_host.io",
    "namespace": "fn-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
    "created_at": "2022-09-14T04:16:45Z",
    "updated_at": "2022-09-14T04:16:45Z",
    "label": "my namespace",
    "region": "nyc1",
    "uuid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
    "key": "d1zcd455h01mqjfs4s2eaewyejehi5f2uj4etqq3h7cera8iwkub6xg5of1wdde2"
  }
}

Unauthorized

Click to expand an example response.
{
  "id": "unauthorized",
  "message": "Unable to authenticate you."
}

Not Allowed.

Click to expand an example response.
{
  "id": "forbidden",
  "message": "not allowed to get namespace",
  "request_id": "b11e45a4-892c-48c9-9001-b6cffe9fe795"
}

Bad Request.

Click to expand an example response.
{
  "id": "not_found",
  "message": "namespace not found",
  "request_id": "88d17b7a-630b-4083-99ce-5b91045efdb4"
}

API Rate limit exceeded

Click to expand an example response.
{
  "id": "too_many_requests",
  "message": "API Rate limit exceeded."
}

Server error.

Click to expand an example response.
{
  "id": "server_error",
  "message": "Unexpected server-side error"
}

Unexpected error

Click to expand an example response.
{
  "id": "example_error",
  "message": "some error message"
}