---
title: "Query Credentials"
method: GET
path: "/credentials"
tags: ["Credentials"]
---

# Query Credentials

`GET /credentials`

Query for credentials. Decrypted credential provided only if `with_secrets` flag set `true` and is not available for cloud-only credentials.

## Query parameters

- `organization_id` string, required
- `with_secrets` boolean
- `accessible_only` boolean
- `limit` integer
- `cursor` string

## Response `200`

Results of the query

- CredentialsWithResourceGroupsQueryResult
  - `credentials` Credentials[] — All credentials that matched the query
    - `id` string — ID of credentials
    - `created_time` integer — Time credentials were created
    - `created_by_id` string — User ID who created these credentials
    - `last_updated_time` integer — Time credentials entity was last updated
    - `last_updated_by_id` string — User ID who last updated these credentials
    - `organization_id` string — Organization ID
    - `name` string — Display name
    - `description` string — Description
    - `tags` Tag[] — Free text tags
      - `name` string, required — tag name
      - `values` string[]
    - `totp_pins` ComputedTotpPin[] — TOTP pins computed for time range (only for MFA type credentials, upon request by authorized caller)
      - `start_time` integer — Starting Unix epoch millisecond key of validity window - lasts 60s
      - `pin` string — Computed pin for time frame
    - `cloud_only` boolean — True if the credentials secrets are only accessible to cloud runs. Cannot be changed from true to false.
    - `type` 'basic' | 'basic_with_totp' — Type of credentials
    - `properties` object — Properties that are specific to the given credentials type.
    - `resource_groups` DerivedResourceGroup[] — Resource groups this resource belongs to
      - `resource_group_id` string — ID of the resource group
      - `short_name` string — Name of the resource group
      - `parent_id` string — ID of the parent to which this ResourceGroup belongs
      - `parent_namespace` 'workspaces' — Namespace of the parent to which this ResourceGroup belongs
  - `cursor` string — Cursor used for pagination

## Other responses

- `400` — Invalid or missing parameter
- `401` — User not authenticated
- `403` — User not authorized
- `default` — Unknown error

---

[API](https://skmtc.net/mabl/apis/mabl-api.md) · [All operations](https://skmtc.net/mabl/apis/mabl-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/mabl/mabl-api/revisions/d0fc0114da66/schema)
