GET
/
cloud
/
v1
/
secrets
/
{project_id}
/
{region_id}
import os
from gcore import Gcore

client = Gcore(
    api_key=os.environ.get("GCORE_API_KEY"),  # This is the default and can be omitted
)
secrets = client.cloud.secrets.list(
    project_id=1,
    region_id=1,
)
print(secrets.count)
{
  "count": 1,
  "results": [
    {
      "algorithm": "aes",
      "bit_length": 256,
      "content_types": {
        "default": "application/octet-stream"
      },
      "created": "2023-03-23T20:00:00+00:00",
      "expiration": "2023-06-23T20:00:00+00:00",
      "id": "bfc7824b-31b6-4a28-a0c4-7df137139215",
      "mode": "cbc",
      "name": "AES key",
      "secret_type": "opaque",
      "status": "ACTIVE"
    }
  ]
}

Authorizations

APIKey
string
header
required

API key for authentication.

Path Parameters

project_id
integer
required

Project ID

Examples:

1

region_id
integer
required

Region ID

Examples:

1

Query Parameters

limit
integer
default:1000

Optional. Limit the number of returned items

Required range: 0 < x <= 1000
Examples:

1000

offset
integer
default:0

Optional. Offset value is used to exclude the first set of records from the result

Required range: x >= 0
Examples:

0

Response

200 - application/json

OK

The response is of type object.