Updating a Custom Scenario
Function
This API is used to update the content of a custom scenario.
URI
PUT /v2.0/{project_id}/workspaces/{workspace_id}/scenes/{scene_id}
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| project_id | Yes | String | Project ID. For details on how to obtain the project ID, see Obtaining a Project ID. |
| scene_id | Yes | String | Scenario ID |
| workspace_id | Yes | String | Workspace ID |
Request Parameters
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| Content-Type | Yes | String | Content type. The value is application/json. |
| X-Auth-Token | Yes | String | User token. For details on how to obtain the user token, see Obtaining a User Token Through Password Authentication. |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| category | Yes | String | Scenario type. The options are:
|
| datasource_id | Yes | String | Data source ID, which is a string of 32 characters and contains letters, digits, underscores (_), and hyphens (-) |
| ds_config | Yes | ds_config object | Data source settings |
| scene_name | Yes | String | Scenario name, which is a string of 1 to 64 characters and contains letters, digits, underscores (_), and hyphens (-) Minimum: 1 Maximum: 64 |
| specs_config | Yes | SpecsConfig object | Computing specifications |
| type | Yes | String | Scenario type. The options are:
|
| service_type | Yes | String | Service type. The options are:
|
Response Parameters
Status code: 200
| Parameter | Type | Description |
|---|---|---|
| is_success | Boolean | Whether the request is successful |
| message | String | Response message (This field is not returned when the request is successful.) |
| error_code | String | Error code (This parameter is not returned when the request is successful.) |
Example Requests
This API is used to update the scenario content.
/v2.0/testuuidxxxxxxxxxxxxxxxxxxxxxxxx/workspaces/testuuidxxxxxxxxxxxxxxxxxxxxxxxx/scenes/testuuidxxxxxxxxxxxxxxxxxxxxxxxx
{
"scene_name" : "jby-test-0227-4",
"category" : "customize",
"type" : "UI",
"service_type" : "rank",
"datasource_id" : "6a3475a7dd11492e8d14f73a3719333b",
"ds_config" : {
"time_interval" : 30
},
"specs_config" : {
"offline" : "4CU",
"nearline" : "2CU",
"rank" : "8CU",
"online_tps" : 10
}
} Example Responses
Status code: 200
OK
{
"is_success" : "true"
} Status Codes
| Status Code | Description |
|---|---|
| 200 | OK |
Error Codes
See Error Codes.
Last Article: Querying the List of Scenarios
Next Article: Updating an Intelligent Scenario
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.