WorkspaceCodePublish
This asynchronous API returns a key. Use this key to query the WorkspaceActionStatus API for the code deployment status.
Operation description
Deploys the code in a workspace.
Try it now
Test
RAM authorization
Request syntax
POST HTTP/1.1
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| WorkspaceId |
string |
Yes |
The workspace ID (numeric ID) for the code deployment. |
12345678 |
| Config |
string |
Yes |
The configuration for the code deployment, specified as a JSON string. The |
{"repos":[{"repo":"git@xxxx.git", "branch":"master"}], "exclude":["/.dms", "/username"]} |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
Schema of Response |
||
| Data |
object |
An object that contains the key for the asynchronous code deployment. |
|
| Key |
string |
The key for the asynchronous code deployment. Use this key to query its status. |
ws-xxxx-xxxxxx |
| Message |
string |
The error message returned if the request fails. This parameter is empty on success. |
Failed to deploy,repo branch empty |
| RequestId |
string |
The request ID. |
67E910F2-4B62-5B0C-ACA3-7547695C**** |
| HttpStatusCode |
integer |
The HTTP status code. |
200 |
| ErrorCode |
string |
The error code. |
UnknownError |
| Success |
boolean |
Indicates if the request succeeded. |
true |
Examples
Success response
JSON format
{
"Data": {
"Key": "ws-xxxx-xxxxxx"
},
"Message": "Failed to deploy,repo branch empty",
"RequestId": "67E910F2-4B62-5B0C-ACA3-7547695C****",
"HttpStatusCode": 200,
"ErrorCode": "UnknownError",
"Success": true
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.