---
title: "Get a Credential by ID"
method: GET
path: "/api/v1/credentials/{id}"
tags: ["Credentials"]
---

# Get a Credential by ID

`GET /api/v1/credentials/{id}`

## Path parameters

- `id` string, uuid, required

## Response `200`

Credential found

- ApiResponseCredential
  - `data` object
    - `assigned_network_ids` string[], required — Networks this credential is assigned to (Broadcast scope). Hydrated from the `network_credentials` junction table.
    - `credential_type` union, required — Universal credential type — tagged enum stored as JSONB. Each variant represents a different credential protocol/method.
      - object — SNMPv1 community string — for legacy devices that only speak v1.
        - `community` union, required — Secret value that can be either inline content or a file path on the daemon host.
          - object
            - `mode` 'Inline', required
            - `value` string, required
          - object
            - `mode` 'FilePath', required
            - `path` string, required
        - `type` 'SnmpV1', required
      - object — SNMPv2c community string for querying network devices
        - `community` union, required — Secret value that can be either inline content or a file path on the daemon host.
          - object
            - `mode` 'Inline', required
            - `value` string, required
          - object
            - `mode` 'FilePath', required
            - `path` string, required
        - `type` 'SnmpV2c', required
      - object — SNMPv3 USM AuthPriv — security name + auth/priv protocols and passwords.
        - `auth_password` union, required — Secret value that can be either inline content or a file path on the daemon host.
          - object
            - `mode` 'Inline', required
            - `value` string, required
          - object
            - `mode` 'FilePath', required
            - `path` string, required
        - `auth_protocol` 'Sha1' | 'Sha256', required — SNMPv3 USM authentication protocol. Variants are limited to the modern, secure set Scanopy supports; MD5 / SHA-2 variants beyond these are intentionally excluded. Serialized form (e.g. "Sha256") is the wire value stored in the credential and used as the frontend select option value.
        - `context_name` string, nullable — Optional context name (default/empty context used if unset).
        - `priv_password` union, required — Secret value that can be either inline content or a file path on the daemon host.
          - object
            - `mode` 'Inline', required
            - `value` string, required
          - object
            - `mode` 'FilePath', required
            - `path` string, required
        - `priv_protocol` 'Aes128' | 'Aes256', required — SNMPv3 USM privacy (encryption) protocol.
        - `security_name` string, required
        - `type` 'SnmpV3', required
      - object — Docker API proxy credentials. Target IP determined from host ip_addresses at scan time.
        - `path` string, nullable — Optional URL path prefix (e.g. "/v1.43")
        - `port` integer — Port for the Docker API proxy (default 2375)
        - `ssl_cert` union — Non-secret value that can be inline content or a file path on daemon host.
          - object
            - `mode` 'Inline', required
            - `value` string, required
          - object
            - `mode` 'FilePath', required
            - `path` string, required
        - `ssl_chain` union — Non-secret value that can be inline content or a file path on daemon host.
          - object
            - `mode` 'Inline', required
            - `value` string, required
          - object
            - `mode` 'FilePath', required
            - `path` string, required
        - `ssl_key` union — Secret value that can be either inline content or a file path on the daemon host.
          - object
            - `mode` 'Inline', required
            - `value` string, required
          - object
            - `mode` 'FilePath', required
            - `path` string, required
        - `type` 'DockerProxy', required
      - object — Local Docker socket access on the daemon host. `socket_path` optionally repoints the socket (non-default `DOCKER_HOST`); blank ⇒ the daemon auto-detects (bollard defaults).
        - `socket_path` string, nullable
        - `type` 'DockerSocket', required
      - object — Podman API proxy credentials. Podman exposes a Docker-compatible REST API, so the fields mirror `DockerProxy`. Target IP determined from host ip_addresses at scan time.
        - `path` string, nullable — Optional URL path prefix (e.g. "/v1.43")
        - `port` integer — Port for the Podman API proxy (default 2375)
        - `ssl_cert` union — Non-secret value that can be inline content or a file path on daemon host.
          - object
            - `mode` 'Inline', required
            - `value` string, required
          - object
            - `mode` 'FilePath', required
            - `path` string, required
        - `ssl_chain` union — Non-secret value that can be inline content or a file path on daemon host.
          - object
            - `mode` 'Inline', required
            - `value` string, required
          - object
            - `mode` 'FilePath', required
            - `path` string, required
        - `ssl_key` union — Secret value that can be either inline content or a file path on the daemon host.
          - object
            - `mode` 'Inline', required
            - `value` string, required
          - object
            - `mode` 'FilePath', required
            - `path` string, required
        - `type` 'PodmanProxy', required
      - object — Local Podman socket access on the daemon host. `socket_path` optionally repoints the socket (e.g. rootful `/run/podman/podman.sock` vs rootless `$XDG_RUNTIME_DIR/podman/podman.sock`); blank ⇒ the daemon auto-detects via `resolve_podman_socket_path()`.
        - `socket_path` string, nullable
        - `type` 'PodmanSocket', required
    - `host_assignments` CredentialHostAssignment[], required — Hosts this credential is assigned to (PerHost scope), with optional IP scoping. Hydrated from the `host_credentials` junction table.
      - `host_id` string, uuid, required
      - `ip_address_ids` string[], nullable, required — IP address IDs to limit this credential to on the host. None = all host ip_addresses.
    - `name` string, required
    - `organization_id` string, uuid, required
    - `tags` string[], required
    - `created_at` string, date-time, required
    - `id` string, uuid, required
    - `updated_at` string, date-time, required
  - `error` string, nullable
  - `meta` ApiMeta, required — API metadata included in all responses
    - `api_version` integer, required — API version (integer, increments on breaking changes)
    - `server_version` string, required — Server version (semver)
  - `success` boolean, required

## Other responses

- `404` — Credential not found

## Changes

- **2026-07-04** `b82ecde04dff` — 1 warning
  - removed the optional property `data/allOf[#/components/schemas/CredentialBase]/target_ips` from the response with the `200` status
- **2026-06-29** `ee1e9482f96c` — 1 breaking, 1 info
  - added `subschema #5, subschema #7` to the `data/allOf[#/components/schemas/CredentialBase]/credential_type` response property `oneOf` list for the response status `200`
  - removed `subschema #5, subschema #7` from the `data/allOf[#/components/schemas/CredentialBase]/credential_type` response property `oneOf` list for the response status `200`
- **2026-06-26** `027b5ba88c2b` — 1 breaking
  - added `subschema #6, subschema #7` to the `data/allOf[#/components/schemas/CredentialBase]/credential_type` response property `oneOf` list for the response status `200`
- **2026-06-23** `abdd8cdaa249` — 3 info
  - api operation id `get_credential_by_id` removed and replaced with `get_by_id_credential`
  - added the required property `data/allOf[#/components/schemas/CredentialBase]/assigned_network_ids` to the response with the `200` status
  - added the required property `data/allOf[#/components/schemas/CredentialBase]/host_assignments` to the response with the `200` status
- **2026-06-21** `87fbc9fdb32c` — 1 breaking
  - added `subschema #1, subschema #3` to the `data/allOf[#/components/schemas/CredentialBase]/credential_type` response property `oneOf` list for the response status `200`

[Full history](https://skmtc.dev/scanopy/apis/scanopy-api/changes/api/v1/credentials/:id/get.md)

---

[API](https://skmtc.dev/scanopy/apis/scanopy-api.md) · [All operations](https://skmtc.dev/scanopy/apis/scanopy-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/scanopy/scanopy-api/revisions/bd76f90aa44b/schema)
