Skip to content

Command History

Real-time examples of Zero Trust Host Access to view the history of all commands performed on nodes and clusters are provided below.


History

Users can set the limit and offset as per their needs. In the example below, the limit and offset are set to 3. This means the history of 3 operations will be returned.

Note

The default is "last 10 operations" if the limit and offset is set to 0.


Create Query

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'

***Example 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": "madhu@rafay.co",
        "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": "madhu@rafay.co",
        "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": "madhu@rafay.co",
        "UnreachableNodes": [],
        "UnapprovedNodes": []
    }
  ]