Ana içeriğe atla

Endpoint

PUT /apiops/projects/{projectName}/credentials/

Authentication

Requires a Personal API Access Token.
Authorization: Bearer YOUR_TOKEN

Request

Headers

HeaderValueRequired
AuthorizationBearer Yes
Content-Typeapplication/jsonYes

Path Parameters

ParameterTypeRequiredDescription
projectNamestringYesProject name

Request Body

Same structure as Create Credential. All fields are required for update.

Full JSON Body Example

{
  "email": "[email protected]",
  "fullName": "Updated User",
  "description": "Updated credential description",
  "username": "api-user",
  "password": "NewSecurePassword123!",
  "roleNameList": [
    "API_USER",
    "DEVELOPER"
  ],
  "enabled": true,
  "ipList": [
    "192.168.1.100"
  ],
  "expireDate": "2025-12-31T23:59:59.000Z"
}

Request Body Fields

Same as Create Credential. See Create Credential for field descriptions.

Important Notes

  • username must match the existing credential username (cannot be changed)
  • All fields are required (same as create)
  • Password can be updated
  • Credential is automatically deployed after update

Response

Same as Create Credential. See Create Credential for response format.

cURL Example

curl -X PUT \
  "https://demo.apinizer.com/apiops/projects/MyProject/credentials/" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "email": "[email protected]",
    "fullName": "Updated User",
    "description": "Updated description",
    "username": "api-user",
    "password": "NewSecurePassword123!",
    "roleNameList": [
      "API_USER"
    ],
    "enabled": true,
    "ipList": [],
    "expireDate": null
  }'

Permissions

  • User must have IDENTITY + MANAGE permission in the project
  • For automatic deployment, user must also have IDENTITY + DEPLOY_UNDEPLOY permission

Notes and Warnings

  • Username Cannot Change:
    • Username is used as identifier and cannot be changed
    • Use the existing username in the request
  • All Fields Required:
    • All fields must be provided (same as create)
    • Missing fields will cause validation errors
  • Password Update:
    • Password can be updated
    • New password must not be empty
  • Automatic Deployment:
    • Credential is automatically deployed after update
    • Deployment results are returned in the response
  • Credential Must Exist:
    • Credential with specified username must exist
    • If credential does not exist, update will fail