Organisations
Choose which apps may connect to an organisation
Turns "Only approved apps can connect" on or off and sets the approved apps by client id; the organisation's own apps are always allowed.
PUT
/orgs/{org}/policies/appsTL;DR
| Question | Answer |
|---|---|
| What does it do? | Choose which apps may connect to an organisation. |
| What does it take? | A JSON body of type AllowedAppsPolicyBody. |
| What does it return? | Status 200 with a body of type AllowedAppsPolicyResult. |
| What can go wrong? | 400 the body is not valid, or an entry cannot be used (orgs.policy_invalid); 401 not signed in; 403 a member or a reader (orgs.forbidden), a plan without the policies (plan.policies_not_included), or the request came from an origin that may not make changes; 404 no such organisation, or the caller is not a member of it; 429 too many requests; 503 organisations are not set up on this server. Every failure uses the one error envelope. |
What it does
Turns "Only approved apps can connect" on or off and sets the approved apps by client id; the organisation's own apps are always allowed. Connections of apps the list no longer allows are ended; dryRun answers how many. Enterprise to turn on; off works on any plan.
Path parameters
| Field | Type | Required | Description |
|---|---|---|---|
org | string | yes | The organisation's id or its slug. |
Request body
The body has the type AllowedAppsPolicyBody.
| Field | Type | Required | Description |
|---|---|---|---|
enabled | boolean | yes | |
apps | string[] | yes | The client ids of the apps to approve. Each must name a registered app. |
dryRun | boolean | no | Answer how many connections the change would end, and change nothing. |
Responses
| Status | Meaning | Body |
|---|---|---|
| 200 | The policy as stored, and how many connections ended. | AllowedAppsPolicyResult |
| 400 | The body is not valid, or an entry cannot be used (orgs.policy_invalid). | ErrorResponse |
| 401 | Not signed in. | ErrorResponse |
| 403 | A member or a reader (orgs.forbidden), a plan without the policies (plan.policies_not_included), or the request came from an origin that may not make changes. | ErrorResponse |
| 404 | No such organisation, or the caller is not a member of it. | ErrorResponse |
| 429 | Too many requests. | ErrorResponse |
| 503 | Organisations are not set up on this server. | ErrorResponse |
Response body
A 200 answer has the type AllowedAppsPolicyResult.
| Field | Type | Required | Description |
|---|---|---|---|
enabled | boolean | yes | |
apps | PolicyApp[] | yes | |
apps[].id | string | yes | The app's client id. |
apps[].name | string | null | yes | The name the app registered, a claim; null when no app has the id any more. |
apps[].homepage | string | null | yes | |
apps[].own | boolean | yes | True for the organisation's own registered app, which is always allowed. |
connectionsEnded | integer | yes | The app connections the list no longer allows, which the change ended (or with dryRun, would end). |
dryRun | boolean | yes |
See also
| Doc | Why |
|---|---|
| API reference | Every endpoint, and the error envelope |
| Schemas | Every request and response type |
| Tool reference | The operations as callable tools |