Method: organizations.environments.analytics.admin.getSchemav2

Get a list of metrics and dimensions which can be used for creating analytics queries and reports. Each schema element contains the name of the field with its associated type and if it is either custom field or standard field.

HTTP request

GET https://apigee.googleapis.com/v1/{name=organizations/*/environments/*/analytics/admin/schemav2}

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
name

string

Required. The parent organization and environment names. Must be of the form organizations/{org}/environments/{env}/analytics/admin/schemav2.

Query parameters

Parameters
type

string

Required. Type refers to the dataset name whose schema needs to be retrieved E.g. type=fact or type=agg_cus1

Request body

The request body must be empty.

Response body

If successful, the response body contains data with the following structure:

Response for Schema call

JSON representation
{
  "dimensions": [
    {
      object (SchemaElement)
    }
  ],
  "metrics": [
    {
      object (SchemaElement)
    }
  ],
  "meta": [
    string
  ]
}
Fields
dimensions[]

object (SchemaElement)

List of schema fiels grouped as dimensions.

metrics[]

object (SchemaElement)

List of schema fields grouped as dimensions. These are fields that can be used with an aggregate function such as sum, avg, min, max.

meta[]

string

Additional metadata associated with schema. This is a legacy field and usually consists of an empty array of strings.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

SchemaElement

Message type for the schema element

JSON representation
{
  "name": string,
  "properties": {
    object (SchemaProperty)
  }
}
Fields
name

string

Name of the field

properties

object (SchemaProperty)

Property of the schema field E.g. { "createTime": "2016-02-26T10:23:09.592Z", "custom": "false", "type": "string" }

SchemaProperty

Message type for schema property

JSON representation
{
  "createTime": string,
  "custom": string,
  "type": string
}
Fields
createTime

string

Creation time of the field

custom

string

Custom is a flag signifying if the field was provided as part of the standard dataset or a custom field created by the customer

type

string

Data type of the field.