Get data source by data source ID

Use this GET request to get a specific data source by its data source ID:

GET /wfo/api/em/recorder/v2/datasources/{id}

If you are at release 15.2 HFR 4 or earlier use the URL that begins /api/em/v2/datasources. If you are at release 15.2 HFR4 with the latest KBs (or higher) use the URL that begins /wfo/api/em/recorder/v2/datasources.

This request requires the View Data Sources user security privilege. This privilege is not tenant safe and cannot be used when using the "User Token" for authentication in a Multi-Tenant SaaS environment. Instead, use an "API Tenant Token" in a Multi-Tenant SaaS environment.

Request parameters

Type

Name

Description

Schema

Required

Path

id

The unique numeric identifier of the data source you want to return.

Integer (int32)

True

Request Example

Here is an example of this request.

GET http://10.100.200.90/wfo/api/em/recorder/v2/datasources/1002

Accept: application/vnd.api+json

Content-Type: application/vnd.api+json

Responses

This request can return these responses.

HTTP Status Code

Detail

Schema

200

Returns an array with a single data source

ExistingDataSource

404

Data Source was not found.

Errors

Response Structure

Path

Type

Description

data [] .id

Integer (int32)

The unique numeric identifier of the data source.

data [] .type

String

Always has the value "DataSource."

data [] attributes.name

String

The name of the data source.

data [] attributes.description

String

The description of the data source.

data [] attributes.type

String

The type of the data source.

data [] attributes.subType

String

The subtype of the data source.

data [] attributes.parentid

Number

The numeric ID of the parent data source. (Required for data source of subtype Text Store.)

data [] attributes.organizationId

Number

The numeric ID of the organization that owns this data source.

data [] attributes.externalId

Number

This attribute is not used in this release.

data [] attributes.associatedRoles

Number

The numeric ID of server roles that are associated to the data source.

200 Response Example

Here is an example of a successful 200 response to this request.

{

    "data":[

    {

          "id":"1002",

          "type":"DataSource",

          "attributes":{
                 "name":"Text Store 1",

                 "description":"My first text store",

                 "type": "TextAnalytics",

                 "subType":"TextStore",

                 "parentId":"21",

                 "organizationId": -3001,

                 "externalId": 5000550,

                 "associatedRoles":[ 678001, 678002 ]

         }

     } ]

}

Error Response 404

The error response includes the following attributes:

  • status - The HTTP status code applicable to a problem, expressed as a string.

  • title - The Enterprise Manager error code title.

  • detail - A short description of the error

Example 404 response:

{

"errors": [ {

"status" : "404",

"title" : "Object Not Found",

"detail" : "Data Source with ID '104' was not found"

} ]

}

Data Sources API v2 requests and error codes

Data Source API version 2 overview