cURL
curl --request POST \ --url https://api.example.com/api/collections/ \ --header 'Authorization: <authorization>' \ --header 'Content-Type: application/json' \ --data ' { "name": "<string>", "description": "<string>", "openapi_spec": {} } '
Create a new API collection (admin only)
Bearer <admin_token>
curl -X POST https://api.sari-platform.com/api/collections/ \ -H "Authorization: Bearer <admin_token>" \ -H "Content-Type: application/json" \ -d '{ "name": "My API", "description": "API description for semantic search", "openapi_spec": { "openapi": "3.0.0", "info": { "title": "My API", "version": "1.0" }, "servers": [ {"url": "https://api.example.com"} ], "paths": { "/users": { "get": { "summary": "List users", "responses": { "200": { "description": "Success" } } } } } } }'
{ "id": "550e8400-e29b-41d4-a716-446655440000", "name": "My API", "description": "API description for semantic search", "created_at": "2024-01-15T10:00:00Z" }