Reviewed-by: Hasko, Vladimir <vladimir.hasko@t-systems.com> Co-authored-by: Li, Qiao <qiaoli@huawei.com> Co-committed-by: Li, Qiao <qiaoli@huawei.com>
15 KiB
Modifying a Reference Table
Function
This API is used to modify a reference table.
URI
PUT /v1/{project_id}/waf/valuelist/{valuelistid}
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID |
valuelistid |
Yes |
String |
Reference table ID. It can be obtained by calling the API Querying the Reference Table List |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
User token |
Content-Type |
Yes |
String |
Content type Default: application/json;charset=utf8 |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
name |
Yes |
String |
Reference table name. The value can contain a maximum of 64 characters. Only digits, letters, hyphens (-), underscores (_), and periods (.) are allowed. |
type |
Yes |
String |
Reference table type. For details, see the enumeration list Enumeration values:
|
values |
No |
Array of strings |
Value of the reference table |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
id |
String |
ID of a reference table |
name |
String |
Reference table name |
type |
String |
The value can be:
|
timestamp |
String |
Reference table timestamp |
values |
Array of strings |
Value of the reference table |
Status code: 400
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code |
error_msg |
String |
Error message |
Status code: 401
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code |
error_msg |
String |
Error message |
Status code: 500
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code |
error_msg |
String |
Error message |
Example Requests
PUT https://{Endpoint}/v1/{project_id}/waf/valuelist/{valuelistid}? { "name" : "demo2", "type" : "url", "values" : [ "/demo" ] }
Example Responses
Status code: 200
Request succeeded.
{ "id" : "3978ca9403844a62bbd24bb5b8d16d4e", "name" : "demo2", "type" : "url", "values" : [ "/demo" ], "timestamp" : 1656495488880 }
Status Codes
Status Code |
Description |
---|---|
200 |
Request succeeded. |
400 |
Request failed. |
401 |
The token does not have required permissions. |
500 |
Internal server error. |
Error Codes
See Error Codes.