Skip to main content

Metadata

If a GET request returns multiple instances of a resource type, the response body returns the _metadata attribute. The _metadata attribute contains information that describes the returned data, including the request URL, total number of resources instances, pagination information, and the common query parameters that are supported by the request. If common query parameters are not specified, default values are returned.

Note
If a GET request returns a single resource or a single instance of a resource, the _metadata attribute is not returned.

The following table describes the attributes that can be returned in the _metadata attribute.

For more information about common query parameters, see Paginating, scoping, filtering, sorting, including data, and excluding data in responses.

AttributesTypeDescription
_metadataObjectInformation about the request, including the request URL, base attributes, sorting, and filtering for the specified query
 limitIntegerNumber of resource instances that can be returned on the page (for pagination)

If set to 0, all instances are returned.

 offsetIntegerOffset at which to start the set of resource instances to be returned (for pagination)
 totalIntegerTotal number of resource instances that are available (for pagination)
 baseAttributesArray of objectsInformation about essential (default) attributes that are returned in the response body
  nameStringName of the base attribute
  sortOrderStringDefault sort order for the attribute. This can be one of the following values.
  • asc. Ascending order
  • desc. (default) Descending order
 excludeAttributesArray of stringsList of attributes, separated by a comma, that are excluded in the response body

This attribute is returned only when the excludeAttributes query parameter is supported.

Note
When both excludeAttributes and includeAttributes query parameters are specified, the excludeAttributes query is ignored; in this case, the value of the excludeAttributes attribute is empty.
 includeAttributesArray of stringsList of attributes, separated by a comma, that are included in the response body
Note
If the excludeAttributes query parameter is specified, the includeAttributes attribute is empty.
 filterOptionsArray of objectsList of criteria that is used to limit the resources that are returned in the response body when a filter query parameter is specified
Note
If filter query parameters are not specified, the filterOptions attribute is empty.
  filterContainsArray of objectsInformation about filter queries that search for data that contains a specific value

Within the same filter query, data matches the query if the value of any one of the specified attributes contains any one of the specified patterns

   attributesStringList of zero or more attribute names in the filter query, separated by a comma

If an attribute name is not provided, all attributes are evaluated.

   valuesStringList of one or more patterns, separated by a comma
  filterNotContainsArray of objectsInformation about filter queries that search for data that exactly matches a specific value

Within the same filter query, data matches the query if the value of any one of the specified attributes contains any one of the specified patterns

   attributesStringList of zero or more attribute names in the filter query, separated by a comma

If an attribute name is not provided, all attributes are evaluated.

   valuesStringList of one or more patterns, separated by a comma
  filterEqualsArray of objectsInformation about filter queries that search for data that exactly matches a specific value

Within the same filter query, data matches the query if the value of any one of the specified attributes contains any one of the specified patterns

   attributesStringList of zero or more attribute names in the filter query, separated by a comma

If an attribute name is not provided, all attributes are evaluated.

   valuesStringList of one or more patterns, separated by a comma
  filterNotEqualsArray of objectsInformation about filter queries that search for data that exactly matches a specific value

Within the same filter query, data matches the query if the value of any one of the specified attributes contains any one of the specified patterns

   attributesStringList of zero or more attribute names in the filter query, separated by a comma

If an attribute name is not provided, all attributes are evaluated.

   valuesStringList of one or more patterns, separated by a comma
  filterRangeArray of objectsInformation about filter queries that search for data that matches a value in a specific range

Within the same filter query, data matches the query if the value of any one of the specified attributes contains any one of the specified patterns

   attributesStringList of zero or more attribute names in the filter query, separated by a comma

If an attribute name is not provided, all attributes are evaluated.

   valuesStringList of one or more patterns, separated by a comma

Each range contains the start and end values in the range, separated by a comma. Multiple ranges are also separated by a comma.

This timestamp is specified using ISO-8601 format (for example, 2019-05-02T19:28:14.000Z). For information about ISO-8601 format, see the W3C Date and Time Formats webpage.

 sortOptionsArray of objectsList of criteria that is used to sort the resources that are returned in the response body when the sort query parameter is specified
Tip
The order of the returned attributes identifies the sort order of the attributes.
  nameStringName of the attribute to sort by
  orderStringSort order. This can be one of the following values.
  • asc. Ascending order
  • desc. (default) Descending order
 _linksObject or Array of objectsRequest URL (see Links)
The following example returns metadata for a specific request when no query parameters are specified.
{
"metadata": {
"offset": 0,
"limit": 0,
"total": 2,
"baseAttributes": [{
"name": "msg"
},
{
"name": "service"
},
{
"name": "severity"
},
{
"name": "systemName "
},
{
"name": "systemType "
},
{
"name": "timeStamp",
"sortOrder": "asc"
}],
"excludeAttributes": [],
"includeAttributes": [
"msg",
"service",
"severity",
"systemName",
"systemType",
"timeStamp"
],
"filterOptions": {},
"sortOptions": [{
"name": "timeStamp",
"order": "asc"
}],
"_links": {
"rel": "self",
"uri": "/api/v1/inbound/events?offset=0&limit=0"
}
}
}