Skip to content
This repository has been archived by the owner on Oct 11, 2023. It is now read-only.

Latest commit

 

History

History
58 lines (39 loc) · 1.07 KB

resource.md

File metadata and controls

58 lines (39 loc) · 1.07 KB

Resource API

Attributes

Name Type Description Example
resourcesAllowed array List of allowed resources ["urn:ews:product:instance:example/resource1"]

Resource authorized

Get authorized resources according selected action and resources

POST /api/v1/resource

Required Parameters

Name Type Description Example
action string Action applied over the resources "example:Read"
resources array List of resources ["urn:ews:product:instance:example/resource1"]

Curl Example

$ curl -n -X POST /api/v1/resource \
  -d '{
  "action": "example:Read",
  "resources": [
    "urn:ews:product:instance:example/resource1"
  ]
}' \
  -H "Content-Type: application/json" \
  -H "Authorization: Basic or Bearer XXX"

Response Example

HTTP/1.1 200 OK
{
  "resourcesAllowed": [
    "urn:ews:product:instance:example/resource1"
  ]
}