ObjectStackObjectStack Protocol

Wire Protocol

The HTTP Interface for ObjectQL. Standard Request/Response envelopes for REST and GraphQL.

ObjectStack assumes a Stateless, JSON-over-HTTP transport layer.

1. The Standard Envelope

All ObjectQL API responses follow a strict OData-inspired envelope structure to ensure consistency across success and error states.

Success Response

{
  "@odata.context": "$metadata#accounts",
  "@odata.count": 250,
  "value": [
    { "_id": "1", "name": "Acme Corp" },
    { "_id": "2", "name": "Wayne Enterprises" }
  ]
}

Error Response

{
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "Start Date cannot be after End Date",
    "details": [
      { "field": "end_date", "reason": "Date out of range" }
    ]
  }
}

2. URL Conventions

Record Retrieval

GET /api/v4/{object_name}/{record_id}

Query (List)

GET /api/v4/{object_name}

  • $filter: OData style filter string (e.g. title eq 'CEO').
  • $select: Projection name,email.
  • $expand: Joins company.

Mutation

  • POST /api/v4/{object_name} (Create)
  • PUT /api/v4/{object_name}/{record_id} (Update)
  • DELETE /api/v4/{object_name}/{record_id} (Delete)

3. Metadata Exchange

The client can request schema definitions dynamically.

  • GET /api/v4/metadata/objects/{object_name}: Returns the JSON Schema for the object, allowing the UI to render forms dynamically.

On this page