Creating a Synchronization Event
Function
This API is used to create a synchronization event when objects in the source bucket need to be synchronized. Then the system synchronizes the objects contained in the synchronization event.
Debugging
You can debug this API in API Explorer.
URI
POST /v2/{project_id}/sync-tasks/{sync_task_id}/events
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| project_id | Yes | String | Specifies the project ID. Minimum length: 1 character Maximum length: 1,024 characters |
| sync_task_id | Yes | String | Specifies the synchronization task ID. Minimum length: 1 character Maximum length: 1,024 characters |
Request
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| X-Auth-Token | Yes | String | Specifies the token used for API authentication. It is recommended that you use signature authorization. For details, see "API Authentication." Minimum length: 1 character Maximum length: 16,384 characters |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| object_keys | Yes | Array of strings | Specifies the list of URL-encoded names of objects to be synchronized. A maximum of 10 objects can be included. |
Response
When the status code is 400, the response parameters are as follows.
| Parameter | Type | Description |
|---|---|---|
| error_msg | String | Specifies the error message. |
| error_code | String | Specifies the error code. |
Example Request
-
/v2/f697f813-554a-4f05-bac8-82a183b20878/sync-tasks/31e9b7e6-6ffb-452f-9842-6ce354d99d75/events { "object_keys" : [ "test%2F001.txt", "test%2F002.txt" ] } -
/v2/f697f813-554a-4f05-bac8-82a183b20878/sync-tasks/31e9b7e6-6ffb-452f-9842-6ce354d99d75/events { "object_keys" : [ "test%2B001.txt" ] } -
/v2/f697f813-554a-4f05-bac8-82a183b20878/sync-tasks/31e9b7e6-6ffb-452f-9842-6ce354d99d75/events { "object_keys" : [ "test+001.txt" ] }
Example Response
None
Status Codes
| Status Code | Description |
|---|---|
| 200 | OK. Synchronous event created successfully. |
| 400 | Bad Request. Invalid parameters. |
| 404 | Not Found. No synchronization tasks found. |
| 503 | Service unavailable. Please try again later. |
Error Codes
See Error Codes.
Last Article: SyncApi
Next Article: Out-of-Date APIs
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.