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

Description

Get status of a specific instance of an 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.

Results

Status of the specified instance along with job urls for all actions of user workflow and non-succeeded actions of the main-workflow.

Examples

Rest Call

GET https://localhost:15443/api/instance/status/process/WordCount?start=2014-11-04T16:00Z&colo=*

Result

{
    "instances": [
        {
            "details": "",
            "endTime": "2014-11-05T16:08:10+05:30",
            "startTime": "2014-11-05T16:07:29+05:30",
            "cluster": "local",
            "logFile": "http:\/\/localhost:11000\/oozie?job=0000011-141105155430303-oozie-oozi-W",
            "status": "SUCCEEDED",
            "instance": "2014-11-04T16:00Z",
            "actions": [
                {
                    "action": "wordcount-mr",
                    "status": "SUCCEEDED",
                    "logFile": "http:\/\/localhost:50030\/jobdetails.jsp?jobid=job_201411051553_0005"
                }
            ]
        }
    ],
    "requestId": "default\/b9fc3cba-1b46-4d1f-8196-52c795ea3580\n",
    "message": "default\/STATUS\n",
    "status": "SUCCEEDED"
}

Rest Call

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

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"
}