/report: Reports

URL:
https://[root]/community/users/[userName]/report
Methods:
GET
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:

Use dark colors for code blocksCopy
1
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

timeAggregate

This displays the time usage aggregated by a specified value. This applies only when the reportSubType is set to itemUsages.

Values: day | week | month

timeDuration

Specifies the time duration for the reports.

This parameter is required when reportSubType is set to credits, activity, serviceUsages, or itemUsages.

This parameter does not apply when the reportSubType is set to content or users.

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.

This parameter does not apply when the reportSubType is set to content or users.

Example:

Use dark colors for code blocksCopy
1
startTime=1642982400

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.

Example for item and member reports:

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
10
11
12
[
  "properties": {
    "reportType": "org",
    "reportSubType": "content"
  }
],
[
  "properties": {
    "reportType": "org",
    "reportSubType": "users"
  }
],

Example for credits and activity reports:

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
[
  "properties": {
    "timeDuration": "monthly",
    "startTime": 1593561600,
    "reportType": "org",
    "reportSubType": "credits"
  }
],
[
  "properties": {
    "timeDuration": "weekly",
    "startTime": 1589673600,
    "reportType": "org",
    "reportSubType": "activity"
  }
]

Example for item usages report:

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
10
[
  "properties": {
    "title": "ItemUsagesMonthlyReport",
    "timeDuration": "monthly",
    "startTime": 1704067200,
    "reportType": "org",
    "reportSubType": "itemUsages",
    "timeAggregate": "day"
  }
]

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:

Use dark colors for code blocksCopy
1
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:

Use dark colors for code blocksCopy
1
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):

Use dark colors for code blocksCopy
1
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:

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
10
11
12
{
  "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:

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
{
  "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

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
10
11
12
{
  "itemId": "e45587025b1e4bf0b56044355f5a11d0",
  "status": "processing",
  "orgId": "J423vH8fR9HV444l",
  "owner": "jsmith",
  "type": "Administrative Report",
  "created": 1613148239000,
  "properties": {
    "reportType": "org",
    "reportSubType": "content"
  }
}

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.