Organisations
List an organisation's folder rules
Each restricted folder with the roles and the people let in.
GET
/orgs/{org}/folder-rulesTL;DR
| Question | Answer |
|---|---|
| What does it do? | List an organisation's folder rules. |
| What does it take? | org in the path. |
| What does it return? | Status 200 with a body of type FolderRuleList. |
| What can go wrong? | 401 not signed in; 403 the caller's role may not read the rules (orgs.forbidden); 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
Each restricted folder with the roles and the people let in. The owner and the admins may read them. A rule covers the folder and every folder inside it, and the nearest rule wins.
Path parameters
| Field | Type | Required | Description |
|---|---|---|---|
org | string | yes | The organisation's id or its slug. |
Responses
| Status | Meaning | Body |
|---|---|---|
| 200 | The rules. | FolderRuleList |
| 401 | Not signed in. | ErrorResponse |
| 403 | The caller's role may not read the rules (orgs.forbidden). | 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 FolderRuleList.
| Field | Type | Required | Description |
|---|---|---|---|
items | FolderRule[] | yes | By folder, at most 50. |
items[].folder | string | yes | The restricted folder, in the form diagrams carry in their folder. |
items[].roles | ("admin" | "member" | "reader" | "key")[] | yes | The roles let in, apart from the owner, who is always allowed: admin, member, reader, and key for the organisation's own API keys. |
items[].users | FolderRuleUser[] | yes | The people let in by name, whatever their role. |
items[].users[].userId | string | yes | The member's account id. |
items[].users[].email | string | yes | The member's address, as the member list shows it. |
items[].createdAt | integer | yes | Milliseconds since the epoch. When the rule as it now stands was set; replacing a rule sets it again. |
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 |