Retrieve a report (GET /v1/reports/{report_id})

Lists the specified statistics report.

If creation of a report has been completed, the report can be retrieved in JSON format. If creation of a report is in progress, the status code "204 No Content" will be returned, and the X-Status response header will be "create_in_progress". Wait for a few moments, and then execute again.

The table below lists the main status codes and X-Message header values.

Status code X-Message
200 Success: Completed successfully
204 No Content: There is no content to return
204 Bad Request: The request was invalid
204 Internal Server Error: Internal error
204 Rate limit exceeded: Too many requests. Wait for a few moments, and then execute again

If an error has occurred for the request, the X-Status response header will be "failed", so refer to the X-Error response header.

If there is no content in the report creation results, the X-Status response header will be "deployed", and the status code 204 will be returned.

Request Headers

Refer to "Common API request headers".

Request parameters

report_id

ID of the report

Data Type Cardinality
String 1..1

Request Elements

None.

Response Headers

Refer to "Common API response headers".

X-Error

Error details

Data Type Cardinality
String 0..1

X-Status

Status information

Data Type Cardinality
String 1..1

Response Elements

headers

Description of report data contain in "rows" elements

Data Type Cardinality Parent Element Child Element(s)
String 1..n None index, name

index

Number of current header column (starts from 0)

Data Type Cardinality Parent Element Child Element(s)
Int 1..1 headers None

name

Title of current header column

Data Type Cardinality Parent Element Child Element(s)
String 1..1 headers None

rows

Array containing all report data

Data Type Cardinality Parent Element Child Element(s)
String 1..n None (array)

(array)

Row containing data for a specific datetime

Data Type Cardinality Parent Element Child Element(s)
String 1..n rows None

metadata

Parameters specified at the time of report creation.

Data Type Cardinality Parent Element Child Element(s)
String 1..1 None start_date, end_date, granularity, delivery_option, time_created, metrics,service_id, per_region

granularity

Parameters specified at the time of report creation.

Refer to the Request parameters of the create a report API for details.

Data Type Cardinality Parent Element Child Element(s)
String 1..1 metadata None

start_date

Parameters specified at the time of report creation.

Refer to the Request parameters of the create a report API for details.

Data Type Cardinality Parent Element Child Element(s)
String 1..1 metadata None

end_date

Parameters specified at the time of report creation.

Refer to the Request parameters of the create a report API for details.

Data Type Cardinality Parent Element Child Element(s)
String 1..1 metadata None

delivery_option

Parameters specified at the time of report creation.

Refer to the Request parameters of the create a report API for details.

Data Type Cardinality Parent Element Child Element(s)
String 1..1 metadata None

metrics

List of values specified at the time of report creation.

Refer to the Request parameters of the create a report API for details.

Data Type Cardinality Parent Element Child Element(s)
String 1..n metadata None

time_created

Datetime when report was created.

Data Type Cardinality Parent Element Child Element(s)
String 1..1 metadata None

service_id

service_id. Refer to the Request parameters of the create a report API for details.

Data Type Cardinality Parent Element Child Element(s)
String 1..1 metadata None

per_region

Output in each region. Refer to the Request parameters of the create a report API for details.

Data Type Cardinality Parent Element Child Element(s)
String 1..1 metadata None

Example of Response


      When the specified report is returned:
       GET /v1/ reports/bdf5d40b-9fc4-47d4-b569-59edf3d1f91d
       
       HTTP/1.1 200 OK
       X-Message: Success
       X-Status: deployed
       Content-Type: application/json
       Content-Length: 563
       {
         "headers": [
           {
             "index": 0,
             "name": "Time"
           },
           {
             "index": 1,
             "name": "Region"
           },
           {
             "index": 2,
             "name": "200Count"
           },
           {
             "index": 3,
             "name": "RequestCount"
           }
         ],
         "metadata": {
           "delivery_option": "all",
           "end_date": "20160814",
           "granularity": "daily",
           "metrics": [
             "200Count",
             "RequestCount"
           ],
           "per_region": "true",
           "service_id": "65a455b0-475a-42fd-b98e-75b396032bff",
           "start_date": "20160812",
           "time_created": "2016/08/23 06:22"
         },
         "rows": [
           [
             "2016/08/12 00:00",
             "North America",
             "2",
             "2"
           ],
           [
             "2016/08/12 00:00",
             "Japan",
             "1",
             "1"
           ],
           [
             "2016/08/13 00:00",
             "North America",
             "1",
             "1"
           ]
         ]
       }
       
      When the specified report is not returned:
       GET /v1/cdn/reports/419be4be-a30b-4af8-97db-900260ae6ad3
       
       HTTP/1.1 204 No Content
       X-Message: No Content
       X-Status: deployed