List policy rules - Spacefast Docs
List policy rules
Returns the ordered address-pattern rules that decide what an agent may call. Team rules are a floor a member cannot loosen.
GET /v1/connectors/policies
Authorization
Authorization Bearer token · header required
Authorization: Bearer <token> with an API key (sfa_ prefix), an OAuth access token, a session token, or a Space machine credential (sfm_ prefix).
or
Authorization OAuth2 access token · header required
OAuth 2.0 with Spacefast scopes. People use the authorization code flow; machines use client credentials.
Scopes: connectors:read
Query parameters
team string
min length 1 · max length 255
Responses
200 Response for status 200
{
"$schema": "string<uri>",
"data": [
{
"id": "string",
"pattern": "string",
"action": "approve",
"owner": "team",
"position": "string",
"createdAt": "string<date-time>"
}
]
}
$schema string
Canonical JSON Schema URL for this response body. The server also sends it in the Link: rel="describedby" response header.
default Problem details (RFC 9457)
Any 4xx/5xx response is one application/problem+json document.
{
"$schema": "string<uri>",
"type": "string",
"title": "string",
"status": "integer",
"detail": "string",
"code": "string",
"pointer": "string",
"details": {
"property1": null,
"property2": null
},
"suggestions": [
"string"
],
"next": [
"string"
],
"requestId": "string"
}
Try it
Server
Base URL: https://api.spacefast.com
Custom base URL: Overrides the selected server when set.
Authorization
Bearer token
Parameters
team query
Request
curl -X GET "https://api.spacefast.com/v1/connectors/policies" \
-H "Authorization: Bearer YOUR_TOKEN"
const response = await fetch("https://api.spacefast.com/v1/connectors/policies", {
method: "GET",
headers: {
"Authorization": "Bearer YOUR_TOKEN"
}
});
import requests
response = requests.get(
"https://api.spacefast.com/v1/connectors/policies",
headers={
"Authorization": "Bearer YOUR_TOKEN"
},
)
Response
{
"$schema": "http://example.com",
"data": [
{
"id": "string",
"pattern": "string",
"action": "approve",
"owner": "team",
"position": "string",
"createdAt": "2019-08-24T14:15:22Z"
}
]
}
{
"$schema": "http://example.com",
"type": "string",
"title": "string",
"status": -9007199254740991,
"detail": "string",
"code": "string",
"pointer": "string",
"details": {
"property1": null,
"property2": null
},
"suggestions": [
"string"
],
"next": [
"string"
],
"requestId": "string"
}