Ana içeriğe atla

Endpoint

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

Authentication

Requires a Personal API Access Token.
Authorization: Bearer YOUR_TOKEN

Request

Headers

HeaderValueRequired
AuthorizationBearer Yes

Path Parameters

ParameterTypeRequiredDescription
projectNamestringYesProject name
usernamestringYesUsername of the credential

Query Parameters

None.

Response

Success Response (200 OK)

{
  "success": true,
  "resultList": [
    {
      "name": "MyAPI",
      "type": "API_PROXY"
    },
    {
      "name": "PaymentAPI",
      "type": "API_PROXY"
    },
    {
      "name": "MyAPIGroup",
      "type": "API_PROXY_GROUP"
    }
  ]
}

Response Fields

FieldTypeDescription
successbooleanIndicates if the request was successful
resultListarray[object]List of granted access items

Access Item Object

FieldTypeDescription
namestringName of the API Proxy or API Proxy Group
typestringType of access. See EnumAccessType

EnumAccessType

  • API_PROXY - Access to a specific API Proxy
  • API_PROXY_GROUP - Access to an API Proxy Group

Notes

  • Returns both API Proxy and API Proxy Group accesses
  • Empty list ([]) is returned if credential has no access
  • Only shows accesses within the project scope

Error Response (400 Bad Request)

{
  "error": "bad_request",
  "error_description": "Credential (username: api-user) was not found!"
}

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/api-user/access/" \
  -H "Authorization: Bearer YOUR_TOKEN"

Notes and Warnings

  • Credential Must Exist:
    • Credential with specified username must exist
  • Project Scope:
    • Only shows accesses within the project
    • Global accesses may not be shown for regular projects
  • Empty Access:
    • Returns empty list if credential has no access
  • Access Types:
    • Shows both API Proxy and API Proxy Group accesses
    • Type field indicates the access type