Skip to main content

reports

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

Overview

Namereports
TypeResource
Idgoogle.apigee.reports

Fields

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
createdAtstringOutput 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
lastModifiedAtstringOutput only. Modified time of this entity as milliseconds since epoch. json key: lastModifiedAt
lastViewedAtstringOutput 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

NameAccessible byRequired ParamsDescription
organizations_reports_getSELECTorganizationsId, reportsIdRetrieve a custom report definition.
organizations_reports_listSELECTorganizationsIdReturn 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_deleteDELETEorganizationsId, reportsIdDeletes an existing custom report definition
organizations_reports_updateREPLACEorganizationsId, reportsIdUpdate an existing custom report definition

SELECT examples

Return a list of Custom Reports

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 }}';

INSERT example

Use the following StackQL query and manifest file to create a new reports resource.

/*+ create */
INSERT INTO google.apigee.reports (
organizationsId,
dimensions,
displayName,
sortOrder,
filter,
chartType,
metrics,
timeUnit,
name,
toTime,
sortByCols,
properties,
offset,
tags,
topk,
fromTime,
comments,
limit
)
SELECT
'{{ organizationsId }}',
'{{ dimensions }}',
'{{ displayName }}',
'{{ sortOrder }}',
'{{ filter }}',
'{{ chartType }}',
'{{ metrics }}',
'{{ timeUnit }}',
'{{ name }}',
'{{ toTime }}',
'{{ sortByCols }}',
'{{ properties }}',
'{{ offset }}',
'{{ tags }}',
'{{ topk }}',
'{{ fromTime }}',
'{{ comments }}',
'{{ limit }}'
;

REPLACE example

Replaces all fields in the specified reports resource.

/*+ update */
REPLACE google.apigee.reports
SET
dimensions = '{{ dimensions }}',
displayName = '{{ displayName }}',
sortOrder = '{{ sortOrder }}',
filter = '{{ filter }}',
chartType = '{{ chartType }}',
metrics = '{{ metrics }}',
timeUnit = '{{ timeUnit }}',
name = '{{ name }}',
toTime = '{{ toTime }}',
sortByCols = '{{ sortByCols }}',
properties = '{{ properties }}',
offset = '{{ offset }}',
tags = '{{ tags }}',
topk = '{{ topk }}',
fromTime = '{{ fromTime }}',
comments = '{{ comments }}',
limit = '{{ limit }}'
WHERE
organizationsId = '{{ organizationsId }}'
AND reportsId = '{{ reportsId }}';

DELETE example

Deletes the specified reports resource.

/*+ delete */
DELETE FROM google.apigee.reports
WHERE organizationsId = '{{ organizationsId }}'
AND reportsId = '{{ reportsId }}';