Use of the /Metadata Endpoint
You can use the /metadata endpoint to request a list of supported facts and dimension, or a list of filter and selection fields by fact/dimension. These fields and facts/dimensions can be used to create custom view templates.
|
Parameter |
Description |
|---|---|
|
realm |
Required. The realm name. |
|
documentType |
Optional. If specified, the response contains only fields for the specified fact or dimension type. If not specified, the response contains fields for all fact/dimension types. |
|
product |
Required. Set value equal to analytics to limit results to fields relevant to the Analytical reporting API. |
|
select |
Optional. Specifies which fields in the output will be populated and which will be null. Relevant fields are documentType, filterFields, and selectFields. Possible values of the select parameter are as follows:
|
|
includeCustomFields |
Optional. Default value is false. When true, the response to the /metadata query includes custom fields. |
|
includeFieldDescription |
Optional. Default value is false. When true, the response to the /metadata query includes field descriptions for all returned fields. Field descriptions are returned as values of fieldDescription. |
|
includeFieldName |
Optional. Default value is false. When true, the response to the /metadata query includes field field labels for all returned fields. Field labels are returned as values of fieldName. |
|
includePrimaryKeys |
Optional. Boolean. When true, primary keys are included in the response. When false primary keys are omitted from the response. Default is false. GET {{runtime_url}}/metadata?includePrimaryKeys={true|false}&realm=realm_name
|
|
jsonSchema |
Optional. Default value is false. The response to a /metadata query can be in either of two formats, which handle complex data structures such as objects in two different ways:
For example, in JSON Schema format, the selectionFields section of the response might list the Approver object as follows:
"Approver": {
"type": [
"object",
"null"
],
"properties": {
"UserId": {
"title": "Approver.UserId",
"type": [
"string",
"null"
],
"precision": null,
"scale": null,
"size": 50,
"allowedValues": null,
"fieldName": "Approver -> User ID",
"fieldDescription": "User identification name or number"
},
"SourceSystem": {
"title": "Approver.SourceSystem",
"type": [
"string",
"null"
],
"precision": null,
"scale": null,
"size": 100,
"allowedValues": null,
"fieldName": "Approver -> Source System",
"fieldDescription": "Source System"
}
}
},
Notice that in the JSON Schema example above, Approver.SourceSystem is nested within Approver. In the Flat JSON format, these fields would appear at the same hierarchal level. |
|
viewTemplateName |
Optional. Restricts the output to include exactly the subset of the document schema that would be returned for the specified view template. |