Once you have enabled an API on your dataset, you can use Talend Cloud API Tester to
send requests and test your API.
Procedure
-
In Talend Cloud API Tester, open the Requests tab and click the New
draft request button in the left panel.
-
Keep the default GET method and enter your API URL, for
example
https://company-talend-com.eu.talend-dataset.com/apis/customers-api-2PZPTB/customers
to get all data in the
customers
entity set.
If your connection uses a Cloud Engine for Design, you
can find the URL in the API tab of your dataset. If you are using
a Remote Engine Gen2, contact your administrator to get the relevant URL.
- Optional:
Expand QUERY PARAMETERS and click Add query
parameter if you want to add parameters.
For example, if you want to get the first two items for which the value of
customer_city
is
Olympia
, you can configure the
parameters as follows:
Name |
Value |
$filter
|
customer_city eq 'Olympia'
|
$top
|
2
|
-
Add your authentication:
- If you are using Basic authentication, click Add
authorization under HEADERS, then
enter the username and password for one of your consumers and click
Set.
- If you are using an API key, click Add header,
enter Authorization in the
name field and enter Token
followed by your API key in the value field.
-
Click Send to send the request.
Results
Talend Cloud API Tester
returns data from your dataset. With the parameters in this example, the response looks
like
this:
{
"@odata.context": "https://company-talend-com.eu.talend-dataset.com/apis/customers-api-2PZPTB/$metadata#customers",
"value":[
{
"customer_age": "36",
"id": "g9wjC",
"customer_name": "Franklin Washington",
"customer_city": "Olympia",
"customer_street": "North Erringer Road"
},
{
"customer_age": "68",
"id": "EVFMD",
"customer_name": "Ronald Van Buren",
"customer_city": "Olympia",
"customer_street": "Bayshore Freeway"
}
]
}