Skip to main content

setSituationProcesses

A Graze API POST request that applies a list of processes to a specified Situation. Any other processes already associated with the Situation are removed.

Back to Graze API EndPoint Reference.

Request arguments

Endpoint setSituationProcesses 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.

sitn_id

Number

Yes

Situation ID.

process_list

Array of Strings

Yes

A Javascript array of process names as text strings. If any processes supplied do not exist in the database, the request creates them and assigns them to the Situation.

Response

Endpoint setSituationProcesses returns the following response:

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 setSituationProcesses:

Request example

Example cURL request to set the processes for Situation ID as "Knowledge Management" and "90nm Manufacturing":

curl -X POST -u graze:graze -k -v "https://localhost/graze/v1/setSituationProcesses" -H "Content-Type: application/json; charset=UTF-8" -d '{"sitn_id" : 7, "process_list" : ["Knowledge Management", "90nm Manufacturing"]}'

Response example