Skip to content

List Credentials

credentials.list(CredentialListParams**kwargs) -> SyncCursorPage[Credential]
GET/v5/credentials

Retrieve a paginated list of all credentials for the current account with optional name filtering.

ParametersExpand Collapse
ending_before: Optional[str]
limit: Optional[int]
maximum10000
minimum1
name: Optional[str]

Filter credentials by name

sort_by: Optional[str]
sort_order: Optional[SortOrder]
One of the following:
"asc"
"desc"
starting_after: Optional[str]
ReturnsExpand Collapse
class Credential: …
id: str
created_at: datetime
formatdate-time
created_by_identity_type: Optional[str]
created_by_user_id: Optional[str]
credential_metadata: Optional[Dict[str, object]]
description: Optional[str]
name: str
type: str
updated_at: datetime
formatdate-time
object: Optional[str]

List Credentials

import os
from scale_gp_beta import SGPClient

client = SGPClient(
    api_key=os.environ.get("SGP_API_KEY"),  # This is the default and can be omitted
)
page = client.credentials.list()
page = page.items[0]
print(page.id)
{
  "has_more": true,
  "items": [
    {
      "id": "id",
      "created_at": "2019-12-27T18:11:19.117Z",
      "created_by_identity_type": "created_by_identity_type",
      "created_by_user_id": "created_by_user_id",
      "credential_metadata": {
        "foo": "bar"
      },
      "description": "description",
      "name": "name",
      "type": "type",
      "updated_at": "2019-12-27T18:11:19.117Z",
      "object": "object"
    }
  ],
  "total": 0,
  "limit": 0,
  "object": "list"
}
Returns Examples
{
  "has_more": true,
  "items": [
    {
      "id": "id",
      "created_at": "2019-12-27T18:11:19.117Z",
      "created_by_identity_type": "created_by_identity_type",
      "created_by_user_id": "created_by_user_id",
      "credential_metadata": {
        "foo": "bar"
      },
      "description": "description",
      "name": "name",
      "type": "type",
      "updated_at": "2019-12-27T18:11:19.117Z",
      "object": "object"
    }
  ],
  "total": 0,
  "limit": 0,
  "object": "list"
}