Appearance
Add or modify a dictionary
About 203 wordsLess than 1 minute
apiDictionaries
2025-05-19
MethodPOST
Request URL
/plugin/datafor-modeler/api/dict/updateAuthorization
 Use of this API requires authentication. For details about the authentication method, see
Authorization.
Content Typeapplication/json
Request Schema
| Name | Location | Type | Required | Description | 
|---|---|---|---|---|
| body | body | object | Yes | Request payload | 
| ├── id | body | string | No | Leave empty for add, provide ID for update | 
| ├── name | body | string | Yes | Dictionary name | 
| ├── datatype | body | string | Yes | 1for NUMBER,2for STRING | 
| ├── type | body | string | Yes | 1for list,2for SQL | 
| ├── dbconn | body | string | No | Database connection name | 
| ├── default | body | string | No | Default value | 
| ├── detail | body | string | No | String array or SQL query | 
| ├── expire | body | integer | No | Expiration time in seconds | 
Request Example
{
  "id": "dev",
  "name": "dev",
  "datatype": "2",
  "type": "2",
  "dbconn": "foodmart",
  "default": "1",
  "detail": "select warehouse_class_id,description from foodmart.warehouse_class",
  "expire": 86400
}Response Example
{
  "msg": "success",
  "success": true
}HTTP Responses
| HTTP Status Code | Meaning | Description | Data schema | 
|---|---|---|---|
| 200 | OK | none | Inline | 
Response Data Schema (HTTP 200)
| Name | Type | Required | Description | 
|---|---|---|---|
| msg | string | No | Response message | 
| success | boolean | Yes | Indicates if the operation was successful |