Skip to main content
POST
/
api
/
v1
/
graphql
curl -X POST \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "query": "query SearchSessions($query: String!) { searchSessions(query: $query, limit: 10) { total results { id name rank } } }",
    "variables": {"query": "authentication bug fix"}
  }' \
  https://cloud.specstory.com/api/v1/graphql
{
  "data": {
    "searchSessions": {
      "total": 3,
      "results": [
        {
          "id": "550e8400-e29b-41d4-a716-446655440001",
          "name": "Fix authentication token validation",
          "rank": 0.95
        },
        {
          "id": "550e8400-e29b-41d4-a716-446655440002",
          "name": "Debug login authentication flow",
          "rank": 0.87
        },
        {
          "id": "550e8400-e29b-41d4-a716-446655440003",
          "name": "Implement OAuth authentication",
          "rank": 0.72
        }
      ]
    }
  }
}

Request

Authorization
string
required
Bearer token for authentication
query
string
required
The GraphQL query string
variables
object
Variables for the GraphQL query
operationName
string
Name of the operation to execute (for queries with multiple operations)

Response

data
object
Query results (structure depends on the query)
errors
array
Array of error objects if any errors occurred
curl -X POST \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "query": "query SearchSessions($query: String!) { searchSessions(query: $query, limit: 10) { total results { id name rank } } }",
    "variables": {"query": "authentication bug fix"}
  }' \
  https://cloud.specstory.com/api/v1/graphql
{
  "data": {
    "searchSessions": {
      "total": 3,
      "results": [
        {
          "id": "550e8400-e29b-41d4-a716-446655440001",
          "name": "Fix authentication token validation",
          "rank": 0.95
        },
        {
          "id": "550e8400-e29b-41d4-a716-446655440002",
          "name": "Debug login authentication flow",
          "rank": 0.87
        },
        {
          "id": "550e8400-e29b-41d4-a716-446655440003",
          "name": "Implement OAuth authentication",
          "rank": 0.72
        }
      ]
    }
  }
}