WorkspaceCodePublish

Updated at:

Deploys workspace code asynchronously. Returns a key for querying deployment status through WorkspaceActionStatus.

Operation description

Deploys 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 numeric workspace ID.

12345678

Config

string

Yes

Code deployment configuration as a JSON string. The repos array specifies Git repositories and branches to deploy. The exclude array lists directories to skip.

{"repos":[{"repo":"git@xxxx.git", "branch":"master"}], "exclude":["/.dms", "/username"]}

Response elements

Element

Type

Description

Example

object

Schema of Response

Data

object

Contains the asynchronous deployment key.

Key

string

The asynchronous deployment key. Pass this to WorkspaceActionStatus to check progress.

ws-xxxx-xxxxxx

Message

string

The error message. 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

Whether 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.