Skip to main content
GET
/
api
/
collections
List Collections
curl --request GET \
  --url https://api.example.com/api/collections/ \
  --header 'Authorization: <authorization>'

Authentication

Authorization
string
required
Bearer token: Bearer <firebase_id_token>

Example Request

curl https://api.sari-platform.com/api/collections/ \
  -H "Authorization: Bearer <token>"

Response

Returns an array of collections. Results are filtered based on role:
  • Admin: All collections
  • Client: Only collections with granted access

Example Response

[
  {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "name": "Stripe Payment API",
    "description": "Payment processing API",
    "created_at": "2024-01-10T08:00:00Z",
    "updated_at": "2024-01-10T08:00:00Z"
  },
  {
    "id": "550e8400-e29b-41d4-a716-446655440001",
    "name": "Twilio SMS API",
    "description": "SMS messaging API",
    "created_at": "2024-01-11T09:00:00Z",
    "updated_at": "2024-01-11T09:00:00Z"
  }
]

Errors

StatusDescription
401Invalid or expired token