List approvals - Spacefast Docs

List approvals

Returns the signed-in user’s own approvals. The pending list ranks elevation requests above routine resumes and then orders by newest; scope=decided returns the 25 most recent receipts instead. Requires a signed-in session.

GET /v1/approvals

Authorization

Authorization Bearer token · header required

Authorization: Bearer <token>

Query parameters

Responses

200 Response for status 200

default Error

Every 4xx and 5xx response is one RFC 9457 problem document served as application/problem+json.

Try it

Server

Base URL https://api.spacefast.com

Authorization

Bearer token

Parameters

Send

Request

cURL

curl -X GET "https://api.spacefast.com/v1/approvals" \
  -H "Authorization: Bearer YOUR_TOKEN"

JavaScript

const response = await fetch("https://api.spacefast.com/v1/approvals", {
  method: "GET",
  headers: {
    "Authorization": "Bearer YOUR_TOKEN"
  }
});

Python

import requests

response = requests.get(
    "https://api.spacefast.com/v1/approvals",
    headers={
        "Authorization": "Bearer YOUR_TOKEN"
    },
)

Response

200 default

{
  "$schema": "http://example.com",
  "data": {
    "decisions": [
      {
        "id": "string",
        "title": "string",
        "description": "string",
        "href": "string",
        "kind": "confirmation",
        "grantId": "string",
        "rationale": "string",
        "requestedScopes": [
          "string"
        ],
        "status": "approved",
        "decidedAt": "2019-08-24T14:15:22Z",
        "expiresAt": "2019-08-24T14:15:22Z",
        "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"
}