Bulk Edit Accounts
1 min
code examples curl request post \\ \ url {{url}}/aioc rest web/rest/sc/sapm/bulkeditsapmaccounts \\ \ header 'accept application/json' \\ \ header 'content type application/json' \\ \ data raw '" {\r\n \\"owner\\" {\r\n \\"id\\" \\"99bf8751 1d18 4268 91f8 e506c16b18c8\\",\r\n \\"eid\\" \\"enduser\\"\r\n },\r\n \\"description\\" \\"description\\",\r\n \\"secretnotes\\" \\"new secret note\\",\r\n \\"additionalinfo\\" \\"info\\",\r\n \\"sapmdbid\\" 349817,\r\n \\"sapmidentifier\\" \\"test4\@10 20 42 106@/linux\\"\r\n }"'var myheaders = new headers(); myheaders append("accept", "application/json"); myheaders append("content type", "application/json"); var raw = json stringify(" {\r\n \\"owner\\" {\r\n \\"id\\" \\"99bf8751 1d18 4268 91f8 e506c16b18c8\\",\r\n \\"eid\\" \\"enduser\\"\r\n },\r\n \\"description\\" \\"description\\",\r\n \\"secretnotes\\" \\"new secret note\\",\r\n \\"additionalinfo\\" \\"info\\",\r\n \\"sapmdbid\\" 349817,\r\n \\"sapmidentifier\\" \\"test4\@10 20 42 106@/linux\\"\r\n }"); var requestoptions = { method 'post', headers myheaders, body raw, redirect 'follow' }; fetch("{{url}}/aioc rest web/rest/sc/sapm/bulkeditsapmaccounts", 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/bulkeditsapmaccounts") http = net http new(url host, url port); request = net http post new(url) request\["accept"] = "application/json" request\["content type"] = "application/json" request body = json dump(" {\r\n \\"owner\\" {\r\n \\"id\\" \\"99bf8751 1d18 4268 91f8 e506c16b18c8\\",\r\n \\"eid\\" \\"enduser\\"\r\n },\r\n \\"description\\" \\"description\\",\r\n \\"secretnotes\\" \\"new secret note\\",\r\n \\"additionalinfo\\" \\"info\\",\r\n \\"sapmdbid\\" 349817,\r\n \\"sapmidentifier\\" \\"test4\@10 20 42 106@/linux\\"\r\n }") response = http request(request) puts response read body import requests import json url = "{{url}}/aioc rest web/rest/sc/sapm/bulkeditsapmaccounts" payload = json dumps(" {\r\n \\"owner\\" {\r\n \\"id\\" \\"99bf8751 1d18 4268 91f8 e506c16b18c8\\",\r\n \\"eid\\" \\"enduser\\"\r\n },\r\n \\"description\\" \\"description\\",\r\n \\"secretnotes\\" \\"new secret note\\",\r\n \\"additionalinfo\\" \\"info\\",\r\n \\"sapmdbid\\" 349817,\r\n \\"sapmidentifier\\" \\"test4\@10 20 42 106@/linux\\"\r\n }") headers = { 'accept' 'application/json', 'content type' 'application/json' } response = requests request("post", url, headers=headers, data=payload) print(response text) responses