Along with the project we include a Postman collection to use the API defined in the
api reference document.
You can download Postman from:
https://www.postman.com/downloads/
The Postman collection for this project is available at:
https://github.com/telefonicaid/fiware-data-access/tree/main/doc/postman/fiware-data-access.postman_collection.json
Import the fiware-data-access.postman_collection.json file into Postman.
Before sending requests, create or update a Postman environment and define the following variables:
| Variable | Description | Example |
|---|---|---|
url |
API base endpoint including protocol and port | http://localhost:8080 |
Fiware-Service |
Header indicating the FIWARE service | my-service |
Fiware-ServicePath |
Header indicating the FIWARE service path | /servicePath |
visibility |
FDA visibility segment in the URL path | public or private |
datasourceId |
Identifier of the Datasource | pg_datasource |
fdaId |
Identifier of the FDA | fda_alarms |
daId |
Identifier of the DA | da_all_alarms |
auth_token |
Optional token to include as X-Auth-Token header |
- |
⚠️ These variables are required. The requests in the collection depend on them and will not work correctly if they are not properly configured.
For GET /{visibility}/fdas/{fdaId}/das/{daId}/data, response format is selected only through the Accept header:
application/json(or missing/*/*) returns JSON.application/x-ndjsonreturns NDJSON stream.text/csvreturns CSV stream.application/vnd.openxmlformats-officedocument.spreadsheetml.sheetreturns XLSX.
The same content negotiation rules apply to GET /{visibility}/fdas/{fdaId}/data, which is the direct fresh FDA query
endpoint.
FIWARE-data-access does not implement any specific security mechanisms, it offers the visibility property so the user
can build his auth system on top. For those cases we added an optional auth_token variable to the requests thats gonna
be mapped to the X-Auth-Token header, in case the user has a system that requires token-based auth.
To create FDAs from tabular files use POST /{{visibility}}/fdas/upload with Body = form-data:
- Required fields:
id(Text)file(File)
- Optional fields:
description(Text)timeColumn(Text)objStgConf(Text, JSON object string)defaultDataAccess(Text/Boolean)datasourceId(Text)
Example objStgConf value:
{ "partition": "day", "compression": "zstd" }Expected behavior:
202when upload is accepted and processing continues asynchronously.400for invalid upload fields (objStgConf.partition,objStgConf.compression, malformed JSON, missing file).413when file size exceeds the configured limit.415when file type is not CSV/XLS/XLSX.