Skip to content

Create Saved Report

Request

A saved report contains information about the report, such as its name and permissions, and also the Grid API query definition that is applied when users view the report. The query definition uses the same JSON format as a Grid API request

Security
API_Key
Bodyapplication/jsonrequired
namestring, non-emptyrequired

Name of the saved report

descriptionstring

Optional description of the saved report

labelsArray of integers

List of label IDs to associate with the saved report

isFavoriteboolean

Indicates if the saved report is marked as favorite by the current user

visibilitystringrequired
Enum:"private""public"
queryDefinitionobjectrequired

Default Grid request body properties. Default behaviour:

  • if no page number is specified, default is 0 (the first results page)
  • if no size is specified, default is 100
  • if no filters are specified, default is to return all runs Default behaviour for exports:
  • if page and size are not specified, all available rows will be exported
displayMetadataobject

Display metadata for the saved report

libraryMetadataobject

Metadata required to show the saved report in the library

visualizationsArray of objects, >= 0 items
gridEntityTypestringrequired
Enum:"web_audit_runs""web_journey_runs""pages""cookies""tags""tag_variables""links""accessibility_issues""network_requests""browser_logs"
POST
/v3/reports/grid/saved
curl -i -X POST \
  https://api.observepoint.com/v3/reports/grid/saved \
  -H 'Authorization: YOUR_API_KEY_HERE' \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "string",
    "description": "string",
    "labels": [
      0
    ],
    "isFavorite": true,
    "visibility": "private",
    "queryDefinition": {
      "size": 10,
      "page": 0,
      "filters": {
        "conditions": [
          {
            "negated": false,
            "operator": "string_contains",
            "filteredColumn": {
              "groupBy": false,
              "columnId": "string",
              "format": "string"
            },
            "fieldName": "id",
            "arg": "string",
            "wildcardStart": true,
            "wildcardEnd": true
          }
        ],
        "conditionMatchMode": "all"
      },
      "columns": [
        {
          "groupBy": false,
          "columnId": "string",
          "format": "string"
        }
      ],
      "sortBy": [
        {
          "columnIndex": 0,
          "sortDesc": false
        }
      ],
      "totals": [
        {
          "columnIndex": 0,
          "aggregateFunction": "avg"
        }
      ]
    },
    "displayMetadata": {},
    "libraryMetadata": {},
    "visualizations": [
      {
        "name": "string",
        "definition": {}
      }
    ],
    "gridEntityType": "web_audit_runs"
  }'

Responses

Saved report created successfully

Bodyapplication/json
idinteger, (int64)required

ID of the saved report

Response
{ "id": 0 }