found the solution, had to add "path": "/authorization/rules/" to the json input. it is working now: %let base_url = https://%scan(&_baseurl.,2,"/");
%put &base_url.;
filename input temp ;
filename output temp ;
filename header temp;
proc stream outfile=input; begin &streamdelim;
[
{
"op": "add",
"path": "/authorization/rules/",
"value": {
"description": "test",
"objectUri": "/folders/folders/c7496325-eabf-474b-a499-e9de0ae5a6a1",
"permissions": [
"read",
"update",
"add",
"remove"
],
"principalType": "group",
"principal": "test",
"type": "grant"
}
},
{
"op": "add",
"path": "/authorization/rules/",
"value": {
"description": "test",
"containerUri": "/folders/folders/c7496325-eabf-474b-a499-e9de0ae5a6a1",
"permissions": [
"read",
"update",
"add",
"remove",
"delete"
],
"principalType": "group",
"principal": "test",
"type": "grant"
}
}
]
;;;;
proc http url="&base_url/authorization/rules"
oauth_bearer=sas_services
out=output
in=input
headerout=header
method=patch;
debug level = 2;
headers
"Accept"="application/vnd.sas.collection+json"
"Content-Type"="application/json-patch+json";
run;
... View more