Bulk Query Dictionaries

Retrieves the items of multiple dictionary types in one request.

Request URL

POST {base_url}/uc-resources/api/v1/dicts/batch

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.
Query parameters
Parameter Required Type Description
types Yes Array<String> The list of dictionary type names to query, separated by commas, such as operator_type,source_type. You can obtain the names using the Query Dictionary Types interface.
Note:

If a type name in the types parameter is not registered, the response returns an empty array for that type instead of an error.

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.
  • 200: Request succeeded.
  • Non-200 value: Request failed.
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 The queried dictionaries. The key is the dictionary type name passed in the types parameter, and the value is the list of items of that type.
Dictionary_Item
Parameter Type Description
code String The code of the dictionary item.
label String The display name of the dictionary item.
scope Array<String> The scopes that the dictionary item applies to. (inferred)

Example

Request example

POST /uc-resources/api/v1/dicts/batch?types=operator_type,source_type HTTP/1.1
Host: api.cn.novoone.com
Authorization: Bearer eyJraWQiOiJjbi0wLWtleS0xIiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiJkaXN0cmlidXRvcmV4YW1wbGVAb3V0bG9vay5jb20iLCJhcHBfa2V5Ijoic2xOdnQzaHc1NXB2Vm5HRlNhR2ZOVTNmMWxYQ3lpa08iLCJncmFudF90eXBlIjoib3BlbmFwaSIsImNsaWVudF9leHQiOnsiZGVzY3JpcHRpb24iOiLnrKzkuInmlrnlkIjkvZzkvJnkvLTlupTnlKgiLCJwYXJ0bmVyIjoi56S65L6L5ZCI5L2c5LyZ5Ly0In0sImNsaWVudF90eXBlIjoib3BlbmFwaSIsImV4cCI6MTc5MzcyNjA2NiwiaWF0IjoxNzkzNzA0NDY2LCJqdGkiOiIxMWY0Zjg5NS1iZjg3LTRmMzItODc1MS1mN2YxOTY2MTM2MTUiLCJjbGllbnRfaWQiOiJub3ZvLW9wZW4tcGxhdGZvcm0iLCJ1c2VyX2V4dCI6eyJyb2xlSWRzIjpbM10sInN0eXBlIjoiQURNSU4iLCJ0ZW5hbnRDb2RlIjpudWxsLCJ0eXBlIjoiUF9BQ0NPVU5UIiwidXNlcklkIjozMDc2OTEzNjQ0OTE1OTk4NzIwLCJlbWFpbCI6ImRpc3RyaWJ1dG9yZXhhbXBsZUBvdXRsb29rLmNvbSIsInVzZXJuYW1lIjoiZGlzdHJpYnV0b3JleGFtcGxlQG91dGxvb2suY29tIiwidWNJZCI6MzA3NjkxMzY0NDg5MDgzMjg5Nn19.MvcRJ65X45nvneeknNK0vUo8AY4uLIUkGUzkQmspfBfSqiI7P8q2dVKMldjKeB-9JNr91h2xFpfzbz_1CstSkM0l7QpZuK9aLOjCsDlY0C2FPfZHOdS0gggUAT7SlG1vReEXK4zs0uCWZ6FZUhyDv3R1EDHGYQVd_Qb7mxXxLIvnqwlXC9Txei8qqvAT8dTEpZmKnI2wyPdBvhg7MFhVIUgei8JhZrrJtWglt0lmxxBsPcKZkJXWs75ZH4j2zsMOQf6klkXDdpOgQUIrQI9PsLrSlRX94FRJ4PvqQbHJtme9bXi6jkTiY1aykDeHA3fxX70SyAJ8MXsBLDRdEMdM_w
x-tenant-code: jint

Response example

HTTP/1.1 200 OK
{
  "result": {
    "operator_type": [
      {
        "code": "SUPER_ADMIN",
        "label": "Super Admin",
        "scope": []
      },
      {
        "code": "ADMIN",
        "label": "Admin",
        "scope": []
      },
      {
        "code": "RESELLER",
        "label": "Reseller",
        "scope": []
      },
      {
        "code": "TENANT_USER",
        "label": "Tenant User",
        "scope": []
      }
    ],
    "source_type": [
      {
        "code": "Web",
        "label": "Web",
        "scope": []
      },
      {
        "code": "API",
        "label": "API",
        "scope": []
      },
      {
        "code": "PC",
        "label": "PC",
        "scope": []
      },
      {
        "code": "Mobile",
        "label": "Mobile",
        "scope": []
      }
    ]
  },
  "requestId": "429f0596d042ac3310d735a2e80c4c4d",
  "code": "200",
  "message": "SUCCESS"
}