---
updatedAt: 2026-07-02T14:39:48.000Z
---

# Retrieve site credentials

This operation returns an object containing information about all credentials for the specified site.

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "x-explorer-enabled": false,
  "info": {
    "title": "Site API (Legacy)",
    "license": {
      "name": "(c) Copyright 2021 WhiteHat Security"
    },
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://sentinel.whitehatsec.com"
    }
  ],
  "paths": {
    "/api/site/{site_id}/site_credentials": {
      "get": {
        "tags": [
          "Site API v1.0"
        ],
        "summary": "Retrieve site credentials",
        "description": "This operation returns an object containing information about all credentials for the specified site.",
        "operationId": "getSiteCredentials",
        "parameters": [
          {
            "name": "site_id",
            "in": "path",
            "description": "Site ID.",
            "required": true,
            "style": "simple",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "page:limit",
            "in": "query",
            "description": "Limit results to n number of credentials per page.",
            "style": "form",
            "explode": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "page:offset",
            "in": "query",
            "description": "Begin showing results from credential number n.",
            "style": "form",
            "explode": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "page:order_by",
            "in": "query",
            "description": "Sort results for credentials.",
            "style": "form",
            "explode": true,
            "schema": {
              "type": "string",
              "default": "id",
              "example": "id",
              "enum": [
                "id",
                "id asc",
                "id desc",
                "priority",
                "priority asc",
                "priority desc"
              ]
            }
          },
          {
            "name": "format",
            "in": "query",
            "description": "The response representation format for results.",
            "style": "form",
            "explode": true,
            "schema": {
              "type": "string",
              "default": "xml",
              "example": "json",
              "enum": [
                "json",
                "xml",
                "csv"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Provides a list of all credentials for site.",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SiteCredentials"
                }
              },
              "application/xml": {
                "example": "XML preview is currently not supported."
              },
              "text/csv, text/comma-separated-values": {
                "schema": {
                  "type": "string",
                  "description": "Column headers for data that may be returned using this format.",
                  "example": "id,account_email,creator,cred_group_name,expire_begin,expire_freeform,expire_notify_before,expire_type,href,login_url,login_valid_url,match_expression,notes,priority,secret_key,selenium_script,status,updated_t,username"
                }
              }
            }
          },
          "400": {
            "description": "BadRequestResponse indicates a request with invalid parameters.",
            "content": {}
          },
          "401": {
            "description": "UnauthorizedResponse signals an unauthorized API access.",
            "content": {}
          },
          "403": {
            "description": "ForbiddenResponse signals a request for a resource that does not exist or is not authorized.",
            "content": {}
          },
          "500": {
            "description": "GenericError generic error.",
            "content": {}
          }
        },
        "deprecated": false
      }
    }
  },
  "components": {
    "schemas": {
      "SiteCredential": {
        "nullable": true,
        "properties": {
          "expire_notify_before": {
            "type": "string",
            "nullable": true
          },
          "cred_group_name": {
            "type": "string",
            "nullable": true
          },
          "wh_managed": {
            "type": "boolean"
          },
          "expire_type": {
            "type": "string",
            "nullable": true
          },
          "selenium_script": {
            "type": "string",
            "nullable": true
          },
          "updated_t": {
            "type": "number",
            "nullable": true
          },
          "account_email": {
            "type": "string",
            "nullable": true
          },
          "match_expression": {
            "type": "string",
            "nullable": true
          },
          "secret_key": {
            "type": "string",
            "nullable": true
          },
          "priority": {
            "type": "number",
            "nullable": true
          },
          "expire_begin": {
            "type": "string",
            "nullable": true
          },
          "expire_freeform": {
            "type": "string",
            "nullable": true
          },
          "username": {
            "type": "string",
            "nullable": true
          },
          "creator": {
            "type": "string",
            "nullable": true
          },
          "href": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "string",
            "nullable": true
          },
          "id": {
            "type": "number"
          },
          "login_valid_url": {
            "type": "string",
            "nullable": true
          },
          "notes": {
            "type": "string",
            "nullable": true
          },
          "login_url": {
            "type": "string",
            "nullable": true
          },
          "scanning_cred": {
            "type": "boolean"
          },
          "pam_target": {
            "type": "string",
            "nullable": true,
            "description": "Target or Secret Path (for Vault app_role) identifier for PAM credential retrieval"
          },
          "pam_integration_id": {
            "type": "number",
            "nullable": true,
            "description": "ID of the PAM integration to use for credential retrieval"
          },
          "options": {
            "type": "string",
            "nullable": true,
            "description": "Additional options/configuration for the credential"
          }
        }
      },
      "SiteCredentials": {
        "properties": {
          "site_credentials": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SiteCredential"
            }
          },
          "href": {
            "type": "string"
          }
        }
      }
    }
  }
}
```