Extracting data
BIRT reports access data stored in one or more BIRT data objects. A BIRT data object is a .data file in a volume and contains one or more data sets. The REST API can access the data from a BIRT data object store directly using the /dataobject resource. You must provide the name of the dataset within a BIRT data object store to access the data.
The following sections provide an example of using each dataobject resource as a curl command.
GET dataobject/{dataobjectId}
This example sends a request to iHub to retrieve the data set list from the data file with file ID 640000000100:
GET /ihub/v1/dataobject/640000000100 HTTP/1.1
Host: myserver.mycompanyname.com:5000
AuthId: <authId>
This curl example requests the data set list from the data file with file ID 640000000100 in the default volume:
curl -i http://%RESTHost%:5000/ihub/v1/dataobject/640000000100 ‑H "AuthId:%RESTAuthId%"
GET dataobject/{dataobjectId}/{datasetName}
This example sends a request to iHub to retrieve the CUSTOMERNUMBER, PAYMENTDATE, and AMOUNT columns in the rows from the Payments data set with AMOUNT greater than 10000 from the data file with file ID 640000000100:
GET /ihub/v1/dataobject/640000000100
/Payments?column=CUSTOMERNUMBER&column=PAYMENTDATE&column=
AMOUNT&filterList={"DataFilterCondition":%20[{"ColumnName":
%20"AMOUNT",%20"Operation":%20"%3E","Operand1":%20"10000"}]} HTTP/1.1
Host: myserver.mycompanyname.com:5000
AuthId: <authId>
This curl example requests the CUSTOMERNUMBER, PAYMENTDATE, and AMOUNT columns in the rows from the Payments data set with Year equal to 2012 from the data file with file ID 640000000100 in the default volume:
curl -i http://%RESTHost%:5000/ihub/v1/dataobject/640000000100
/Payments ‑G ‑H "AuthId:%RESTAuthId%" -d column=CUSTOMERNUMBER ‑d column=PAYMENTDATE -d column=AMOUNT -d filterList=
"{\"DataFilterCondition\":%20[{\"ColumnName\":%20\"AMOUNT\",
%20\"Operation\":%20\"%3E\",\"Operand1\":%20\"10000\"}]}"