Create a policy.

POST {{baseUrl}}/policies

Create a new policy with the provided content.

Request Body

{"name"=>"<string>", "subjects"=>["<string>", "<string>"], "rules"=>[{"actions"=>["<string>", "<string>"], "resources"=>["<string>", "<string>"], "name"=>"<string>", "conditions"=>[{"resourceType"=>"<string>", "expression"=>"<string>"}, {"resourceType"=>"<string>", "expression"=>"<string>"}], "propagationDepth"=>-1}, {"actions"=>["<string>", "<string>"], "resources"=>["<string>", "<string>"], "name"=>"<string>", "conditions"=>[{"resourceType"=>"<string>", "expression"=>"<string>"}, {"resourceType"=>"<string>", "expression"=>"<string>"}], "propagationDepth"=>-1}], "description"=>"<string>", "active"=>true}

HEADERS

KeyDatatypeRequiredDescription
Content-Typestring
Acceptstring

RESPONSES

status: Created

{&quot;owner&quot;:&quot;tenantA&quot;,&quot;id&quot;:&quot;94411f5a-cf07-4281-b7f3-ce39ca53fe00&quot;,&quot;name&quot;:&quot;PLIDataPolicy&quot;,&quot;active&quot;:true,&quot;subjects&quot;:[&quot;mdsp:core:identitymanagement:eu1:tenantA:user:test@example.com&quot;,&quot;mdsp:core:identitymanagement:eu1:tenantA:user:test@example.com&quot;],&quot;rules&quot;:[{&quot;actions&quot;:[&quot;mdsp:core:idl:prefix:read&quot;,&quot;mdsp:core:idl:prefix:read&quot;],&quot;resources&quot;:[&quot;mdsp:core:idl:eu1:tenantA:prefix:/data/ten=tenantA/PLISimulationData&quot;,&quot;mdsp:core:idl:eu1:tenantA:prefix:/data/ten=tenantA/PLISimulationData&quot;],&quot;name&quot;:&quot;Rule1&quot;,&quot;conditions&quot;:[{&quot;resourceType&quot;:&quot;mdsp:core:idl:prefix&quot;,&quot;expression&quot;:&quot;prefix.global.countryOfOrigin == &#39;GB&#39; AND prefix.global.businessSensitivity eq &#39;PRIVATE&#39;&quot;},{&quot;resourceType&quot;:&quot;mdsp:core:idl:prefix&quot;,&quot;expression&quot;:&quot;prefix.global.countryOfOrigin == &#39;GB&#39; AND prefix.global.businessSensitivity eq &#39;PRIVATE&#39;&quot;}],&quot;propagationDepth&quot;:-1},{&quot;actions&quot;:[&quot;mdsp:core:idl:prefix:read&quot;,&quot;mdsp:core:idl:prefix:read&quot;],&quot;resources&quot;:[&quot;mdsp:core:idl:eu1:tenantA:prefix:/data/ten=tenantA/PLISimulationData&quot;,&quot;mdsp:core:idl:eu1:tenantA:prefix:/data/ten=tenantA/PLISimulationData&quot;],&quot;name&quot;:&quot;Rule1&quot;,&quot;conditions&quot;:[{&quot;resourceType&quot;:&quot;mdsp:core:idl:prefix&quot;,&quot;expression&quot;:&quot;prefix.global.countryOfOrigin == &#39;GB&#39; AND prefix.global.businessSensitivity eq &#39;PRIVATE&#39;&quot;},{&quot;resourceType&quot;:&quot;mdsp:core:idl:prefix&quot;,&quot;expression&quot;:&quot;prefix.global.countryOfOrigin == &#39;GB&#39; AND prefix.global.businessSensitivity eq &#39;PRIVATE&#39;&quot;}],&quot;propagationDepth&quot;:-1}],&quot;createdAt&quot;:&quot;2019-10-12T07:20:50.52Z&quot;,&quot;lastModifiedAt&quot;:&quot;2019-10-12T07:20:50.52Z&quot;,&quot;createdBy&quot;:&quot;mdsp:core:identitymanagement:eu1:core:client:client1234&quot;,&quot;lastModifiedBy&quot;:&quot;mdsp:core:identitymanagement:eu1:core:client:client1234&quot;,&quot;eTag&quot;:1,&quot;description&quot;:&quot;This policy defines the access rules for a technician.&quot;}