Update Consumer Organization
Endpoint
PUT /apiops/projects/{projectName}/consumer-organizations/{code}
Authentication
Requires a Personal API Access Token.
Authorization: Bearer YOUR_TOKEN
Request
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| projectName | string | Yes | Project name |
| code | string | Yes | Code of the organization |
Request Body
Same fields as Create Consumer Organization.
{
"nameDefault": "ACME Partner Network"
}
| Value you send | Result |
|---|---|
nameDefault, nameSecondary or parentOrganizationCode omitted or blank | The stored value stays |
metadata omitted | The stored list stays |
metadata sent | Replaces the stored list. A secret entry that you send without a value is stored empty. Send the value to keep it |
code different from the path | 400 immutableField |
parentOrganizationCode unknown | 404 resourceNotFound |
On an organization that an identity source manages, the fields that the source owns keep the values of the source.
Response
200 OK.
The response is a write response. result is the organization. runtimeDeployment reports the gateway push (IN_SYNC or DEGRADED). A DEGRADED write is stored. resourceVersion is not returned.
cURL Example
curl -X PUT \
"https://demo.apinizer.com/apiops/projects/MyProject/consumer-organizations/acme-partners" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{ "nameDefault": "ACME Partner Network" }'
Permissions
- User must have
IDENTITY+MANAGEpermission in the project - A project outside the scope of the caller answers
404 resourceNotFound, never403 - The admin project has no consumer organizations: a call on it answers
400 malformedRequest(params.reason=platformScopeNotSupported)