Skip to content
Connect an agent
Organisations

List an organisation's folder rules

Each restricted folder with the roles and the people let in.

GET/orgs/{org}/folder-rules

TL;DR

QuestionAnswer
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

FieldTypeRequiredDescription
orgstringyesThe organisation's id or its slug.

Responses

StatusMeaningBody
200The rules.FolderRuleList
401Not signed in.ErrorResponse
403The caller's role may not read the rules (orgs.forbidden).ErrorResponse
404No such organisation, or the caller is not a member of it.ErrorResponse
429Too many requests.ErrorResponse
503Organisations are not set up on this server.ErrorResponse

Response body

A 200 answer has the type FolderRuleList.

FieldTypeRequiredDescription
itemsFolderRule[]yesBy folder, at most 50.
items[].folderstringyesThe restricted folder, in the form diagrams carry in their folder.
items[].roles("admin" | "member" | "reader" | "key")[]yesThe roles let in, apart from the owner, who is always allowed: admin, member, reader, and key for the organisation's own API keys.
items[].usersFolderRuleUser[]yesThe people let in by name, whatever their role.
items[].users[].userIdstringyesThe member's account id.
items[].users[].emailstringyesThe member's address, as the member list shows it.
items[].createdAtintegeryesMilliseconds since the epoch. When the rule as it now stands was set; replacing a rule sets it again.

See also

DocWhy
API referenceEvery endpoint, and the error envelope
SchemasEvery request and response type
Tool referenceThe operations as callable tools