Ana içeriğe geç

Update Credential Organization

Deprecated

This operation is deprecated. It still works. Use the successor operation of the Consumer Organizations 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}/consumer-organizations>; rel="successor-version"

Endpoint​

PUT /apiops/projects/{projectName}/credential-organizations/{code}

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
codestringYesOrganization code (cannot be changed)

Request Body​

Full JSON Body Example​

{
"code": "team-alpha",
"nameDefault": "Team Alpha (Updated)",
"nameSecondary": "Alpha Ekibi",
"parentOrganizationCode": "root-org",
"metadata": [
{
"key": "costCenter",
"value": "CC-2002",
"secret": false,
"includeInJwt": true,
"includeInTokenResponse": false,
"jwtClaimName": null
}
]
}

Request Body Fields​

FieldTypeRequiredDefaultDescription
codestringNo-Ignored for rename; path {code} identifies the organization
nameDefaultstringNo-Primary display name (updated when non-blank)
nameSecondarystringNo-Secondary display name (updated when non-blank)
parentOrganizationCodestringNo-Parent organization code (must exist in the same project)
metadataarray[object]No-Replaces the entire metadata list. See Create Credential Organization for the Metadata Object schema

Response​

Success Response (200 OK)​

Returns the updated CredentialOrganizationDTO (secret metadata values omitted).

Error Responses​

StatusCondition
400Parent organization not found
401Invalid or missing token
404Organization with the given code does not exist in the project
500Unexpected server error

cURL Example​

curl -X PUT \
"https://demo.apinizer.com/apiops/projects/MyProject/credential-organizations/team-alpha" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"nameDefault": "Team Alpha (Updated)", "metadata": []}'

Notes and Warnings​

  • The organization code cannot be changed via APIops. Create a new organization if you need a different code.
  • Metadata is replaced wholesale. The body metadata array becomes the new full list; omitting it clears all metadata entries.
  • Secret metadata is write-only. To update a secret value, include the entry with a non-blank value in the PUT body.
  • Synchronized organizations keep their source-owned fields. On an organization that a directory sync (LDAP, OIDC, Database or API provider) manages, nameDefault, nameSecondary, parentOrganizationCode and the source binding are ignored in the body and stay at their stored values; the response is still 200. The operator-owned metadata is saved as sent. Earlier releases rejected the whole request with 400 (ldapManaged).
  • Limits are not part of the organization body. A defaultLimitPlans field in the body is ignored; an organization no longer carries default limit plans. Manage its limit plans from the Limits tab or through the Limit Assignments Management API.

Permissions​

User must have IDENTITY + MANAGE permission in the project.