This is an older version of the docs. View the latest
Static Endpoints
Static endpoints return the contents of a file stored next to the endpoint configuration.
Configuration
Each endpoint is a folder endpoints/Static/{EndpointName}/ with entity.json and the content file:
txt
endpoints/Static/ProductionMachine/
├── entity.json
└── summary.xmlContents of entity.json:
json
{
"ContentType": "application/xml",
"ContentFile": "summary.xml",
"EnableFiltering": true,
"Hidden": false,
"AllowedEnvironments": ["prod", "dev"],
"Documentation": {
"TagDescription": "Production machine data",
"MethodDescriptions": {
"GET": "Retrieve machine details"
}
}
}All properties, types and defaults: Entity configuration.
Supported content types
| Format | MIME type | OData filtering |
|---|---|---|
| JSON | application/json |
Supported |
| XML | application/xml |
Supported |
| CSV | text/csv |
Not supported |
| Plain text | text/plain |
Not supported |
| Images | image/* |
Not supported |
OData filtering
With EnableFiltering: true, static endpoints accept the same OData options as SQL endpoints:
http
GET /api/prod/ProductionMachine?$filter=status eq 'running'&$top=5&$orderby=name
GET /api/prod/ProductionMachine?$select=id,name,statusFiltered responses include these headers:
X-Filtering-Status: AppliedX-Total-Count: item count before filteringX-Returned-Count: item count after filtering
Portway