Skip to main content

mergeSituations

A Graze API POST request that merges multiple specified Situations. You can configure whether or not the new Situation supersedes the original Situations using the supersede_original parameter.

Back to Graze API EndPoint Reference.

Request arguments

Endpoint mergeSituations takes the following request arguments:

Name

Type

Required

Description

auth_token

String

Yes

A valid auth_token returned from the authenticate request. Alternatively, basic authenticate headers can be used in place of this parameter. See the authenticate endpoint for more information and usage examples.

situations

Array of Numbers

Yes

An array of the Situation IDs you want to merge. Specify using Situation IDs, separating each item with a comma.

supersede_original

Boolean

Yes

Determines whether or not the original merged Situations are superseded by the new Situation.

Response

Endpoint mergeSituations returns the following response:

Successful requests return a JSON object containing the following:

Name

Type

Description

sitn_id

Number

ID of the new merged Situation.

API update behavior

The behavior of this endpoint depends on whether the relevant alert or Situation is open, closed and still in the active database, or closed and archived to the historic database. This endpoint updates the alert or Situation as follows:

See API Update Behavior for more information on Situation statuses.

Examples

The following examples demonstrate typical use of endpoint mergeSituations:

Request example

Example cURL request to merge Situations 31, 32, and 33 without superseding the original Situations by the new one:

curl -X POST -u graze:graze -k -v "https://localhost/graze/v1/mergeSituations" \ --data-urlencode 'situations=[31,32,33]' \ --data-urlencode 'supersede_original=false'

Response example

Example response returning the ID of the new merged Situation:

{"sitn_id":30}