Ana içeriğe geç

Add Credentials to RLCL

Endpoint

POST /apiops/projects/{projectName}/rlcl/{rlclName}/credentials/

Authentication

Requires a Personal API Access Token.

Authorization: Bearer YOUR_TOKEN

Request

Headers

HeaderValueRequired
AuthorizationBearer {token}Yes
Content-Typeapplication/jsonYes

Path Parameters

ParameterTypeRequiredDescription
projectNamestringYesProject name
rlclNamestringYesRLCL name

Request Body

Full JSON Body Example - Single Credential

{
"credentialNameList": [
"api-user"
]
}

Full JSON Body Example - Multiple Credentials

{
"credentialNameList": [
"api-user-1",
"api-user-2",
"premium-user"
]
}

Request Body Fields

FieldTypeRequiredDefaultDescription
credentialNameListarray[string]Yes-List of credential names (usernames) to add

Notes

  • credentialNameList must not be empty
  • Credential names must exist in the project
  • Duplicate credentials are ignored (not added twice)
  • Credentials are added to the existing list

Response

Success Response (200 OK)

{
"success": true
}

Error Response (400 Bad Request)

{
"error": "bad_request",
"error_description": "credentialNameList value can not be empty!"
}

or

{
"error": "bad_request",
"error_description": "Credential with name (api-user) is not found in project!"
}

cURL Example

curl -X POST \
"https://demo.apinizer.com/apiops/projects/MyProject/rlcl/PremiumUserRLCL/credentials/" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"credentialNameList": [
"api-user-1",
"api-user-2"
]
}'

Permissions

  • User must have IDENTITY + MANAGE permission in the project

Notes and Warnings

  • Credential Names:
    • Use credential usernames (not IDs)
    • Credentials must exist in the project
  • Duplicate Handling:
    • Duplicate credentials are ignored
    • No error is thrown for duplicates
  • RLCL Must Exist:
    • RLCL must exist before adding credentials