Create or replace DCR policy
PUT/apps-srv/app-management-policies
Creates or replaces the DCR app-management policy (policyType=dcr).
DCR upserts: if no policy exists for name=default + policyType=dcr,
the server creates it (201). If it exists, the server replaces it
(200). Prefer listing with type=dcr first so the seeded default
exists when the feature is on.
DCR disabled returns 404 APP10161. Name other than default
returns 400 APP10163. Other validation failures return 400
APP10164.
Requires scope cidaas:apps_write and role ADMIN or SECONDARY_ADMIN.
Request
Responses
- 200
- 201
- 400
- 401
- 403
- 404
Policy replaced. createdTime is preserved; updatedTime changes.
Policy created.
Validation or parse error.
| Code | Typical cause |
|---|---|
APP10001 | Invalid JSON body |
APP10126 | Invalid policyType |
APP10127 | Name longer than 128 characters |
APP10163 | Name is not default |
APP10164 | Missing dcr sub-document, foreign cimd sub-document, developer-portal fields (groupIDs / allowedScopes), invalid ceilings/defaults/secrets/limits |
Unauthorized
Forbidden — caller lacks a required admin role (APP10023).
DCR is not enabled for the tenant (APP10161).