Query Meta Record


Get meta records by record type IDs.

Request Format


GET https://{api-gateway}/cds-meta-service/v1.0/record?action=query

Request Parameters


Name

Location

Mandatory/Optional

Data Type

Description

orgId

Query

Mandatory

String

The organization ID which the record belongs to. How to get orgId >>

recordTypes

Query

Optional

String

The record type ID which the record belongs to. Separate multiple IDs by commas. Up to 100 record types are allowed in a single query. How to get recordTypes>>

withSchema

Query

Optional

Boolean

Whether to return the schema of the record.

locale

Query

Optional

String

Use zh-CN, en-US, ja-JP, or es-ES. If not specified, the value is set to en_US by default.

withI18n

Query

Optional

Boolean

Whether to return the internationalization content.

Response Content Type


application/json; charset = UTF-8

Response Codes


See Common Data Service API Response Codes.

Samples

Request Sample


https://{api-gateway}/cds-meta-service/v1.0/record?action=query&orgId=yourOrgId

Response Sample


{
   "data":[
        {
            "recordType":"SR",
            "name": "Service Request",
            "references": [
                {
                    "recordType": "WO",
                    "foreignKeys": {
                        "fieldOfThisType": "fieldOfForeignType"
                    }
                }
            ],
            "schema": [{
                "field":"field1",
                "name":"field1",
                "isI18n": false,
                "dataType":"String",
                "units":"--",
                "sortable":false,
                "filters":["in",">=",">","==","<","<=","startWith","between"],
                "expression":"rawField1",
                "enum":{
                    "0": {
                            "nameI18n": {
                            "defaultValue": "Normal",
                            "i18nValue": {
                                "en_US": "Normal",
                                "zh_CN": "健康"
                            }
                        }
                    },
                     "1": {
                            "nameI18n": {
                            "defaultValue": "Underperformed",
                            "i18nValue": {
                                "en_US": "Underperformed",
                                "zh_CN": "亚健康"
                             }
                        }
                    }
                }
            },
            {
                "field":"field2",
                "name":"field2",
                "isI18n": false,
                "dataType":"Double",
                "units":"kW",
                "sortable":true,
                "filters":[],
                "expression":"rawField2",
                "enum":{}
            }]
        },
        {
            "recordType":"WO",
            "name": "Work Order",
            "schema": [{
                "field":"field1",
                "name":"field1",
                "isI18n": false,
                "dataType":"String",
                "units":"--",
                "sortable":false,
                "filters":["in",">=",">","==","<","<="],
                "expression":"rawField1",
                "enum":{}
            },
            {
                "field":"field2",
                "name":"field2",
                "isI18n": false,
                "dataType":"Double",
                "units":"kW",
                "sortable":true,
                "filters":[],
                "expression":"rawField2",
                "enum":{}
            }]
        }
   ],
   "code":0,
   "msg":"OK",
   "traceId": "1234567890abcdefghijkl0987654321"
}