Export of saved report views

You use the GET operation on the api/reports/report_ID element to export a saved report view which can be then imported to another instance of BigFix Inventory.

Table 1. Operation descriptions
Operation details Description
Operation GET /api/reports/report_ID
Purpose Returns the saved report view with the specified ID.
HTTP method GET
Resource URI https://server_host_name:port_number/api/reports/report_ID
URL link relation n/a
URI query parameters For a list of applicable query parameters, see: Query parameters.
Request headers
Header
Accept-Language (optional)
Values
en-US (only English is supported)

Used to negotiate the language of the response. If this header is not specified, the content is returned in the server language.

Request payload n/a
Request Content-Type
  • Application/json
Response headers
Header
Content-Type
Values
Application/json

Specifies the content type of the response.

Header
Content-Language
Values
en-US, …

Specifies the language of the response content. If this header is not specified, the content is returned in the server language.

Response payload Saved reports element
Response Content-Type
  • Application/json
Normal HTTP response codes
  • 200 – OK
Error HTTP response codes
  • 401- There is no match for the provided user name and password
  • 401 - You are not assigned a Computer Group. You will not be able to access the system until you are assigned a valid Computer Group. Contact your administrator for assistance
  • 404 - Sequel::RecordNotFound

For more details about each error code, check the tema.log log file in the install_dir/wlp/usr/servers/server1/logs/ directory.

Query parameters

You can use query parameters to narrow down the results of your search. The following table presents query parameters that you can use for the api/reports element.
Table 2. Query parameters for retrieving saved report views
Parameter Description Required Value
token A unique user authentication identifier. Yes Alphanumeric
id An identifier of the saved report. To find the report identifier, open the saved report and check the last number in the report URL. In the following example, the report ID is 3.
server_host_name:port/sam/app_usage_property_values#cafcac39cd0b242b82729377b0b2b872d3af8d8a/3
No Numeric

Example HTTP conversation

Request
GET/api/reports/1
&token=a070afeca411d2fs25f5s4c962de2d002b14352f
Response header
HTTP/1.1 200 OK
Content-Type: Application/json
Content-Language: en-US
Response body (JSON)
	{
	"id":1,
	"user_id":1,
	"pagestate_id":"eb5743b7cd23316f0bc8a4dd3f63b90d73549042",
	"name":"pvu_test",
	"path":"/sam/pvuonlysubcapreports",
	"private":true,
	"state":{
		"columns":["product","quantity","hwm_history"],
		"criteria":{"and":[["quantity",">","200"]]},
		"grid_options":["autosize_columns"],
		"order":{"asc":true,"col":null},
		"time_range":{
			"max":"2014-07-21T10:18:04Z",
			"min":"2014-04-21T22:00:00Z",
			"type":"absolute_to_now",
			"units":"days",
			"value":"90"
			},
		"column_order":{
			"hwm_history":1,
			"product":0,
			"quantity":2
			},
		"column_widths":{
			"hwm_history":180,
			"product":524,
			"quantity":719
		}}}