Help Center/ EventGrid/ API Reference/ APIs/ Event Target Catalog Management/ Obtaining the Event Target Catalog
Updated on 2023-05-24 GMT+08:00

Obtaining the Event Target Catalog

Function

This API is used to obtain the predefined target catalog of an event.

URI

GET /v1/{project_id}/target-catalogs

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Tenant project ID.

Table 2 Query Parameters

Parameter

Mandatory

Type

Description

offset

No

Integer

Offset, which is the position where the query starts. The value must be greater than or equal to 0.

Minimum: 0

Maximum: 100

Default: 0

limit

No

Integer

Number of records displayed on each page. The value must be within the range [1, 1000].

Minimum: 1

Maximum: 1000

Default: 15

sort

No

String

Sorting mode of the query results.

Default: created_time:DESC

fuzzy_label

No

String

Label of the event target. It is used for fuzzy match.

Request Parameters

Table 3 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

User token. The token can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is the user token.

Minimum: 1

Maximum: 16384

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

total

Integer

Total number of records.

Minimum: 0

Maximum: 100

size

Integer

Number of records displayed on the current page.

Minimum: 0

Maximum: 100

items

Array of CatalogTargetInfo objects

Object list.

Table 5 CatalogTargetInfo

Parameter

Type

Description

id

String

ID of the event target catalog.

name

String

Name of the event target catalog.

Minimum: 1

Maximum: 128

label

String

Label of the event target catalog.

Maximum: 255

description

String

Description of the event target catalog.

Maximum: 512

provider_type

String

Provider type, which can be OFFICIAL (official cloud service event target) and CUSTOM (third-party event target).

Enumeration values:

  • OFFICIAL

  • CUSTOM

parameters

Array of CatalogTargetParameters objects

Event target parameters

created_time

String

UTC time when the catalog is created.

updated_time

String

UTC time when the catalog is updated.

Table 6 CatalogTargetParameters

Parameter

Type

Description

name

String

Name of the target parameter.

Minimum: 1

Maximum: 128

label

String

Label of the target parameter.

Maximum: 255

metadata

Object

Metadata of the target parameter, for example, whether the parameter is mandatory and the text box type.

Status code: 400

Table 7 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

Minimum: 1

Maximum: 128

error_msg

String

Error message.

Minimum: 1

Maximum: 512

error_details

String

Error details.

Minimum: 1

Maximum: 1024

request_id

String

Request ID.

Minimum: 1

Maximum: 128

Status code: 401

Table 8 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

Minimum: 1

Maximum: 128

error_msg

String

Error message.

Minimum: 1

Maximum: 512

error_details

String

Error details.

Minimum: 1

Maximum: 1024

request_id

String

Request ID.

Minimum: 1

Maximum: 128

Status code: 403

Table 9 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

Minimum: 1

Maximum: 128

error_msg

String

Error message.

Minimum: 1

Maximum: 512

error_details

String

Error details.

Minimum: 1

Maximum: 1024

request_id

String

Request ID.

Minimum: 1

Maximum: 128

Status code: 404

Table 10 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

Minimum: 1

Maximum: 128

error_msg

String

Error message.

Minimum: 1

Maximum: 512

error_details

String

Error details.

Minimum: 1

Maximum: 1024

request_id

String

Request ID.

Minimum: 1

Maximum: 128

Status code: 500

Table 11 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

Minimum: 1

Maximum: 128

error_msg

String

Error message.

Minimum: 1

Maximum: 512

error_details

String

Error details.

Minimum: 1

Maximum: 1024

request_id

String

Request ID.

Minimum: 1

Maximum: 128

Example Requests

None

Example Responses

Status code: 400

{
  "error_code" : "EG.00014000",
  "error_msg" : "Bad request"
}

Status code: 401

{
  "error_code" : "EG.00014010",
  "error_msg" : "Incorrect token or token resolution failed"
}

Status code: 403

{
  "error_code" : "EG.00014030",
  "error_msg" : "No permissions to request this method"
}

Status code: 404

{
  "error_code" : "EG.00014040",
  "error_msg" : "Not request resource found"
}

Status code: 500

{
  "error_code" : "EG.00015000",
  "error_msg" : "Internal Server Error"
}

Status Codes

Status Code

Description

200

Operation successful.

400

Invalid request.

401

Unauthorized.

403

Access denied.

404

Resource not found.

500

Internal service error.

Error Codes

See Error Codes.