Ana içeriğe geç

List Credentials

Deprecated

This operation is deprecated. It still works. Use the successor operation of the Consumers API instead.

Every response of this operation carries a Deprecation: @1792368000 header and a Link header whose rel is successor-version:

Link: </apiops/projects/{projectName}/consumers>; rel="successor-version"

Endpoint​

GET /apiops/projects/{projectName}/credentials/

Authentication​

Requires a Personal API Access Token.

Authorization: Bearer YOUR_TOKEN

Request​

Headers​

HeaderValueRequired
AuthorizationBearer {token}Yes

Path Parameters​

ParameterTypeRequiredDescription
projectNamestringYesProject name

Query Parameters​

None.

Response​

Success Response (200 OK)​

{
"status": "SUCCESS",
"resultList": [
{
"email": "user@example.com",
"fullName": "John Doe",
"description": "API user credential",
"username": "api-user",
"password": null,
"roleNameList": [
"API_USER",
"DEVELOPER"
],
"enabled": true,
"ipList": [
"192.168.1.100",
"10.0.0.0/8"
],
"expireDate": "2024-12-31T23:59:59.000Z"
},
{
"email": "admin@example.com",
"fullName": "Admin User",
"description": "Administrator credential",
"username": "admin",
"password": null,
"roleNameList": [
"ADMIN"
],
"enabled": true,
"ipList": [],
"expireDate": null
}
]
}

Response Fields​

FieldTypeDescription
statusstringResponse status: SUCCESS or FAILURE
resultListarray[object]List of consumers

Consumer Object​

FieldTypeDescription
emailstringEmail address of the consumer
fullNamestringFull name of the consumer holder
descriptionstringDescription of the consumer
usernamestringUsername (unique identifier)
passwordstring|nullPassword (always null in list response for security)
roleNameListarray[string]List of role names assigned to the consumer
enabledbooleanWhether the consumer is enabled
trafficLogDisabledboolean|nullWhether this consumer's traffic is kept out of the traffic log connectors. null on a record where it was never set. It silences the traffic log connectors only — trace records, OpenTelemetry spans, metrics and the security/access events are unaffected.
ipListarray[string]List of allowed IP addresses/CIDR ranges
expireDatestring|nullExpiration date in ISO 8601 format (e.g., "2024-12-31T23:59:59.000Z")

Notes​

  • password field is always null in list responses for security reasons
  • expireDate is in ISO 8601 format (UTC)
  • ipList can contain individual IP addresses or CIDR ranges
  • Empty arrays ([]) are returned for empty lists
  • For admin project, all consumers are returned; for regular projects, only project-specific consumers are returned

Error Response (401 Unauthorized)​

{
"status": "FAILURE",
"resultMessage": "Token is not valid!"
}

cURL Example​

curl -X GET \
"https://demo.apinizer.com/apiops/projects/MyProject/credentials/" \
-H "Authorization: Bearer YOUR_TOKEN"

Notes and Warnings​

  • Password Security:

    • Passwords are never returned in list responses
    • Use Change Password endpoint to update passwords
  • Project Scope:

    • Regular projects return only project-specific consumers
    • Admin project returns all consumers (including global)
  • Role Names:

    • Role names are returned instead of role IDs
    • Role names must match existing consumer roles
  • IP Restrictions:

    • IP list can contain individual IPs or CIDR ranges
    • Empty IP list means no IP restrictions
  • Expiration:

    • Expired consumers may still be returned
    • Check expireDate to determine if consumer is expired
  • Enabled Status:

    • Disabled consumers are still returned
    • Check enabled field to determine if consumer is active

Permissions​

  • User must have any permission in the project (read access)