Skip to main content

Get Credential

Retrieves details for a specific cloud credential by ID. Credential secrets are never returned - only metadata and verification status.

Request

GET /credentials/{id}

Authentication

Requires Bearer JWT Token with ORG_ADMIN role.

Authorization: Bearer <access_token>

Path Parameters

ParameterTypeRequiredDescription
idUUIDYesCredential unique identifier

Response

Success Response

Status Code: 200 OK

Response Body:

{
"id": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
"name": "AWS Production Account",
"provider": "AWS",
"credentialType": "ACCESS_KEY",
"isValid": true,
"lastVerifiedAt": "2026-02-18T10:00:00Z",
"verificationError": null,
"createdAt": "2026-01-10T09:00:00Z",
"updatedAt": "2026-02-18T10:00:00Z"
}

Response Fields

FieldTypeDescription
idUUIDUnique credential identifier
namestringHuman-readable credential name
providerstringCloud provider: AWS, GCP, AZURE, or APISIX
credentialTypestringType of credential (e.g., ACCESS_KEY, SERVICE_ACCOUNT, SERVICE_PRINCIPAL)
isValidbooleanWhether credential passed last verification (null if never verified)
lastVerifiedAtstring (ISO 8601)Timestamp of last verification attempt (null if never verified)
verificationErrorstringError message from last failed verification (null if valid or never verified)
createdAtstring (ISO 8601)Credential creation timestamp
updatedAtstring (ISO 8601)Last update timestamp

Error Responses

Status CodeErrorDescription
401 UnauthorizedUNAUTHORIZEDMissing or invalid authentication token
403 ForbiddenFORBIDDENUser lacks ORG_ADMIN role
404 Not FoundCREDENTIAL_NOT_FOUNDCredential with specified ID does not exist or does not belong to your organization
429 Too Many RequestsRATE_LIMIT_EXCEEDEDRate limit exceeded
500 Internal Server ErrorINTERNAL_ERRORServer error occurred

Error Response Example

{
"error": "CREDENTIAL_NOT_FOUND",
"message": "Credential with ID 7c9e6679-7425-40de-944b-e07fc1f90ae7 not found",
"timestamp": "2026-02-18T12:45:00Z"
}

Example

Request

curl -X GET https://api.entryguard.io/api/v1/credentials/7c9e6679-7425-40de-944b-e07fc1f90ae7 \
-H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..." \
-H "Content-Type: application/json"

Response - Valid Credential

{
"id": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
"name": "AWS Production Account",
"provider": "AWS",
"credentialType": "ACCESS_KEY",
"isValid": true,
"lastVerifiedAt": "2026-02-18T10:00:00Z",
"verificationError": null,
"createdAt": "2026-01-10T09:00:00Z",
"updatedAt": "2026-02-18T10:00:00Z"
}

Response - Invalid Credential

{
"id": "8d0f7780-8536-51f0-c958-f18ed2g01bf8",
"name": "GCP Production Project",
"provider": "GCP",
"credentialType": "SERVICE_ACCOUNT",
"isValid": false,
"lastVerifiedAt": "2026-02-17T14:30:00Z",
"verificationError": "AccessDenied: Service account lacks compute.firewalls.list permission",
"createdAt": "2026-01-12T11:00:00Z",
"updatedAt": "2026-02-17T14:30:00Z"
}

Response - Newly Created (Not Yet Verified)

{
"id": "9e1f8891-9647-62g1-d069-g29ge3h12cg9",
"name": "Azure Subscription",
"provider": "AZURE",
"credentialType": "SERVICE_PRINCIPAL",
"isValid": null,
"lastVerifiedAt": null,
"verificationError": null,
"createdAt": "2026-02-18T12:40:00Z",
"updatedAt": "2026-02-18T12:40:00Z"
}

Notes

  • Credential secrets (API keys, access keys, service account JSON) are never returned
  • Credentials are scoped to your organization - you can only access credentials belonging to your organization
  • The isValid field indicates whether the credential works:
    • true - Last verification succeeded
    • false - Last verification failed (check verificationError for details)
    • null - Never verified (newly created credentials)
  • Credentials are automatically verified asynchronously after creation
  • Invalid credentials will prevent resources linked to them from being used in sessions
  • Check this endpoint after creating a credential to see verification status

Verification Status

The verification status helps you understand if your credentials are working:

isValidverificationErrorMeaning
truenullCredential is valid and working
falseError messageCredential failed verification - see error for details
nullnullCredential not yet verified (just created)

Common Verification Errors

ProviderErrorSolution
AWSInvalidClientTokenIdAccess Key ID is invalid or doesn't exist
AWSSignatureDoesNotMatchSecret Access Key is incorrect
AWSUnauthorizedOperationIAM policy doesn't allow required EC2 operations
GCPinvalid_grantService account key is invalid or revoked
GCPPermission deniedService account lacks required compute permissions
AzureInvalidAuthenticationTokenClient secret is invalid or expired
AzureAuthorizationFailedService principal lacks Network Contributor role