Skip to content
Connect an agent

Organisations

Read an organisation's key policy

When the organisation's keys expire, whether agents sign in through the browser only, and the networks calls with its keys may come from.

GET/orgs/{org}/policies/keys

TL;DR

QuestionAnswer
What does it do?Read an organisation's key policy.
What does it take?org in the path.
What does it return?Status 200 with a body of type KeyPolicy.
What can go wrong?401 not signed in; 403 a member or a reader (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

When the organisation's keys expire, whether agents sign in through the browser only, and the networks calls with its keys may come from. The owner and admins.

Path parameters

FieldTypeRequiredDescription
orgstringyesThe organisation's id or its slug.

Responses

StatusMeaningBody
200The key policy.KeyPolicy
401Not signed in.ErrorResponse
403A member or a reader (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 KeyPolicy.

FieldTypeRequiredDescription
expiryDays30 | 90 | 180 | nullyes"Keys expire after": 30, 90 or 180 days from when a key is made, or null for never.
browserOnlybooleanyes"Agents sign in through the browser only": members and readers on a verified domain make no personal API key, and only the owner and admins make the organisation's keys, for CI.
networksstring[]yes"Keys only from these networks": CIDR ranges, IPv4 or IPv6, in their canonical spelling. Empty is any network.

See also

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