Skip to content

Get Object's Job History

Get the operations history for the object with the specified ID.

Request

HTTP Request

GET /node/api/objects/:id/jobs

Permissions

objectPermissions

Path parameters

Parameter Type Description
id String
required
The ID of an object for whose job history is retrieved.

Request body

The request body is empty.

Response

Returns an array of jobs performed on an object.

Example

Request

login=<...>
password=<...>
saymon_hostname=<...>
object_id=<...>
url=http://$saymon_hostname/node/api/objects/$object_id/jobs

curl -X GET $url -u $login:$password
let login = <...>
let password = <...>
let saymonHostname = <...>
let objectId = <...>
let path = "/node/api/objects/" + objectId + "/jobs"
let auth = "Basic " + btoa(login + ":" + password);

let headers = new Headers();
headers.append("Authorization", auth);

let requestOptions = {
    method: "GET",
    headers: headers
};

fetch(saymonHostname + path, requestOptions)
    .then(response => response.text())
    .then(result => console.log(result))
    .catch(error => console.log("error", error));
const http = require("http");

let login = <...>
let password = <...>
let saymonHostname = <...>
let objectId = <...>
let path = "/node/api/objects/" + objectId + "/jobs"
let auth = "Basic " + Buffer.from(login + ":" + password).toString("base64");

let options = {
    "method": "GET",
    "hostname": saymonHostname,
    "headers": {
        "Authorization": auth
    },
    "path": path
};

let req = http.request(options, function (res) {
    let chunks = [];

    res.on("data", function (chunk) {
        chunks.push(chunk);
    });

    res.on("end", function (chunk) {
        let body = Buffer.concat(chunks);
        console.log(body.toString());
    });

    res.on("error", function (error) {
        console.error(error);
    });
});

req.end();
import requests

login = <...>
password =  <...>
saymon_hostname = <...>
object_id = <...>
url = "https://" + saymon_hostname + "/node/api/objects/" + object_id + "/jobs"

response = requests.request("GET", url, auth=(login, password))
print(response.text)

Response

[
    {
        "description": {
            "stdout": "Operation 1",
            "exitCode": 0
        },
        "results": [],
        "operation_id": "62e7d648ebe90b0c87903fcb",
        "owner_id": "62d7e5da56d203149a08002f",
        "user_id": "62c2f3ce80c8654892764d56",
        "timestamp": 1659362048187,
        "process_meta": null,
        "operation": {
            "name": "Operation 1"
        },
        "id": "62e7db0081358e0de357a173"
    },
    {
        "description": {
            "stdout": "Hello World",
            "exitCode": 0
        },
        ...
        "operation": {
            "name": "Operation1"
        },
        "id": "62e7db0581358e0de357a178"
    },
    {
        "description": {
            "stdout": "Operation 2",
            "exitCode": 0
        },
        ...
        "operation": {
            "name": "Operation 2"
        },
        "id": "62e7db0681358e0de357a17a"
    }
]