/processes[ POST ]

Create a new process based on a predefined micro service.  


Body Parameters


Name Optional Valid values
name Yes string
service_id No string
agents No 1. agent identifier (string) : "agent_1"
2. agent identifiers (list) : ["agent_1", "agent_2"..]
3. "all" - creates a process on each and every valid agent (based on the service agents mapping)
4. "any" - randomly select an active agent to run on from the list of valid agents (based on the service agents mapping)
properties Yes A key-value json map (can be a nested json as the following):  

{
  "key": "value",
  "key2": 34,
  "key3": {
    "a": "b",
    "c": "d"
  },
  "key4": false
}

  


Request Examples   

## Example 1: run my_service on my_agent provided some input parameters
curl -k -u admin:admin -X POST -H "Content-Type: application/json" -d '{
     "service_id":"my_service",
     "agents":"my_agent", 
     "name": "my_process", 
     "properties":  {"param1" : "value1", "param2": "value2"} 
}' https://OPERETOHOST/processes

    

## Example 2: to save some json manipulation code (useful in some languages like JAVA..), 
## you may also use a flat map, passing the input parameters directly w/o specifying the key 
## "properties") as follows: 

curl -k -u admin:admin -X POST -H "Content-Type: application/json" -d '{
     "service_id":"my_service",
     "agents":"my_agent", 
     "name": "my_process", 
     "param1" : "value1", 
     "param2": "value2" 
}' https://OPERETOHOST/processes

 

Response Examples    

{"status": "success", "data": ["GDSWtBEHqIw"]}

## data contains a list of all new registered process identifiers


{
  "status": "fail",
  "message": "Entity type [services] with id [my_service] not found."
}