Skip to main content

reports

Creates, updates, deletes, gets or lists a reports resource.

Overview

Namereports
TypeResource
Idgoogle.apigee.reports

Fields

The following fields are returned by SELECT queries:

Successful response

NameDatatypeDescription
namestringRequired. Unique identifier for the report T his is a legacy field used to encode custom report unique id
chartTypestringThis field contains the chart type for the report
commentsarrayLegacy field: not used. This field contains a list of comments associated with custom report
createdAtstring (int64)Output only. Unix time when the app was created json key: createdAt
dimensionsarrayThis contains the list of dimensions for the report
displayNamestringThis is the display name for the report
environmentstringOutput only. Environment name
filterstringThis field contains the filter expression
fromTimestringLegacy field: not used. Contains the from time for the report
lastModifiedAtstring (int64)Output only. Modified time of this entity as milliseconds since epoch. json key: lastModifiedAt
lastViewedAtstring (int64)Output only. Last viewed time of this entity as milliseconds since epoch
limitstringLegacy field: not used This field contains the limit for the result retrieved
metricsarrayRequired. This contains the list of metrics
offsetstringLegacy field: not used. This field contains the offset for the data
organizationstringOutput only. Organization name
propertiesarrayThis field contains report properties such as ui metadata etc.
sortByColsarrayLegacy field: not used much. Contains the list of sort by columns
sortOrderstringLegacy field: not used much. Contains the sort order for the sort columns
tagsarrayLegacy field: not used. This field contains a list of tags associated with custom report
timeUnitstringThis field contains the time unit of aggregation for the report
toTimestringLegacy field: not used. Contains the end time for the report
topkstringLegacy field: not used. This field contains the top k parameter value for restricting the result

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
organizations_reports_getselectorganizationsId, reportsIdRetrieve a custom report definition.
organizations_reports_listselectorganizationsIdexpandReturn a list of Custom Reports
organizations_reports_createinsertorganizationsIdCreates a Custom Report for an Organization. A Custom Report provides Apigee Customers to create custom dashboards in addition to the standard dashboards which are provided. The Custom Report in its simplest form contains specifications about metrics, dimensions and filters. It is important to note that the custom report by itself does not provide an executable entity. The Edge UI converts the custom report definition into an analytics query and displays the result in a chart.
organizations_reports_updatereplaceorganizationsId, reportsIdUpdate an existing custom report definition
organizations_reports_deletedeleteorganizationsId, reportsIdDeletes an existing custom report definition

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
organizationsIdstring
reportsIdstring
expandboolean

SELECT examples

Retrieve a custom report definition.

SELECT
name,
chartType,
comments,
createdAt,
dimensions,
displayName,
environment,
filter,
fromTime,
lastModifiedAt,
lastViewedAt,
limit,
metrics,
offset,
organization,
properties,
sortByCols,
sortOrder,
tags,
timeUnit,
toTime,
topk
FROM google.apigee.reports
WHERE organizationsId = '{{ organizationsId }}' -- required
AND reportsId = '{{ reportsId }}' -- required;

INSERT examples

Creates a Custom Report for an Organization. A Custom Report provides Apigee Customers to create custom dashboards in addition to the standard dashboards which are provided. The Custom Report in its simplest form contains specifications about metrics, dimensions and filters. It is important to note that the custom report by itself does not provide an executable entity. The Edge UI converts the custom report definition into an analytics query and displays the result in a chart.

INSERT INTO google.apigee.reports (
data__name,
data__displayName,
data__metrics,
data__dimensions,
data__filter,
data__properties,
data__chartType,
data__timeUnit,
data__sortByCols,
data__sortOrder,
data__fromTime,
data__toTime,
data__offset,
data__limit,
data__topk,
data__tags,
data__comments,
organizationsId
)
SELECT
'{{ name }}',
'{{ displayName }}',
'{{ metrics }}',
'{{ dimensions }}',
'{{ filter }}',
'{{ properties }}',
'{{ chartType }}',
'{{ timeUnit }}',
'{{ sortByCols }}',
'{{ sortOrder }}',
'{{ fromTime }}',
'{{ toTime }}',
'{{ offset }}',
'{{ limit }}',
'{{ topk }}',
'{{ tags }}',
'{{ comments }}',
'{{ organizationsId }}'
RETURNING
name,
chartType,
comments,
createdAt,
dimensions,
displayName,
environment,
filter,
fromTime,
lastModifiedAt,
lastViewedAt,
limit,
metrics,
offset,
organization,
properties,
sortByCols,
sortOrder,
tags,
timeUnit,
toTime,
topk
;

REPLACE examples

Update an existing custom report definition

REPLACE google.apigee.reports
SET
data__name = '{{ name }}',
data__displayName = '{{ displayName }}',
data__metrics = '{{ metrics }}',
data__dimensions = '{{ dimensions }}',
data__filter = '{{ filter }}',
data__properties = '{{ properties }}',
data__chartType = '{{ chartType }}',
data__timeUnit = '{{ timeUnit }}',
data__sortByCols = '{{ sortByCols }}',
data__sortOrder = '{{ sortOrder }}',
data__fromTime = '{{ fromTime }}',
data__toTime = '{{ toTime }}',
data__offset = '{{ offset }}',
data__limit = '{{ limit }}',
data__topk = '{{ topk }}',
data__tags = '{{ tags }}',
data__comments = '{{ comments }}'
WHERE
organizationsId = '{{ organizationsId }}' --required
AND reportsId = '{{ reportsId }}' --required
RETURNING
name,
chartType,
comments,
createdAt,
dimensions,
displayName,
environment,
filter,
fromTime,
lastModifiedAt,
lastViewedAt,
limit,
metrics,
offset,
organization,
properties,
sortByCols,
sortOrder,
tags,
timeUnit,
toTime,
topk;

DELETE examples

Deletes an existing custom report definition

DELETE FROM google.apigee.reports
WHERE organizationsId = '{{ organizationsId }}' --required
AND reportsId = '{{ reportsId }}' --required;