Skip to main content
POST
/
digester
/
{session_id}
/
classes
/
{object_class}
/
endpoints
Extract API Endpoints
curl --request POST \
  --url https://api.example.com/digester/{session_id}/classes/{object_class}/endpoints \
  --header 'Content-Type: application/json' \
  --data '
{
  "endpoints": {}
}
'
{
  "jobId": "<string>",
  "status": "<string>",
  "result": {
    "result.endpoints": [
      {
        "result.endpoints[].path": "<string>",
        "result.endpoints[].method": "<string>",
        "result.endpoints[].description": "<string>",
        "result.endpoints[].responseContentType": "<string>",
        "result.endpoints[].requestContentType": "<string>",
        "result.endpoints[].suggestedUse": [
          {}
        ]
      }
    ]
  },
  "message": "<string>",
  "sessionId": "<string>",
  "objectClass": "<string>",
  "status_code": 123,
  "detail": "<string>"
}
Extract API endpoints (CRUD operations, lifecycle methods, etc.) for a specific object class. Automatically loads the base API URL from session metadata if available.
You must extract object classes first using /classes endpoint before extracting endpoints.

Request

session_id
string
required
Session ID (UUID format)
object_class
string
required
Object class name (e.g., “User”, “Group”). Case-insensitive.
use_previous_session_data
boolean
default:"true"
Whether to use previous session data if available

Response

Returns a job ID to poll for results.
jobId
string
Job ID (UUID) to track extraction progress

Example Request

curl -X POST "https://api.example.com/digester/550e8400-e29b-41d4-a716-446655440000/classes/User/endpoints" \
  -H "Authorization: Bearer YOUR_TOKEN"

Example Response

{
  "jobId": "123e4567-e89b-12d3-a456-426614174000"
}

Get Endpoints Status

Get the status and results of the endpoints extraction job.

Request

session_id
string
required
Session ID (UUID format)
object_class
string
required
Object class name
jobId
string
Job ID (optional, will use session’s job if not provided)

Response

status
string
Job status: pending, running, finished, or failed
result
object
Extraction results (available when status is finished)
result.endpoints
array
List of HTTP endpoints related to the object class
result.endpoints[].path
string
Concrete URL path template (e.g., /users/{id}, /users/{id}/groups)
result.endpoints[].method
string
HTTP method in uppercase: GET, POST, PUT, PATCH, DELETE
result.endpoints[].description
string
Short summary of what this method does for the object class
result.endpoints[].responseContentType
string
Primary response media type (e.g., application/json, application/hal+json)
result.endpoints[].requestContentType
string
Primary request media type (often for POST/PUT/PATCH)
result.endpoints[].suggestedUse
array
List of suggested use-cases: create, update, delete, getById, getAll, search, activate, deactivate, etc.

Example Request

curl -X GET "https://api.example.com/digester/550e8400-e29b-41d4-a716-446655440000/classes/User/endpoints?jobId=123e4567-e89b-12d3-a456-426614174000" \
  -H "Authorization: Bearer YOUR_TOKEN"

Example Response

{
  "status": "finished",
  "result": {
    "endpoints": [
      {
        "path": "/users",
        "method": "GET",
        "description": "List all users with optional filtering",
        "responseContentType": "application/json",
        "requestContentType": null,
        "suggestedUse": ["getAll", "search"]
      },
      {
        "path": "/users",
        "method": "POST",
        "description": "Create a new user",
        "responseContentType": "application/json",
        "requestContentType": "application/json",
        "suggestedUse": ["create"]
      },
      {
        "path": "/users/{id}",
        "method": "GET",
        "description": "Get user by ID",
        "responseContentType": "application/json",
        "requestContentType": null,
        "suggestedUse": ["getById"]
      },
      {
        "path": "/users/{id}",
        "method": "PUT",
        "description": "Update user by ID",
        "responseContentType": "application/json",
        "requestContentType": "application/json",
        "suggestedUse": ["update"]
      },
      {
        "path": "/users/{id}",
        "method": "PATCH",
        "description": "Partially update user by ID",
        "responseContentType": "application/json",
        "requestContentType": "application/json",
        "suggestedUse": ["update"]
      },
      {
        "path": "/users/{id}",
        "method": "DELETE",
        "description": "Delete user by ID",
        "responseContentType": null,
        "requestContentType": null,
        "suggestedUse": ["delete"]
      },
      {
        "path": "/users/{id}/activate",
        "method": "POST",
        "description": "Activate a user account",
        "responseContentType": "application/json",
        "requestContentType": null,
        "suggestedUse": ["activate"]
      },
      {
        "path": "/users/{id}/deactivate",
        "method": "POST",
        "description": "Deactivate a user account",
        "responseContentType": "application/json",
        "requestContentType": null,
        "suggestedUse": ["deactivate"]
      },
      {
        "path": "/users/{id}/groups",
        "method": "GET",
        "description": "Get groups for a specific user",
        "responseContentType": "application/json",
        "requestContentType": null,
        "suggestedUse": ["getAll"]
      },
      {
        "path": "/users/{userId}/groups/{groupId}",
        "method": "PUT",
        "description": "Add user to a group",
        "responseContentType": null,
        "requestContentType": null,
        "suggestedUse": ["create"]
      }
    ]
  }
}

Override Endpoints

Manually override the endpoints for an object class.

Request

session_id
string
required
Session ID (UUID format)
object_class
string
required
Object class name (will be normalized to lowercase)
endpoints
object
required
Endpoints data as JSON object

Response

message
string
Success message
sessionId
string
Session ID
objectClass
string
Object class name (normalized)

Example Request

curl -X PUT "https://api.example.com/digester/550e8400-e29b-41d4-a716-446655440000/classes/User/endpoints" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "endpoints": [
      {
        "path": "/users/{id}",
        "method": "GET",
        "description": "Get user by ID",
        "suggestedUse": ["getById"]
      }
    ]
  }'

Example Response

{
  "message": "Endpoints for user overridden successfully",
  "sessionId": "550e8400-e29b-41d4-a716-446655440000",
  "objectClass": "user"
}

Base API URL

The endpoint extraction automatically loads the base API URL from session metadata if it has been extracted using the /metadata endpoint. This allows for complete endpoint URLs to be constructed.
{
  "baseApiUrl": "https://api.example.com/v1"
}
The base URL is combined with the endpoint path to provide complete API endpoint information.

Error Responses

status_code
number
HTTP status code
detail
string
Error message

Common Errors

404 Not Found - Object class not found or no object classes in session
{
  "detail": "No object classes found in session. Please run /classes endpoint first."
}
400 Bad Request - No relevant chunks found for the object class
{
  "detail": "No relevant chunks found for object class 'User'. Cannot extract endpoints."
}

Build docs developers (and LLMs) love