The APIs allow you to view the data loaded into the system using the Ingestion Connector. You are required to follow the two-step process described in this topic. The first step is to use the Metadata Keys API to fetch the Metadata Keys. The second step is to use the Metadata Keys in the Retrieve Data using the Metadata Keys API.
Topics:
· Retrieve Data Using the Metadata Keys
The following are the prerequisites to use the APIs listed in this section:
· Users must be mapped to the Data Access User Group (AFCSDTACCGRP).
· Users must get the Connector ID.
For more information on how to get the Connector ID, see the below links
§ Getting the Connector Metadata Key from the Data Catalog Viewer
§ Getting the Connector Metadata Key from the Connector Details page
· Users must have all the details required to invoke the APIs.
For more information, see Executing Pipeline Using an API.
Use the Get method to fetch the Metadata Keys. The Get Metadata Keys API enables you to fetch the Business Term Codes for the Target that is used in the Connector. You can use the Business Term Codes in the Retrieve Data Using the Metadata Keys API request to retrieve data.
· Method – GET
· URL - https://<HOST_NAME:PORT>/<TENANT>/dsa-ext/v1/data-access/keys/<connector_id>
· Content-Type - application/json
To call the API, follow these steps:
1. Open a relevant tool.
2. Copy only the Authorization Token that you got from the Authentication Request.
3. Go to Header.
4. Enter KEY as an Authentication and Description as a bearer (Authorization Token) <eyJ4NXQjUzI1NiI6Ikk3cWxndm1Kal...>.
5. Send a request using the GET Method. The request must be in the following format:
§ URL- https://<HOST_NAME:PORT>/<TENANT>/dsa-ext/v1/data-access/keys/<connector_id>
There is no payload to be submitted during API invocation.
This section provides the list of parameters in the JSON Response.
The following table provides details for the query parameters returned in the response body.
Table: POST JSON Response
Name |
Type |
Description |
name | STRING | Connector name. |
code | INTEGER | Connector Metadata Key |
attributes | ARRAY | Business
Term Attributes
· name - The Business Term Name. This is a STRING. · code - The Business Term Code. This is a STRING. |
Pass the Business Term Codes received in the response from the Get Metadata Keys API in the Retrieve Data using the Metadata Keys API request to retrieve data. You can specify a filter. However, the filter expression allows only one column.
The API retrieves the JSON response payload data up to 5MB.
· Method – POST
· URL - https://<HOST_NAME:PORT>/<TENANT>/dsa-ext/v1/data-access/data/<connector_id>
· Content-Type - application/json
To call the API, follow these steps:
1. Open a relevant tool.
2. Copy only the Authorization Token that you got from the Authentication Request.
3. Go to Header.
4. Enter KEY as an Authentication and Description as a bearer (Authorization Token) <eyJ4NXQjUzI1NiI6Ikk3cWxndm1Kal...>.
5. Send a request using the POST Method. The request must be in the following format:
§ URL- https://<HOST_NAME:PORT>/<TENANT>/dsa-ext/v1/data-access/data/<connector_id>
This section provides the list of parameters in the JSON Request.
Table: JSON Request
Name |
Type |
Required |
Description |
attr_filter |
STRING |
Yes |
Business Term Codes from the Get Metadata Keys API. NOTE: · The Business Term Codes must be enclosed within square brackets ([ ]). |
data_filter |
OBJECT |
Yes |
Key is the Business Term Code and the value is the corresponding value for the Business Term Code. For example: "data_filter": {"BTO1375": "01-Apr-2022"} NOTE: · The filter expression allows only one column. |
This section provides the list of parameters in the JSON Response.
The following table provides details for the query parameters returned in the response body.
Table: POST JSON Response
Name |
Type |
Description |
name | STRING | Logical Entity Name used in the Connector. |
data | ARRAY | Key is the Business Term Code and the value is the corresponding value present in the table for the Business Term Code. |