This project has retired. For details please refer to its Attic page.
Falcon - GET /api/instance/list/:entity-type/:entity-name

GET /api/instance/list/:entity-type/:entity-name

Description

Get list of all instances of a given entity.

Parameters

  • :entity-type Valid options are cluster, feed or process.
  • :entity-name Name of the entity.
  • start <optional param> Show instances from this date. Date format is yyyy-MM-dd'T'HH:mm'Z'.
    • By default, it is set to (end - (10 * entityFrequency)).
  • end <optional param> Show instances up to this date. Date format is yyyy-MM-dd'T'HH:mm'Z'.
    • Default is set to now.
  • colo <optional param> Colo on which the query should be run.
  • lifecycle <optional param> Valid lifecycles for feed are Eviction/Replication(default) and for process is Execution(default).
  • filterBy <optional param> Filter results by list of field:value pairs. Example: filterBy=STATUS:RUNNING,CLUSTER:primary-cluster
    • Supported filter fields are STATUS, CLUSTER, SOURCECLUSTER, STARTEDAFTER.
    • Query will do an AND among filterBy fields.
  • orderBy <optional param> Field by which results should be ordered.
    • Supports ordering by "status","startTime","endTime","cluster".
  • sortOrder <optional param> Valid options are "asc" and "desc"
  • offset <optional param> Show results from the offset, used for pagination. Defaults to 0.
  • numResults <optional param> Number of results to show per request, used for pagination. Only integers > 0 are valid, Default is 10.
  • doAs <optional query param> allows the current user to impersonate the user passed in doAs when interacting with the Falcon system.
  • allAttempts <optional query param> To get all the attempts for corresponding instances.

Results

List of instances of given entity.

The possible instance status returned and its meaning are as follows:

  • WAITING - The instance is waiting for the corresponding data(feed) instances to become available.
  • READY - The instance is ready to be scheduled. But, is waiting for scheduling conditions to be met. For example, limitation on number of instances that can be run in parallel.
  • RUNNING - The instance is running on the workflow engine.
  • FAILED - The instance has failed during execution.
  • KILLED - The instance has been killed either manually or by the system.
  • SUCCEEDED - The instance has executed successfully.
  • SKIPPED - This instance was not executed, but was skipped. For example, when the execution order is LAST_ONLY, the older instances are skipped.
  • ERROR - There was error while executing this instance on the workflow engine.
  • UNDEFINED - The status of the instance could not be determined.

Examples

Rest Call

GET http://localhost:15000/api/instance/list/process/SampleProcess?colo=*&start=2012-04-03T07:00Z

Result

{
    "instances": [
        {
            "details": "",
            "endTime": "2013-10-21T14:40:26-07:00",
            "startTime": "2013-10-21T14:39:56-07:00",
            "cluster": "primary-cluster",
            "logFile": "http:\/\/localhost:11000\/oozie?job=0000070-131021115933395-oozie-rgau-W",
            "status": "SUCCEEDED",
            "instance": "2012-04-03T07:00Z"
        }
    ],
    "requestId": "default\/e15bb378-d09f-4911-9df2-5334a45153d2\n",
    "message": "default\/STATUS\n",
    "status": "SUCCEEDED"
}

Rest Call

GET http://localhost:15000/api/instance/list/process/SampleProcess?colo=*&start=2012-04-03T07:00Z&filterBy=STATUS:SUCCEEDED,CLUSTER:primary-cluster&orderBy=startTime&offset=2&numResults=2&doAs=joe

Result

{
    "instances": [
        {
            "details": "",
            "endTime": "2013-10-21T14:40:26-07:00",
            "startTime": "2013-10-21T14:39:56-07:00",
            "cluster": "primary-cluster",
            "logFile": "http:\/\/localhost:11000\/oozie?job=0000070-131021115933395-oozie-rgau-W",
            "status": "SUCCEEDED",
            "instance": "2012-04-03T07:00Z"
        },
        {
            "details": "",
            "endTime": "2013-10-21T14:42:26-07:00",
            "startTime": "2013-10-21T14:41:56-07:00",
            "cluster": "primary-cluster",
            "logFile": "http:\/\/localhost:11000\/oozie?job=0000070-131021115933397-oozie-rgau-W",
            "status": "SUCCEEDED",
            "instance": "2012-04-03T08:00Z"
        },
    ],

    "requestId": "default\/e15bb378-d09f-4911-9df2-5334a45153d2\n",
    "message": "default\/STATUS\n",
    "status": "SUCCEEDED"
}

Rest Call

GET https://localhost:15443/api/instance/status/process/oozie-mr-process?user.name=narayan&start=2013-11-15T00:05Z&end=2013-11-15T01:00Z&colo=*&offset=0&allAttempts=true

Result

{
   "status":"SUCCEEDED",
   "message":"default/STATUS\n",
   "requestId":"default/942519651@qtp-1386909980-16 - 5b11a8ba-402b-4cc7-969c-256e0ed18ae2\n",
   "instances":[
      {
         "instance":"2013-11-15T00:05Z",
         "status":"SUCCEEDED",
         "logFile":"http://IM1948-X0:11000/oozie?job=0000010-160106121750678-oozie-oozi-W",
         "cluster":"local",
         "startTime":"2016-01-06T12:39:22+05:30",
         "endTime":"2016-01-06T12:40:05+05:30",
         "runId":0,
         "details":"",
         "actions":[
            {
               "action":"mr-node",
               "status":"SUCCEEDED",
               "logFile":"http://localhost:8088/proxy/application_1452062826344_0010/"
            }
         ]
      },
      {
         "instance":"2013-11-15T00:05Z",
         "status":"SUCCEEDED",
         "logFile":"http://IM1948-X0:11000/oozie?job=0000011-160106121750678-oozie-oozi-W",
         "cluster":"local",
         "startTime":"2016-01-06T12:40:27+05:30",
         "endTime":"2016-01-06T12:41:05+05:30",
         "runId":0,
         "details":"",
         "actions":[
            {
               "action":"mr-node",
               "status":"SUCCEEDED",
               "logFile":"http://localhost:8088/proxy/application_1452062826344_0012/"
            }
         ]
      }
   ]
}