Skip to main content

Get Credential Details

Get credential metadata (without decrypted data). This endpoint retrieves stored credential information for a specific integration without exposing sensitive authentication tokens, making it safe for display in management interfaces.


Endpoint

Method: GET URL: {{base_url}}/api/v1/credentials/{integrationId}/details


Authentication

This endpoint uses Bearer Token authentication via a JWT (JSON Web Token). The token must be included in the Authorization header. Requires appropriate permissions to view credentials.


Headers

HeaderDescriptionRequired
AuthorizationBearer token (JWT) for authenticationYes
acceptSpecifies acceptable response formats (application/json)Yes
x-tenantidUUID identifying the tenant/organizationYes
realmnameThe authentication realm nameNo

Path Parameters

ParameterTypeDescriptionRequired
integrationIdstringThe unique identifier of the integrationYes

Query Parameters

ParameterTypeDescriptionRequired
credentialIdstring (UUID)Credential ID (optional) - use to retrieve a specific credential when multiple exist for an integrationNo

Request Body Schema

Not applicable — this is a GET request with no request body.


Example cURL

curl --request GET \
--url '{{base_url}}/api/v1/credentials/servicenow-prod-001/details' \
--header 'accept: application/json' \
--header 'authorization: Bearer {{access_token}}' \
--header 'x-tenantid: {{tenant_id}}'

With Credential ID:

curl --request GET \
--url '{{base_url}}/api/v1/credentials/servicenow-prod-001/details?credentialId=cred-550e8400-e29b-41d4-a716-446655440001' \
--header 'accept: application/json' \
--header 'authorization: Bearer {{access_token}}' \
--header 'x-tenantid: {{tenant_id}}'

Success Response Example

Status Code: 200 OK

{
"success": true,
"message": "Credential details retrieved successfully",
"data": {
"id": "cred-550e8400-e29b-41d4-a716-446655440001",
"integrationId": "servicenow-prod-001",
"credentialName": "ServiceNow Production",
"description": "OAuth credentials for ServiceNow ITSM production instance",
"authType": "oauth2_bearer",
"scopes": [
"read",
"write"
],
"tokenEndpoint": "https://instance.service-now.com/oauth_token.do",
"authorizationEndpoint": "https://instance.service-now.com/oauth_auth.do",
"metadata": {
"environment": "production",
"instanceUrl": "https://instance.service-now.com",
"version": "tokyo"
},
"status": "active",
"expiresAt": "2025-07-10T14:15:00.000Z",
"isExpired": false,
"createdAt": "2025-07-10T13:15:00.000Z",
"createdBy": {
"id": "1876278a-3634-4833-b73e-1536d806e117",
"name": "Deepak purohit",
"email": "deepak.purohit@rezolve.ai"
},
"updatedAt": "2025-07-10T13:30:00.000Z",
"updatedBy": {
"id": "1876278a-3634-4833-b73e-1536d806e117",
"name": "Deepak purohit",
"email": "deepak.purohit@rezolve.ai"
},
"lastAccessedAt": "2025-07-10T13:45:00.000Z",
"accessCount": 47,
"tenant": {
"id": "{{tenant_id}}",
"name": "{{tenant_name}}"
}
},
"timestamp": "2025-07-10T13:50:00.000Z"
}
Safe for Display

This endpoint does not return sensitive data (accessToken, refreshToken, secrets), making it safe for use in admin dashboards and management interfaces.


Error Responses

Status CodeErrorDescription
400 Bad RequestInvalid parametersInvalid integrationId or credentialId format
401 UnauthorizedAuthentication failedBearer token is missing, expired, or invalid
403 ForbiddenInsufficient permissionsUser lacks permission to view credentials
404 Not FoundCredential not foundNo credential exists for the specified integration
500 Internal Server ErrorServer errorUnexpected server-side error

Example Error Response:

{
"success": false,
"error": {
"code": "CREDENTIAL_NOT_FOUND",
"message": "Credential not found",
"details": "No credential exists for integration ID: servicenow-prod-999"
},
"timestamp": "2025-07-10T13:50:00.000Z"
}

Notes

  1. No Sensitive Data: Unlike GET /credentials/{integrationId}, this endpoint does not return decrypted tokens or secrets.

  2. Safe for UI: Use this endpoint for displaying credential information in management dashboards and admin interfaces.

  3. Expiration Check: The isExpired boolean field indicates whether the credential has expired.

  4. Access Metrics: The accessCount and lastAccessedAt fields provide usage statistics.

  5. Multiple Credentials: If multiple credentials exist for an integration, use the credentialId query parameter to retrieve a specific one.

  6. Status Values: The status field can be active, inactive, expired, or revoked.

  7. Audit Information: Includes createdBy, updatedBy, and timestamp fields for audit purposes.

  8. Required Roles: Requires integration_viewer or higher role to access credential details.

  9. Related Endpoints:

    • GET /credentials/{integrationId} — Get credential with decrypted data
    • POST /credentials — Store new credentials
    • PATCH /credentials/{credentialId} — Update credential
    • DELETE /credentials/{credentialId} — Delete credential