Skip to main content
Eptura Knowledge Center

Endpoint - reporting

The interface has the following reporting endpoints:

image2022-3-7_10-47-43.png

POST /api/v2/reporting/custom


This returns a report when you run a report report schema (xml) in the request body.

  1. Click the POST /api/v2/reporting/custom line.
  2. Click the Try it out button.

clipboard_efd1e41f73e17f640c6d70fc2a16bc1e8.png

  1. In the Edit Value field, enter the XML.
  2. Click the Execute button.

clipboard_e617a15f39680d0e2e28def9fb9ec4d05.png

GET /api/v2/reporting/{id}


This returns a report:

https://[client_instance].serraview.com/api/v2/reporting/{id}

You will need to find the report id, report's secured action, and defined the scope before you can run the GET. Learn more in Extract Data using the Reporting Endpoint.

The following is an example of the GET where you want to use a report number to retrieve the data for a report.

RequestURL:

https://[client_instance].serraview.com/api/v2/reporting/1

This will return:

[
  {
    "id": "Table_60",
    "headers": [
      "Building Information",
      "Allocation"
    ],
    "rows": [
      [
        "Georgia",
        "Atlanta",
        "Atlanta Office",
        "Corporate",
        "",
        "0",
        "6",
        "0",
        "0",
        "6",
        "6",
        "0"
      ],
      [
        "Massachusetts",
        "Boston",
        "Boston Office",
        "Corporate",
        "",
        "1660",
        "50",
        "42",
        "3",
        "47",
        "50",
        "0"
      ],
      [
        "New York",
        "New York",
        "New York Office",
        "Corporate",
        "",
        "251",
        "25",
        "12",
        "0",
        "25",
        "25",
        "0"
      ],
      [
        "Victoria",
        "Melbourne",
        "Melbourne Office",
        "Corporate",
        "",
        "673",
        "59",
        "56",
        "32",
        "27",
        "38",
        "21"
      ],
      [
        "Zagreb",
        "Zagreb",
        "Zagreb Office",
        "Corporate",
        "",
        "263",
        "30",
        "0",
        "0",
        "30",
        "30",
        "0"
      ]
    ]
  }
]

If you receive an error when you use the URL.

https://serraview.serraview.com/api/v2/reporting/1075

And the following error displays, then the type of data requested doesn't line up with what the server is able to provide. 

clipboard_ed4bcf9b4aefb7c1f81bede4abbf0b49c.png

We recommend that you use the URL with .json on the end.

https://serraview.serraview.com/api/v2/reporting/1075.json

And this displays the response.

clipboard_e8eef01671bdf1243a10279de6e16464c.png

POST /api/v2/reporting/{id}


This returns a report.

You can specify parameters when you run the report. 

You will need to find the report's secured action and defined the scope before you can run the POST. Learn more in Extract Data using the Reporting Endpoint.

Step 1. Set up the report with the parameters

From Serraview complete the following:

  1. Navigate to Insights > Reporting.
  2. In the search field, enter the report number.
  3. Select the report to display the Launch Report form.
  4. Complete the parameters.
  5. Click the Copy URL to Clipboard button.

clipboard_ea9e43d471e9a4ef2520f446358f273f1.png

This copies the URL and you will see the parameters are included.

ReportID=345&OutputType=Excel&PageSize=A4&PageOrientation=Portrait&FloorID.IsIn=18&Floors=18&FloorIDs=18&floorSelector=f18&startTime=2023-05-21&endTime=2023-05-23

Step 2. Create the JSON script

In this example, you want to include the Location, Start Time, End Time in the API call, so the JSON script looks like.

{
floorSelector:"f18",
startTime:"2023-05-21",
endTime:"2023-05-23"
}

Step 3. Run the Report

  1. Click the POST /api/v2/reporting/{id} line.
  2. Click the Try it out button.
  3. In the report ID field, enter the report ID.
  4. In the Edit Value field, enter the JSON script.
  5. Click the Execute button.
clipboard_e2a6778262ce354792126dd3e561230ad.png