Creating a Pipeline Trigger Policy
Function
This API is used to create a pipeline trigger policy.
URI
POST /cpepipeline/v2/pipelines/{pipeline_id}/hooks
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| pipeline_id | Yes | String | Pipeline ID. See Querying the Pipeline List. |
Request
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| Content-Type | Yes | String | Message body type (format). Default value: application/json;charset=utf8. |
| X-Auth-Token | Yes | String | API calling can be authenticated using a token or AK/SK. If you use a token, this parameter is mandatory and must be set to the token. For details about how to obtain the token, see Obtaining a User Token Through Password Authentication. |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| hooks | No | Array of objects | Trigger policy. For details, see Table 4. |
| strategy_type | Yes | Integer | Trigger type. |
Response
| Parameter | Type | Description |
|---|---|---|
| [Array elements] | Array of objects | Execution record. For details, see Table 6. |
Example Request
{
"strategy_type": 1,
"hooks": [
{
"schedule": "59 46 21 21 7 ? 2025",
"timezone_operator": "+",
"timezone_hour": 8
}
]
} Example Response
[
{
"schedule": "59 46 21 21 7 ? 2025",
"timezone_operator": "+",
"timezone_hour": 8.0
}
] Status Codes
| Status Code | Description |
|---|---|
| 200 | OK |
| 400 | Bad Request |
| 404 | Not Found |
| 500 | Internal Server Error |
Error Codes
What is your overall rating for this page?
Thank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot