Saltexec historyexample
Real-time examples of Zero Trust Host Access (Salt Exec) to view the history of all operations performed on nodes and clusters are provided below
History (set Limit and Offset)¶
Users can set the limit and offset as per the requirement. The below example limit and offset set to 3 and thus, shows the history of 3 operations. The recent 10 operations appear by default if the limit and offset is set to 0.
Step 1: Post Command¶
curl --location --request GET 'https://app.phani-ptnr-1219.dev.rafay-edge.net/cmdexec/v1/projects/j2q4j5k/history/?limit=03&offset=03' \
--header 'X-RAFAY-API-KEYID: f6869debbd24b1c235aa79b4d2971bdca4855d6f'
***Output**
[
{
"Id": "dpkv0mn",
"SubmittedAt": "2021-10-11T07:44:01.09573Z",
"ClusterId": "3mxg7ek",
"ClusterName": "madhunew-ubuntu201-arm",
"ProjectId": "j2q4j5k",
"OrganizationId": "dk69nqk",
"PartnerId": "9d2wyk8",
"Command": "cGluZyAtYyAxIGdvb2dsZS5jb20KaWYgWyAkPyA9PSAwIF07IHRoZW4KICAgIGVjaG8gJ0Nvbm5lY3Rpb24gd29ya2luZycKZWxzZQogICAgZWNobyAnRXJyb3IgaW4gY29ubmVjdGlvbiB0byBVUkwnCmZpCg==",
"Target": [],
"TargetType": "cluster",
"TargetNodes": [
"madhuamd-ubuntu201"
],
"ContentType": "base64",
"Timeout": 120,
"Username": "[email protected]",
"UnreachableNodes": [
"madhuarm-ubuntu201"
],
"UnapprovedNodes": []
},
{
"Id": "lpkzgmv",
"SubmittedAt": "2021-10-11T07:42:15.912945Z",
"ClusterId": "3mxg7ek",
"ClusterName": "madhunew-ubuntu201-arm",
"ProjectId": "j2q4j5k",
"OrganizationId": "dk69nqk",
"PartnerId": "9d2wyk8",
"Command": "cGluZyAtYyAxIGdvb2dsZS5jb20KaWYgWyAkPyA9PSAwIF07IHRoZW4KICAgIGVjaG8gJ0Nvbm5lY3Rpb24gd29ya2luZycKZWxzZQogICgZWNobyAnRXJyb3IgaW4gY29ubmVjdGlvbiB0byBVUkwnCmZpCg==",
"Target": [
"madhuarm-ubuntu201,madhuamd-ubuntu201"
],
"TargetType": "node",
"TargetNodes": [],
"ContentType": "bas64",
"Timeout": 60,
"Username": "[email protected]",
"UnreachableNodes": [],
"UnapprovedNodes": []
},
{
"Id": "5pk0lk6",
"SubmittedAt": "2021-10-11T07:42:01.3719Z",
"ClusterId": "3mxg7ek",
"ClusterName": "madhunew-ubuntu201-arm",
"ProjectId": "j2q4j5k",
"OrganizationId": "dk69nqk",
"PartnerId": "9d2wyk8",
"Command": "cGluZyAtYyAxIGdvb2dsZS5jb20KaWYgWyAkPyA9PSAwIF07IHRoZW4KICAgIGVjaG8gJ0Nvbm5lY3Rpb24gd29ya2luZycKZWxzZQogICgZWNobyAnRXJyb3IgaW4gY29ubmVjdGlvbiB0byBVUkwnCmZpCg==",
"Target": [
"madhuarm-ubuntu201,madhuamd-ubuntu201"
],
"TargetType": "node",
"TargetNodes": [],
"ContentType": "bas64",
"Timeout": 60,
"Username": "[email protected]",
"UnreachableNodes": [],
"UnapprovedNodes": []
}
]