Skip To Content

/report: Reports

  • URL:https://[root]/community/users/[userName]/report
  • Version Introduced:ArcGIS Online December 2020

Example usage

The following is a sample request URL for the reports operation that demonstrates running an item report, which will generate a .csv file that returns information about all the items in an organization:

https://org.arcgis.com/sharing/rest/community/users/jsmith/report?reportType=org&reportSubType=content&f=pjson&token=ELIMsyURgefHIZ_-x6PzynYsaxLNR30GbWE6PCpgD0Hu7dWQ3vmBLz3bljwvJC8a74K_XARVfs5lpmCkjLkMZANHIDgMHiwgwnNiQBbTWHEbNqJeodE9ipXYeUmlGkveMQ44JjNQlNGYim-LqV4DcrPynxBlvO0CsIT4RIB-OsYp6oU_jqS9xVHxcHwCtvu3rnikAqeb3S96aS0ntC-414Y23t1CWAVhDSmRrl7NyWgw-jN4VBZ3FvPnDDDoFooY

Description

The reports operation generates reports, in CSV format, on the overall usage of the organizations. Reports define organization usage metrics in one place for a set time period (either a day, week, or month). Administrators can generate reports that monitor which organization member is using certain services, as well as how many credits and storage are used within a certain time period. Reports also include the current state of the organization, which includes the number of items, groups, users, user types, app license assignments, and public items.

Request parameters

ParameterDetails
[Common Parameters]

For a complete listing, see Common parameters.

reportType

The report type. Currently, only the organization (org) report type is supported.

Values: org

reportSubType

Specifies the report subtype.

Values: content | users | activity | credits | serviceUsages | itemUsages

timeDuration

Specifies the time duration for the reports. This parameter is required when reportSubType is set to credits, activity, serviceUsages, or itemUsages.

Note:

The daily value is only available when reportSubType is set to activity.

The yearly value is only available when reportSubType is set to itemUsages.

Values: daily | weekly | monthly | quarterly | yearly

startTime

The start time of the time duration. The time format is Unix time with millisecond precision. If timeDuration is weekly, the startTime value must be a time on Sunday or Monday GMT. If timeDuration is monthly, the startTime value must be on the first day of the month.

Example

startTime=1642982400
f

The response format. The only supported response format is json.

Response properties

PropertyDetails
itemID

The ID of the newly created item (report).

status

The status of the item.

orgId

The organization ID.

owner

The owner of the item.

type

The type of the item.

Values: Administrative Report

created

The Unix time stamp in milliseconds when the report was created.

properties

A JSON array of item properties. Each item is detailed with properties described in the Request parameters section.

For item and member reports:

Example


[
  "properties": {
    "reportType": "org",
    "reportSubType": "content"
  }
],
[
  "properties": {
    "reportType": "org",
    "reportSubType": "users"
  }
],

For credits and activity reports:

Example


[
  "properties": {
    "timeDuration": "monthly",
    "startTime": 1593561600,
    "reportType": "org",
    "reportSubType": "credits"
  }
],
[
  "properties": {
    "timeDuration": "weekly",
    "startTime": 1589673600,
    "reportType": "org",
    "reportSubType": "activity"
  }
]

Additional example usage

Example 1: Member report

The following is a sample request URL for the reports operation that demonstrates running a member report, which will generate a .csv file that returns information for all members in the organization:

https://org.arcgis.com/sharing/rest/community/users/jsmith/report?reportType=org&reportSubType=users&f=pjson&token=ELIMsyURgefHIZ_-x6PzynYsaxLNR30GbWE6PCpgD0Hu7dWQ3vmBLz3bljwvJC8a74K_XARVfs5lpmCkjLkMZANHIDgMHiwgwnNiQBbTWHEbNqJeodE9ipXYeUmlGkveMQ44JjNQlNGYim-LqV4DcrPynxBlvO0CsIT4RIB-OsYp6oU_jqS9xVHxcHwCtvu3rnikAqeb3S96aS0ntC-414Y23t1CWAVhDSmRrl7NyWgw-jN4VBZ3FvPnDDDoFooY

Example 2: Credits report

The following is a sample request URL for the reports operation that demonstrates running a credits report, which will generate a .csv file that returns information for credit usage at a certain time (specified using the timeDuration and startTime parameters) and usage by type:

https://org.arcgis.com/sharing/rest/community/users/jsmith/report?reportType=org&reportSubType=credits&timeDuration=monthly&startTime=1589673600&f=pjson&token=ELIMsyURgefHIZ_-x6PzynYsaxLNR30GbWE6PCpgD0Hu7dWQ3vmBLz3bljwvJC8a74K_XARVfs5lpmCkjLkMZANHIDgMHiwgwnNiQBbTWHEbNqJeodE9ipXYeUmlGkveMQ44JjNQlNGYim-LqV4DcrPynxBlvO0CsIT4RIB-OsYp6oU_jqS9xVHxcHwCtvu3rnikAqeb3S96aS0ntC-414Y23t1CWAVhDSmRrl7NyWgw-jN4VBZ3FvPnDDDoFooY

Example 3: Activity report

The following is a sample request URL for the reports operation that demonstrates running an activity report, which will generate a .csv file that returns information for all activity that occurred in an organization at a certain time (specified using the timeDuration and startTime parameters):

https://org.arcgis.com/sharing/rest/community/users/jsmith/report?reportType=org&reportSubType=activity&timeDuration=weekly&startTime=1589673600&f=pjson&token=ELIMsyURgefHIZ_-x6PzynYsaxLNR30GbWE6PCpgD0Hu7dWQ3vmBLz3bljwvJC8a74K_XARVfs5lpmCkjLkMZANHIDgMHiwgwnNiQBbTWHEbNqJeodE9ipXYeUmlGkveMQ44JjNQlNGYim-LqV4DcrPynxBlvO0CsIT4RIB-OsYp6oU_jqS9xVHxcHwCtvu3rnikAqeb3S96aS0ntC-414Y23t1CWAVhDSmRrl7NyWgw-jN4VBZ3FvPnDDDoFooY

JSON Response syntax

The following syntax example demonstrates a response for item and member reports:


{
  "itemId": "<item id>",
  "status": "processing",
  "orgId": "<org id>",
  "owner": "<owner>",
  "type": "Administrative Report",
  "created": <time in milliseconds>,
  "properties": {
    "reportType": "org",
    "reportSubType": content | users
  }
}

The following syntax example demonstrates a response for credit reports:


{
  "itemId": "<item id>",
  "status": "processing",
  "orgId": "<org id>",
  "owner": "<owner>",
  "type": "Administrative Report",
  "created": <time in milliseconds>,
  "properties": {
    "timeDuration": daily | weekly | monthly | quarterly | yearly,
    "startTime": <startTime>,
    "reportType": "org",
    "reportSubType": content | users | activity | credits | serviceUsages | itemUsages
  }
}

JSON Response example


{
  "itemId": "e45587025b1e4bf0b56044355f5a11d0",
  "status": "processing",
  "orgId": "J423vH8fR9HV444l",
  "owner": "jsmith",
  "type": "Administrative Report",
  "created": 1613148239000,
  "properties": {
    "reportType": "org",
    "reportSubType": "content"
  }
}