Import of saved report views

You use the POST operation on the api/reports element to import a saved report view from another instance of BigFix Inventory.

Table 1. Operation descriptions
Operation details Description
Operation POST /api/reports
Purpose Imports a saved report view from another instance of BigFix Inventory.
HTTP method POST
Resource URI https://server_host_name:port_number/api/reports
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 Saved reports element
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 n/a
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 - Not Found
  • 404 - Sequel::RecordNotFound
  • 500 - Name is already taken
  • 500 - There was a problem with your request
  • 500 - We're sorry, but something went wrong. Please contact your BigFix Analytics administrator if the problem persists
  • 500 if the JSON format is invalid, a detailed message with the problem explanation is also returned. For example, if a name field is missing, the following message is displayed: The property '#/' did not contain a required property of 'name' in schema 69e40f9b-9a3e-53d1-a7d8-61d63eb191e8#

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

Example HTTP conversation

Request header
Content-Type: application/json
Content-Language: en-US
Request
POST /api/reports?token=465c33848de3db7ch5699023ea22deb5b1a476d1
{
	"id":4,
	"user_id":2,
	"pagestate_id":"7ebb0b0a018ab55fab8e6e40d5eb62529ea38fad",
	"name":"pvu_report",
	"path":"/sam/pvuonlysubcapreports",
	"private":true,
	"state":{
		"columns":["product","quantity","hwm_history"],
		"criteria":{"and":[["quantity",">","200"]]},
		"grid_options":["autosize_columns"],
		"order":{
			"asc":true,
			"col":"quantity"
			},
		"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
}}}
Response
HTTP/1.1 200 OK