Get data (Pivot API)
Endpoint: http://data.gov.om/api/1.0/data/pivot
This endpoint returns dataset's data in pivot table format.
Input
The input data should specify dataset id and pivot header/stub/filter components. For header/stub it should be arrays of header/stub items where dimension field is mandatory and members field is optional. If no members specified in header/stub item it means all dimension members should be included in the request. Filter request should be array of filter items. Each filter item should have dimension and members field. Only single member can be specified for filter item. The dimension cannot be included into header/stub/filter at the same time.
Result
The output of this endpoint is array of tuples. For each header/stub dimension there will be corresponding tuple field and also value field. Stub fields will be included in the order of their definition in request followed by header fields in the order of their definition in request. Tuples will follow the value order defined in request, i.e. tuples for values listed first will be followed by tuples for values listed later.
Name | Type | Description |
---|---|---|
Dataset | string | Unique dataset id |
Header | object | Dimension details and members of header Contains array of
|
Stub | Object | Dimension details and members of stub Contains array of
|
Filter | Object | Dimension details of members which are used as a filter. This can contain only one member. |
Data | object | Tuples describing each data point. consists
|
Example
Post: http: //data.gov.om/api/1.0/data/pivot
|