API Reference
This page documents the Lynx API endpoints.
Models
Create domains and models, upload schemas, and retrieve schema, OpenAPI spec, and context for each model.
Method |
Endpoint |
Description |
GET |
|
List domains |
POST |
|
Create domain |
DELETE |
|
Delete domain |
GET |
|
List models in domain |
GET |
|
List model files |
POST |
|
Create model from schema |
PUT |
|
Update model schema |
DELETE |
|
Delete model |
GET |
|
Get JSON Schema |
GET |
|
Get OpenAPI spec |
GET |
|
Get JSON-LD context |
Contexts
List, create, update, and delete JSON-LD contexts. Store custom contexts alongside generated ones.
Method |
Endpoint |
Description |
GET |
|
List contexts |
GET |
|
Get context |
POST |
|
Create context |
PUT |
|
Update context |
DELETE |
|
Delete context |
Workbench
Infer schemas from JSON, compact or expand JSON-LD documents, and validate entities against a model.
Method |
Endpoint |
Description |
POST |
|
Infer schema from JSON payload |
POST |
|
Compact JSON-LD document |
POST |
|
Expand JSON-LD document |
POST |
|
Validate entity against model schema |
Example (schema inference):
curl -X POST "http://localhost:8080/api/v2/workbench/schema/infer" \
-H "Content-Type: application/json" \
-d '{"temperature": 22.5, "humidity": 65}'
Example (validate entity):
curl -X POST "http://localhost:8080/api/v2/validate/myDomain/WeatherObserved" \
-H "Content-Type: application/json" \
-d '{"id": "urn:ngsi-ld:WeatherObserved:1", "type": "WeatherObserved", "temperature": {"value": 22.5}}'