Ana içeriğe atla

Endpoint

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

Authentication

Requires a Personal API Access Token.
Authorization: Bearer YOUR_TOKEN

Request

Headers

HeaderValueRequired
AuthorizationBearer Yes

Path Parameters

ParameterTypeRequiredDescription
projectNamestringYesProject name

Query Parameters

None.

Response

Success Response (200 OK)

{
  "success": true,
  "resultList": [
    {
      "email": "[email protected]",
      "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": "[email protected]",
      "fullName": "Admin User",
      "description": "Administrator credential",
      "username": "admin",
      "password": null,
      "roleNameList": [
        "ADMIN"
      ],
      "enabled": true,
      "ipList": [],
      "expireDate": null
    }
  ]
}

Response Fields

FieldTypeDescription
successbooleanIndicates if the request was successful
resultListarray[object]List of credentials

Credential Object

FieldTypeDescription
emailstringEmail address of the credential
fullNamestringFull name of the credential holder
descriptionstringDescription of the credential
usernamestringUsername (unique identifier)
passwordstring|nullPassword (always null in list response for security)
roleNameListarray[string]List of role names assigned to the credential
enabledbooleanWhether the credential is enabled
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 credentials are returned; for regular projects, only project-specific credentials are returned

Error Response (401 Unauthorized)

{
  "error": "unauthorized_client",
  "error_description": "Invalid token"
}

Error Response (404 Not Found)

{
  "error": "not_found",
  "error_description": "Project(MyProject) was not found or user does not have privilege to access it!"
}

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 credentials
    • Admin project returns all credentials (including global)
  • Role Names:
    • Role names are returned instead of role IDs
    • Role names must match existing credential roles
  • IP Restrictions:
    • IP list can contain individual IPs or CIDR ranges
    • Empty IP list means no IP restrictions
  • Expiration:
    • Expired credentials may still be returned
    • Check expireDate to determine if credential is expired
  • Enabled Status:
    • Disabled credentials are still returned
    • Check enabled field to determine if credential is active

Permissions

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