---
title: Save Request
slug: kron-pam-api-collection-381-patch3/save-request
docTags: 
createdAt: 2026-10-21T06:07:16.182Z
---

{
  "id": "m8IODnl3PCKBIx1Xylnov",
  "type": "api-oas-v2",
  "data": {
    "method": "POST",
    "url": "{{url}}/aioc-rest-web/rest/rap/saveRequest",
    "name": "",
    "description": "<h3>Request Overview</h3>\n<ul>\n<li>\n<p><strong>Body:</strong></p>\n<ul>\n<li>The JSON body includes details for users and devices along with scheduling and configuration options.</li>\n</ul>\n</li>\n<li>\n<p><strong>Response:</strong></p>\n<ul>\n<li>\n<p>A JSON object is returned with the created or updated request details.</p>\n</li>\n<li>\n<p>Includes a new <code>dbId</code>, user and device details (with their respective generated IDs), and flags such as <code>alreadyAssignedCheck</code>.</p>\n</li>\n</ul>\n</li>\n</ul>",
    "contentType": "application/json",
    "request": {
      "headerParameters": [
        {
          "name": "X-XSRF-TOKEN",
          "description": "",
          "default": "{{csrftoken}}",
          "value": "{{csrftoken}}",
          "type": "string"
        }
      ],
      "queryParameters": [],
      "pathParameters": [
        {
          "name": "url",
          "description": "",
          "default": "url",
          "value": "url",
          "type": "string"
        }
      ],
      "bodyDataParameters": [
        {
          "name": "body",
          "description": "",
          "default": "{\r\n    \"userInfo\": [\r\n        {\r\n            \"userInfoId\": \"f8ea68b3-fe96-4965-a295-b9e5ec0b3222\",\r\n            \"userInfoEid\": \"user-all-001\",\r\n            \"userType\": \"USER\"\r\n        }\r\n    ],\r\n    \"deviceInfo\": [\r\n        {\r\n            \"deviceInfoId\": \"dbcd3354-5fde-4de9-8305-f3ebde5cda29\",\r\n            \"deviceType\": \"DEVICE\",\r\n            \"deviceInfoEid\": \"10.20.42.55-LDAP - 10.20.42.55\"\r\n        },\r\n        {\r\n            \"deviceInfoId\": \"54826eea-f5c1-446f-94ac-fbb9d2685e06\",\r\n            \"deviceType\": \"DEVICE\",\r\n            \"deviceInfoEid\": \"10.20.42.129-Linux1 - 10.20.42.129\"\r\n        }\r\n    ],\r\n    \"isSMSEnabled\": true,\r\n    \"startTime\": 17391937820000,\r\n    \"endTime\": 17391937820001,\r\n    \"timeByDay\": null\r\n}\r\n",
          "value": "{\r\n    \"userInfo\": [\r\n        {\r\n            \"userInfoId\": \"f8ea68b3-fe96-4965-a295-b9e5ec0b3222\",\r\n            \"userInfoEid\": \"user-all-001\",\r\n            \"userType\": \"USER\"\r\n        }\r\n    ],\r\n    \"deviceInfo\": [\r\n        {\r\n            \"deviceInfoId\": \"dbcd3354-5fde-4de9-8305-f3ebde5cda29\",\r\n            \"deviceType\": \"DEVICE\",\r\n            \"deviceInfoEid\": \"10.20.42.55-LDAP - 10.20.42.55\"\r\n        },\r\n        {\r\n            \"deviceInfoId\": \"54826eea-f5c1-446f-94ac-fbb9d2685e06\",\r\n            \"deviceType\": \"DEVICE\",\r\n            \"deviceInfoEid\": \"10.20.42.129-Linux1 - 10.20.42.129\"\r\n        }\r\n    ],\r\n    \"isSMSEnabled\": true,\r\n    \"startTime\": 17391937820000,\r\n    \"endTime\": 17391937820001,\r\n    \"timeByDay\": null\r\n}\r\n",
          "type": "object"
        }
      ],
      "formDataParameters": [],
      "oAuthParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "Save Request",
        "jsonExample": "{\n    \"dbId\": \"262a1d84-552f-43d0-9757-ab06b21fc902\",\n    \"timeByDay\": null,\n    \"userInfo\": [\n        {\n            \"id\": \"bf352193-dfb5-483f-ae0f-803dcdf623d8\",\n            \"requestId\": null,\n            \"userInfoId\": \"f8ea68b3-fe96-4965-a295-b9e5ec0b3222\",\n            \"userInfoEid\": \"user-all-001\",\n            \"userType\": \"USER\"\n        }\n    ],\n    \"deviceInfo\": [\n        {\n            \"id\": \"876cf753-3286-4a66-9e6a-bbb6f3cc2558\",\n            \"requestId\": null,\n            \"deviceInfoId\": \"dbcd3354-5fde-4de9-8305-f3ebde5cda29\",\n            \"deviceInfoEid\": \"10.20.42.55-LDAP - 10.20.42.55\",\n            \"deviceType\": \"DEVICE\"\n        },\n        {\n            \"id\": \"5b46d333-9e7f-4af2-96d9-f51ca81a673f\",\n            \"requestId\": null,\n            \"deviceInfoId\": \"54826eea-f5c1-446f-94ac-fbb9d2685e06\",\n            \"deviceInfoEid\": \"10.20.42.129-Linux1 - 10.20.42.129\",\n            \"deviceType\": \"DEVICE\"\n        }\n    ],\n    \"createdBy\": {\n        \"id\": \"25e53f47-ce66-4df2-9abc-6961dc668264\",\n        \"eid\": \"admin\"\n    },\n    \"startTime\": 17391937820000,\n    \"endTime\": 17391937820001,\n    \"isSMSEnabled\": true,\n    \"alreadyAssignedCheck\": true\n}"
      }
    ],
    "examples": {
      "languages": [
        {
          "id": "NOH9nqL-mb2Lld8jlwtvF",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url {{url}}/aioc-rest-web/rest/rap/saveRequest \\\n     --header 'accept: application/json' \\\n     --header 'content-type: application/json' \\\n     --header 'x-xsrf-token: {{csrftoken}}' \\\n     --data '\"{\\r\\n    \\\"userInfo\\\": [\\r\\n        {\\r\\n            \\\"userInfoId\\\": \\\"f8ea68b3-fe96-4965-a295-b9e5ec0b3222\\\",\\r\\n            \\\"userInfoEid\\\": \\\"user-all-001\\\",\\r\\n            \\\"userType\\\": \\\"USER\\\"\\r\\n        }\\r\\n    ],\\r\\n    \\\"deviceInfo\\\": [\\r\\n        {\\r\\n            \\\"deviceInfoId\\\": \\\"dbcd3354-5fde-4de9-8305-f3ebde5cda29\\\",\\r\\n            \\\"deviceType\\\": \\\"DEVICE\\\",\\r\\n            \\\"deviceInfoEid\\\": \\\"10.20.42.55-LDAP - 10.20.42.55\\\"\\r\\n        },\\r\\n        {\\r\\n            \\\"deviceInfoId\\\": \\\"54826eea-f5c1-446f-94ac-fbb9d2685e06\\\",\\r\\n            \\\"deviceType\\\": \\\"DEVICE\\\",\\r\\n            \\\"deviceInfoEid\\\": \\\"10.20.42.129-Linux1 - 10.20.42.129\\\"\\r\\n        }\\r\\n    ],\\r\\n    \\\"isSMSEnabled\\\": true,\\r\\n    \\\"startTime\\\": 17391937820000,\\r\\n    \\\"endTime\\\": 17391937820001,\\r\\n    \\\"timeByDay\\\": null\\r\\n}\\r\\n\"'"
        },
        {
          "id": "UZstsVVZinJAXkmWceDnd",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\nmyHeaders.append(\"x-xsrf-token\", \"{{csrftoken}}\");\n\nvar raw = JSON.stringify(\"{\\r\\n    \\\"userInfo\\\": [\\r\\n        {\\r\\n            \\\"userInfoId\\\": \\\"f8ea68b3-fe96-4965-a295-b9e5ec0b3222\\\",\\r\\n            \\\"userInfoEid\\\": \\\"user-all-001\\\",\\r\\n            \\\"userType\\\": \\\"USER\\\"\\r\\n        }\\r\\n    ],\\r\\n    \\\"deviceInfo\\\": [\\r\\n        {\\r\\n            \\\"deviceInfoId\\\": \\\"dbcd3354-5fde-4de9-8305-f3ebde5cda29\\\",\\r\\n            \\\"deviceType\\\": \\\"DEVICE\\\",\\r\\n            \\\"deviceInfoEid\\\": \\\"10.20.42.55-LDAP - 10.20.42.55\\\"\\r\\n        },\\r\\n        {\\r\\n            \\\"deviceInfoId\\\": \\\"54826eea-f5c1-446f-94ac-fbb9d2685e06\\\",\\r\\n            \\\"deviceType\\\": \\\"DEVICE\\\",\\r\\n            \\\"deviceInfoEid\\\": \\\"10.20.42.129-Linux1 - 10.20.42.129\\\"\\r\\n        }\\r\\n    ],\\r\\n    \\\"isSMSEnabled\\\": true,\\r\\n    \\\"startTime\\\": 17391937820000,\\r\\n    \\\"endTime\\\": 17391937820001,\\r\\n    \\\"timeByDay\\\": null\\r\\n}\\r\\n\");\n\nvar requestOptions = {\n   method: 'POST',\n   headers: myHeaders,\n   body: raw,\n   redirect: 'follow'\n};\n\nfetch(\"{{url}}/aioc-rest-web/rest/rap/saveRequest\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "ikd4SxOKeCwgiMeyMFR8y",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"{{url}}/aioc-rest-web/rest/rap/saveRequest\")\n\nhttp = Net::HTTP.new(url.host, url.port);\nrequest = Net::HTTP::Post.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\nrequest[\"x-xsrf-token\"] = \"{{csrftoken}}\"\nrequest.body = JSON.dump(\"{\\r\\n    \\\"userInfo\\\": [\\r\\n        {\\r\\n            \\\"userInfoId\\\": \\\"f8ea68b3-fe96-4965-a295-b9e5ec0b3222\\\",\\r\\n            \\\"userInfoEid\\\": \\\"user-all-001\\\",\\r\\n            \\\"userType\\\": \\\"USER\\\"\\r\\n        }\\r\\n    ],\\r\\n    \\\"deviceInfo\\\": [\\r\\n        {\\r\\n            \\\"deviceInfoId\\\": \\\"dbcd3354-5fde-4de9-8305-f3ebde5cda29\\\",\\r\\n            \\\"deviceType\\\": \\\"DEVICE\\\",\\r\\n            \\\"deviceInfoEid\\\": \\\"10.20.42.55-LDAP - 10.20.42.55\\\"\\r\\n        },\\r\\n        {\\r\\n            \\\"deviceInfoId\\\": \\\"54826eea-f5c1-446f-94ac-fbb9d2685e06\\\",\\r\\n            \\\"deviceType\\\": \\\"DEVICE\\\",\\r\\n            \\\"deviceInfoEid\\\": \\\"10.20.42.129-Linux1 - 10.20.42.129\\\"\\r\\n        }\\r\\n    ],\\r\\n    \\\"isSMSEnabled\\\": true,\\r\\n    \\\"startTime\\\": 17391937820000,\\r\\n    \\\"endTime\\\": 17391937820001,\\r\\n    \\\"timeByDay\\\": null\\r\\n}\\r\\n\")\n\nresponse = http.request(request)\nputs response.read_body\n"
        },
        {
          "id": "6c4zJAcq6sxWllwDxem7a",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"{{url}}/aioc-rest-web/rest/rap/saveRequest\"\n\npayload = json.dumps(\"{\\r\\n    \\\"userInfo\\\": [\\r\\n        {\\r\\n            \\\"userInfoId\\\": \\\"f8ea68b3-fe96-4965-a295-b9e5ec0b3222\\\",\\r\\n            \\\"userInfoEid\\\": \\\"user-all-001\\\",\\r\\n            \\\"userType\\\": \\\"USER\\\"\\r\\n        }\\r\\n    ],\\r\\n    \\\"deviceInfo\\\": [\\r\\n        {\\r\\n            \\\"deviceInfoId\\\": \\\"dbcd3354-5fde-4de9-8305-f3ebde5cda29\\\",\\r\\n            \\\"deviceType\\\": \\\"DEVICE\\\",\\r\\n            \\\"deviceInfoEid\\\": \\\"10.20.42.55-LDAP - 10.20.42.55\\\"\\r\\n        },\\r\\n        {\\r\\n            \\\"deviceInfoId\\\": \\\"54826eea-f5c1-446f-94ac-fbb9d2685e06\\\",\\r\\n            \\\"deviceType\\\": \\\"DEVICE\\\",\\r\\n            \\\"deviceInfoEid\\\": \\\"10.20.42.129-Linux1 - 10.20.42.129\\\"\\r\\n        }\\r\\n    ],\\r\\n    \\\"isSMSEnabled\\\": true,\\r\\n    \\\"startTime\\\": 17391937820000,\\r\\n    \\\"endTime\\\": 17391937820001,\\r\\n    \\\"timeByDay\\\": null\\r\\n}\\r\\n\")\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json',\n   'x-xsrf-token': '{{csrftoken}}'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "NOH9nqL-mb2Lld8jlwtvF"
    },
    "results": {
      "languages": [
        {
          "id": "XSlSbyj_MbGHnCIYBkDN2",
          "language": "200",
          "code": "{\n    \"dbId\": \"262a1d84-552f-43d0-9757-ab06b21fc902\",\n    \"timeByDay\": null,\n    \"userInfo\": [\n        {\n            \"id\": \"bf352193-dfb5-483f-ae0f-803dcdf623d8\",\n            \"requestId\": null,\n            \"userInfoId\": \"f8ea68b3-fe96-4965-a295-b9e5ec0b3222\",\n            \"userInfoEid\": \"user-all-001\",\n            \"userType\": \"USER\"\n        }\n    ],\n    \"deviceInfo\": [\n        {\n            \"id\": \"876cf753-3286-4a66-9e6a-bbb6f3cc2558\",\n            \"requestId\": null,\n            \"deviceInfoId\": \"dbcd3354-5fde-4de9-8305-f3ebde5cda29\",\n            \"deviceInfoEid\": \"10.20.42.55-LDAP - 10.20.42.55\",\n            \"deviceType\": \"DEVICE\"\n        },\n        {\n            \"id\": \"5b46d333-9e7f-4af2-96d9-f51ca81a673f\",\n            \"requestId\": null,\n            \"deviceInfoId\": \"54826eea-f5c1-446f-94ac-fbb9d2685e06\",\n            \"deviceInfoEid\": \"10.20.42.129-Linux1 - 10.20.42.129\",\n            \"deviceType\": \"DEVICE\"\n        }\n    ],\n    \"createdBy\": {\n        \"id\": \"25e53f47-ce66-4df2-9abc-6961dc668264\",\n        \"eid\": \"admin\"\n    },\n    \"startTime\": 17391937820000,\n    \"endTime\": 17391937820001,\n    \"isSMSEnabled\": true,\n    \"alreadyAssignedCheck\": true\n}"
        }
      ],
      "selectedLanguageId": "XSlSbyj_MbGHnCIYBkDN2"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}