Query REST Reference

 

/query

Methods
GET
Expand

NOTE: Currently, all fields come back on GET all, but the ** indicates fields which will be listed in a future release

The fields parameter should be specified along the query string, and it takes the syntax

    ?fields=<field>,...

Allowed Fields type "vuln", sourceType "cumulative" | null

* id
** name
** description
creator
owner
ownerGroup
targetGroup
tool
type
tags
context
browseColumns
browseSortColumn
browseSortDirection
createdTime
modifiedTime
status
filters
canManage
canUse
groups

Legend

* = always comes back

** = comes back if fields list not specified on GET all

Gets the list of Queries.

Fields Parameter
Request Parameters
Expand

Parameters must be passed in as query string (as opposed to JSON) in the format of: /query?type=lce

{
	"type" : <string> "alert" | "lce" | "mobile" | "ticket" | "user" | "vuln" DEFAULT "all"
}
Filter Parameters

usable - The response will be an object containing an array of usable Queries. By default, both usable and manageable objects are returned.
manageable - The response will be an object containing all manageable Queries. By default, both usable and manageable objects are returned.

Example Response
Expand
{
	"type" : "regular",
	"response" : {
		"usable" : [
			{
				"id" : "1",
				"name" : "Name",
				"description" : "Test for posting an alert query"
			},
			{
				"id" : "2",
				"name" : "Post Copy Response Example",
				"description" : ""
			},
			{
				"id" : "3",
				"name" : "Post Copy Response Example2",
				"description" : ""
			},
			{
				"id" : "1391",
				"name" : "TEST",
				"description" : ""
			},
			{
				"id" : "1467",
				"name" : "Test 1",
				"description" : ""
			},
			{
				"id" : "1468",
				"name" : "Test 2",
				"description" : ""
			},
			{
				"id" : "1469",
				"name" : "Test 3",
				"description" : ""
			},
			{
				"id" : "1470",
				"name" : "Test 4",
				"description" : ""
			},
			{
				"id" : "1471",
				"name" : "Test 5",
				"description" : ""
			}
		],
		"manageable" : [
			{
				"id" : "1",
				"name" : "Name",
				"description" : "Test for posting an alert query"
			},
			{
				"id" : "2",
				"name" : "Post Copy Response Example",
				"description" : ""
			},
			{
				"id" : "3",
				"name" : "Post Copy Response Example2",
				"description" : ""
			},
			{
				"id" : "1391",
				"name" : "TEST",
				"description" : ""
			},
			{
				"id" : "1434",
				"name" : "query1",
				"description" : "Created with 'group1's shared asset: 'Test Asset 1'.\n\nThis asset will be unshared"
			},
			{
				"id" : "1435",
				"name" : "query2",
				"description" : "Created with 'group1's shared asset: 'Test Asset 2'.\n\nThis asset will be deleted"
			},
			{
				"id" : "1436",
				"name" : "group1Query",
				"description" : ""
			},
			{
				"id" : "1467",
				"name" : "Test 1",
				"description" : ""
			},
			{
				"id" : "1468",
				"name" : "Test 2",
				"description" : ""
			},
			{
				"id" : "1469",
				"name" : "Test 3",
				"description" : ""
			},
			{
				"id" : "1470",
				"name" : "Test 4",
				"description" : ""
			},
			{
				"id" : "1471",
				"name" : "Test 5",
				"description" : ""
			}
		]
	},
	"error_code" : 0,
	"error_msg" : "",
	"warnings" : [],
	"timestamp" : 1427750981
}