Skip to main content

Home

Common endpoints

Like the Applications page, these endpoints provide detailed information about your applications. You can collect data based on application name, type, user, queues, and tags.

/common/app/{app_id}/errors

Gets the errors associated with a given app.

Request
GET http://unravel-host:3000/api/v1/common/app/{app_id}/errors
Path parameters

Name

Description

app_id

App ID.

Query parameters

None.

Response body

Name

Type

Description

integer

Examples

Request:

curl -X GET "http://myserver.com:3000/api/v1/common/app/parwinder_20190228180000_db0d2b83-849f-45d2-bd64-e9224e4b4388-u_SOyF/errors" -H  "accept: application/json" -H  "Authorization: JWT token"

Response body:

No errors found
/common/app/{app_id}/extendedsummary

Gets a detailed summary of a given app.

Request
GET http://unravel-host:3000/api/v1/common/app/{app_id}/extendedsummary
Path parameters

Name

Description

app_id

App ID.

Query parameters

None.

Response body

Name

Type

Description

integer

Examples

Request:

curl -X GET "http://myserver.com:3000/api/v1/common/app/parwinder_20190228180000_db0d2b83-849f-45d2-bd64-e9224e4b4388-u_SOyF/extendedsummary" -H  "accept: application/json" -H  "Authorization: JWT token"

Response body:

/common/app/{app_id}/logs

Gets the logs associated with a given app.

Request
GET http://unravel-host:3000/api/v1/common/app/{app_id}/logs
Path parameters

Name

Description

app_id

App ID.

Query parameters

None.

Response body

Name

Type

Description

integer

Examples

Request:

curl -X GET "http://myserver.com:3000/api/v1/common/app/parwinder_20190228180000_db0d2b83-849f-u_SOyF/logs" -H  "accept: application/json" -H  "Authorization: JWT token"

Response body:

No log view found for app hive_20190126160707_1d3f4e51-55eb-4cc7-8a8b-bca05d598920
/common/app/{app_id}/recommendation

Gets Unravel's recommendations for the given application.

Request
GET http://unravel-host:3000/api/v1/common/app/{app_id}/recommendation
Path parameters

Name

Description

app_id

App ID.

Query parameters

None.

Response body

Name

Type

Description

parameter

string

App parameter.

current_value

string

Current value of the app's parameter.

recommended

string

Recommended value for the app's parameter.

Examples

Request:

curl -X GET "http://myserver.com:3000/api/v1/common/app/job_1543784013107_1631/recommendation" -H  "accept: application/json" -H  "Authorization: JWT token"

Response:

[
   {
      "parameter": "mapreduce.map.memory.mb",
      "current_value": "7596",
      "recommended_value": "3896"
   },
   {
      "parameter": "mapreduce.map.java.opts",
      "current_value": "-Xmx8192m",
      "recommended_value": "-Xmx3117m"
   }
]
spark/{clusterUid}/{app_id}/{attempt_id}/errorview

Request
GET http://<unravel-host>:3000/api/v1/spark/{clusterUid}/{app_id}/{attempt_id}/errorview
Path parameters

Name

Description

app_id

App ID.

clusterUid

Cluster unique ID.

attempt_id

Query parameters

Name

Description

 clusterUid

Cluster unique ID.

Examples

Request:

curl -X GET "http://myserver.com:3000/api/v1/spark/default/application_1648561667886_0027/1/errorview" -H "accept: application/json"  -H "Content-Type:application/json" -H  "Authorization: JWT <token>"

Response:

[{"component":"driver","meta":"{\"appId\":\"application_1648115466090_0016\",\"attemptId\":\"1\",\"component\":\"driver\",\"severityNumsAll\":{\"exception\":0,\"warn\":1,\"error\":0,\"fatal\":0},\"hitdoc\":null,\"schema\":[{\"name\":\"severity\",\"type\":\"int\",\"desc\":\"Unravel
error level\"},{\"name\":\"time\",\"type\":\"TimeStamp\",\"desc\":\"timestamp of the error
occurred\"},{\"name\":\"keyword\",\"type\":\"String\",\"desc\":\"Error type
keyword\"},{\"name\":\"message\",\"type\":\"String\",\"desc\":\"error log
entries\"}],\"content\":[{\"id\":\"application_1648115466090_0016\",\"severity\":\"30\",\"time\":\"1648127088000\",\"keyword\":\"cluster.YarnSchedulerBackend$YarnSchedulerEndpoint:\",\"message\":\"Attempted
to request executors before the AM has registered!\"}]}","attempt_id":"1"}]
/common/app/{app_id}/summary

Gets a summary of a given app.

Request
GET http://unravel-host:3000/api/v1/common/app/{app_id}/summary
Path parameters

Name

Description

app_id

App ID.

Query parameters

None.

Response body

Name

Type

Description

@class

string

vcoreSeconds

integeger

memorySeconds

integer

cents

integer

version

integer

source

string

kind

string

id

string

App ID.

nick

string

status

string

user

string

mrJobIds

array

List of MapReduce job IDs.

duration

integer

startTime

integer

numMRJobs

integer

totalMRJobs

integer

totalMapTasks

integer

sm

integer

km

integer

kmu

integer

fm

integer

fmu

integer

totalReduceTasks

integer

sr

integer

kr

integer

kru

integer

fr

integer

fru

integer

totalMapSlotDuration

integer

totalReduceSlotDuration

integer

totalDfsBytesRead

integer

totalDfsBytesWritten

integer

queryString

string

type

string

numEvents

integer

Examples

Request:

curl -X GET "http://myserver.com:3000/api/v1/common/app/parwinder_20190228180000_db0d2b83-849f-45d2-bd64-e9224e4b4388-u_SOyF/summary" -H  "accept: application/json" -H  "Authorization: JWT token"

Response:

{
  "@class": "com.unraveldata.annotation.HiveQueryAnnotation",
  "vcoreSeconds": 0,
  "memorySeconds": 0,
  "cents": 0,
  "version": 1,
  "source": "post-db",
  "kind": "hive",
  "id": "parwinder_20190228180000_db0d2b83-849f-45d2-bd64-e9224e4b4388-u_SOyF",
  "nick": "Hive Query",
  "status": "S",
  "user": "parwinder",
  "mrJobIds": [
    "job_1550559654567_8334"
  ],
  "duration": 82120,
  "startTime": 1551405626487,
  "numMRJobs": 0,
  "totalMRJobs": 1,
  "totalMapTasks": 0,
  "sm": 0,
  "km": 0,
  "kmu": 0,
  "fm": 0,
  "fmu": 0,
  "totalReduceTasks": 0,
  "sr": 0,
  "kr": 0,
  "kru": 0,
  "fr": 0,
  "fru": 0,
  "totalMapSlotDuration": 0,
  "totalReduceSlotDuration": 0,
  "totalDfsBytesRead": 0,
  "totalDfsBytesWritten": 0,
  "queryString": "\nINSERT OVERWRITE DIRECTORY '\/user\/benchmark-user\/benchmarks\/oozie\/workflows\/road_accident_db\/output\/'\nROW FORMAT DELIMITED\nFIELDS TERMINATED BY '\\t'\nSTORED AS TEXTFILE\nselect reflect(\"java.lang.Thread\", \"sleep\", bigint(60000))",
  "type": "DML",
  "numEvents": 0
}