API Reference

IOTA SDK provides both GraphQL and REST APIs for integration and custom development.

GraphQL API

GraphQL is available for flexible data queries and mutations:

ModuleEndpointDescription
Core/queryUsers, uploads, authentication
Warehouse/query/warehouseProducts, inventory, orders

GraphQL Features

  • Strongly typed - Schema defines all available operations
  • Flexible queries - Request exactly what you need
  • Real-time - Subscriptions for live updates
  • Introspection - Self-documenting API

Making GraphQL Requests

GraphQL endpoint accepts POST requests with JSON body:

{ "query": "query { users(limit: 10) { id firstName email } }" }

REST API

REST endpoints are available for traditional HTTP operations:

Authentication

All API requests require authentication via:

  • Session cookie - For browser clients
  • API token - For programmatic access (if enabled)

Common Patterns

OperationMethodPattern
ListGET/resource
Get oneGET/resource/:id
CreatePOST/resource
UpdatePUT or POST/resource/:id (many form-based UIs use POST)
DeleteDELETE/resource/:id

Module APIs

Select a module to view its API documentation:

API Explorer

Use the GraphQL Playground to explore the API:

  1. Start the development server
  2. Navigate to /playground (dev) — it targets /query; module-specific endpoint e.g. /query/warehouse
  3. Use the interactive explorer to build queries

SDK Clients

While you can use raw HTTP requests, consider:

  • Generated clients - Use GraphQL codegen for type-safe clients
  • Apollo Client - Feature-rich GraphQL client
  • Fetch/Axios - Simple HTTP clients for REST

Note: Not all modules expose GraphQL schemas. Modules without GraphQL use REST endpoints exclusively.

Last updated on