Update API Setting
Update the OpenAPI configuration.
Request URL
PUT {base_url}/uc-user/api/v1/system/api-config
Request parameters
- Headers
-
Parameter Required Type Description Authorization Yes String The access token used for authentication. Format: Bearer
{access_token}.x-tenant-code No String The tenant name. Note: You can obtain tenant name using the Query Tenants interface.
- Body parameters
-
Parameter Required Type Description enabled Yes Boolean Whether to enable OpenAPI.
Valid value:
true: Enabled.false: Disabled.
clientSecret No String The new client secret to be saved. Note: You can generate a new client secret using the Regenerate Client Secret interface.
Response parameters
| Parameter | Type | Description |
|---|---|---|
| requestId | String | The unique ID of the request, which can be used to quickly locate the request. |
| code | String | The HTTP status code of the request.
|
| message | String | The status message of the request. |
| detailMessage | String | The detailed error information. When the request is successful, this parameter returns empty. |
| result | Object<API_Configuration> | The OpenAPI configuration. |
- API_Config
-
Parameter Type Description enabled Boolean Whether OpenAPI is enabled.
true: Enabled.false: Disabled.
clientId String The client ID. clientSecret String The client secret. Note: The value is masked as******in this response. To retrieve the plaintext value, use the Get Client Secret interface.
Example
Request example
PUT /uc-user/api/v1/system/api-config HTTP/1.1
Host: api.cn.novoone.com
Authorization: Bearer eyJraWQiOiJjbi0wLWtleS0xIiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiIxMDAwQGNvbG9ydGVzdDIiLCJncmFudF90eXBlIjoicGFzc3dvcmQiLCJ1c2VyX25hbWUiOiIxMDAwQGNvbG9ydGVzdDIiLCJzY29wZSI6WyJyZWFkIiwid3JpdGUiXSwiY2xpZW50X2V4dCI6eyJkZXNjcmlwdGlvbiI6IueuoeeQhuWQjuWPsFdlYuW6lOeUqCIsInBsYXRmb3JtIjoid2ViIn0sImV4cCI6MTc5MzYyNzk4MSwiaWF0IjoxNzkzNjA2MzgxLCJqdGkiOiIyNDZmMmI1ZC01NWJiLTRiYjktOGVkNS0wY2JjNzcyZDgzZjciLCJjbGllbnRfaWQiOiJub3ZvLWFkbWluLXdlYiIsInNpZCI6ImZiOWIxMTMxLWRjMDEtNGEwOS05MzczLTgyYWRkOTQwY2RkZSIsInVzZXJfZXh0Ijp7InJvbGVJZHMiOlsxMDJdLCJwdWlkIjozMDc2OTEzNjQ0OTE1OTk4NzIwLCJ0ZW5hbnRJZCI6MjA3OTUwNDIwNTMwOTE5NDI0MSwicGFyZW50VWNJZCI6MzA3NjkxMzY0NDg5MDgzMjg5NiwidGVuYW50Q29kZSI6ImNvbG9ydGVzdDIiLCJ0eXBlIjoiVF9VU0VSIiwidXNlcklkIjoyMDc5NzQ2OTE1Mzg4MDc2MDMzLCJlbWFpbCI6Imxlb0BzYW1wbGUuY29tIiwidXNlcm5hbWUiOiIxMDAwQGNvbG9ydGVzdDIiLCJ1Y0lkIjozMDc2OTEzNjQ0ODkwODMyODk2fX0.RGyn2te1jfOoFX6QcDflVGktFOo07aqDlDmW2pGQVVUeX-D1B1ZbAvJi66RPE74KqT1IiQWT1ghIsaYXA3TwJFBvU8g77iOGPkFeglRjP3dst8fBbzOXf_oiF7URHKKRi92lFFsvRGVnO-FJJgnVatI3vbpkhyIjBHTxa7MNFLX4Kucn79DmCUAeoFMlA22FkavqAOhteg3H3kMy0r0ndP9qX0x2SMQKj1mwoCyrdDnlW-7zJGZV6iNX-qrhOEE43NQhb46UIZSYk6bsyOyttxv2RVj6B2uysTr43b2WAwKwp_-ItnoxMuNHeVmiHFcG7nblVQOI3a-yEWIP6DdrzA
Content-Type: application/json
{
"enabled": true
}
Response example
HTTP/1.1 200 OK { "result": { "enabled": true, "clientId": "slNvt3hw55pvVnGFSaGfNU3f1lXCyikO", "clientSecret": "******" }, "requestId": "60d48b7e5225f6c802aae7f169dca8e2", "code": "200", "message": "SUCCESS" }