WorkspaceCodePublish

Updated at:

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

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

No authorization for this operation. If you encounter issues with this operation, contact technical support.

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 array identifies the Git repositories in the workspace and specifies the branch to deploy. The exclude array lists directories to skip during the deployment.

{"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.