Upload a sort script file.
Debugging
Request headers
This operation uses only the common request headers. For more information, see Common request parameters.
Request syntax
PUT /v4/openapi/app-groups/[appGroupIdentity]/apps/[appVersionId]/sort-scripts/[scriptName]/files/src/[fileName] HTTP/1.1
Request parameters
Parameter | Type | Position | Required | Example | Description |
---|---|---|---|---|---|
appGroupIdentity | String | Path | Yes | ''1111'' |
The name or ID of the application. |
appVersionId | String | Path | Yes | ''111111'' |
The version number of the application. |
scriptName | String | Path | Yes | ''11111'' |
The script for which you want to upload the file. |
scriptContent
Parameter |
Type |
Required |
Description |
---|---|---|---|
content |
String |
Yes |
The script content that is encoded in the Base64 format. |
version |
Interge |
No |
The version number of the script content. This version number is used to ensure that the script content is updated in order when the script content is concurrently updated by multiple users. Default value: the current time. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
requestId | String | ABCDEFGH |
The ID of the request. |
Examples
Sample requests
POST /v4/openapi/app-groups/my_app/apps/123456/sort-scripts/script1/files/src/UserScorer.cava
{
"content" : "YWJjZGVmZw==",
"version" : 123456
}
Sample success responses
XML
format
<requestId>ABCDEFGH</requestId>
JSON
format
{
"requestId": "ABCDEFGH"
}
Sample error response
Error response
{
"requestId" : "ABCDEFGH"
"code":"InvalidAppStatus",
"message":"invalid app status.",
"httpCode":400
}
Error codes
For a list of error codes, visit the API Error Center.