/search/processes[ GET / POST ]


Search for processes.

URL Parameters


Name Optional Valid values
start Yes Integer (search processes from a start position where last executed process is 0, the default)
limit Yes Integer (max processes to fetch in each call, default is 100)


Body Parameters


Name Optional Valid values
start No Integer (search processes from a start position where last executed process is 0, the default)
limit No Integer (max processes to fetch in each call, default is 100)
filter No Filter may include the following parameters:
  • service_id : string, the service id to match
  • generic : string, free search pattern (checks in process logs and properties)
  • flow_id : string, the flow id to search for all processes of a given flow
  • time_qualifier : any of the following: [minutes, hours, days, weeks, months, years]
  • time_counter : integer, relates to the time_qualifier
  • from : date of the format YYYY-MM-DD (e.g. 2014-07-10)
  • to : date of the format YYYY-MM-DD (e.g. 2014-07-10)
  • exec_status : any of the following: [success, failure, error, warning, registered, in_process, timeout, terminated, terminate_pending]


Request Examples     

## using get method

curl -k -u admin:admin https://OPERETOHOST/search/processes?start=0&limit=2

  

## using POST method, useful in case of complex filters, for example:
## get all processes of service "my_service" from the last two hours that ended with success 

curl -k -u admin:admin -X POST -H "Content-Type: application/json" -d '{
"start" : 0,
"limit" : 100,
"filter": {
   "service_id" : "test2",
   "exec_status" : "success",
   "time_qualifier" : "hours",
   "time_counter"   : 2
   }
}' https://OPERETOHOST/search/processes

       

Response Example    

{
  "status": "success",
  "data": [
    {
      "username": "admin",
      "modified_date": "2016-12-21T20:05:36.789589",
      "agent_id": "test_agent",
      "end_date": "2016-12-21T20:05:36.756740",
      "description": "",
      "s_version": "default",
      "cmd": "python -u run.py",
      "sflow_id": "89hxHBgfdU2",
      "start_date": "2016-12-21T20:03:50.305884",
      "s_user": "admin",
      "orig_date": "2016-12-21T20:03:46.185775",
      "summary": "",
      "mode": "production",
      "timeout": 600,
      "action_md5": "bde78a7e6a782f85075880d67759982a",
      "service_type": "action",
      "actual_version": "default",
      "service_id": "hello_world",
      "exec_status": "success",
      "id": "89hxHBgfdU2",
      "name": "hello_world"
    },
    {
      "username": "admin",
      "modified_date": "2016-12-15T12:20:24.472722",
      "agent_id": "test_agent",
      "end_date": "2016-12-15T12:20:24.470114",
      "description": "",
      "s_version": "default",
      "cmd": "python -u run.py",
      "sflow_id": "zZteupOt5ix",
      "start_date": "2016-12-15T12:18:38.625253",
      "s_user": "admin",
      "orig_date": "2016-12-15T12:18:34.075002",
      "summary": "",
      "mode": "production",
      "timeout": 600,
      "action_md5": "8aa54edc8e356cd9b022a32944187a3c",
      "service_type": "action",
      "actual_version": "default",
      "service_id": "hello_world",
      "exec_status": "success",
      "id": "zZteupOt5ix",
      "name": "fsdfds fsfds sfdfds"
    }
  ]
}