SecurityCenter : Bulk REST Reference

/bulk


The bulk endpoint is very resource intensive. Requests that are too large may fail. It is recommended to minimize the payload size of requests to bulk.

Methods

POST

Performs a bulk action, depending on access and permissions.

NOTE #1: Currently supported bulk actions (with links to their respective documentation):

NOTE #2: If a bulk post fails on one object, the bulk operation will continue to attempt other objects, return a fail response indicating failed objects, and rollback all bulk actions.

Request Parameters
Expand
{
	"operations" : [
		{
			"api" : <string> "/asset" | "/asset/<id>" | "/query" | "/query/<id>" | "/dashboard/<id>/component" | "/dashboard/<id>/component/<id>,
			"method" : <string> "GET" | "PATCH" | "POST",
 
			method "GET"
			------------
			"params" : <valid object parameters:see NOTE #1> DEFAULT {}

			method not "GET"
			----------------
			"params" : <valid object parameters:see NOTE #1>
		}...
	]
}
Example Response
Expand
{
	"type" : "regular",
	"response" : [
		{
			"type" : "regular",
			"response" : {
				"id" : "38",
				"name" : "testBulk",
				"type" : "dynamic",
				"description" : "",
				"tags" : "",
				"context" : "",
				"status" : "0",
				"createdTime" : "1414436709",
				"modifiedTime" : "1423678805",
				"typeFields" : {
					"rules" : {
						"operator" : "any",
						"children" : [
							{
								"filterName" : "ip",
								"operator" : "eq",
								"value" : "192.168.0.0\/24",
								"pluginIDConstraint" : "-1",
								"type" : "clause"
							}
						],
						"type" : "group"
					}
				},
				"repositories" : [],
				"ipCount" : 0,
				"groups" : [],
				"assetDataFields" : [],
				"canUse" : "true",
				"canManage" : "true",
				"creator" : {
					"id" : "1",
					"username" : "head",
					"firstname" : "Security Manager",
					"lastname" : ""
				},
				"owner" : {
					"id" : "1",
					"username" : "head",
					"firstname" : "Security Manager",
					"lastname" : ""
				},
				"template" : {
					"id" : -1,
					"name" : "",
					"description" : ""
				},
				"ownerGroup" : {
					"id" : "0",
					"name" : "Full Access",
					"description" : "Full Access group"
				},
				"targetGroup" : {
					"id" : -1,
					"name" : "",
					"description" : ""
				}
			},
			"error_code" : 0,
			"error_msg" : "",
			"warnings" : [],
			"timestamp" : 1423678804
		},
		{
			"type" : "regular",
			"response" : {
				"id" : "38",
				"name" : "testBulk2",
				"type" : "dynamic",
				"description" : "",
				"tags" : "",
				"context" : "",
				"status" : "0",
				"createdTime" : "1414436709",
				"modifiedTime" : "1423678805",
				"typeFields" : {
				"rules" : {
					"operator" : "any",
					"children" : [
						{
							"filterName" : "ip",
							"operator" : "eq",
							"value" : "192.168.0.0\/24",
							"pluginIDConstraint" : "-1",
							"type" : "clause"
						}
					],
					"type" : "group"
				}
				},
				"repositories" : [],
				"ipCount" : 0,
				"groups" : [],
				"assetDataFields" : [],
				"canUse" : "true",
				"canManage" : "true",
				"creator" : {
					"id" : "1",
					"username" : "head",
					"firstname" : "Security Manager",
					"lastname" : ""
				},
				"owner" : {
					"id" : "1",
					"username" : "head",
					"firstname" : "Security Manager",
					"lastname" : ""
				},
				"template" : {
					"id" : -1,
					"name" : "",
					"description" : ""
				},
				"ownerGroup" : {
					"id" : "0",
					"name" : "Full Access",
					"description" : "Full Access group"
				},
				"targetGroup" : {
					"id" : -1,
					"name" : "",
					"description" : ""
				}
			},
			"error_code" : 0,
			"error_msg" : "",
			"warnings" : [],
			"timestamp" : 1423678804
		}
	],
	"error_code" : 0,
	"error_msg" : "",
	"warnings" : [],
	"timestamp" : 1423678804
}