Use case 2: Get a Data Source using the Data Source name
Use this example to get a Data Source using the Data Source name so that you can use the Data Source ID in other API calls.
Prerequisites
The name of the Data Source you are looking for is 'My Data Source'.
Step
-
Use the GET method on the end point /api/em/v2/datasources?name=My Data Source.
Sample Response:
Copy{ "data":[{ "id": "101", "type": "DataSource", "attributes":
{ "name": "Text Store 1", "description": "My Data Source",
"type": "TextAnalytics", "subtype": "TextStore", "parentID":
"21", "organizationId": -3001, "externalId": 5000550,
"associatedRoles": [ 678001, 678002 ] } }] }