Make Reservation For Vault Account
1 min
code examples curl request post \\ \ url {{url}}/aioc rest web/rest/sc/sapm/makereservation \\ \ header 'accept application/json' \\ \ header 'content type application/json' \\ \ header 'x xsrf token {{csrftoken}}' \\ \ data '"{\n \\"sapmdbid\\" 464216,\n \\"comment\\" \\"asdf11g\\",\n \\"startdate\\" \\"2026 10 02t19 45 00\\",\n \\"enddate\\" \\"2026 10 28t21 45 00\\",\n \\"firstpartuser\\" {\n \\"eid\\" \\"test user2\\",\n \\"id\\" \\"e039e179 ba80 4932 b07d f33db7e38d3a\\"\n },\n \\"secondpartuser\\" {\n \\"eid\\" \\"test user3\\",\n \\"id\\" \\"f4118975 355b 40f7 a5d5 ed0fdc81a5c2\\"\n },\n \\"remindbeforeinmins\\" 15\n}\n"'var myheaders = new headers(); myheaders append("accept", "application/json"); myheaders append("content type", "application/json"); myheaders append("x xsrf token", "{{csrftoken}}"); var raw = json stringify("{\n \\"sapmdbid\\" 464216,\n \\"comment\\" \\"asdf11g\\",\n \\"startdate\\" \\"2026 10 02t19 45 00\\",\n \\"enddate\\" \\"2026 10 28t21 45 00\\",\n \\"firstpartuser\\" {\n \\"eid\\" \\"test user2\\",\n \\"id\\" \\"e039e179 ba80 4932 b07d f33db7e38d3a\\"\n },\n \\"secondpartuser\\" {\n \\"eid\\" \\"test user3\\",\n \\"id\\" \\"f4118975 355b 40f7 a5d5 ed0fdc81a5c2\\"\n },\n \\"remindbeforeinmins\\" 15\n}\n"); var requestoptions = { method 'post', headers myheaders, body raw, redirect 'follow' }; fetch("{{url}}/aioc rest web/rest/sc/sapm/makereservation", requestoptions) then(response => response text()) then(result => console log(result)) catch(error => console log('error', error));require "uri" require "json" require "net/http" url = uri("{{url}}/aioc rest web/rest/sc/sapm/makereservation") http = net http new(url host, url port); request = net http post new(url) request\["accept"] = "application/json" request\["content type"] = "application/json" request\["x xsrf token"] = "{{csrftoken}}" request body = json dump("{\n \\"sapmdbid\\" 464216,\n \\"comment\\" \\"asdf11g\\",\n \\"startdate\\" \\"2026 10 02t19 45 00\\",\n \\"enddate\\" \\"2026 10 28t21 45 00\\",\n \\"firstpartuser\\" {\n \\"eid\\" \\"test user2\\",\n \\"id\\" \\"e039e179 ba80 4932 b07d f33db7e38d3a\\"\n },\n \\"secondpartuser\\" {\n \\"eid\\" \\"test user3\\",\n \\"id\\" \\"f4118975 355b 40f7 a5d5 ed0fdc81a5c2\\"\n },\n \\"remindbeforeinmins\\" 15\n}\n") response = http request(request) puts response read body import requests import json url = "{{url}}/aioc rest web/rest/sc/sapm/makereservation" payload = json dumps("{\n \\"sapmdbid\\" 464216,\n \\"comment\\" \\"asdf11g\\",\n \\"startdate\\" \\"2026 10 02t19 45 00\\",\n \\"enddate\\" \\"2026 10 28t21 45 00\\",\n \\"firstpartuser\\" {\n \\"eid\\" \\"test user2\\",\n \\"id\\" \\"e039e179 ba80 4932 b07d f33db7e38d3a\\"\n },\n \\"secondpartuser\\" {\n \\"eid\\" \\"test user3\\",\n \\"id\\" \\"f4118975 355b 40f7 a5d5 ed0fdc81a5c2\\"\n },\n \\"remindbeforeinmins\\" 15\n}\n") headers = { 'accept' 'application/json', 'content type' 'application/json', 'x xsrf token' '{{csrftoken}}' } response = requests request("post", url, headers=headers, data=payload) print(response text) responses success