/api/jobs
The following resources are applicable:
/jobs
GET
Returns the list of job history objects.
Parameters
| name | description | type | default |
|---|---|---|---|
| size | The number of jobs to return. | query | 10 |
| offset | Used with size to indicate where to start the result set. | query | 0 |
| sortProperty | Same as sortProp. | query | jobId |
| sortProp | Specifies the property on which to sort. | query | |
| sortDirection | Same as sortDir. | query | inc |
| sortDir | The order in which the result set objects are sorted, options=increasing, decreasing. | query | |
| filters | (no documentation provided) | query |
Response Body
| element: | jobs |
| media types: | text/plain application/json |
output = Job ID.
Status Codes
| HTTP Status Code | Description |
|---|---|
| 200 OK | OK; the requested operation was successful |
| 400 Bad Request | bad or malformed request |
| 404 Not Found | the resource does not exist |
| 406 Not Acceptable | required representation is not supported by the server |
| 500 Internal Server Error | internal server error |
| 503 Service Unavailable | service is unavailable |
POST
Starts the running of either the report associated with given report ID, or creates and runs a report from the optional content. The report ID will take precedence.
Parameters
| name | description | type | default |
|---|---|---|---|
| mid | Report ID | query | 0 |
Request Body
| element: | json |
| media types: | text/plain application/json |
input = content of the report definition, in JSON format, dataType=string
Response Body
| element: | reportDefinition |
| media types: | */* application/xml |
output = an instance of the newly created ReportDefinition object
Status Codes
| HTTP Status Code | Description |
|---|---|
| 201 Created | the request has been fulfilled and resulted in a new resource being created |
| 400 Bad Request | bad or malformed request |
| 404 Not Found | the resource does not exist |
| 406 Not Acceptable | required representation is not supported by the server |
| 500 Internal Server Error | internal server error |
| 503 Service Unavailable | service is unavailable |
/jobs/{jid }
GET
Returns the report job history object associated with the supplied job ID.
Parameters
| name | description | type | default |
|---|---|---|---|
| jid | Job ID | path |
Response Body
| element: | job |
| media types: | text/plain application/json |
output = a string representing the Job
Status Codes
| HTTP Status Code | Description |
|---|---|
| 200 OK | OK; the requested operation was successful |
| 400 Bad Request | bad or malformed request |
| 404 Not Found | the resource does not exist |
| 406 Not Acceptable | required representation is not supported by the server |
| 500 Internal Server Error | internal server error |
| 503 Service Unavailable | service is unavailable |
DELETE
Deletes the report history object, along with all associated report output data.
Parameters
| name | description | type | default |
|---|---|---|---|
| jid | Job ID. | path |
Status Codes
| HTTP Status Code | Description |
|---|---|
| 200 OK | OK; the resource was deleted successfully |
| 400 Bad Request | bad or malformed request |
| 404 Not Found | the resource does not exist |
| 406 Not Acceptable | required representation is not supported by the server |
| 500 Internal Server Error | internal server error |
| 503 Service Unavailable | service is unavailable |
/jobs/{jid }/cancel
PUT
Cancels a currently running report.
Parameters
| name | description | type | default |
|---|---|---|---|
| jid | Job ID of a running report. | path |
Status Codes
| HTTP Status Code | Description |
|---|---|
| 200 OK | OK; the resource was updated successfully |
| 400 Bad Request | bad or malformed request |
| 404 Not Found | the resource does not exist |
| 406 Not Acceptable | required representation is not supported by the server |
| 500 Internal Server Error | internal server error |
| 503 Service Unavailable | service is unavailable |
/jobs/{jid }/csv
GET
Returns the report output table associated with the given report job ID.
Parameters
| name | description | type | default |
|---|---|---|---|
| jid | Job ID | path |
Response Body
| element: | (custom) |
| media types: | text/plain |
output Report output table
Status Codes
| HTTP Status Code | Description |
|---|---|
| 200 OK | OK; the requested operation was successful |
| 400 Bad Request | bad or malformed request |
| 404 Not Found | the resource does not exist |
| 406 Not Acceptable | required representation is not supported by the server |
| 500 Internal Server Error | internal server error |
| 503 Service Unavailable | service is unavailable |
/jobs/count
GET
Returns the number of existing job history objects.
Response Body
| element: | (custom) |
| media types: | text/plain |
output = The number of existing job history objects.
Status Codes
| HTTP Status Code | Description |
|---|---|
| 200 OK | OK; the requested operation was successful |
| 400 Bad Request | bad or malformed request |
| 404 Not Found | the resource does not exist |
| 406 Not Acceptable | required representation is not supported by the server |
| 500 Internal Server Error | internal server error |
| 503 Service Unavailable | service is unavailable |
/jobs/live
POST
This method starts the running of the report, associated with the supplied info and content.
JSON Example: the following query using POST will start running the report.
matelive/api/jobs/live
{
"hasRawData": "True",
"isLive": "True",
"dataType": "int",
"objectKeys": [{
"name": "node",
"value": "er1.van"
},
"name": "interface",
"value": "ge-0/1/0.0"
}],
"objectType": "Interfaces",
"properties": [{
"aggregationMode": "last",
"name": "prop"
}],
"reportType": "Adhoc",
"timeFrom": "000101_0000_UTC",
"timeTo": "150101_0000_UTC"
}
Parameters
| name | description | type | default |
|---|---|---|---|
| sortBy | the name of the property to be used in the sorting process, dataType=string | query |
Request Body
| element: | json |
| media types: | text/plain application/json |
input = content of the report definition, in JSON format, dataType=string
Response Body
| element: | lwReportResults |
| media types: | text/plain application/json |
output = a string representing the job run status indicator
Status Codes
| HTTP Status Code | Description |
|---|---|
| 201 Created | the request has been fulfilled and resulted in a new resource being created |
| 400 Bad Request | bad or malformed request |
| 404 Not Found | the resource does not exist |
| 406 Not Acceptable | required representation is not supported by the server |
| 500 Internal Server Error | internal server error |
| 503 Service Unavailable | service is unavailable |