Help Center/ Media Processing Center/ API Reference/ Authorization and Configuration APIs/ Querying Transcoding Server Event Notifications
Updated on 2023-12-25 GMT+08:00

Querying Transcoding Server Event Notifications

Function

Queries the enabling statuses of subscription events of an SMN topic and subscription messages.

Calling Method

For details, see Calling APIs.

URI

GET /v1/{project_id}/notification

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Specifies the project ID.

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

No

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.

Authorization

No

String

Authentication information. This parameter is mandatory when AK/SK-based authentication is used.

X-Project_Id

No

String

Project ID. This parameter is mandatory when AK/SK-based authentication is used. It is same as the project ID in path parameters.

X-Sdk-Date

No

String

Time when the request is sent. This parameter is mandatory when AK/SK-based authentication is used.

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

notifications

Array of Notification objects

Event notification template information

total

Integer

Total number of event notification templates

Table 4 Notification

Parameter

Type

Description

event_name

String

Name of a message event

status

String

Indicates whether an event notification template is selected.

topic

String

URN of the event notification topic

msg_type

Integer

Subscription message type

Status code: 400

Table 5 Response body parameters

Parameter

Type

Description

error_code

String

Error code

error_msg

String

Error description

Example Requests

GET https://{endpoint}/v1/{project_id}/notification

Example Responses

Status code: 200

Event notification query on the transcoding server has been configured.

{
  "total" : 7,
  "notifications" : [ {
    "event_name" : "RemuxComplete",
    "status" : "on",
    "topic" : "urn: smn:region1:tenantId:topic",
    "msg_type" : 3
  }, {
    "event_name" : "AnimatedGraphicsComplete",
    "status" : "on",
    "topic" : "urn: smn:region1:tenantId:topic",
    "msg_type" : 3
  }, {
    "event_name" : "TranscodeComplete",
    "status" : "on",
    "topic" : "urn: smn:region1:tenantId:topic",
    "msg_type" : 3
  }, {
    "event_name" : "ThumbnailComplete",
    "status" : "off",
    "topic" : "urn: smn:region1:tenantId:topic",
    "msg_type" : 3
  }, {
    "event_name" : "TranscodeStart",
    "status" : "on",
    "topic" : "urn: smn:region1:tenantId:topic",
    "msg_type" : 3
  }, {
    "event_name" : "ParseComplete",
    "status" : "on",
    "topic" : "urn: smn:region1:tenantId:topic",
    "msg_type" : 3
  }, {
    "event_name" : "EditingComplete",
    "status" : "on",
    "topic" : "urn: smn:region1:tenantId:topic",
    "msg_type" : 3
  } ]
}

Status code: 400

Event notification query on the transcoding server cannot be configured.

{
  "error_code" : "MPC.10208",
  "error_msg" : "Failed to verify the tenant ID."
}

Status Codes

Status Code

Description

200

Event notification query on the transcoding server has been configured.

400

Event notification query on the transcoding server cannot be configured.

Error Codes

See Error Codes.