Skip to main content

Home

POST /apps/search

Gets all apps filtered by app type, status, username, queue, and tags.

Note

JSON is used for the query format that is made with POST requests.

Request
POST -H "Authorization: JWT <token>" -d {"appStatus":["appStatus","appStatus1","appStatus12"],"appTypes":["appTypes"],"size":15,"start_time":["start_time"],"end_time":["end_time"],"users":["username"],"queues":["queues"],"appTags":["taglist"]:"from":0}  -H "Content-Type: application/json" http://myserver.unraveldata.com:3000/api/v1/apps/search
Path parameters

None.

Query parameters

Required parameters are highlighted.

Name

Type

Description

appTypes

string

List of app types.

Format: ["appType1","appType2"]

Valid values are mr | hive | spark | pig | cascading | impala | tez.

appStatus

string

App status.

Format: ["appStatus1","appStatus2"]

Valid values are Success | Failed | Killed | Running | Waiting| Pending | Unkown.

Note

For Hive and MR you must specify at least one status type.

size

string

The number of items to be listed. Default is 15.

start_time

string

Start time. Format: yyyy-mm-ddThh:mm:ss.SSS+offset value

For example: 2022-02-23T15:41:42+05:30

end_time

string

End time. Format: yyyy-mm-ddThh:mm:ss.SSS+offset value

For example: 2022-03-25T15:41:42+05:30

users

string

Username(s)

Format: ["user1","user2"]

queues

string

Cluster's queue names(s)

Format: ["queue1","queue2"]

taglist

string

Tag(s)

Format: "key":["value,value"]. For example, "dept":[finance, mktg]

from

integer

Set this to 0.

Response body

The JSON response body contains a metadata section and a results section that vary according to the request.

Examples

List all app status and app types within a specific timeframe:

curl -X POST -H "Authorization: JWT <Token>" -d '{"appStatus":["K","F","R","S","P","U","W"],"appTypes":[],"size":15,"start_time":"2022-02-23T15:41:42+05:30","end_time":"2022-03-25T15:41:42+05:30","from":0}' -H "Content-Type: application/json" http://myserver.unraveldata.com:3000/api/v1/apps/search

Response body:

{
   "metadata": {
       "duration": {
           "max": 187496,
           "min": 1373
       },
       "resource": {
           "max": null,
           "min": null
       },
       "events": {
           "max": 2,
           "min": 0
       },
       "totalEvents": 16,
       "totalReads": 56322731,
       "totalWrites": 306,
       "appTypes": {
           "spark": 16,
           "hive": 2
       },
       "appStatus": {
           "S": 14,
           "F": 2,
           "K": 2
       },
       "users": {
           "user1": 4,
           "hive": 3,
           "user3": 3,
           "user10": 2,
           "user2": 2,
           "user5": 1,
           "user6": 1,
           "user7": 1,
           "user9": 1
       },
       "queues": {
           "root.DataForecast": 4,
           "root.DataSecurity": 3,
           "root.Sales": 3,
           "root.DataAnalyst": 2,
           "default": 1,
           "root.Marketing": 1,
           "root.Payroll": 1,
           "root.ThirdPartyData": 1,
           "root.user5": 1
       },
       "clusters": {
           "3c599cf8-aa69-11ec-9173-1e0036001415": 18
       },
       "totalRecords": 18
   },
   "results": [
       {
           "appId": null,
           "appType": null,
           "gotoId": null,
           "gotoLevel": null,
           "id": "application_1648115466090_0016",
           "nick": "spark",
           "name": "Spark Test App",
           "queue": "root.DataForecast",
           "status": "S",
           "status_long": "Success",
           "user": "user3",
           "raw_user": "user3",
           "realUser": "user3",
           "raw_realUser": "user3",
           "submitHost": "-",
           "remarks": [
               "AA2"
           ],
           "aa2Badge": true,
           "inBadge": false,
           "key": "YARN",
           "clusterId": "Cluster1",
           "clusterUid": "3c599cf8-aa69-11ec-9173-1e0036001415",
           "clusterTag": "-",
           "start_time": "03/24/22 13:04:37",
           "start_time_long": "2022-03-24T13:04:37.600Z",
           "finished_time": "03/24/22 13:05:29",
           "finished_time_long": "2022-03-24T13:05:29.287Z",
           "duration_long": 51687,
           "predDuration_long": 0,
           "io_long": 0,
           "read_long": 0,
           "write_long": 0,
           "resource": 0,
           "service": 0,
           "events": 1,
           "numApps": 0,
           "numSparkApps": 0,
           "numMRJobs": 0,
           "numEvents": 1,
           "mrJobIds": [
               "stage-0",
               "stage-1",
               "stage-2",
               "stage-3",
               "stage-4",
               "stage-5",
               "stage-6"
     
            ],
           "appIds": [],
           "sm": 1000,
           "sr": 100,
           "fm": null,
           "fr": null,
           "km": null,
           "kr": null,
           "ss": 1000,
           "fs": null,
           "ks": null,
           "fsu": null,
           "ksu": null,
           "totalMapTasks": 1000,
           "totalReduceTasks": null,
           "totalSparkTasks": 1000,
           "totalMapSlotDuration": 81002,
           "totalReduceSlotDuration": null,
           "totalSparkSlotDuration": 81002,
           "inputTables": null,
           "outputTables": null,
           "wi": null,
           "wn": null,
           "wt": null,
           "type": "REGULAR",
           "type_regular": true,
           "jobId": "-",
           "runName": "-",
           "runId": "-",
           "dbus": "-",
           "dbuCost": 0,
           "dbuPremium": "-",
           "dbuStandard": "-",
           "clusterType": "-",
           "setupDuration": 0,
           "cleanupDuration": 0,
           "wsInstance": "-",
           "clusterTg": "-",
           "sparkAppId": "-",
           "cents": 0,
           "cost": 0,
           "db": "-",
           "output": "-",
           "aid": "-",
           "userType": "-",
           "metrics": null,
           "totalProcessingTime": 0,
           "memorySeconds": 306713,
           "cpuTime": 0,
           "storageWaitTime": 0,
           "networkSendWaitTime": 0,
           "networkReceiveWaitTime": 0,
           "elastic": true,
           "kind": "spark",
           "kindLong": "Spark",
           "name_long": "Spark Test App",
           "kind_url": "spark",
           "kind_parent_url": "app"
       } 
   ]
}