Ana içeriğe geç

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​

ParameterTypeRequiredDescription
projectNamestringYesProject name
codestringYesCode of the organization

Request Body​

Same fields as Create Consumer Organization.

{
"nameDefault": "ACME Partner Network"
}
Value you sendResult
nameDefault, nameSecondary or parentOrganizationCode omitted or blankThe stored value stays
metadata omittedThe stored list stays
metadata sentReplaces 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 path400 immutableField
parentOrganizationCode unknown404 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 + MANAGE permission in the project
  • A project outside the scope of the caller answers 404 resourceNotFound, never 403
  • The admin project has no consumer organizations: a call on it answers 400 malformedRequest (params.reason = platformScopeNotSupported)