NAV Navbar
Home icon
SAS Viya REST APIs
shell javascript python go
  • Core Services
  • Core Services

    Annotations

    Base URLs:

    Email: SAS Developers Web: SAS Developers

    Scroll down for code samples, example requests and responses. Select a language for code samples from the tabs above or the mobile navigation menu.

    The Annotations API allows users to associate annotations with resources that other decoupled services manage. An annotation augments a target resource, which is typically a column or table, with information that extends beyond its physical properties. This information might include categorization (such as email and address), role (such as categorical and primary key), or other descriptive information.

    Usage Notes

    Overview

    The Annotations API manages annotations within the SAS environment. An annotation adds extra information to tables, columns, and other objects. This is information that extends beyond metadata. The service allows annotations to be managed independently from the services that manage the object.

    Expected uses of this API include data preparation and data mining.

    Each annotation can contain an array of members. Each member represents an object to which that annotation applies. Each member has only one annotation.

    If an object has more than one annotation, the object is represented as two unique members, each owned by a different annotation. For example, a column "SN" can have two annotations: one named "Serial Number" and another named "Discrete". The Annotations API persists the "Serial Number" annotation with a member named "SN". The "Discrete" annotation has a unique member named "SN".

    Terminology

    annotation

    a named attribute for an object that is stored in the SAS environment.

    annotation member

    a reference to an object that the annotation references.

    domain

    a character field on an annotation that is used to group annotations. Domains enable filtering or scoping of annotations.

    object

    an atomic unit of data to which an annotation applies, which is typically a column or table.

    Error Codes

    This API uses the standard error response type, (media type 'application/vnd.sas.error'), to handle propagation of all error messages and codes to the user.

    HTTP Status Code Error Code Description
    400 16300 The specified status code is not valid.
    400 16301 A null body is not valid.
    400 16302 An empty or null body is not valid.
    400 16307 The specified annotation ID does not match any existing annotation ID.
    400 16308 The specified value exceeds the maximum allowable length.
    400 16309 The specified domain exceeds the maximum allowable length.
    400 16310 The specified name exceeds the maximum allowable length.
    400 16311 The specified description exceeds the maximum allowable length.
    400 16312 The specified label exceeds the maximum allowable length.
    400 16313 The specified object type exceeds the maximum allowable length.
    400 16314 The specified domain and name combination already exist.
    400 16315 The specified object URI exceeds the maximum allowable length.
    404 16303 The member was not found for specified annotation ID.
    404 16304 The annotation was not found for specified annotation ID.
    412 16306 The Etag did not match the conditional PUT request.
    428 16305 No required Etag exists for the specified conditional PUT.

    Operations

    Root

    Contains the operations for the root resource of this API.

    Code samples

    # You can also use wget
    curl -X GET https://www.example.com/annotations/ \
      -H 'Accept: application/vnd.sas.api+json'
    
    
    
    const headers = {
      'Accept':'application/vnd.sas.api+json'
    };
    
    fetch('https://www.example.com/annotations/',
    {
      method: 'GET',
    
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    import requests
    headers = {
      'Accept': 'application/vnd.sas.api+json'
    }
    
    r = requests.get('https://www.example.com/annotations/', headers = headers)
    
    print(r.json())
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Accept": []string{"application/vnd.sas.api+json"},
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("GET", "https://www.example.com/annotations/", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    

    GET /

    Returns a list of links at the top-level collections that this API provides.

    Example responses

    200 Response

    {
      "links": [
        {
          "method": "GET",
          "rel": "annotations",
          "href": "/annotations/annotations",
          "uri": "/annotations/annotations",
          "type": "application/vnd.sas.collection"
        },
        {
          "method": "POST",
          "rel": "create",
          "href": "/annotations/annotations",
          "uri": "/annotations/annotations",
          "type": "application/vnd.sas.annotation",
          "responseType": "application/vnd.sas.annotation"
        }
      ]
    }
    
    Status Meaning Description Schema
    200 OK The API link list is available. api

    Check API availability

    Code samples

    # You can also use wget
    curl -X HEAD https://www.example.com/annotations/
    
    
    
    fetch('https://www.example.com/annotations/',
    {
      method: 'HEAD'
    
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    import requests
    
    r = requests.head('https://www.example.com/annotations/')
    
    print(r.json())
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("HEAD", "https://www.example.com/annotations/", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    

    HEAD /

    Checks whether the Annotations API is available.

    Responses
    Status Meaning Description Schema
    200 OK The API is available. None

    Annotations

    Get all annotations

    Code samples

    # You can also use wget
    curl -X GET https://www.example.com/annotations/annotations \
      -H 'Accept: application/vnd.sas.collection+json'
    
    
    
    const headers = {
      'Accept':'application/vnd.sas.collection+json'
    };
    
    fetch('https://www.example.com/annotations/annotations',
    {
      method: 'GET',
    
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    import requests
    headers = {
      'Accept': 'application/vnd.sas.collection+json'
    }
    
    r = requests.get('https://www.example.com/annotations/annotations', headers = headers)
    
    print(r.json())
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Accept": []string{"application/vnd.sas.collection+json"},
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("GET", "https://www.example.com/annotations/annotations", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    

    GET /annotations

    Returns a collection of annotations. Standard paging, filtering, and sorting options are provided.

    Parameters
    Name In Type Required Description
    start query integer false The starting index of the first annotation in a page. The default is 0.
    limit query integer false The maximum number of annotations to return in this page of results. The actual number of returned annotations might be less if the collection has been exhausted. The default is 10.
    filter query string(filter-criteria) false The filtering criteria for returned annotations.
    sortBy query string(sort-criteria) false The sort returned annotations. The only valid sorting option is the name field. Ascending is the default sort order on the name field. Here is a sample sort:

    /annotations/annotations?sortBy=name:descending

    resourceUri query string false The resourceUri of the object from which annotations are to be retrieved.

    Example responses

    200 Response

    {
      "links": [
        {
          "method": "GET",
          "rel": "collection",
          "href": "/annotations/annotations",
          "uri": "/annotations/annotations",
          "type": "application/vnd.sas.collection"
        },
        {
          "method": "GET",
          "rel": "self",
          "href": "/annotations/annotations?start=0&limit=10",
          "uri": "/annotations/annotations?start=0&limit=10",
          "type": "application/vnd.sas.collection"
        },
        {
          "method": "POST",
          "rel": "create",
          "href": "/annotations/annotations",
          "uri": "/annotations/annotations",
          "type": "application/vnd.sas.annotation",
          "responseType": "application/vnd.sas.annotation"
        }
      ],
      "name": "annotations",
      "accept": "application/vnd.sas.annotation",
      "count": 1,
      "items": [
        {
          "id": "f9bd5124-418f-4326-86cf-b6d98d57778",
          "name": "Annotation1",
          "domain": "Domain1",
          "description": "One annotation.",
          "creationTimeStamp": "2016-12-19T18:02:07.986Z",
          "modifiedTimeStamp": "2016-12-19T18:02:07.986Z",
          "createdBy": "bob",
          "modifiedBy": "bob",
          "links": [
            {
              "method": "POST",
              "rel": "create",
              "href": "/annotations/annotations",
              "uri": "/annotations/annotations",
              "type": "application/vnd.sas.annotation",
              "responseType": "application/vnd.sas.annotation"
            },
            {
              "method": "GET",
              "rel": "self",
              "href": "/annotations/annotations/ccc0492f-7a0a-4481-8890-ca0b127c6ed4",
              "uri": "/annotations/annotations/ccc0492f-7a0a-4481-8890-ca0b127c6ed4",
              "type": "application/vnd.sas.annotation"
            },
            {
              "method": "PUT",
              "rel": "update",
              "href": "/annotations/annotations/ccc0492f-7a0a-4481-8890-ca0b127c6ed4",
              "uri": "/annotations/annotations/ccc0492f-7a0a-4481-8890-ca0b127c6ed4",
              "type": "application/vnd.sas.annotation"
            },
            {
              "method": "DELETE",
              "rel": "delete",
              "href": "/annotations/annotations/ccc0492f-7a0a-4481-8890-ca0b127c6ed4",
              "uri": "/annotations/annotations/ccc0492f-7a0a-4481-8890-ca0b127c6ed4"
            }
          ]
        }
      ],
      "limit": 10,
      "version": 2
    }
    
    Responses
    Status Meaning Description Schema
    200 OK The collection of annotations is available. annotationCollection
    400 Bad Request The request was invalid. error2

    Create an annotation

    Code samples

    # You can also use wget
    curl -X POST https://www.example.com/annotations/annotations \
      -H 'Content-Type: application/vnd.sas.annotation+json' \
      -H 'Accept: application/vnd.sas.annotation+json'
    
    
    const inputBody = '{
      "domain": "string",
      "name": "string",
      "label": "string",
      "description": "string"
    }';
    const headers = {
      'Content-Type':'application/vnd.sas.annotation+json',
      'Accept':'application/vnd.sas.annotation+json'
    };
    
    fetch('https://www.example.com/annotations/annotations',
    {
      method: 'POST',
      body: inputBody,
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    import requests
    headers = {
      'Content-Type': 'application/vnd.sas.annotation+json',
      'Accept': 'application/vnd.sas.annotation+json'
    }
    
    r = requests.post('https://www.example.com/annotations/annotations', headers = headers)
    
    print(r.json())
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Content-Type": []string{"application/vnd.sas.annotation+json"},
            "Accept": []string{"application/vnd.sas.annotation+json"},
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("POST", "https://www.example.com/annotations/annotations", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    

    POST /annotations

    Creates an annotation from the specified request.

    Body parameter

    {
      "domain": "string",
      "name": "string",
      "label": "string",
      "description": "string"
    }
    
    Parameters
    Name In Type Required Description
    body body createAnnotation true The annotation to create. Valid fields are name, label, domain, and description. All other fields are ignored.

    Example responses

    201 Response

    {
      "name": "My Annotation",
      "id": "f9bd5124-418f-4326-86cf-b6d98d57778",
      "domain": "Domain1",
      "label": "Label",
      "description": "Gives context to one or more objects.",
      "creationTimeStamp": "2016-12-19T18:02:07.986Z",
      "modifiedTimeStamp": "2016-12-19T18:02:07.986Z",
      "createdBy": "bob",
      "modifiedBy": "bob",
      "links": [
        {
          "method": "POST",
          "rel": "create",
          "href": "/annotations/annotations",
          "uri": "/annotations/annotations",
          "type": "application/vnd.sas.annotation",
          "responseType": "application/vnd.sas.annotation"
        },
        {
          "method": "GET",
          "rel": "self",
          "href": "/annotations/annotations/f9bd5124-418f-4326-86cf-b6d98d57778",
          "uri": "/annotations/annotations/f9bd5124-418f-4326-86cf-b6d98d57778",
          "type": "application/vnd.sas.annotation"
        },
        {
          "method": "PUT",
          "rel": "update",
          "href": "/annotations/annotations/f9bd5124-418f-4326-86cf-b6d98d57778",
          "uri": "/annotations/annotations/f9bd5124-418f-4326-86cf-b6d98d57778",
          "type": "application/vnd.sas.annotation"
        },
        {
          "method": "DELETE",
          "rel": "delete",
          "href": "/annotations/annotations/f9bd5124-418f-4326-86cf-b6d98d57778",
          "uri": "/annotations/annotations/f9bd5124-418f-4326-86cf-b6d98d57778"
        }
      ]
    }
    
    Responses
    Status Meaning Description Schema
    201 Created The annotation was successfully created. annotation
    400 Bad Request The request was invalid. error2
    Response Headers
    Status Header Type Format Description
    201 Location string The URI was created for the new annotation.
    201 Last-Modified string The ISO8601 date string that represents the timestamp of the last update to this object.
    201 Etag string A tag that identifies this revision of this object.

    Find annotations by resourceUris

    Code samples

    # You can also use wget
    curl -X POST https://www.example.com/annotations/annotations#multi \
      -H 'Content-Type: application/vnd.sas.selection+json' \
      -H 'Accept: application/vnd.sas.collection+json'
    
    
    const inputBody = '{
      "version": 0,
      "template": "http://example.com",
      "type": "id",
      "resources": [
        "string"
      ],
      "links": [
        {
          "method": "string",
          "rel": "string",
          "uri": "string",
          "href": "string",
          "title": "string",
          "type": "string",
          "itemType": "string",
          "responseType": "string",
          "responseItemType": "string"
        }
      ]
    }';
    const headers = {
      'Content-Type':'application/vnd.sas.selection+json',
      'Accept':'application/vnd.sas.collection+json'
    };
    
    fetch('https://www.example.com/annotations/annotations#multi',
    {
      method: 'POST',
      body: inputBody,
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    import requests
    headers = {
      'Content-Type': 'application/vnd.sas.selection+json',
      'Accept': 'application/vnd.sas.collection+json'
    }
    
    r = requests.post('https://www.example.com/annotations/annotations#multi', headers = headers)
    
    print(r.json())
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Content-Type": []string{"application/vnd.sas.selection+json"},
            "Accept": []string{"application/vnd.sas.collection+json"},
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("POST", "https://www.example.com/annotations/annotations#multi", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    

    POST /annotations#multi

    Find all annotations that are associated with the provided resourceUris. Returns an application/vnd.sas.collection of application/vnd.sas.annotation objects.

    Body parameter

    {
      "version": 0,
      "template": "http://example.com",
      "type": "id",
      "resources": [
        "string"
      ],
      "links": [
        {
          "method": "string",
          "rel": "string",
          "uri": "string",
          "href": "string",
          "title": "string",
          "type": "string",
          "itemType": "string",
          "responseType": "string",
          "responseItemType": "string"
        }
      ]
    }
    
    Parameters
    Name In Type Required Description
    body body selection true Selects resourceUris for which associated annotations are to be found.

    Example responses

    200 Response

    {
      "links": [
        {
          "method": "GET",
          "rel": "collection",
          "href": "/annotations/annotations",
          "uri": "/annotations/annotations",
          "type": "application/vnd.sas.collection"
        },
        {
          "method": "GET",
          "rel": "self",
          "href": "/annotations/annotations?start=0&limit=10",
          "uri": "/annotations/annotations?start=0&limit=10",
          "type": "application/vnd.sas.collection"
        },
        {
          "method": "POST",
          "rel": "create",
          "href": "/annotations/annotations",
          "uri": "/annotations/annotations",
          "type": "application/vnd.sas.annotation",
          "responseType": "application/vnd.sas.annotation"
        }
      ],
      "name": "annotations",
      "accept": "application/vnd.sas.annotation",
      "count": 1,
      "items": [
        {
          "id": "f9bd5124-418f-4326-86cf-b6d98d57778",
          "name": "Annotation1",
          "domain": "Domain1",
          "description": "One annotation.",
          "creationTimeStamp": "2016-12-19T18:02:07.986Z",
          "modifiedTimeStamp": "2016-12-19T18:02:07.986Z",
          "createdBy": "bob",
          "modifiedBy": "bob",
          "links": [
            {
              "method": "POST",
              "rel": "create",
              "href": "/annotations/annotations",
              "uri": "/annotations/annotations",
              "type": "application/vnd.sas.annotation",
              "responseType": "application/vnd.sas.annotation"
            },
            {
              "method": "GET",
              "rel": "self",
              "href": "/annotations/annotations/ccc0492f-7a0a-4481-8890-ca0b127c6ed4",
              "uri": "/annotations/annotations/ccc0492f-7a0a-4481-8890-ca0b127c6ed4",
              "type": "application/vnd.sas.annotation"
            },
            {
              "method": "PUT",
              "rel": "update",
              "href": "/annotations/annotations/ccc0492f-7a0a-4481-8890-ca0b127c6ed4",
              "uri": "/annotations/annotations/ccc0492f-7a0a-4481-8890-ca0b127c6ed4",
              "type": "application/vnd.sas.annotation"
            },
            {
              "method": "DELETE",
              "rel": "delete",
              "href": "/annotations/annotations/ccc0492f-7a0a-4481-8890-ca0b127c6ed4",
              "uri": "/annotations/annotations/ccc0492f-7a0a-4481-8890-ca0b127c6ed4"
            }
          ]
        }
      ],
      "limit": 10,
      "version": 2
    }
    
    Responses
    Status Meaning Description Schema
    200 OK The request succeeded. annotationCollection
    400 Bad Request The request was invalid. This can occur when no matching annotations are found or when the user provides an invalid limit, start, sortBy, or filter. None

    Get an annotation

    Code samples

    # You can also use wget
    curl -X GET https://www.example.com/annotations/annotations/{annotationId} \
      -H 'Accept: application/vnd.sas.annotation+json'
    
    
    
    const headers = {
      'Accept':'application/vnd.sas.annotation+json'
    };
    
    fetch('https://www.example.com/annotations/annotations/{annotationId}',
    {
      method: 'GET',
    
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    import requests
    headers = {
      'Accept': 'application/vnd.sas.annotation+json'
    }
    
    r = requests.get('https://www.example.com/annotations/annotations/{annotationId}', headers = headers)
    
    print(r.json())
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Accept": []string{"application/vnd.sas.annotation+json"},
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("GET", "https://www.example.com/annotations/annotations/{annotationId}", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    

    GET /annotations/{annotationId}

    Returns information about a single annotation that is based on its unique ID.

    Parameters
    Name In Type Required Description
    annotationId path string true The annotation ID.

    Example responses

    200 Response

    {
      "name": "My Annotation",
      "id": "f9bd5124-418f-4326-86cf-b6d98d57778",
      "domain": "Domain1",
      "label": "Label",
      "description": "Gives context to one or more objects.",
      "creationTimeStamp": "2016-12-19T18:02:07.986Z",
      "modifiedTimeStamp": "2016-12-19T18:02:07.986Z",
      "createdBy": "bob",
      "modifiedBy": "bob",
      "links": [
        {
          "method": "POST",
          "rel": "create",
          "href": "/annotations/annotations",
          "uri": "/annotations/annotations",
          "type": "application/vnd.sas.annotation",
          "responseType": "application/vnd.sas.annotation"
        },
        {
          "method": "GET",
          "rel": "self",
          "href": "/annotations/annotations/f9bd5124-418f-4326-86cf-b6d98d57778",
          "uri": "/annotations/annotations/f9bd5124-418f-4326-86cf-b6d98d57778",
          "type": "application/vnd.sas.annotation"
        },
        {
          "method": "PUT",
          "rel": "update",
          "href": "/annotations/annotations/f9bd5124-418f-4326-86cf-b6d98d57778",
          "uri": "/annotations/annotations/f9bd5124-418f-4326-86cf-b6d98d57778",
          "type": "application/vnd.sas.annotation"
        },
        {
          "method": "DELETE",
          "rel": "delete",
          "href": "/annotations/annotations/f9bd5124-418f-4326-86cf-b6d98d57778",
          "uri": "/annotations/annotations/f9bd5124-418f-4326-86cf-b6d98d57778"
        }
      ]
    }
    
    Responses
    Status Meaning Description Schema
    200 OK The annotation exists. annotation
    404 Not Found The specified annotation does not exist. error2
    Response Headers
    Status Header Type Format Description
    200 Last-Modified string The ISO8601 date string that represents the timestamp of the last update to this annotation.
    200 Etag string A tag that identifies this revision of this object.

    Check annotation availability

    Code samples

    # You can also use wget
    curl -X HEAD https://www.example.com/annotations/annotations/{annotationId}
    
    
    
    fetch('https://www.example.com/annotations/annotations/{annotationId}',
    {
      method: 'HEAD'
    
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    import requests
    
    r = requests.head('https://www.example.com/annotations/annotations/{annotationId}')
    
    print(r.json())
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("HEAD", "https://www.example.com/annotations/annotations/{annotationId}", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    

    HEAD /annotations/{annotationId}

    Returns header information and verifies that the annotation exists.

    Parameters
    Name In Type Required Description
    annotationId path string true The annotation ID.
    Responses
    Status Meaning Description Schema
    200 OK The annotation exists. None
    404 Not Found The annotation does not exist. None
    Response Headers
    Status Header Type Format Description
    200 Last-Modified string The ISO8601 date string that represents the timestamp of the last update to this annotation.
    200 Etag string A tag that identifies this revision of this object.

    Update or replace an existing annotation

    Code samples

    # You can also use wget
    curl -X PUT https://www.example.com/annotations/annotations/{annotationId} \
      -H 'Content-Type: application/vnd.sas.annotation+json' \
      -H 'Accept: application/vnd.sas.annotation+json' \
      -H 'If-Match: string'
    
    
    const inputBody = '{
      "version": 0,
      "id": "string",
      "domain": "string",
      "name": "string",
      "label": "string",
      "description": "string",
      "createdBy": "string",
      "modifiedBy": "string",
      "creationTimeStamp": "string",
      "modifiedTimeStamp": "string"
    }';
    const headers = {
      'Content-Type':'application/vnd.sas.annotation+json',
      'Accept':'application/vnd.sas.annotation+json',
      'If-Match':'string'
    };
    
    fetch('https://www.example.com/annotations/annotations/{annotationId}',
    {
      method: 'PUT',
      body: inputBody,
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    import requests
    headers = {
      'Content-Type': 'application/vnd.sas.annotation+json',
      'Accept': 'application/vnd.sas.annotation+json',
      'If-Match': 'string'
    }
    
    r = requests.put('https://www.example.com/annotations/annotations/{annotationId}', headers = headers)
    
    print(r.json())
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Content-Type": []string{"application/vnd.sas.annotation+json"},
            "Accept": []string{"application/vnd.sas.annotation+json"},
            "If-Match": []string{"string"},
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("PUT", "https://www.example.com/annotations/annotations/{annotationId}", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    

    PUT /annotations/{annotationId}

    Updates an existing annotation with a full replacement of the resource. This operation cannot modify the ID field.

    Body parameter

    {
      "version": 0,
      "id": "string",
      "domain": "string",
      "name": "string",
      "label": "string",
      "description": "string",
      "createdBy": "string",
      "modifiedBy": "string",
      "creationTimeStamp": "string",
      "modifiedTimeStamp": "string"
    }
    
    Parameters
    Name In Type Required Description
    annotationId path string true The annotation ID.
    If-Match header string false The Etag that was returned from a GET, POST, or PUT of this annotation.
    body body updateAnnotation true The annotation to update.

    Example responses

    200 Response

    {
      "name": "My Annotation",
      "id": "f9bd5124-418f-4326-86cf-b6d98d57778",
      "domain": "Domain1",
      "label": "Label",
      "description": "Gives context to one or more objects.",
      "creationTimeStamp": "2016-12-19T18:02:07.986Z",
      "modifiedTimeStamp": "2016-12-19T18:02:07.986Z",
      "createdBy": "bob",
      "modifiedBy": "bob",
      "links": [
        {
          "method": "POST",
          "rel": "create",
          "href": "/annotations/annotations",
          "uri": "/annotations/annotations",
          "type": "application/vnd.sas.annotation",
          "responseType": "application/vnd.sas.annotation"
        },
        {
          "method": "GET",
          "rel": "self",
          "href": "/annotations/annotations/f9bd5124-418f-4326-86cf-b6d98d57778",
          "uri": "/annotations/annotations/f9bd5124-418f-4326-86cf-b6d98d57778",
          "type": "application/vnd.sas.annotation"
        },
        {
          "method": "PUT",
          "rel": "update",
          "href": "/annotations/annotations/f9bd5124-418f-4326-86cf-b6d98d57778",
          "uri": "/annotations/annotations/f9bd5124-418f-4326-86cf-b6d98d57778",
          "type": "application/vnd.sas.annotation"
        },
        {
          "method": "DELETE",
          "rel": "delete",
          "href": "/annotations/annotations/f9bd5124-418f-4326-86cf-b6d98d57778",
          "uri": "/annotations/annotations/f9bd5124-418f-4326-86cf-b6d98d57778"
        }
      ]
    }
    
    Responses
    Status Meaning Description Schema
    200 OK The annotation was updated. annotation
    400 Bad Request The request was invalid. error2
    412 Precondition Failed The specified Etag does not match the current version of the object or the last modified date. error2
    415 Unsupported Media Type The specified media type is not supported. error2
    428 Precondition Required The Etag was not specified during update of an existing type. error2
    Response Headers
    Status Header Type Format Description
    200 Last-Modified string The ISO8601 date string that represents the timestamp of the last update to this annotation.
    200 Etag string A tag that identifies this revision of this object.

    Delete an annotation

    Code samples

    # You can also use wget
    curl -X DELETE https://www.example.com/annotations/annotations/{annotationId} \
      -H 'Accept: */*'
    
    
    
    const headers = {
      'Accept':'*/*'
    };
    
    fetch('https://www.example.com/annotations/annotations/{annotationId}',
    {
      method: 'DELETE',
    
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    import requests
    headers = {
      'Accept': '*/*'
    }
    
    r = requests.delete('https://www.example.com/annotations/annotations/{annotationId}', headers = headers)
    
    print(r.json())
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Accept": []string{"*/*"},
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("DELETE", "https://www.example.com/annotations/annotations/{annotationId}", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    

    DELETE /annotations/{annotationId}

    Deletes the specified annotation. The annotation and its members are permanently removed from the service.

    Parameters
    Name In Type Required Description
    annotationId path string true The annotation ID.

    Example responses

    404 Response

    Responses
    Status Meaning Description Schema
    204 No Content The annotation was deleted. None
    404 Not Found The annotation does not exist. error2

    Members

    Get member objects for an annotation

    Code samples

    # You can also use wget
    curl -X GET https://www.example.com/annotations/annotations/{annotationId}/members \
      -H 'Accept: application/vnd.sas.collection+json'
    
    
    
    const headers = {
      'Accept':'application/vnd.sas.collection+json'
    };
    
    fetch('https://www.example.com/annotations/annotations/{annotationId}/members',
    {
      method: 'GET',
    
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    import requests
    headers = {
      'Accept': 'application/vnd.sas.collection+json'
    }
    
    r = requests.get('https://www.example.com/annotations/annotations/{annotationId}/members', headers = headers)
    
    print(r.json())
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Accept": []string{"application/vnd.sas.collection+json"},
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("GET", "https://www.example.com/annotations/annotations/{annotationId}/members", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    

    GET /annotations/{annotationId}/members

    Returns the member objects for an annotation. A member is an external object that uses this annotation.

    Parameters
    Name In Type Required Description
    annotationId path string true The annotation ID.
    start query integer false The starting index of the first annotation in a page. The default is 0.
    limit query integer false The maximum number of members to return in this page of results. The actual number of returned members might be less if the collection has been exhausted. The default is 30.
    filter query string(filter-criteria) false The filtering criteria for returned members.
    sortBy query string(sort-criteria) false The sort returned members. The sorting criteria supports the name and descriptions fields in either ascending or descending order.

    Example responses

    200 Response

    {
      "links": [
        {
          "method": "GET",
          "rel": "collection",
          "href": "/annotations/annotations/26e2df43-aeaf-475d-a64e-7baafb8a4eca/members",
          "uri": "/annotations/annotations/26e2df43-aeaf-475d-a64e-7baafb8a4eca/members",
          "type": "application/vnd.sas.collection"
        },
        {
          "method": "GET",
          "rel": "self",
          "href": "/annotations/annotations/26e2df43-aeaf-475d-a64e-7baafb8a4eca/members?start=0&limit=10",
          "uri": "/annotations/annotations/26e2df43-aeaf-475d-a64e-7baafb8a4eca/members?start=0&limit=10",
          "type": "application/vnd.sas.collection"
        },
        {
          "method": "POST",
          "rel": "create",
          "href": "/annotations/annotations/26e2df43-aeaf-475d-a64e-7baafb8a4eca/members",
          "uri": "/annotations/annotations/26e2df43-aeaf-475d-a64e-7baafb8a4eca/members",
          "type": "application/vnd.sas.annotation.member",
          "responseType": "application/vnd.sas.annotation.member"
        }
      ],
      "name": "members",
      "accept": "application/vnd.sas.annotation.member",
      "start": 0,
      "count": 1,
      "items": [
        {
          "creationTimeStamp": "2018-03-26T20:11:17.132Z",
          "modifiedTimeStamp": "2018-03-26T20:11:17.132Z",
          "createdBy": "sasboot",
          "modifiedBy": "sasboot",
          "version": 1,
          "id": "a7f35cb5-c72d-4fae-a5f3-af74f26cdf42",
          "annotationId": "26e2df43-aeaf-475d-a64e-7baafb8a4eca",
          "resourceType": "table",
          "resourceUri": "objects/b673660283/96764860d",
          "value": "objectValue",
          "links": [
            {
              "method": "GET",
              "rel": "annotation",
              "href": "/annotations/annotations/26e2df43-aeaf-475d-a64e-7baafb8a4eca",
              "uri": "/annotations/annotations/26e2df43-aeaf-475d-a64e-7baafb8a4eca",
              "type": "application/vnd.sas.annotation"
            },
            {
              "method": "GET",
              "rel": "self",
              "href": "/annotations/annotations/26e2df43-aeaf-475d-a64e-7baafb8a4eca/members/a7f35cb5-c72d-4fae-a5f3-af74f26cdf42",
              "uri": "/annotations/annotations/26e2df43-aeaf-475d-a64e-7baafb8a4eca/members/a7f35cb5-c72d-4fae-a5f3-af74f26cdf42",
              "type": "application/vnd.sas.annotation.member"
            },
            {
              "method": "PUT",
              "rel": "update",
              "href": "/annotations/annotations/26e2df43-aeaf-475d-a64e-7baafb8a4eca/members/a7f35cb5-c72d-4fae-a5f3-af74f26cdf42",
              "uri": "/annotations/annotations/26e2df43-aeaf-475d-a64e-7baafb8a4eca/members/a7f35cb5-c72d-4fae-a5f3-af74f26cdf42",
              "type": "application/vnd.sas.annotation.member"
            },
            {
              "method": "DELETE",
              "rel": "delete",
              "href": "/annotations/annotations/26e2df43-aeaf-475d-a64e-7baafb8a4eca/members/a7f35cb5-c72d-4fae-a5f3-af74f26cdf42",
              "uri": "/annotations/annotations/26e2df43-aeaf-475d-a64e-7baafb8a4eca/members/a7f35cb5-c72d-4fae-a5f3-af74f26cdf42"
            },
            {
              "method": "GET",
              "rel": "up",
              "href": "/annotations/annotations/26e2df43-aeaf-475d-a64e-7baafb8a4eca/members",
              "uri": "/annotations/annotations/26e2df43-aeaf-475d-a64e-7baafb8a4eca/members",
              "type": "application/vnd.sas.annotation.member",
              "responseType": "application/vnd.sas.annotation.member"
            }
          ]
        }
      ],
      "limit": 10,
      "version": 2
    }
    
    Responses
    Status Meaning Description Schema
    200 OK The annotation schema was retrieved. memberCollection
    404 Not Found The specified annotation ID does not exist. error2

    Create an annotation member

    Code samples

    # You can also use wget
    curl -X POST https://www.example.com/annotations/annotations/{annotationId}/members \
      -H 'Content-Type: application/vnd.sas.annotation.member+json' \
      -H 'Accept: application/vnd.sas.annotation.member+json'
    
    
    const inputBody = '{
      "annotationId": "string",
      "resourceUri": "string",
      "resourceType": "string",
      "value": "string"
    }';
    const headers = {
      'Content-Type':'application/vnd.sas.annotation.member+json',
      'Accept':'application/vnd.sas.annotation.member+json'
    };
    
    fetch('https://www.example.com/annotations/annotations/{annotationId}/members',
    {
      method: 'POST',
      body: inputBody,
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    import requests
    headers = {
      'Content-Type': 'application/vnd.sas.annotation.member+json',
      'Accept': 'application/vnd.sas.annotation.member+json'
    }
    
    r = requests.post('https://www.example.com/annotations/annotations/{annotationId}/members', headers = headers)
    
    print(r.json())
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Content-Type": []string{"application/vnd.sas.annotation.member+json"},
            "Accept": []string{"application/vnd.sas.annotation.member+json"},
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("POST", "https://www.example.com/annotations/annotations/{annotationId}/members", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    

    POST /annotations/{annotationId}/members

    Creates an annotation member from the provided request.

    Body parameter

    {
      "annotationId": "string",
      "resourceUri": "string",
      "resourceType": "string",
      "value": "string"
    }
    
    Parameters
    Name In Type Required Description
    annotationId path string true The annotation ID.
    body body createMember true The member to create. Valid fields are annotationId, value, resourceType, and resourceUri. All other fields are ignored.

    Example responses

    201 Response

    {
      "name": "A member",
      "annotationId": "f9bd5124-418f-4326-86cf-b6d98d57778",
      "id": "bd5124b7-318f-3326-97edf-cd79fe77758",
      "resourceUri": "/objects/3989203-3867-1927-175d38a7421",
      "resourceType": "column",
      "value": "the member's value",
      "creationTimeStamp": "2016-12-19T18:02:07.986Z",
      "modifiedTimeStamp": "2016-12-21T17:12:01.846Z",
      "createdBy": "bob",
      "modifiedBy": "bob",
      "links": [
        {
          "method": "GET",
          "rel": "self",
          "href": "/annotations/annotations/f9bd5124-418f-4326-86cf-b6d98d57778/members/bd5124b7-318f-3326-97edf-cd79fe77758",
          "uri": "/annotations/annotations/f9bd5124-418f-4326-86cf-b6d98d57778/members/bd5124b7-318f-3326-97edf-cd79fe77758",
          "type": "application/vnd.sas.annotation.member"
        },
        {
          "method": "PUT",
          "rel": "create",
          "href": "/annotations/annotations/f9bd5124-418f-4326-86cf-b6d98d57778/members/bd5124b7-318f-3326-97edf-cd79fe77758",
          "uri": "/annotations/annotations/f9bd5124-418f-4326-86cf-b6d98d57778/members/bd5124b7-318f-3326-97edf-cd79fe77758",
          "type": "application/vnd.sas.annotation.member"
        },
        {
          "method": "DELETE",
          "rel": "delete",
          "href": "/annotations/annotations/f9bd5124-418f-4326-86cf-b6d98d57778/members/bd5124b7-318f-3326-97edf-cd79fe77758",
          "uri": "/annotations/annotations/f9bd5124-418f-4326-86cf-b6d98d57778/members/bd5124b7-318f-3326-97edf-cd79fe77758"
        }
      ]
    }
    
    Responses
    Status Meaning Description Schema
    201 Created The annotation member was successfully created. member
    400 Bad Request The request was invalid. error2
    404 Not Found The specified annotation does not exist. error2
    Response Headers
    Status Header Type Format Description
    201 Location string The URI of the newly created annotation.
    201 Last-Modified string The ISO8601 date string that represents the timestamp of the last update to this object.
    201 Etag string A tag that identifies this revision of this object.

    Get a member

    Code samples

    # You can also use wget
    curl -X GET https://www.example.com/annotations/annotations/{annotationId}/members/{memberId} \
      -H 'Accept: application/vnd.sas.annotation.member+json'
    
    
    
    const headers = {
      'Accept':'application/vnd.sas.annotation.member+json'
    };
    
    fetch('https://www.example.com/annotations/annotations/{annotationId}/members/{memberId}',
    {
      method: 'GET',
    
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    import requests
    headers = {
      'Accept': 'application/vnd.sas.annotation.member+json'
    }
    
    r = requests.get('https://www.example.com/annotations/annotations/{annotationId}/members/{memberId}', headers = headers)
    
    print(r.json())
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Accept": []string{"application/vnd.sas.annotation.member+json"},
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("GET", "https://www.example.com/annotations/annotations/{annotationId}/members/{memberId}", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    

    GET /annotations/{annotationId}/members/{memberId}

    Retrieves the member for the given annotation and member ID.

    Parameters
    Name In Type Required Description
    annotationId path string true The annotation ID.
    memberId path string true The member ID to retrieve.

    Example responses

    200 Response

    {
      "name": "A member",
      "annotationId": "f9bd5124-418f-4326-86cf-b6d98d57778",
      "id": "bd5124b7-318f-3326-97edf-cd79fe77758",
      "resourceUri": "/objects/3989203-3867-1927-175d38a7421",
      "resourceType": "column",
      "value": "the member's value",
      "creationTimeStamp": "2016-12-19T18:02:07.986Z",
      "modifiedTimeStamp": "2016-12-21T17:12:01.846Z",
      "createdBy": "bob",
      "modifiedBy": "bob",
      "links": [
        {
          "method": "GET",
          "rel": "self",
          "href": "/annotations/annotations/f9bd5124-418f-4326-86cf-b6d98d57778/members/bd5124b7-318f-3326-97edf-cd79fe77758",
          "uri": "/annotations/annotations/f9bd5124-418f-4326-86cf-b6d98d57778/members/bd5124b7-318f-3326-97edf-cd79fe77758",
          "type": "application/vnd.sas.annotation.member"
        },
        {
          "method": "PUT",
          "rel": "create",
          "href": "/annotations/annotations/f9bd5124-418f-4326-86cf-b6d98d57778/members/bd5124b7-318f-3326-97edf-cd79fe77758",
          "uri": "/annotations/annotations/f9bd5124-418f-4326-86cf-b6d98d57778/members/bd5124b7-318f-3326-97edf-cd79fe77758",
          "type": "application/vnd.sas.annotation.member"
        },
        {
          "method": "DELETE",
          "rel": "delete",
          "href": "/annotations/annotations/f9bd5124-418f-4326-86cf-b6d98d57778/members/bd5124b7-318f-3326-97edf-cd79fe77758",
          "uri": "/annotations/annotations/f9bd5124-418f-4326-86cf-b6d98d57778/members/bd5124b7-318f-3326-97edf-cd79fe77758"
        }
      ]
    }
    
    Responses
    Status Meaning Description Schema
    200 OK The annotation member was retrieved. member
    404 Not Found The specified annotation or member does not exist. error2
    Response Headers
    Status Header Type Format Description
    200 Last-Modified string The ISO8601 date string that represents the timestamp of the last update to this object.
    200 Etag string A tag that identifies this revision of this object.

    Get headers verify that the member exists

    Code samples

    # You can also use wget
    curl -X HEAD https://www.example.com/annotations/annotations/{annotationId}/members/{memberId} \
      -H 'Accept: */*'
    
    
    
    const headers = {
      'Accept':'*/*'
    };
    
    fetch('https://www.example.com/annotations/annotations/{annotationId}/members/{memberId}',
    {
      method: 'HEAD',
    
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    import requests
    headers = {
      'Accept': '*/*'
    }
    
    r = requests.head('https://www.example.com/annotations/annotations/{annotationId}/members/{memberId}', headers = headers)
    
    print(r.json())
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Accept": []string{"*/*"},
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("HEAD", "https://www.example.com/annotations/annotations/{annotationId}/members/{memberId}", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    

    HEAD /annotations/{annotationId}/members/{memberId}

    Returns header information and verifies that the member exists.

    Parameters
    Name In Type Required Description
    annotationId path string true The annotation ID.
    memberId path string true The member ID.

    Example responses

    400 Response

    Responses
    Status Meaning Description Schema
    200 OK The annotation member exists. None
    400 Bad Request The specified request was invalid for one of these reasons:
    • The annotation ID for the specified member is not correct.
    • The new member value exceeds the maximum allowable length.
    error2
    404 Not Found The specified member does not exist. error2
    Response Headers
    Status Header Type Format Description
    200 Last-Modified string The ISO8601 date string that represents the timestamp of the last update to this object.
    200 Etag string A tag that identifies this revision of this object.

    Update or replace the member value

    Code samples

    # You can also use wget
    curl -X PUT https://www.example.com/annotations/annotations/{annotationId}/members/{memberId} \
      -H 'Content-Type: application/vnd.sas.annotation.member+json' \
      -H 'Accept: application/vnd.sas.annotation.member+json' \
      -H 'If-Match: string'
    
    
    const inputBody = '{
      "id": "string",
      "annotationId": "string",
      "resourceUri": "string",
      "resourceType": "string",
      "value": "string",
      "createdBy": "string",
      "modifiedBy": "string",
      "creationTimeStamp": "string",
      "modifiedTimeStamp": "string"
    }';
    const headers = {
      'Content-Type':'application/vnd.sas.annotation.member+json',
      'Accept':'application/vnd.sas.annotation.member+json',
      'If-Match':'string'
    };
    
    fetch('https://www.example.com/annotations/annotations/{annotationId}/members/{memberId}',
    {
      method: 'PUT',
      body: inputBody,
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    import requests
    headers = {
      'Content-Type': 'application/vnd.sas.annotation.member+json',
      'Accept': 'application/vnd.sas.annotation.member+json',
      'If-Match': 'string'
    }
    
    r = requests.put('https://www.example.com/annotations/annotations/{annotationId}/members/{memberId}', headers = headers)
    
    print(r.json())
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Content-Type": []string{"application/vnd.sas.annotation.member+json"},
            "Accept": []string{"application/vnd.sas.annotation.member+json"},
            "If-Match": []string{"string"},
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("PUT", "https://www.example.com/annotations/annotations/{annotationId}/members/{memberId}", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    

    PUT /annotations/{annotationId}/members/{memberId}

    Updates or replaces the member value for the given annotation and member ID.

    Body parameter

    {
      "id": "string",
      "annotationId": "string",
      "resourceUri": "string",
      "resourceType": "string",
      "value": "string",
      "createdBy": "string",
      "modifiedBy": "string",
      "creationTimeStamp": "string",
      "modifiedTimeStamp": "string"
    }
    
    Parameters
    Name In Type Required Description
    annotationId path string true The annotation ID.
    memberId path string true The member ID to update or replace.
    If-Match header string false The Etag that was returned from a GET, POST, or PUT of this annotation.
    body body updateMember true The member object.

    Example responses

    200 Response

    {
      "name": "A member",
      "annotationId": "f9bd5124-418f-4326-86cf-b6d98d57778",
      "id": "bd5124b7-318f-3326-97edf-cd79fe77758",
      "resourceUri": "/objects/3989203-3867-1927-175d38a7421",
      "resourceType": "column",
      "value": "the member's value",
      "creationTimeStamp": "2016-12-19T18:02:07.986Z",
      "modifiedTimeStamp": "2016-12-21T17:12:01.846Z",
      "createdBy": "bob",
      "modifiedBy": "bob",
      "links": [
        {
          "method": "GET",
          "rel": "self",
          "href": "/annotations/annotations/f9bd5124-418f-4326-86cf-b6d98d57778/members/bd5124b7-318f-3326-97edf-cd79fe77758",
          "uri": "/annotations/annotations/f9bd5124-418f-4326-86cf-b6d98d57778/members/bd5124b7-318f-3326-97edf-cd79fe77758",
          "type": "application/vnd.sas.annotation.member"
        },
        {
          "method": "PUT",
          "rel": "create",
          "href": "/annotations/annotations/f9bd5124-418f-4326-86cf-b6d98d57778/members/bd5124b7-318f-3326-97edf-cd79fe77758",
          "uri": "/annotations/annotations/f9bd5124-418f-4326-86cf-b6d98d57778/members/bd5124b7-318f-3326-97edf-cd79fe77758",
          "type": "application/vnd.sas.annotation.member"
        },
        {
          "method": "DELETE",
          "rel": "delete",
          "href": "/annotations/annotations/f9bd5124-418f-4326-86cf-b6d98d57778/members/bd5124b7-318f-3326-97edf-cd79fe77758",
          "uri": "/annotations/annotations/f9bd5124-418f-4326-86cf-b6d98d57778/members/bd5124b7-318f-3326-97edf-cd79fe77758"
        }
      ]
    }
    
    Responses
    Status Meaning Description Schema
    200 OK The annotation member value was updated. member
    400 Bad Request The specified request was invalid for one of these reasons:
    • The specified annotation ID for the specified member is not correct.
    • The new member value exceeds the maximum allowable length.
    error2
    404 Not Found The specified member does not exist. error2
    412 Precondition Failed The specified Etag does not match the current version or the last modified date of the object. error2
    415 Unsupported Media Type The specified media type is not supported. error2
    428 Precondition Required The Etag was not specified during update of an existing type. error2
    Response Headers
    Status Header Type Format Description
    200 Last-Modified string The ISO8601 date string that represents the timestamp of the last update to this object.
    200 Etag string A tag that identifies this revision of this object.

    Delete a member

    Code samples

    # You can also use wget
    curl -X DELETE https://www.example.com/annotations/annotations/{annotationId}/members/{memberId} \
      -H 'Accept: */*'
    
    
    
    const headers = {
      'Accept':'*/*'
    };
    
    fetch('https://www.example.com/annotations/annotations/{annotationId}/members/{memberId}',
    {
      method: 'DELETE',
    
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    import requests
    headers = {
      'Accept': '*/*'
    }
    
    r = requests.delete('https://www.example.com/annotations/annotations/{annotationId}/members/{memberId}', headers = headers)
    
    print(r.json())
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Accept": []string{"*/*"},
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("DELETE", "https://www.example.com/annotations/annotations/{annotationId}/members/{memberId}", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    

    DELETE /annotations/{annotationId}/members/{memberId}

    Deletes the member for the specified annotation and member ID.

    Parameters
    Name In Type Required Description
    annotationId path string true The annotation ID.
    memberId path string true The member ID to delete.

    Example responses

    404 Response

    Responses
    Status Meaning Description Schema
    204 No Content The member was deleted. None
    404 Not Found The specified annotation or member does not exist. error2

    Find annotation members by annotationIds

    Code samples

    # You can also use wget
    curl -X POST https://www.example.com/annotations/members#multi \
      -H 'Content-Type: application/vnd.sas.selection+json' \
      -H 'Accept: application/vnd.sas.collection+json'
    
    
    const inputBody = '{
      "version": 0,
      "template": "http://example.com",
      "type": "id",
      "resources": [
        "string"
      ],
      "links": [
        {
          "method": "string",
          "rel": "string",
          "uri": "string",
          "href": "string",
          "title": "string",
          "type": "string",
          "itemType": "string",
          "responseType": "string",
          "responseItemType": "string"
        }
      ]
    }';
    const headers = {
      'Content-Type':'application/vnd.sas.selection+json',
      'Accept':'application/vnd.sas.collection+json'
    };
    
    fetch('https://www.example.com/annotations/members#multi',
    {
      method: 'POST',
      body: inputBody,
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    import requests
    headers = {
      'Content-Type': 'application/vnd.sas.selection+json',
      'Accept': 'application/vnd.sas.collection+json'
    }
    
    r = requests.post('https://www.example.com/annotations/members#multi', headers = headers)
    
    print(r.json())
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Content-Type": []string{"application/vnd.sas.selection+json"},
            "Accept": []string{"application/vnd.sas.collection+json"},
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("POST", "https://www.example.com/annotations/members#multi", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    

    POST /members#multi

    Find all members that are associated with the provided annotationIds. Returns an application/vnd.sas.collection of application/vnd.sas.annotation.member objects.

    Body parameter

    {
      "version": 0,
      "template": "http://example.com",
      "type": "id",
      "resources": [
        "string"
      ],
      "links": [
        {
          "method": "string",
          "rel": "string",
          "uri": "string",
          "href": "string",
          "title": "string",
          "type": "string",
          "itemType": "string",
          "responseType": "string",
          "responseItemType": "string"
        }
      ]
    }
    
    Parameters
    Name In Type Required Description
    body body selection true Selects annotationIds for which associated members are to be found.

    Example responses

    200 Response

    {
      "links": [
        {
          "method": "GET",
          "rel": "collection",
          "href": "/annotations/annotations/26e2df43-aeaf-475d-a64e-7baafb8a4eca/members",
          "uri": "/annotations/annotations/26e2df43-aeaf-475d-a64e-7baafb8a4eca/members",
          "type": "application/vnd.sas.collection"
        },
        {
          "method": "GET",
          "rel": "self",
          "href": "/annotations/annotations/26e2df43-aeaf-475d-a64e-7baafb8a4eca/members?start=0&limit=10",
          "uri": "/annotations/annotations/26e2df43-aeaf-475d-a64e-7baafb8a4eca/members?start=0&limit=10",
          "type": "application/vnd.sas.collection"
        },
        {
          "method": "POST",
          "rel": "create",
          "href": "/annotations/annotations/26e2df43-aeaf-475d-a64e-7baafb8a4eca/members",
          "uri": "/annotations/annotations/26e2df43-aeaf-475d-a64e-7baafb8a4eca/members",
          "type": "application/vnd.sas.annotation.member",
          "responseType": "application/vnd.sas.annotation.member"
        }
      ],
      "name": "members",
      "accept": "application/vnd.sas.annotation.member",
      "start": 0,
      "count": 1,
      "items": [
        {
          "creationTimeStamp": "2018-03-26T20:11:17.132Z",
          "modifiedTimeStamp": "2018-03-26T20:11:17.132Z",
          "createdBy": "sasboot",
          "modifiedBy": "sasboot",
          "version": 1,
          "id": "a7f35cb5-c72d-4fae-a5f3-af74f26cdf42",
          "annotationId": "26e2df43-aeaf-475d-a64e-7baafb8a4eca",
          "resourceType": "table",
          "resourceUri": "objects/b673660283/96764860d",
          "value": "objectValue",
          "links": [
            {
              "method": "GET",
              "rel": "annotation",
              "href": "/annotations/annotations/26e2df43-aeaf-475d-a64e-7baafb8a4eca",
              "uri": "/annotations/annotations/26e2df43-aeaf-475d-a64e-7baafb8a4eca",
              "type": "application/vnd.sas.annotation"
            },
            {
              "method": "GET",
              "rel": "self",
              "href": "/annotations/annotations/26e2df43-aeaf-475d-a64e-7baafb8a4eca/members/a7f35cb5-c72d-4fae-a5f3-af74f26cdf42",
              "uri": "/annotations/annotations/26e2df43-aeaf-475d-a64e-7baafb8a4eca/members/a7f35cb5-c72d-4fae-a5f3-af74f26cdf42",
              "type": "application/vnd.sas.annotation.member"
            },
            {
              "method": "PUT",
              "rel": "update",
              "href": "/annotations/annotations/26e2df43-aeaf-475d-a64e-7baafb8a4eca/members/a7f35cb5-c72d-4fae-a5f3-af74f26cdf42",
              "uri": "/annotations/annotations/26e2df43-aeaf-475d-a64e-7baafb8a4eca/members/a7f35cb5-c72d-4fae-a5f3-af74f26cdf42",
              "type": "application/vnd.sas.annotation.member"
            },
            {
              "method": "DELETE",
              "rel": "delete",
              "href": "/annotations/annotations/26e2df43-aeaf-475d-a64e-7baafb8a4eca/members/a7f35cb5-c72d-4fae-a5f3-af74f26cdf42",
              "uri": "/annotations/annotations/26e2df43-aeaf-475d-a64e-7baafb8a4eca/members/a7f35cb5-c72d-4fae-a5f3-af74f26cdf42"
            },
            {
              "method": "GET",
              "rel": "up",
              "href": "/annotations/annotations/26e2df43-aeaf-475d-a64e-7baafb8a4eca/members",
              "uri": "/annotations/annotations/26e2df43-aeaf-475d-a64e-7baafb8a4eca/members",
              "type": "application/vnd.sas.annotation.member",
              "responseType": "application/vnd.sas.annotation.member"
            }
          ]
        }
      ],
      "limit": 10,
      "version": 2
    }
    
    Responses
    Status Meaning Description Schema
    200 OK The request succeeded. memberCollection
    400 Bad Request The request was invalid. This can occur when no matching members are found or when the user provides an invalid limit, start, sortBy, or filter. None

    Schemas

    annotation

    {
      "name": "My Annotation",
      "id": "f9bd5124-418f-4326-86cf-b6d98d57778",
      "domain": "Domain1",
      "label": "Label",
      "description": "Gives context to one or more objects.",
      "creationTimeStamp": "2016-12-19T18:02:07.986Z",
      "modifiedTimeStamp": "2016-12-19T18:02:07.986Z",
      "createdBy": "bob",
      "modifiedBy": "bob",
      "links": [
        {
          "method": "POST",
          "rel": "create",
          "href": "/annotations/annotations",
          "uri": "/annotations/annotations",
          "type": "application/vnd.sas.annotation",
          "responseType": "application/vnd.sas.annotation"
        },
        {
          "method": "GET",
          "rel": "self",
          "href": "/annotations/annotations/f9bd5124-418f-4326-86cf-b6d98d57778",
          "uri": "/annotations/annotations/f9bd5124-418f-4326-86cf-b6d98d57778",
          "type": "application/vnd.sas.annotation"
        },
        {
          "method": "PUT",
          "rel": "update",
          "href": "/annotations/annotations/f9bd5124-418f-4326-86cf-b6d98d57778",
          "uri": "/annotations/annotations/f9bd5124-418f-4326-86cf-b6d98d57778",
          "type": "application/vnd.sas.annotation"
        },
        {
          "method": "DELETE",
          "rel": "delete",
          "href": "/annotations/annotations/f9bd5124-418f-4326-86cf-b6d98d57778",
          "uri": "/annotations/annotations/f9bd5124-418f-4326-86cf-b6d98d57778"
        }
      ]
    }
    
    

    Annotation

    Properties
    Name Type Required Restrictions Description
    version number false none The version of the resource.
    id string false none The unique ID, which the system assigns.
    domain string false none The domain that is associated with the annotation. The domain and name comprise a unique key.
    name string false none The name. The domain and name comprise a unique key.
    label string false none The display label for the annotation.
    description string false none The description.
    createdBy string false none The user who created this annotation member.
    modifiedBy string false none The last user to modify this annotation member.
    creationTimeStamp string false none The formatted timestamp when the annotation member was created, shown in yyyy-mm-ddThh:mm:ssZ format.
    modifiedTimeStamp string false none The formatted timestamp when the annotation member was last modified, shown in yyyy-mm-ddThh:mm:ssZ format.
    links [any] false none Zero or more link objects.
    » Link object false none A link to a related operation or resource.
    »» method string false none The HTTP method for the link.
    »» rel string true none The relationship of the link to the resource.
    »» uri string false none The relative URI for the link.
    »» href string false none The URL for the link.
    »» title string false none The title for the link.
    »» type string false none The media type or link type for the link.
    »» itemType string false none If this is a link to a container, itemType is the media type or link type for the items in the container.
    »» responseType string false none The media type or link type of the response body for a PUT, POST, or PATCH operation.
    »» responseItemType string false none The media type or link type of the items in the response body for a PUT, POST, or PATCH operation.

    createAnnotation

    {
      "domain": "string",
      "name": "string",
      "label": "string",
      "description": "string"
    }
    
    

    Create Annotation

    Properties
    Name Type Required Restrictions Description
    domain string false none The domain that is associated with the annotation. The domain and name comprise a unique key.
    name string false none The name. The domain and name comprise a unique key.
    label string false none The display label for the annotation.
    description string false none The description of the annotation.

    updateAnnotation

    {
      "version": 0,
      "id": "string",
      "domain": "string",
      "name": "string",
      "label": "string",
      "description": "string",
      "createdBy": "string",
      "modifiedBy": "string",
      "creationTimeStamp": "string",
      "modifiedTimeStamp": "string"
    }
    
    

    Update Annotation

    Properties
    Name Type Required Restrictions Description
    version number false none The version of the resource.
    id string false none The unique ID, which the system assigns.
    domain string false none The domain that is associated with the annotation. The domain and name comprise a unique key.
    name string false none The name. The domain and name comprise a unique key.
    label string false none The display label for the annotation.
    description string false none The description of the annotation.
    createdBy string false none The user who created this annotation member.
    modifiedBy string false none The last user to modify this annotation member.
    creationTimeStamp string false none The formatted timestamp when the annotation member was created, shown in yyyy-mm-ddThh:mm:ssZ format.
    modifiedTimeStamp string false none The formatted timestamp when the annotation member was last modified, shown in yyyy-mm-ddThh:mm:ssZ format.

    annotationCollection

    {
      "links": [
        {
          "method": "GET",
          "rel": "collection",
          "href": "/annotations/annotations",
          "uri": "/annotations/annotations",
          "type": "application/vnd.sas.collection"
        },
        {
          "method": "GET",
          "rel": "self",
          "href": "/annotations/annotations?start=0&limit=10",
          "uri": "/annotations/annotations?start=0&limit=10",
          "type": "application/vnd.sas.collection"
        },
        {
          "method": "POST",
          "rel": "create",
          "href": "/annotations/annotations",
          "uri": "/annotations/annotations",
          "type": "application/vnd.sas.annotation",
          "responseType": "application/vnd.sas.annotation"
        }
      ],
      "name": "annotations",
      "accept": "application/vnd.sas.annotation",
      "count": 1,
      "items": [
        {
          "id": "f9bd5124-418f-4326-86cf-b6d98d57778",
          "name": "Annotation1",
          "domain": "Domain1",
          "description": "One annotation.",
          "creationTimeStamp": "2016-12-19T18:02:07.986Z",
          "modifiedTimeStamp": "2016-12-19T18:02:07.986Z",
          "createdBy": "bob",
          "modifiedBy": "bob",
          "links": [
            {
              "method": "POST",
              "rel": "create",
              "href": "/annotations/annotations",
              "uri": "/annotations/annotations",
              "type": "application/vnd.sas.annotation",
              "responseType": "application/vnd.sas.annotation"
            },
            {
              "method": "GET",
              "rel": "self",
              "href": "/annotations/annotations/ccc0492f-7a0a-4481-8890-ca0b127c6ed4",
              "uri": "/annotations/annotations/ccc0492f-7a0a-4481-8890-ca0b127c6ed4",
              "type": "application/vnd.sas.annotation"
            },
            {
              "method": "PUT",
              "rel": "update",
              "href": "/annotations/annotations/ccc0492f-7a0a-4481-8890-ca0b127c6ed4",
              "uri": "/annotations/annotations/ccc0492f-7a0a-4481-8890-ca0b127c6ed4",
              "type": "application/vnd.sas.annotation"
            },
            {
              "method": "DELETE",
              "rel": "delete",
              "href": "/annotations/annotations/ccc0492f-7a0a-4481-8890-ca0b127c6ed4",
              "uri": "/annotations/annotations/ccc0492f-7a0a-4481-8890-ca0b127c6ed4"
            }
          ]
        }
      ],
      "limit": 10,
      "version": 2
    }
    
    

    Annotation Collection

    Properties
    Name Type Required Restrictions Description
    name string false none The name of the collection "annotations" in the context of the request.
    start integer false none The zero-based index of the result candidates to start returning.
    limit integer false none The maximum number of results that were requested.
    count integer false none The actual number of results that were returned in the collection.
    accept string false none The accept header value that was used in the initial request.
    links [link] false none The paging links that apply to this object.
    items [annotation] false none The actual results of a query.
    version integer false none The collection schema version.

    member

    {
      "name": "A member",
      "annotationId": "f9bd5124-418f-4326-86cf-b6d98d57778",
      "id": "bd5124b7-318f-3326-97edf-cd79fe77758",
      "resourceUri": "/objects/3989203-3867-1927-175d38a7421",
      "resourceType": "column",
      "value": "the member's value",
      "creationTimeStamp": "2016-12-19T18:02:07.986Z",
      "modifiedTimeStamp": "2016-12-21T17:12:01.846Z",
      "createdBy": "bob",
      "modifiedBy": "bob",
      "links": [
        {
          "method": "GET",
          "rel": "self",
          "href": "/annotations/annotations/f9bd5124-418f-4326-86cf-b6d98d57778/members/bd5124b7-318f-3326-97edf-cd79fe77758",
          "uri": "/annotations/annotations/f9bd5124-418f-4326-86cf-b6d98d57778/members/bd5124b7-318f-3326-97edf-cd79fe77758",
          "type": "application/vnd.sas.annotation.member"
        },
        {
          "method": "PUT",
          "rel": "create",
          "href": "/annotations/annotations/f9bd5124-418f-4326-86cf-b6d98d57778/members/bd5124b7-318f-3326-97edf-cd79fe77758",
          "uri": "/annotations/annotations/f9bd5124-418f-4326-86cf-b6d98d57778/members/bd5124b7-318f-3326-97edf-cd79fe77758",
          "type": "application/vnd.sas.annotation.member"
        },
        {
          "method": "DELETE",
          "rel": "delete",
          "href": "/annotations/annotations/f9bd5124-418f-4326-86cf-b6d98d57778/members/bd5124b7-318f-3326-97edf-cd79fe77758",
          "uri": "/annotations/annotations/f9bd5124-418f-4326-86cf-b6d98d57778/members/bd5124b7-318f-3326-97edf-cd79fe77758"
        }
      ]
    }
    
    

    Member

    Properties
    Name Type Required Restrictions Description
    version number false none The version of the resource.
    id string false none The unique ID, which the system assigns.
    annotationId string false none The annotation ID that is associated with the member.
    resourceUri string false none The URI of the object that is associated with the member.
    resourceType string false none The object type that is associated with the member.
    value string false none The member value.
    createdBy string false none The user who created this annotation member.
    modifiedBy string false none The last user to modify this annotation member.
    creationTimeStamp string false none The formatted timestamp when the annotation member was created, shown in yyyy-mm-ddThh:mm:ssZ format.
    modifiedTimeStamp string false none The formatted timestamp when the annotation member was last modified, shown in yyyy-mm-ddThh:mm:ssZ format.
    links [link] false none Zero or more link objects.

    createMember

    {
      "annotationId": "string",
      "resourceUri": "string",
      "resourceType": "string",
      "value": "string"
    }
    
    

    Create Member

    Properties
    Name Type Required Restrictions Description
    annotationId string false none The annotation ID that is associated with the member.
    resourceUri string false none The URI of the object that is associated with the member.
    resourceType string false none The object type that is associated with the member.
    value string false none The member value.

    updateMember

    {
      "id": "string",
      "annotationId": "string",
      "resourceUri": "string",
      "resourceType": "string",
      "value": "string",
      "createdBy": "string",
      "modifiedBy": "string",
      "creationTimeStamp": "string",
      "modifiedTimeStamp": "string"
    }
    
    

    Update Member

    Properties
    Name Type Required Restrictions Description
    id string false none The unique ID, which the system assigns.
    annotationId string false none The annotation ID that is associated with the member.
    resourceUri string false none The URI of the object that is associated with the member.
    resourceType string false none The object type that is associated with the member.
    value string false none The member value.
    createdBy string false none The user who created this annotation member.
    modifiedBy string false none The last user to modify this annotation member.
    creationTimeStamp string false none The formatted timestamp when the annotation member was created, shown in yyyy-mm-ddThh:mm:ssZ format.
    modifiedTimeStamp string false none The formatted timestamp when the annotation member was last modified, shown in yyyy-mm-ddThh:mm:ssZ format.

    memberCollection

    {
      "links": [
        {
          "method": "GET",
          "rel": "collection",
          "href": "/annotations/annotations/26e2df43-aeaf-475d-a64e-7baafb8a4eca/members",
          "uri": "/annotations/annotations/26e2df43-aeaf-475d-a64e-7baafb8a4eca/members",
          "type": "application/vnd.sas.collection"
        },
        {
          "method": "GET",
          "rel": "self",
          "href": "/annotations/annotations/26e2df43-aeaf-475d-a64e-7baafb8a4eca/members?start=0&limit=10",
          "uri": "/annotations/annotations/26e2df43-aeaf-475d-a64e-7baafb8a4eca/members?start=0&limit=10",
          "type": "application/vnd.sas.collection"
        },
        {
          "method": "POST",
          "rel": "create",
          "href": "/annotations/annotations/26e2df43-aeaf-475d-a64e-7baafb8a4eca/members",
          "uri": "/annotations/annotations/26e2df43-aeaf-475d-a64e-7baafb8a4eca/members",
          "type": "application/vnd.sas.annotation.member",
          "responseType": "application/vnd.sas.annotation.member"
        }
      ],
      "name": "members",
      "accept": "application/vnd.sas.annotation.member",
      "start": 0,
      "count": 1,
      "items": [
        {
          "creationTimeStamp": "2018-03-26T20:11:17.132Z",
          "modifiedTimeStamp": "2018-03-26T20:11:17.132Z",
          "createdBy": "sasboot",
          "modifiedBy": "sasboot",
          "version": 1,
          "id": "a7f35cb5-c72d-4fae-a5f3-af74f26cdf42",
          "annotationId": "26e2df43-aeaf-475d-a64e-7baafb8a4eca",
          "resourceType": "table",
          "resourceUri": "objects/b673660283/96764860d",
          "value": "objectValue",
          "links": [
            {
              "method": "GET",
              "rel": "annotation",
              "href": "/annotations/annotations/26e2df43-aeaf-475d-a64e-7baafb8a4eca",
              "uri": "/annotations/annotations/26e2df43-aeaf-475d-a64e-7baafb8a4eca",
              "type": "application/vnd.sas.annotation"
            },
            {
              "method": "GET",
              "rel": "self",
              "href": "/annotations/annotations/26e2df43-aeaf-475d-a64e-7baafb8a4eca/members/a7f35cb5-c72d-4fae-a5f3-af74f26cdf42",
              "uri": "/annotations/annotations/26e2df43-aeaf-475d-a64e-7baafb8a4eca/members/a7f35cb5-c72d-4fae-a5f3-af74f26cdf42",
              "type": "application/vnd.sas.annotation.member"
            },
            {
              "method": "PUT",
              "rel": "update",
              "href": "/annotations/annotations/26e2df43-aeaf-475d-a64e-7baafb8a4eca/members/a7f35cb5-c72d-4fae-a5f3-af74f26cdf42",
              "uri": "/annotations/annotations/26e2df43-aeaf-475d-a64e-7baafb8a4eca/members/a7f35cb5-c72d-4fae-a5f3-af74f26cdf42",
              "type": "application/vnd.sas.annotation.member"
            },
            {
              "method": "DELETE",
              "rel": "delete",
              "href": "/annotations/annotations/26e2df43-aeaf-475d-a64e-7baafb8a4eca/members/a7f35cb5-c72d-4fae-a5f3-af74f26cdf42",
              "uri": "/annotations/annotations/26e2df43-aeaf-475d-a64e-7baafb8a4eca/members/a7f35cb5-c72d-4fae-a5f3-af74f26cdf42"
            },
            {
              "method": "GET",
              "rel": "up",
              "href": "/annotations/annotations/26e2df43-aeaf-475d-a64e-7baafb8a4eca/members",
              "uri": "/annotations/annotations/26e2df43-aeaf-475d-a64e-7baafb8a4eca/members",
              "type": "application/vnd.sas.annotation.member",
              "responseType": "application/vnd.sas.annotation.member"
            }
          ]
        }
      ],
      "limit": 10,
      "version": 2
    }
    
    

    Member Collection

    Properties
    Name Type Required Restrictions Description
    name string false none The name of the collection "members" within the context of the request.
    start integer false none The zero-based index of the result candidates to start returning.
    limit integer false none The maximum number of results that were requested.
    count integer false none The actual number of results that were returned in the collection.
    accept string false none The accept header value that was used in the initial request.
    links [link] false none The paging links that apply to this object.
    items [member] false none The actual results of a query.
    version integer false none The collection schema version.

    api

    {
      "links": [
        {
          "method": "GET",
          "rel": "annotations",
          "href": "/annotations/annotations",
          "uri": "/annotations/annotations",
          "type": "application/vnd.sas.collection"
        },
        {
          "method": "POST",
          "rel": "create",
          "href": "/annotations/annotations",
          "uri": "/annotations/annotations",
          "type": "application/vnd.sas.annotation",
          "responseType": "application/vnd.sas.annotation"
        }
      ]
    }
    
    

    API

    Properties
    Name Type Required Restrictions Description
    links [link] false none The API base links.

    error2

    {
      "message": "string",
      "id": "string",
      "errorCode": 0,
      "httpStatusCode": 0,
      "details": [
        "string"
      ],
      "remediation": "string",
      "errors": [
        null
      ],
      "links": [
        {
          "method": "string",
          "rel": "string",
          "uri": "string",
          "href": "string",
          "title": "string",
          "type": "string",
          "itemType": "string",
          "responseType": "string",
          "responseItemType": "string"
        }
      ],
      "version": 0
    }
    
    

    Error

    Properties
    Name Type Required Restrictions Description
    message string false none The message for the error.
    id string false none The string ID for the error.
    errorCode integer false none The numeric ID for the error.
    httpStatusCode integer true none The HTTP status code for the error.
    details [string] false none Messages that provide additional details about the cause of the error.
    remediation string false none A message that describes how to resolve the error.
    errors [error2] false none Any additional errors that occurred.
    links [link] false none The links that apply to the error.
    version integer true none The version number of the error representation. This representation is version 2.

    selection

    {
      "version": 0,
      "template": "http://example.com",
      "type": "id",
      "resources": [
        "string"
      ],
      "links": [
        {
          "method": "string",
          "rel": "string",
          "uri": "string",
          "href": "string",
          "title": "string",
          "type": "string",
          "itemType": "string",
          "responseType": "string",
          "responseItemType": "string"
        }
      ]
    }
    
    

    Selection

    Properties
    Name Type Required Restrictions Description
    version integer true none The schema version number of this media type. This representation is version 1.
    template string(uri) false none A URI template in which the {id} parameter can be replaced with a value from the "resources" array in order to yield the URI of the identified resource.
    type string false none Specifies whether the resources array contains IDs, URIs, or both.

    "id"
    the array contains resource identifiers only. This is the default if "type" is omitted.

    "uri"
    the array contains resource URIs

    "mixed"
    the array contains a mixture of identifiers and URIs.

    resources [string] true none An array of resource IDs or URIs
    links [link] false none An array of links to related resources and actions.
    Enumerated Values
    Property Value
    type id
    type uri
    type mixed

    Examples

    Github Examples

    Detailed examples on how to use this API can be found on Github.

    Media Type Samples

    application/vnd.sas.annotation

    Represents the annotation. The schema is at application/vnd.sas.annotation.

    The application/vnd.sas.annotation media type contains these members.

    Name Type Description
    version integer The schema version number for this media type. This representation is version 2.
    id string The system-assigned unique ID for this object.
    name string The value that the search service uses. When combined with the domain, it must be unique to the microservice. The maximum length is 100.
    domain string A grouping that can be assigned to an annotation for the purpose of filtering or scoping. This can be any string, as long as the combination of domain and name are unique and the length does not exceed 100. The default is \'none\'.
    label string The (optional) display label for the annotation. The maximum length is 1000.
    description string The (optional) description of annotation. The maximum length is 1000.
    createdBy string The user who created this annotation.
    modifiedBy string The last user to modify this annotation.
    creationTimeStamp string The formatted time stamp when the annotation was created, shown in yyyy-mm-ddThh:mm:ssZ format.
    modifiedTimeStamp string The formatted time stamp when the annotation was modified, shown in yyyy-mm-ddThh:mm:ssZ format.

    Here is an example of the JSON representation of this media type. { "version": 1, "id": "1c9bcdf2-a7de-424b-aebd-d9228e632cad", "name": "my annotation name", "domain": "my group", "label": "my annotation label", "description": "my annotation description", "createdBy": "bob", "modifiedBy": "bob", "creationTimeStamp": "2016-03-11T19:02:05+0000", "modifiedTimeStamp": "2016-03-11T19:02:05+0000", "links": [ { "method": "GET", "rel": "self", "type": "application/vnd.sas.annotation", "href": "/annotations/annotations/1c9bcdf2-a7de-424b-aebd-d9228e632cad", "uri": "/annotations/annotations/1c9bcdf2-a7de-424b-aebd-d9228e632cad" }, { "method": "PUT", "rel": "update", "type": "application/vnd.sas.annotation", "href": "/annotations/annotations/1c9bcdf2-a7de-424b-aebd-d9228e632cad", "uri": "/annotations/annotations/1c9bcdf2-a7de-424b-aebd-d9228e632cad" }, { "method": "DELETE", "rel": "delete", "href": "/annotations/annotations/1c9bcdf2-a7de-424b-aebd-d9228e632cad", "uri": "/annotations/annotations/1c9bcdf2-a7de-424b-aebd-d9228e632cad" }, { "method": "GET", "rel": "up", "type": "application/vnd.sas.collection", "itemType": "application/vnd.sas.annotation", "href": "/annotations/annotations", "uri": "/annotations/annotations" }, { "method": "GET", "rel": "members", "type": "application/vnd.sas.collection", "itemType": "application/vnd.sas.annotation.member", "href": "/annotations/annotations/1c9bcdf2-a7de-424b-aebd-d9228e632cad/members", "uri": "/annotations/annotations/1c9bcdf2-a7de-424b-aebd-d9228e632cad/members" } ] }

    application/vnd.sas.annotation.member'

    Represents an annotation member. Each member represents an object that the annotation references. For example, a member could represent a column or table. The schema is at application/vnd.sas.annotation.member.

    The application/vnd.sas.annotation.member media type contains these members.

    Name Type Description
    version integer The schema version number of this media type. This representation is version 1.
    id string The system-assigned unique ID for this object.
    name string The value that the search service uses. When combined with the domain, it must be unique to the microservice. The maximum length is 100.
    domain string A grouping that can be assigned to an annotation for the purpose of filtering or scoping. This can be any string, as long as the combination of domain and name are unique and the length does not exceed 100. The default is \'none\'.
    label string The (optional) display label for the annotation. The maximum length is 1000.
    description string The (optional) description of annotation. The maximum length is 1000.
    createdBy string The user who created this annotation.
    modifiedBy string The last user to modify this annotation.
    creationTimeStamp string The formatted time stamp when the annotation was created, shown in yyyy-mm-ddThh:mm:ssZ format.
    modifiedTimeStamp string The formatted time stamp when the annotation was modified, shown in yyyy-mm-ddThh:mm:ssZ format.

    Here is an example of the JSON representation of this media type. { "version": 1, "id": "1c9bcdf2-a7de-424b-aebd-d9228e632cad", "annotationId": "dc5d2f32-28ef-11e6-b67b-9e71128cae77", "objectId": "f974a322-5df2-452f-a624-b1c92cb9eebe", "objectType": "COLUMN", "value": "Indexed column", "modifiedBy": "bob", "createdBy": "bob", "creationTimeStamp": "2016-03-11T19:02:05+0000", "modifiedTimeStamp": "2016-03-11T19:02:05+0000" "links": [ { "method": "GET", "rel": "self", "responseType": "application/vnd.sas.annotation.member", "href": "/annotations/annotations/1c9bcdf2-a7de-424b-aebd-d9228e632cad/members/3ce53ab5-0b85-4a8c-b2d4-a7cdba53ace4", "uri": "/annotations/annotations/1c9bcdf2-a7de-424b-aebd-d9228e632cad/members/3ce53ab5-0b85-4a8c-b2d4-a7cdba53ace4" }, { "method": "PUT", "rel": "update", "type": "application/vnd.sas.annotation.member", "responseType": "application/vnd.sas.annotation.member", "href": "/annotations/annotations/1c9bcdf2-a7de-424b-aebd-d9228e632cad/members/3ce53ab5-0b85-4a8c-b2d4-a7cdba53ace4", "uri": "/annotations/annotations/1c9bcdf2-a7de-424b-aebd-d9228e632cad/members/3ce53ab5-0b85-4a8c-b2d4-a7cdba53ace4" }, { "method": "DELETE", "rel": "delete", "href": "/annotations/annotations/1c9bcdf2-a7de-424b-aebd-d9228e632cad/members/3ce53ab5-0b85-4a8c-b2d4-a7cdba53ace4", "uri": "/annotations/annotations/1c9bcdf2-a7de-424b-aebd-d9228e632cad/members/3ce53ab5-0b85-4a8c-b2d4-a7cdba53ace4" } ] }

    application/vnd.sas.api

    Contains top-level links for an API. See application/vnd.sas.api.

    application/vnd.sas.collection

    A paginated, filterable, sortable collection of resource representations. In this API, this is a collection of Annotation resources in the application/vnd.sas.annotation representation or a collection of Member resources in the application/vnd.sas.annotation.member representation. See application/vnd.sas.collection.

    application/vnd.sas.search.response

    Contains the static schema structure that a search query returns. For example: GET /search/content?query=and(matchAny("*"), in(sasType,"annotation")).

    Here is the mapping between an (application/vnd.sas.annotation) annotation object and the (application/vnd.sas.search.response) schema.

    Annotation Object Field Schema Field Type Description
    name title string The name of the annotation.
    description description string The description of the annotation.
    createdBy createdBy string The user who created this annotation.
    modifiedBy modifiedBy string The last user to modify this annotation.
    creationTimeStamp creationTimeStamp string The formatted timestamp when the annotation was created.
    modifiedTimeStamp modifiedTimeStamp string The formatted timestamp when the annotation was modified.

    Resource Reference

    Resource Relationships

    This diagram shows the relationships among the resources in this API.

    Annotations relationship diagram

    Root

    Path: /

    The root of the API.

    This resource contains links to the top-level resources in the API. The response uses the application/vnd.sas.api media type.

    The GET / response includes these links.

    Relation Method Description
    annotations GET Retrieves all annotations.
    URI: /annotations/annotations
    Response type: application/vnd.sas.collection
    Item type: application/vnd.sas.annotation
    createAnnotation POST Creates a new annotation.
    URI: /annotations/annotations
    Response type: application/vnd.sas.annotation
    Collection Resources

    Path: /annotations

    This API provides collections of annotations.

    Members of the /annotations collection are annotation definitions, /annotations/{annotationId}. (See below.)

    Relation Method Description
    create POST Adds a new annotation to the collection.
    URI: /annotations
    This is present on only the /annotations collection and if the user has CREATE permission.
    Request type: application/vnd.sas.annotation
    Response type: application/vnd.sas.annotation
    self GET Returns the current page from the collection.
    collection GET Returns the first page of the collection with no sorting or filtering criteria.
    prev GET Returns the previous page of resources from the collection. This link is omitted if the current view is on the first page.
    next GET Returns the next page of resources from the collection. This link is omitted if the current view is on the last page of the collection.
    first GET Returns the first page of resources from the collection. This link is omitted if the current view is on the first page.
    last GET Returns the last page of resources from the collection. This link is omitted if the current view is on the last page.

    Path: /annotations/{annotationId}/members

    This API provides collections of Members.

    Members of the /annotations/{annotationId}/members collection are Member definitions. (See below.)

    Relation Method Description
    create POST Associates a new member with the annotation.
    URI: /annotations/{annotationId}/members
    This is present on only the /annotations/{annotationId}/members collection and if the user has CREATE permission.
    Request type: application/vnd.sas.annotation.member
    Response type: application/vnd.sas.annotation.member
    self GET Returns the current page from the collection.
    collection GET Returns the first page of the collection with no sorting or filtering criteria.
    prev GET Returns the previous page of resources from the collection. This link is omitted if the current view is on the first page.
    next GET Returns the next page of resources from the collection. This link is omitted if the current view is on the last page of the collection.
    first GET Returns the first page of resources from the collection. This link is omitted if the current view is on the first page.
    last GET Returns the last page of resources from the collection. This link is omitted if the current view is on the last page.
    Pagination, Sorting, and Filtering

    The methods in this API that operate on a collection of annotations support these features.

    Here are some sample filter query strings.

    You can specify an optional ?resourceId parameter to query annotations that are associated with one or more resourceIds--for example:

    Single Item Resources

    Path: /annotations/{annotationId}

    A specific annotation.

    Relation Method Description
    self GET Returns an annotation.
    update PUT Updates an annotation.
    delete DELETE Deletes an annotation.

    Path: /annotations/{annotationId}/members/{memberId}

    A specific annotation member.

    Relation Method Description
    self GET Returns a member.
    update PUT Updates a member.
    delete DELETE Deletes a member.
    Deletion Behavior

    When an annotation is deleted, the annotation and all of its existing members are deleted.

    Authorization Behavior

    All authenticated users have READ access to annotations by default. Only authorized and authenticated users have permission to create, update, or delete an annotation. Other SAS services and applications are authorized to load annotations using the bootstrap mechanism.

    Authorization

    Base URLs:

    Email: SAS Developers Web: SAS Developers

    Scroll down for code samples, example requests and responses. Select a language for code samples from the tabs above or the mobile navigation menu.

    Manages authorization rules and makes authorization decisions.

    Usage Notes

    Overview

    The Authorization API encapsulates all activities that affect access to system functions and resources.

    Here is a summary of the functional scope of this API:

    For background information, see General Authorization: Concepts.

    Security

    The Authorization API automatically protects any endpoints of any API that includes dependencies on it. This dependency intercepts calls to the endpoints and builds an authorization context, which is then sent to the Authorization API for evaluation. If the context is granted permission to perform the request action on that endpoint, it returns an HTTP status code of 200 and allows the request to proceed. If the context is prohibited, it returns an HTTP status code of 403 and the request does not continue further. This access is controlled by authorization rules that can be created through bootstrapping, by an administrative user, or by other methods.

    Terminology

    authorization

    the process by which a set of principals is evaluated against defined rules and a requested action to determine whether the user can perform the action.

    authorization context

    information about an authorization request (for example, a target URI, the HTTP headers and verb, the requestor's group memberships, or the time of the request).

    condition

    a logical Spring Expression Language (SpEL) expression that evaluates to either true or false. A rule that includes a condition applies only when the condition is true. For example, you can use a condition to make a rule applicable to only to the creator of an object.

    container

    an object that logically contains the URI of one or more member objects. In parent-child relationship between objects, a container represents a parent.

    decision

    a yes or no answer to an authorization request to perform a particular action. Each authorization decision is based on a specific authorization context.

    permission

    a specific action that a rule affects (for example: read, update, delete, create, secure, add, or remove).

    principal

    an entity that represents an individual user or a group.

    rule

    an action or set of actions that is either permitted or prohibited for a given principal or set of principals. A rule can include a condition that limits the circumstances under which the rule applies.

    share

    a simplified abstraction of an authorization rule. Each share identifies a target object (resource), a recipient (principal), and a level of access (type). Each share is backed by a corresponding authorization rule. Shares can help users easily make resources available to each other.

    Error Codes

    HTTP Status Code Error Code Description
    400 12600 The patch 'test' operation failed.

    Operations

    Rules

    Contains operations that create and manage authorization rules.

    Get authorization rules

    Code samples

    # You can also use wget
    curl -X GET https://www.example.com/authorization/rules \
      -H 'Accept: application/vnd.sas.collection+json' \
      -H 'Accept-Item: string'
    
    
    
    const headers = {
      'Accept':'application/vnd.sas.collection+json',
      'Accept-Item':'string'
    };
    
    fetch('https://www.example.com/authorization/rules',
    {
      method: 'GET',
    
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    import requests
    headers = {
      'Accept': 'application/vnd.sas.collection+json',
      'Accept-Item': 'string'
    }
    
    r = requests.get('https://www.example.com/authorization/rules', headers = headers)
    
    print(r.json())
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Accept": []string{"application/vnd.sas.collection+json"},
            "Accept-Item": []string{"string"},
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("GET", "https://www.example.com/authorization/rules", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    

    GET /rules

    Retrieves some or all authorization rules, with or without paging.

    Parameters
    Name In Type Required Description
    start query integer false The index number for the first rule in a page. default: 0
    limit query integer false The maximum number of rules to return per page.
    filter query string(filter-criteria) false Constraints on which rules to retrieve. Here are the supported filters and criteria:
    • principal (eq, ne, startsWith, endsWith, contains)
    • type (eq, ne)
    • principalType (eq, ne)
    • permissions (in)
    • objectUri (eq, ne, startsWith, endsWith, contains)
    • containerUri (eq, ne, startsWith, endsWith, contains)
    • mediaType (eq, ne, startsWith, endsWith, contains)
    • enabled (eq, ne)
    sortBy query string(sort-criteria) false Instructions for sorting the retrieved rules. You can sort by name or description in ascending or descending order.
    Accept-Item header string false If provided, returns the items in the requested format. Supported media types are:
    • application/vnd.sas.authorization.rule+json;version=1
    • application/vnd.sas.authorization.rule+json;version=2
    • application/vnd.sas.authorization.rule+json;version=3
    • application/vnd.sas.authorization.rule+json;version=4
    • application/vnd.sas.authorization.rule+json;version=5
    • application/vnd.sas.authorization.rule+json;version=6
    • application/vnd.sas.authorization.rule+json;version=7
    • application/vnd.sas.authorization.rule+json;version=8
    • application/vnd.sas.authorization.rule+json;version=9
    • application/vnd.sas.authorization.rule+json;version=10

    Example responses

    200 Response

    {
      "name": "string",
      "start": 0,
      "limit": 0,
      "count": 0,
      "accept": "string",
      "links": [
        {
          "method": "string",
          "rel": "string",
          "uri": "string",
          "href": "string",
          "title": "string",
          "type": "string",
          "itemType": "string",
          "responseType": "string",
          "responseItemType": "string"
        }
      ],
      "version": 0,
      "items": [
        {
          "condition": "string",
          "containerUri": "string",
          "expirationTimeStamp": "2019-08-24T14:15:22Z",
          "filter": "string",
          "contentType": "string",
          "acceptType": "string",
          "acceptItemType": "string",
          "objectUri": "string",
          "permissions": [
            "add"
          ],
          "principal": "string",
          "principalType": "user",
          "reason": "string",
          "type": "grant",
          "version": 0,
          "description": "string",
          "enabled": true,
          "matchParams": false,
          "links": [
            {
              "method": "string",
              "rel": "string",
              "uri": "string",
              "href": "string",
              "title": "string",
              "type": "string",
              "itemType": "string",
              "responseType": "string",
              "responseItemType": "string"
            }
          ],
          "ruleId": "string",
          "createdBy": "string",
          "creationTimeStamp": "2019-08-24T14:15:22Z",
          "modifiedBy": "string",
          "modifiedTimeStamp": "2019-08-24T14:15:22Z"
        }
      ]
    }
    
    Responses
    Status Meaning Description Schema
    200 OK The request succeeded. savedAuthorizationRuleCollection
    400 Bad Request The request was invalid. Returned if any query criteria (sortBy, filter, limit, start) are invalid. None

    Create a new authorization rule

    Code samples

    # You can also use wget
    curl -X POST https://www.example.com/authorization/rules \
      -H 'Content-Type: application/vnd.sas.authorization.rule+json' \
      -H 'Accept: application/vnd.sas.authorization.rule+json' \
      -H 'Content-Type: string' \
      -H 'Accept: string'
    
    
    const inputBody = '{
      "condition": "string",
      "containerUri": "string",
      "expirationTimeStamp": "2019-08-24T14:15:22Z",
      "filter": "string",
      "contentType": "string",
      "acceptType": "string",
      "acceptItemType": "string",
      "objectUri": "string",
      "permissions": [
        "add"
      ],
      "principal": "string",
      "principalType": "user",
      "reason": "string",
      "type": "grant",
      "version": 0,
      "description": "string",
      "enabled": true,
      "matchParams": false,
      "links": [
        {
          "method": "string",
          "rel": "string",
          "uri": "string",
          "href": "string",
          "title": "string",
          "type": "string",
          "itemType": "string",
          "responseType": "string",
          "responseItemType": "string"
        }
      ]
    }';
    const headers = {
      'Content-Type':'application/vnd.sas.authorization.rule+json',
      'Accept':'application/vnd.sas.authorization.rule+json',
      'Content-Type':'string',
      'Accept':'string'
    };
    
    fetch('https://www.example.com/authorization/rules',
    {
      method: 'POST',
      body: inputBody,
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    import requests
    headers = {
      'Content-Type': 'application/vnd.sas.authorization.rule+json',
      'Accept': 'application/vnd.sas.authorization.rule+json',
      'Content-Type': 'string',
      'Accept': 'string'
    }
    
    r = requests.post('https://www.example.com/authorization/rules', headers = headers)
    
    print(r.json())
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Content-Type": []string{"application/vnd.sas.authorization.rule+json"},
            "Accept": []string{"application/vnd.sas.authorization.rule+json"},
            "Content-Type": []string{"string"},
            "Accept": []string{"string"},
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("POST", "https://www.example.com/authorization/rules", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    

    POST /rules

    Creates a new authorization rule that has a system-generated ID.

    Body parameter

    {
      "condition": "string",
      "containerUri": "string",
      "expirationTimeStamp": "2019-08-24T14:15:22Z",
      "filter": "string",
      "contentType": "string",
      "acceptType": "string",
      "acceptItemType": "string",
      "objectUri": "string",
      "permissions": [
        "add"
      ],
      "principal": "string",
      "principalType": "user",
      "reason": "string",
      "type": "grant",
      "version": 0,
      "description": "string",
      "enabled": true,
      "matchParams": false,
      "links": [
        {
          "method": "string",
          "rel": "string",
          "uri": "string",
          "href": "string",
          "title": "string",
          "type": "string",
          "itemType": "string",
          "responseType": "string",
          "responseItemType": "string"
        }
      ]
    }
    
    Parameters
    Name In Type Required Description
    Content-Type header string false Specifies the format of the incoming rule. Supported media types are:
    • application/vnd.sas.authorization.rule+json;version=1
    • application/vnd.sas.authorization.rule+json;version=2
    • application/vnd.sas.authorization.rule+json;version=3
    • application/vnd.sas.authorization.rule+json;version=4
    • application/vnd.sas.authorization.rule+json;version=5
    • application/vnd.sas.authorization.rule+json;version=6
    • application/vnd.sas.authorization.rule+json;version=7
    • application/vnd.sas.authorization.rule+json;version=8
    • application/vnd.sas.authorization.rule+json;version=9
    • application/vnd.sas.authorization.rule+json;version=10
    Accept header string false Specifies the desired format of the returned rule. Supported media types are:
    • application/vnd.sas.authorization.rule+json;version=1
    • application/vnd.sas.authorization.rule+json;version=2
    • application/vnd.sas.authorization.rule+json;version=3
    • application/vnd.sas.authorization.rule+json;version=4
    • application/vnd.sas.authorization.rule+json;version=5
    • application/vnd.sas.authorization.rule+json;version=6
    • application/vnd.sas.authorization.rule+json;version=7
    • application/vnd.sas.authorization.rule+json;version=8
    • application/vnd.sas.authorization.rule+json;version=9
    • application/vnd.sas.authorization.rule+json;version=10
    body body authorizationRule true The properties of the new rule.

    Example responses

    201 Response

    {
      "condition": "string",
      "containerUri": "string",
      "expirationTimeStamp": "2019-08-24T14:15:22Z",
      "filter": "string",
      "contentType": "string",
      "acceptType": "string",
      "acceptItemType": "string",
      "objectUri": "string",
      "permissions": [
        "add"
      ],
      "principal": "string",
      "principalType": "user",
      "reason": "string",
      "type": "grant",
      "version": 0,
      "description": "string",
      "enabled": true,
      "matchParams": false,
      "links": [
        {
          "method": "string",
          "rel": "string",
          "uri": "string",
          "href": "string",
          "title": "string",
          "type": "string",
          "itemType": "string",
          "responseType": "string",
          "responseItemType": "string"
        }
      ],
      "ruleId": "string",
      "createdBy": "string",
      "creationTimeStamp": "2019-08-24T14:15:22Z",
      "modifiedBy": "string",
      "modifiedTimeStamp": "2019-08-24T14:15:22Z"
    }
    
    Responses
    Status Meaning Description Schema
    201 Created A new authorization rule was created. savedAuthorizationRule
    400 Bad Request The request was invalid. Returned if the specified authorization rule is invalid. None
    Response Headers
    Status Header Type Format Description
    201 Content-Type string Type of returned content.
    201 Last-Modified string Timestamp of when rule was last modified.
    201 Location string Relative URI of the rule's path.
    201 ETag string The entity tag for the rule.

    Patch authorization rules

    Code samples

    # You can also use wget
    curl -X PATCH https://www.example.com/authorization/rules \
      -H 'Content-Type: application/json-patch+json' \
      -H 'Accept: application/vnd.sas.collection+json'
    
    
    const inputBody = '[
      {
        "value": {
          "condition": "string",
          "containerUri": "string",
          "expirationTimeStamp": "2019-08-24T14:15:22Z",
          "filter": "string",
          "contentType": "string",
          "acceptType": "string",
          "acceptItemType": "string",
          "objectUri": "string",
          "permissions": [
            "add"
          ],
          "principal": "string",
          "principalType": "user",
          "reason": "string",
          "type": "grant",
          "version": 0,
          "description": "string",
          "enabled": true,
          "matchParams": false,
          "links": [
            {
              "method": "string",
              "rel": "string",
              "uri": "string",
              "href": "string",
              "title": "string",
              "type": "string",
              "itemType": "string",
              "responseType": "string",
              "responseItemType": "string"
            }
          ]
        },
        "op": "add",
        "path": null
      }
    ]';
    const headers = {
      'Content-Type':'application/json-patch+json',
      'Accept':'application/vnd.sas.collection+json'
    };
    
    fetch('https://www.example.com/authorization/rules',
    {
      method: 'PATCH',
      body: inputBody,
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    import requests
    headers = {
      'Content-Type': 'application/json-patch+json',
      'Accept': 'application/vnd.sas.collection+json'
    }
    
    r = requests.patch('https://www.example.com/authorization/rules', headers = headers)
    
    print(r.json())
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Content-Type": []string{"application/json-patch+json"},
            "Accept": []string{"application/vnd.sas.collection+json"},
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("PATCH", "https://www.example.com/authorization/rules", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    

    PATCH /rules

    Performs a set of rule management actions as specified in a JSON patch. The actions are performed synchronously and transactionally. A resource collection of all created and revised rules is returned. If the patch is not successfully applied, changes are rolled back.

    For every action, the patch must specify an operation (add, replace, remove, test, or copy) and a target URI (for example, /authorization/rules/{ruleId} or, to create a new rule, /authorization/rules). Each add and replace operation requires a valid rule representation. Each copy operation requires a 'from' URI that identifies the original rule.

    You cannot save duplicate rules, so a patch that includes a copy operation must also include an operation that modifies or deletes either the original rule or the new rule.

    You can combine operations to migrate existing rules. For example, you might copy a rule, then update the new rule (using the 'replace' operation), and then delete the original rule.

    New rules that do not yet have known rule IDs are added to a zero-indexed ordered list. To reference such rules, use the substitution token @CREATED#@ (where '#' is the index of the target rule).

    Body parameter

    [
      {
        "value": {
          "condition": "string",
          "containerUri": "string",
          "expirationTimeStamp": "2019-08-24T14:15:22Z",
          "filter": "string",
          "contentType": "string",
          "acceptType": "string",
          "acceptItemType": "string",
          "objectUri": "string",
          "permissions": [
            "add"
          ],
          "principal": "string",
          "principalType": "user",
          "reason": "string",
          "type": "grant",
          "version": 0,
          "description": "string",
          "enabled": true,
          "matchParams": false,
          "links": [
            {
              "method": "string",
              "rel": "string",
              "uri": "string",
              "href": "string",
              "title": "string",
              "type": "string",
              "itemType": "string",
              "responseType": "string",
              "responseItemType": "string"
            }
          ]
        },
        "op": "add",
        "path": null
      }
    ]
    
    Parameters
    Name In Type Required Description
    body body rulePatchOperation true JSON patch describing operations to perform and identifying the target rules.

    Example responses

    200 Response

    {
      "state": "pending",
      "actions": [
        {
          "rule": {
            "condition": "string",
            "containerUri": "string",
            "expirationTimeStamp": "2019-08-24T14:15:22Z",
            "filter": "string",
            "contentType": "string",
            "acceptType": "string",
            "acceptItemType": "string",
            "objectUri": "string",
            "permissions": [
              "add"
            ],
            "principal": "string",
            "principalType": "user",
            "reason": "string",
            "type": "grant",
            "version": 0,
            "description": "string",
            "enabled": true,
            "matchParams": false,
            "links": [
              {
                "method": "string",
                "rel": "string",
                "uri": "string",
                "href": "string",
                "title": "string",
                "type": "string",
                "itemType": "string",
                "responseType": "string",
                "responseItemType": "string"
              }
            ]
          },
          "type": "create",
          "status": "pending"
        }
      ],
      "links": [
        {
          "method": "string",
          "rel": "string",
          "uri": "string",
          "href": "string",
          "title": "string",
          "type": "string",
          "itemType": "string",
          "responseType": "string",
          "responseItemType": "string"
        }
      ]
    }
    
    Responses
    Status Meaning Description Schema
    200 OK The request succeeded. Returned if the patch was applied successfully. ruleJob
    400 Bad Request The request was invalid. Returned if the specified rule patch is invalid. error2
    422 Unprocessable Entity Returned if the patch request is syntactically valid but would result in a resource state that is inconsistent or invalid. error2

    Delete an authorization rule

    Code samples

    # You can also use wget
    curl -X DELETE https://www.example.com/authorization/rules/{ruleId}
    
    
    
    fetch('https://www.example.com/authorization/rules/{ruleId}',
    {
      method: 'DELETE'
    
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    import requests
    
    r = requests.delete('https://www.example.com/authorization/rules/{ruleId}')
    
    print(r.json())
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("DELETE", "https://www.example.com/authorization/rules/{ruleId}", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    

    DELETE /rules/{ruleId}

    Deletes a specified authorization rule.

    Parameters
    Name In Type Required Description
    ruleId path string true The ID of the rule to delete.
    Responses
    Status Meaning Description Schema
    204 No Content The authorization rule was deleted. None
    404 Not Found No authorization rule with the specified ID was found. None

    Get an authorization rule

    Code samples

    # You can also use wget
    curl -X GET https://www.example.com/authorization/rules/{ruleId} \
      -H 'Accept: application/vnd.sas.authorization.rule+json'
    
    
    
    const headers = {
      'Accept':'application/vnd.sas.authorization.rule+json'
    };
    
    fetch('https://www.example.com/authorization/rules/{ruleId}',
    {
      method: 'GET',
    
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    import requests
    headers = {
      'Accept': 'application/vnd.sas.authorization.rule+json'
    }
    
    r = requests.get('https://www.example.com/authorization/rules/{ruleId}', headers = headers)
    
    print(r.json())
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Accept": []string{"application/vnd.sas.authorization.rule+json"},
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("GET", "https://www.example.com/authorization/rules/{ruleId}", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    

    GET /rules/{ruleId}

    Retrieves a specified authorization rule.

    Parameters
    Name In Type Required Description
    ruleId path string true The ID of the rule to retrieve.

    Example responses

    200 Response

    {
      "condition": "string",
      "containerUri": "string",
      "expirationTimeStamp": "2019-08-24T14:15:22Z",
      "filter": "string",
      "contentType": "string",
      "acceptType": "string",
      "acceptItemType": "string",
      "objectUri": "string",
      "permissions": [
        "add"
      ],
      "principal": "string",
      "principalType": "user",
      "reason": "string",
      "type": "grant",
      "version": 0,
      "description": "string",
      "enabled": true,
      "matchParams": false,
      "links": [
        {
          "method": "string",
          "rel": "string",
          "uri": "string",
          "href": "string",
          "title": "string",
          "type": "string",
          "itemType": "string",
          "responseType": "string",
          "responseItemType": "string"
        }
      ],
      "ruleId": "string",
      "createdBy": "string",
      "creationTimeStamp": "2019-08-24T14:15:22Z",
      "modifiedBy": "string",
      "modifiedTimeStamp": "2019-08-24T14:15:22Z"
    }
    
    Responses
    Status Meaning Description Schema
    200 OK The request succeeded. savedAuthorizationRule
    404 Not Found No authorization rule with the specified ID was found. None
    Response Headers
    Status Header Type Format Description
    200 Content-Type string Type of returned content.
    200 Last-Modified string Timestamp of when rule was last modified.
    200 Location string Relative URI of the rule's path.
    200 ETag string The entity tag for the rule.

    Update or create an authorization rule

    Code samples

    # You can also use wget
    curl -X PUT https://www.example.com/authorization/rules/{ruleId} \
      -H 'Content-Type: application/vnd.sas.authorization.rule+json' \
      -H 'Accept: application/vnd.sas.authorization.rule+json' \
      -H 'If-Match: string'
    
    
    const inputBody = '{
      "condition": "string",
      "containerUri": "string",
      "expirationTimeStamp": "2019-08-24T14:15:22Z",
      "filter": "string",
      "contentType": "string",
      "acceptType": "string",
      "acceptItemType": "string",
      "objectUri": "string",
      "permissions": [
        "add"
      ],
      "principal": "string",
      "principalType": "user",
      "reason": "string",
      "type": "grant",
      "version": 0,
      "description": "string",
      "enabled": true,
      "matchParams": false,
      "links": [
        {
          "method": "string",
          "rel": "string",
          "uri": "string",
          "href": "string",
          "title": "string",
          "type": "string",
          "itemType": "string",
          "responseType": "string",
          "responseItemType": "string"
        }
      ],
      "ruleId": "string"
    }';
    const headers = {
      'Content-Type':'application/vnd.sas.authorization.rule+json',
      'Accept':'application/vnd.sas.authorization.rule+json',
      'If-Match':'string'
    };
    
    fetch('https://www.example.com/authorization/rules/{ruleId}',
    {
      method: 'PUT',
      body: inputBody,
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    import requests
    headers = {
      'Content-Type': 'application/vnd.sas.authorization.rule+json',
      'Accept': 'application/vnd.sas.authorization.rule+json',
      'If-Match': 'string'
    }
    
    r = requests.put('https://www.example.com/authorization/rules/{ruleId}', headers = headers)
    
    print(r.json())
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Content-Type": []string{"application/vnd.sas.authorization.rule+json"},
            "Accept": []string{"application/vnd.sas.authorization.rule+json"},
            "If-Match": []string{"string"},
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("PUT", "https://www.example.com/authorization/rules/{ruleId}", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    

    PUT /rules/{ruleId}

    Updates an authorization rule by completely replacing it with specified values. Or, if there is no rule that has the specified ID, creates a new rule using that ID.

    Body parameter

    {
      "condition": "string",
      "containerUri": "string",
      "expirationTimeStamp": "2019-08-24T14:15:22Z",
      "filter": "string",
      "contentType": "string",
      "acceptType": "string",
      "acceptItemType": "string",
      "objectUri": "string",
      "permissions": [
        "add"
      ],
      "principal": "string",
      "principalType": "user",
      "reason": "string",
      "type": "grant",
      "version": 0,
      "description": "string",
      "enabled": true,
      "matchParams": false,
      "links": [
        {
          "method": "string",
          "rel": "string",
          "uri": "string",
          "href": "string",
          "title": "string",
          "type": "string",
          "itemType": "string",
          "responseType": "string",
          "responseItemType": "string"
        }
      ],
      "ruleId": "string"
    }
    
    Parameters
    Name In Type Required Description
    ruleId path string true The ID of the rule to update or create.
    If-Match header string true The entity tag obtained from the most recent ETag response header. Must match the current entity tag for the rule.
    body body identifiableAuthorizationRule true The properties of the rule.

    Example responses

    200 Response

    {
      "condition": "string",
      "containerUri": "string",
      "expirationTimeStamp": "2019-08-24T14:15:22Z",
      "filter": "string",
      "contentType": "string",
      "acceptType": "string",
      "acceptItemType": "string",
      "objectUri": "string",
      "permissions": [
        "add"
      ],
      "principal": "string",
      "principalType": "user",
      "reason": "string",
      "type": "grant",
      "version": 0,
      "description": "string",
      "enabled": true,
      "matchParams": false,
      "links": [
        {
          "method": "string",
          "rel": "string",
          "uri": "string",
          "href": "string",
          "title": "string",
          "type": "string",
          "itemType": "string",
          "responseType": "string",
          "responseItemType": "string"
        }
      ],
      "ruleId": "string",
      "createdBy": "string",
      "creationTimeStamp": "2019-08-24T14:15:22Z",
      "modifiedBy": "string",
      "modifiedTimeStamp": "2019-08-24T14:15:22Z"
    }
    
    Responses
    Status Meaning Description Schema
    200 OK The object was updated. savedAuthorizationRule
    201 Created A new authorization rule was created. savedAuthorizationRule
    400 Bad Request The request was invalid. Returned if the format of the request does not match the schema for the media type used. Also can be returned if the ID passed in the request payload does not match the ID in the URI. None
    412 Precondition Failed The If-Match request header did not match the resource's entity tag. error2
    Response Headers
    Status Header Type Format Description
    200 ETag string The entity tag for the rule.
    201 Location string Relative URI of the rule's path.
    201 ETag string The entity tag for the rule.

    Create a rule job

    Code samples

    # You can also use wget
    curl -X POST https://www.example.com/authorization/rules/jobs \
      -H 'Content-Type: application/vnd.sas.authorization.rule.job+json' \
      -H 'Accept: application/vnd.sas.authorization.rule.job+json' \
      -H 'Accept: string' \
      -H 'Content-Type: string'
    
    
    const inputBody = '{
      "state": "pending",
      "actions": [
        {
          "rule": {
            "condition": "string",
            "containerUri": "string",
            "expirationTimeStamp": "2019-08-24T14:15:22Z",
            "filter": "string",
            "contentType": "string",
            "acceptType": "string",
            "acceptItemType": "string",
            "objectUri": "string",
            "permissions": [
              "add"
            ],
            "principal": "string",
            "principalType": "user",
            "reason": "string",
            "type": "grant",
            "version": 0,
            "description": "string",
            "enabled": true,
            "matchParams": false,
            "links": [
              {
                "method": "string",
                "rel": "string",
                "uri": "string",
                "href": "string",
                "title": "string",
                "type": "string",
                "itemType": "string",
                "responseType": "string",
                "responseItemType": "string"
              }
            ]
          },
          "type": "create",
          "status": "pending"
        }
      ],
      "links": [
        {
          "method": "string",
          "rel": "string",
          "uri": "string",
          "href": "string",
          "title": "string",
          "type": "string",
          "itemType": "string",
          "responseType": "string",
          "responseItemType": "string"
        }
      ]
    }';
    const headers = {
      'Content-Type':'application/vnd.sas.authorization.rule.job+json',
      'Accept':'application/vnd.sas.authorization.rule.job+json',
      'Accept':'string',
      'Content-Type':'string'
    };
    
    fetch('https://www.example.com/authorization/rules/jobs',
    {
      method: 'POST',
      body: inputBody,
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    import requests
    headers = {
      'Content-Type': 'application/vnd.sas.authorization.rule.job+json',
      'Accept': 'application/vnd.sas.authorization.rule.job+json',
      'Accept': 'string',
      'Content-Type': 'string'
    }
    
    r = requests.post('https://www.example.com/authorization/rules/jobs', headers = headers)
    
    print(r.json())
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Content-Type": []string{"application/vnd.sas.authorization.rule.job+json"},
            "Accept": []string{"application/vnd.sas.authorization.rule.job+json"},
            "Accept": []string{"string"},
            "Content-Type": []string{"string"},
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("POST", "https://www.example.com/authorization/rules/jobs", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    

    POST /rules/jobs

    Creates an asynchronous job that performs one or more rule management actions (such as creating, updating, and deleting authorization rules. Each update and delete action must specify the rule ID for an existing rule. All actions are performed in a single request. The request returns a vnd.sas.authorization.rule.job that contains a 'self' and 'ruleJobState' links that can be used to retrieve the entire job or to check the current state of the running job.

    Body parameter

    {
      "state": "pending",
      "actions": [
        {
          "rule": {
            "condition": "string",
            "containerUri": "string",
            "expirationTimeStamp": "2019-08-24T14:15:22Z",
            "filter": "string",
            "contentType": "string",
            "acceptType": "string",
            "acceptItemType": "string",
            "objectUri": "string",
            "permissions": [
              "add"
            ],
            "principal": "string",
            "principalType": "user",
            "reason": "string",
            "type": "grant",
            "version": 0,
            "description": "string",
            "enabled": true,
            "matchParams": false,
            "links": [
              {
                "method": "string",
                "rel": "string",
                "uri": "string",
                "href": "string",
                "title": "string",
                "type": "string",
                "itemType": "string",
                "responseType": "string",
                "responseItemType": "string"
              }
            ]
          },
          "type": "create",
          "status": "pending"
        }
      ],
      "links": [
        {
          "method": "string",
          "rel": "string",
          "uri": "string",
          "href": "string",
          "title": "string",
          "type": "string",
          "itemType": "string",
          "responseType": "string",
          "responseItemType": "string"
        }
      ]
    }
    
    Parameters
    Name In Type Required Description
    Accept header string false Specifies the desired format of the returned rule job. Supported media types are:
    • application/json
    • application/vnd.sas.authorization.rule.job+json
    • application/vnd.sas.authorization.rule.job+json;version=1
    • application/vnd.sas.authorization.rule.job+json;version=2
    Content-Type header string false Specifies the format of the incoming rule job. Supported media types are:
    • application/json
    • application/vnd.sas.authorization.rule.job+json
    • application/vnd.sas.authorization.rule.job+json;version=1
    • application/vnd.sas.authorization.rule.job+json;version=2
    body body ruleJob true Instructions to create, update, and delete specified rules.

    Example responses

    202 Response

    {
      "state": "pending",
      "actions": [
        {
          "rule": {
            "condition": "string",
            "containerUri": "string",
            "expirationTimeStamp": "2019-08-24T14:15:22Z",
            "filter": "string",
            "contentType": "string",
            "acceptType": "string",
            "acceptItemType": "string",
            "objectUri": "string",
            "permissions": [
              "add"
            ],
            "principal": "string",
            "principalType": "user",
            "reason": "string",
            "type": "grant",
            "version": 0,
            "description": "string",
            "enabled": true,
            "matchParams": false,
            "links": [
              {
                "method": "string",
                "rel": "string",
                "uri": "string",
                "href": "string",
                "title": "string",
                "type": "string",
                "itemType": "string",
                "responseType": "string",
                "responseItemType": "string"
              }
            ]
          },
          "type": "create",
          "status": "pending"
        }
      ],
      "links": [
        {
          "method": "string",
          "rel": "string",
          "uri": "string",
          "href": "string",
          "title": "string",
          "type": "string",
          "itemType": "string",
          "responseType": "string",
          "responseItemType": "string"
        }
      ]
    }
    
    Responses
    Status Meaning Description Schema
    202 Accepted Accepted. Returned if the rule job is created. ruleJob
    400 Bad Request The request was invalid. Returned if the specified rule job is invalid. error2
    Response Headers
    Status Header Type Format Description
    202 Location string Relative URI of the rule job's path.
    202 Content-Type string Content type of the returned object.

    Get information about a rule job

    Code samples

    # You can also use wget
    curl -X GET https://www.example.com/authorization/rules/jobs/{jobId} \
      -H 'Accept: application/vnd.sas.authorization.rule.job+json'
    
    
    
    const headers = {
      'Accept':'application/vnd.sas.authorization.rule.job+json'
    };
    
    fetch('https://www.example.com/authorization/rules/jobs/{jobId}',
    {
      method: 'GET',
    
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    import requests
    headers = {
      'Accept': 'application/vnd.sas.authorization.rule.job+json'
    }
    
    r = requests.get('https://www.example.com/authorization/rules/jobs/{jobId}', headers = headers)
    
    print(r.json())
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Accept": []string{"application/vnd.sas.authorization.rule.job+json"},
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("GET", "https://www.example.com/authorization/rules/jobs/{jobId}", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    

    GET /rules/jobs/{jobId}

    Retrieves descriptive information about a specified rule job.

    Parameters
    Name In Type Required Description
    jobId path string true The ID of the rule job.

    Example responses

    200 Response

    {
      "state": "pending",
      "actions": [
        {
          "rule": {
            "condition": "string",
            "containerUri": "string",
            "expirationTimeStamp": "2019-08-24T14:15:22Z",
            "filter": "string",
            "contentType": "string",
            "acceptType": "string",
            "acceptItemType": "string",
            "objectUri": "string",
            "permissions": [
              "add"
            ],
            "principal": "string",
            "principalType": "user",
            "reason": "string",
            "type": "grant",
            "version": 0,
            "description": "string",
            "enabled": true,
            "matchParams": false,
            "links": [
              {
                "method": "string",
                "rel": "string",
                "uri": "string",
                "href": "string",
                "title": "string",
                "type": "string",
                "itemType": "string",
                "responseType": "string",
                "responseItemType": "string"
              }
            ]
          },
          "type": "create",
          "status": "pending"
        }
      ],
      "links": [
        {
          "method": "string",
          "rel": "string",
          "uri": "string",
          "href": "string",
          "title": "string",
          "type": "string",
          "itemType": "string",
          "responseType": "string",
          "responseItemType": "string"
        }
      ]
    }
    
    Responses
    Status Meaning Description Schema
    200 OK The specified rule job exists. ruleJob
    404 Not Found No rule job with the specified ID was found. None

    Delete a rule job

    Code samples

    # You can also use wget
    curl -X DELETE https://www.example.com/authorization/rules/jobs/{jobId}
    
    
    
    fetch('https://www.example.com/authorization/rules/jobs/{jobId}',
    {
      method: 'DELETE'
    
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    import requests
    
    r = requests.delete('https://www.example.com/authorization/rules/jobs/{jobId}')
    
    print(r.json())
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("DELETE", "https://www.example.com/authorization/rules/jobs/{jobId}", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    

    DELETE /rules/jobs/{jobId}

    Deletes a specified rule job.

    Parameters
    Name In Type Required Description
    jobId path string true The ID of the rule job to delete.
    Responses
    Status Meaning Description Schema
    204 No Content The rule job was deleted. None
    404 Not Found No rule job with the specified ID was found. None

    Get the state of a rule job

    Code samples

    # You can also use wget
    curl -X GET https://www.example.com/authorization/rules/jobs/{jobId}/state \
      -H 'Accept: text/plain'
    
    
    
    const headers = {
      'Accept':'text/plain'
    };
    
    fetch('https://www.example.com/authorization/rules/jobs/{jobId}/state',
    {
      method: 'GET',
    
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    import requests
    headers = {
      'Accept': 'text/plain'
    }
    
    r = requests.get('https://www.example.com/authorization/rules/jobs/{jobId}/state', headers = headers)
    
    print(r.json())
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Accept": []string{"text/plain"},
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("GET", "https://www.example.com/authorization/rules/jobs/{jobId}/state", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    

    GET /rules/jobs/{jobId}/state

    Retrieves status information for a specified rule job.

    Parameters
    Name In Type Required Description
    jobId path string true The ID of the rule job.

    Example responses

    200 Response

    "pending"
    
    Responses
    Status Meaning Description Schema
    200 OK The rule job with the specified ID exists. The value of the response is the state of the overall job: pending, running, completed, completedWithErrors, or failed. string
    404 Not Found No rule job with the specified ID was found. None

    Validate the syntax of a specified rule condition

    Code samples

    # You can also use wget
    curl -X POST https://www.example.com/authorization/commons/validations/conditions \
      -H 'Content-Type: text/plain' \
      -H 'Accept: application/vnd.sas.validation+json'
    
    
    const inputBody = 'string';
    const headers = {
      'Content-Type':'text/plain',
      'Accept':'application/vnd.sas.validation+json'
    };
    
    fetch('https://www.example.com/authorization/commons/validations/conditions',
    {
      method: 'POST',
      body: inputBody,
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    import requests
    headers = {
      'Content-Type': 'text/plain',
      'Accept': 'application/vnd.sas.validation+json'
    }
    
    r = requests.post('https://www.example.com/authorization/commons/validations/conditions', headers = headers)
    
    print(r.json())
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Content-Type": []string{"text/plain"},
            "Accept": []string{"application/vnd.sas.validation+json"},
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("POST", "https://www.example.com/authorization/commons/validations/conditions", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    

    POST /commons/validations/conditions

    Determines whether a client-supplied string is a properly formatted Spring Expression Language (SpEL) expression.

    Body parameter

    "string"
    
    string
    
    
    Parameters
    Name In Type Required Description
    body body string true The string that constitutes a rule condition.

    Example responses

    200 Response

    {
      "version": 0,
      "valid": true,
      "error": {},
      "links": [
        {
          "method": "string",
          "rel": "string",
          "uri": "string",
          "href": "string",
          "title": "string",
          "type": "string",
          "itemType": "string",
          "responseType": "string",
          "responseItemType": "string"
        }
      ]
    }
    
    Responses
    Status Meaning Description Schema
    200 OK The request succeeded. validation
    400 Bad Request The request was invalid. errorResponse

    Validate a new rule

    Code samples

    # You can also use wget
    curl -X POST https://www.example.com/authorization/commons/validations/rules \
      -H 'Content-Type: application/vnd.sas.authorization.rule+json' \
      -H 'Accept: application/vnd.sas.validation+json'
    
    
    const inputBody = '{
      "condition": "string",
      "containerUri": "string",
      "expirationTimeStamp": "2019-08-24T14:15:22Z",
      "filter": "string",
      "contentType": "string",
      "acceptType": "string",
      "acceptItemType": "string",
      "objectUri": "string",
      "permissions": [
        "add"
      ],
      "principal": "string",
      "principalType": "user",
      "reason": "string",
      "type": "grant",
      "version": 0,
      "description": "string",
      "enabled": true,
      "matchParams": false,
      "links": [
        {
          "method": "string",
          "rel": "string",
          "uri": "string",
          "href": "string",
          "title": "string",
          "type": "string",
          "itemType": "string",
          "responseType": "string",
          "responseItemType": "string"
        }
      ]
    }';
    const headers = {
      'Content-Type':'application/vnd.sas.authorization.rule+json',
      'Accept':'application/vnd.sas.validation+json'
    };
    
    fetch('https://www.example.com/authorization/commons/validations/rules',
    {
      method: 'POST',
      body: inputBody,
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    import requests
    headers = {
      'Content-Type': 'application/vnd.sas.authorization.rule+json',
      'Accept': 'application/vnd.sas.validation+json'
    }
    
    r = requests.post('https://www.example.com/authorization/commons/validations/rules', headers = headers)
    
    print(r.json())
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Content-Type": []string{"application/vnd.sas.authorization.rule+json"},
            "Accept": []string{"application/vnd.sas.validation+json"},
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("POST", "https://www.example.com/authorization/commons/validations/rules", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    

    POST /commons/validations/rules

    Determines whether a new authorization rule meets completeness and uniqueness requirements.

    Body parameter

    {
      "condition": "string",
      "containerUri": "string",
      "expirationTimeStamp": "2019-08-24T14:15:22Z",
      "filter": "string",
      "contentType": "string",
      "acceptType": "string",
      "acceptItemType": "string",
      "objectUri": "string",
      "permissions": [
        "add"
      ],
      "principal": "string",
      "principalType": "user",
      "reason": "string",
      "type": "grant",
      "version": 0,
      "description": "string",
      "enabled": true,
      "matchParams": false,
      "links": [
        {
          "method": "string",
          "rel": "string",
          "uri": "string",
          "href": "string",
          "title": "string",
          "type": "string",
          "itemType": "string",
          "responseType": "string",
          "responseItemType": "string"
        }
      ]
    }
    
    Parameters
    Name In Type Required Description
    body body authorizationRule true The properties of the rule.

    Example responses

    200 Response

    {
      "version": 0,
      "valid": true,
      "error": {},
      "links": [
        {
          "method": "string",
          "rel": "string",
          "uri": "string",
          "href": "string",
          "title": "string",
          "type": "string",
          "itemType": "string",
          "responseType": "string",
          "responseItemType": "string"
        }
      ]
    }
    
    Responses
    Status Meaning Description Schema
    200 OK The request succeeded. validation
    400 Bad Request The request was invalid. errorResponse

    Validate an updated rule

    Code samples

    # You can also use wget
    curl -X PUT https://www.example.com/authorization/commons/validations/rules/{ruleId} \
      -H 'Content-Type: application/vnd.sas.authorization.rule+json' \
      -H 'Accept: application/vnd.sas.validation+json' \
      -H 'If-Match: string'
    
    
    const inputBody = '{
      "condition": "string",
      "containerUri": "string",
      "expirationTimeStamp": "2019-08-24T14:15:22Z",
      "filter": "string",
      "contentType": "string",
      "acceptType": "string",
      "acceptItemType": "string",
      "objectUri": "string",
      "permissions": [
        "add"
      ],
      "principal": "string",
      "principalType": "user",
      "reason": "string",
      "type": "grant",
      "version": 0,
      "description": "string",
      "enabled": true,
      "matchParams": false,
      "links": [
        {
          "method": "string",
          "rel": "string",
          "uri": "string",
          "href": "string",
          "title": "string",
          "type": "string",
          "itemType": "string",
          "responseType": "string",
          "responseItemType": "string"
        }
      ]
    }';
    const headers = {
      'Content-Type':'application/vnd.sas.authorization.rule+json',
      'Accept':'application/vnd.sas.validation+json',
      'If-Match':'string'
    };
    
    fetch('https://www.example.com/authorization/commons/validations/rules/{ruleId}',
    {
      method: 'PUT',
      body: inputBody,
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    import requests
    headers = {
      'Content-Type': 'application/vnd.sas.authorization.rule+json',
      'Accept': 'application/vnd.sas.validation+json',
      'If-Match': 'string'
    }
    
    r = requests.put('https://www.example.com/authorization/commons/validations/rules/{ruleId}', headers = headers)
    
    print(r.json())
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Content-Type": []string{"application/vnd.sas.authorization.rule+json"},
            "Accept": []string{"application/vnd.sas.validation+json"},
            "If-Match": []string{"string"},
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("PUT", "https://www.example.com/authorization/commons/validations/rules/{ruleId}", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    

    PUT /commons/validations/rules/{ruleId}

    Determines whether an updated authorization rule meets completeness and uniqueness requirements.

    Body parameter

    {
      "condition": "string",
      "containerUri": "string",
      "expirationTimeStamp": "2019-08-24T14:15:22Z",
      "filter": "string",
      "contentType": "string",
      "acceptType": "string",
      "acceptItemType": "string",
      "objectUri": "string",
      "permissions": [
        "add"
      ],
      "principal": "string",
      "principalType": "user",
      "reason": "string",
      "type": "grant",
      "version": 0,
      "description": "string",
      "enabled": true,
      "matchParams": false,
      "links": [
        {
          "method": "string",
          "rel": "string",
          "uri": "string",
          "href": "string",
          "title": "string",
          "type": "string",
          "itemType": "string",
          "responseType": "string",
          "responseItemType": "string"
        }
      ]
    }
    
    Parameters
    Name In Type Required Description
    ruleId path string true The ID of the updated rule.
    If-Match header string true The entity tag obtained from the most recent ETag response header. Must match the current entity tag for the rule.
    body body authorizationRule true The properties of the updated rule.

    Example responses

    200 Response

    {
      "version": 0,
      "valid": true,
      "error": {},
      "links": [
        {
          "method": "string",
          "rel": "string",
          "uri": "string",
          "href": "string",
          "title": "string",
          "type": "string",
          "itemType": "string",
          "responseType": "string",
          "responseItemType": "string"
        }
      ]
    }
    
    Responses
    Status Meaning Description Schema
    200 OK The request succeeded. validation
    400 Bad Request The request was invalid. errorResponse
    412 Precondition Failed The If-Match request header did not match the resource's entity tag. error2

    Verify that a specified rule exists

    Code samples

    # You can also use wget
    curl -X DELETE https://www.example.com/authorization/commons/validations/rules/{ruleId} \
      -H 'Accept: application/vnd.sas.validation+json'
    
    
    
    const headers = {
      'Accept':'application/vnd.sas.validation+json'
    };
    
    fetch('https://www.example.com/authorization/commons/validations/rules/{ruleId}',
    {
      method: 'DELETE',
    
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    import requests
    headers = {
      'Accept': 'application/vnd.sas.validation+json'
    }
    
    r = requests.delete('https://www.example.com/authorization/commons/validations/rules/{ruleId}', headers = headers)
    
    print(r.json())
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Accept": []string{"application/vnd.sas.validation+json"},
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("DELETE", "https://www.example.com/authorization/commons/validations/rules/{ruleId}", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    

    DELETE /commons/validations/rules/{ruleId}

    Determines whether a specified authorization rule exists.

    Parameters
    Name In Type Required Description
    ruleId path string true The ID of the rule.

    Example responses

    200 Response

    {
      "version": 0,
      "valid": true,
      "error": {},
      "links": [
        {
          "method": "string",
          "rel": "string",
          "uri": "string",
          "href": "string",
          "title": "string",
          "type": "string",
          "itemType": "string",
          "responseType": "string",
          "responseItemType": "string"
        }
      ]
    }
    
    Responses
    Status Meaning Description Schema
    200 OK The request succeeded. validation
    400 Bad Request The request was invalid. errorResponse

    Decisions

    Contains operations that make and explain authorization decisions.

    Obtain an authorization decision

    Code samples

    # You can also use wget
    curl -X POST https://www.example.com/authorization/decisions \
      -H 'Content-Type: application/vnd.sas.authorization.context+json' \
      -H 'Accept: application/vnd.sas.authorization.decision+json'
    
    
    const inputBody = '{
      "request": {
        "uri": "string",
        "method": "string",
        "queryString": "string",
        "parameters": {},
        "locale": "string",
        "headers": {},
        "contentLength": 0,
        "contentType": "string",
        "protocol": "string",
        "serverName": "string",
        "serverPort": 0,
        "serverIp": "string",
        "remoteHost": "string",
        "remoteIp": "string",
        "requestDate": 0,
        "timeStamp": "string"
      },
      "principals": [
        {
          "name": "string",
          "type": "user",
          "version": 0
        }
      ],
      "permission": "add",
      "parameters": {},
      "matchParams": false,
      "eachNamed": {},
      "version": 0
    }';
    const headers = {
      'Content-Type':'application/vnd.sas.authorization.context+json',
      'Accept':'application/vnd.sas.authorization.decision+json'
    };
    
    fetch('https://www.example.com/authorization/decisions',
    {
      method: 'POST',
      body: inputBody,
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    import requests
    headers = {
      'Content-Type': 'application/vnd.sas.authorization.context+json',
      'Accept': 'application/vnd.sas.authorization.decision+json'
    }
    
    r = requests.post('https://www.example.com/authorization/decisions', headers = headers)
    
    print(r.json())
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Content-Type": []string{"application/vnd.sas.authorization.context+json"},
            "Accept": []string{"application/vnd.sas.authorization.decision+json"},
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("POST", "https://www.example.com/authorization/decisions", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    

    POST /decisions

    Determines whether a specified principal is authorized to perform a specified action in a specified context. The response is either true (the action is authorized) or false (the action is not authorized).

    Body parameter

    {
      "request": {
        "uri": "string",
        "method": "string",
        "queryString": "string",
        "parameters": {},
        "locale": "string",
        "headers": {},
        "contentLength": 0,
        "contentType": "string",
        "protocol": "string",
        "serverName": "string",
        "serverPort": 0,
        "serverIp": "string",
        "remoteHost": "string",
        "remoteIp": "string",
        "requestDate": 0,
        "timeStamp": "string"
      },
      "principals": [
        {
          "name": "string",
          "type": "user",
          "version": 0
        }
      ],
      "permission": "add",
      "parameters": {},
      "matchParams": false,
      "eachNamed": {},
      "version": 0
    }
    
    Parameters
    Name In Type Required Description
    body body authorizationContext true The requested action and contextual details.

    Example responses

    200 Response

    true
    
    true
    
    Responses
    Status Meaning Description Schema
    200 OK Always returned if the request is successful and the request's Accept header is application/vnd.sas.authorization.direct.decision+json. However, if the Accept header is application/json or application/vnd.sas.authorization.direct.decision+json, 200 is returned only if the request is successful and the decision is true. boolean
    201 Created Always returned if the request is successful and the request's Accept header is text/plain string
    400 Bad Request The request was invalid. Returned if the authorization context is invalid. None
    403 Forbidden Returned if the request's Accept header is application/vnd.sas.authorization.decision+json or application/json and the request was completed successfully but the authorization decision is false. boolean

    Obtain authorization decisions with explanations

    Code samples

    # You can also use wget
    curl -X POST https://www.example.com/authorization/decisions#explanation \
      -H 'Content-Type: application/vnd.sas.selection+json' \
      -H 'Accept: application/vnd.sas.authorization.explanations+json'
    
    
    const inputBody = '{
      "version": 0,
      "template": "http://example.com",
      "type": "id",
      "resources": [
        "string"
      ],
      "links": [
        {
          "method": "string",
          "rel": "string",
          "uri": "string",
          "href": "string",
          "title": "string",
          "type": "string",
          "itemType": "string",
          "responseType": "string",
          "responseItemType": "string"
        }
      ]
    }';
    const headers = {
      'Content-Type':'application/vnd.sas.selection+json',
      'Accept':'application/vnd.sas.authorization.explanations+json'
    };
    
    fetch('https://www.example.com/authorization/decisions#explanation',
    {
      method: 'POST',
      body: inputBody,
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    import requests
    headers = {
      'Content-Type': 'application/vnd.sas.selection+json',
      'Accept': 'application/vnd.sas.authorization.explanations+json'
    }
    
    r = requests.post('https://www.example.com/authorization/decisions#explanation', headers = headers)
    
    print(r.json())
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Content-Type": []string{"application/vnd.sas.selection+json"},
            "Accept": []string{"application/vnd.sas.authorization.explanations+json"},
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("POST", "https://www.example.com/authorization/decisions#explanation", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    

    POST /decisions#explanation

    Provides authorization information for specified principals in a specified context. Each explanation identifies the rules that are relevant to a particular authorization decision and includes details (such as parent containment) if applicable. By default, explanations are provided for only principals to whom relevant authorization rules are directly assigned.

    Body parameter

    {
      "version": 0,
      "template": "http://example.com",
      "type": "id",
      "resources": [
        "string"
      ],
      "links": [
        {
          "method": "string",
          "rel": "string",
          "uri": "string",
          "href": "string",
          "title": "string",
          "type": "string",
          "itemType": "string",
          "responseType": "string",
          "responseItemType": "string"
        }
      ]
    }
    
    Parameters
    Name In Type Required Description
    additionalUser query array[string] false The ID of an additional user to include. You can specify this parameter multiple times.
    additionalGroup query array[string] false The ID of an additional group to include. You can specify this parameter multiple times.
    includeSystemAccounts query boolean false Whether to provide explanations for system accounts (such as sasapp and sas.ops-agentsrv).
    contentType query string false String to match rules' contentType against.
    acceptType query string false String to match rules' acceptType against.
    acceptItemType query string false String to match rules' acceptItemType against.
    includeShares query boolean false Whether to include explanations for shares.
    body body object true The resources for which explanations are requested. Only 'uri' type selections (relative object URIs) are supported.

    Example responses

    200 Response

    "{'/foo/123': [... explanation array ...], '/bar/123': [... explanation array ...]}"
    
    Responses
    Status Meaning Description Schema
    200 OK The request succeeded. explanations
    400 Bad Request The request was invalid. Returned if the format of the request does not match the schema for the media type used. None

    Obtain predictive authorization decisions

    Code samples

    # You can also use wget
    curl -X POST https://www.example.com/authorization/decisions#hypotheticalExplanation \
      -H 'Content-Type: application/vnd.sas.authorization.explanation.hypothetical+json' \
      -H 'Accept: application/vnd.sas.authorization.explanations+json'
    
    
    const inputBody = '{
      "version": 0,
      "patch": [
        {
          "value": {
            "condition": "string",
            "containerUri": "string",
            "expirationTimeStamp": "2019-08-24T14:15:22Z",
            "filter": "string",
            "contentType": "string",
            "acceptType": "string",
            "acceptItemType": "string",
            "objectUri": "string",
            "permissions": [
              "add"
            ],
            "principal": "string",
            "principalType": "user",
            "reason": "string",
            "type": "grant",
            "version": 0,
            "description": "string",
            "enabled": true,
            "matchParams": false,
            "links": [
              {
                "method": "string",
                "rel": "string",
                "uri": "string",
                "href": "string",
                "title": "string",
                "type": "string",
                "itemType": "string",
                "responseType": "string",
                "responseItemType": "string"
              }
            ]
          },
          "op": "add",
          "path": null
        }
      ],
      "uris": [
        "string"
      ]
    }';
    const headers = {
      'Content-Type':'application/vnd.sas.authorization.explanation.hypothetical+json',
      'Accept':'application/vnd.sas.authorization.explanations+json'
    };
    
    fetch('https://www.example.com/authorization/decisions#hypotheticalExplanation',
    {
      method: 'POST',
      body: inputBody,
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    import requests
    headers = {
      'Content-Type': 'application/vnd.sas.authorization.explanation.hypothetical+json',
      'Accept': 'application/vnd.sas.authorization.explanations+json'
    }
    
    r = requests.post('https://www.example.com/authorization/decisions#hypotheticalExplanation', headers = headers)
    
    print(r.json())
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Content-Type": []string{"application/vnd.sas.authorization.explanation.hypothetical+json"},
            "Accept": []string{"application/vnd.sas.authorization.explanations+json"},
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("POST", "https://www.example.com/authorization/decisions#hypotheticalExplanation", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    

    POST /decisions#hypotheticalExplanation

    Provides decisions and explanations that incorporate unsaved changes to authorization rules. A client enters an array of PATCH input that describes unsaved changes to authorization rules. The returned information is hypothetical in the sense that it reflects the effects of unsaved changes.

    Body parameter

    {
      "version": 0,
      "patch": [
        {
          "value": {
            "condition": "string",
            "containerUri": "string",
            "expirationTimeStamp": "2019-08-24T14:15:22Z",
            "filter": "string",
            "contentType": "string",
            "acceptType": "string",
            "acceptItemType": "string",
            "objectUri": "string",
            "permissions": [
              "add"
            ],
            "principal": "string",
            "principalType": "user",
            "reason": "string",
            "type": "grant",
            "version": 0,
            "description": "string",
            "enabled": true,
            "matchParams": false,
            "links": [
              {
                "method": "string",
                "rel": "string",
                "uri": "string",
                "href": "string",
                "title": "string",
                "type": "string",
                "itemType": "string",
                "responseType": "string",
                "responseItemType": "string"
              }
            ]
          },
          "op": "add",
          "path": null
        }
      ],
      "uris": [
        "string"
      ]
    }
    
    Parameters
    Name In Type Required Description
    additionalUser query array[string] false The ID of an additional user to include. You can specify this parameter multiple times.
    additionalGroup query array[string] false The ID of an additional group to include. You can specify this parameter multiple times.
    includeSystemAccounts query boolean false Whether to provide hypothetical explanations for system accounts (such as sasapp and sas.ops-agentsrv).
    contentType query string false String to match rules' contentType against.
    acceptType query string false String to match rules' acceptType against.
    acceptItemType query string false String to match rules' acceptItemType against.
    includeShares query boolean false Whether to include explanations for shares.
    body body hypothetical true A hypothetical object that consists of one or more URIs and one or more new rules.

    Example responses

    200 Response

    "{'/foo/123': [... explanation array ...], '/bar/123': [... explanation array ...]}"
    
    Responses
    Status Meaning Description Schema
    200 OK The request succeeded. explanations
    400 Bad Request The request was invalid. Returned if the format of the request does not match the schema for the media type used. None

    Obtain multiple authorization decisions

    Code samples

    # You can also use wget
    curl -X POST https://www.example.com/authorization/decisions#bulk \
      -H 'Content-Type: application/vnd.sas.authorization.bulk.context+json' \
      -H 'Accept: application/vnd.sas.authorization.authorized.links+json'
    
    
    const inputBody = '{
      "bulkLinks": {
        "add": [
          {
            "method": "string",
            "rel": "string",
            "uri": "string",
            "href": "string",
            "title": "string",
            "type": "string",
            "itemType": "string",
            "responseType": "string",
            "responseItemType": "string"
          }
        ],
        "create": [
          {
            "method": "string",
            "rel": "string",
            "uri": "string",
            "href": "string",
            "title": "string",
            "type": "string",
            "itemType": "string",
            "responseType": "string",
            "responseItemType": "string"
          }
        ],
        "delete": [
          {
            "method": "string",
            "rel": "string",
            "uri": "string",
            "href": "string",
            "title": "string",
            "type": "string",
            "itemType": "string",
            "responseType": "string",
            "responseItemType": "string"
          }
        ],
        "read": [
          {
            "method": "string",
            "rel": "string",
            "uri": "string",
            "href": "string",
            "title": "string",
            "type": "string",
            "itemType": "string",
            "responseType": "string",
            "responseItemType": "string"
          }
        ],
        "remove": [
          {
            "method": "string",
            "rel": "string",
            "uri": "string",
            "href": "string",
            "title": "string",
            "type": "string",
            "itemType": "string",
            "responseType": "string",
            "responseItemType": "string"
          }
        ],
        "secure": [
          {
            "method": "string",
            "rel": "string",
            "uri": "string",
            "href": "string",
            "title": "string",
            "type": "string",
            "itemType": "string",
            "responseType": "string",
            "responseItemType": "string"
          }
        ],
        "update": [
          {
            "method": "string",
            "rel": "string",
            "uri": "string",
            "href": "string",
            "title": "string",
            "type": "string",
            "itemType": "string",
            "responseType": "string",
            "responseItemType": "string"
          }
        ]
      },
      "request": {
        "uri": "string",
        "method": "string",
        "queryString": "string",
        "parameters": {},
        "locale": "string",
        "headers": {},
        "contentLength": 0,
        "contentType": "string",
        "protocol": "string",
        "serverName": "string",
        "serverPort": 0,
        "serverIp": "string",
        "remoteHost": "string",
        "remoteIp": "string",
        "requestDate": 0,
        "timeStamp": "string"
      },
      "principals": [
        {
          "name": "string",
          "type": "user",
          "version": 0
        }
      ],
      "permission": "add",
      "parameters": {},
      "matchParams": false,
      "eachNamed": {},
      "version": 0
    }';
    const headers = {
      'Content-Type':'application/vnd.sas.authorization.bulk.context+json',
      'Accept':'application/vnd.sas.authorization.authorized.links+json'
    };
    
    fetch('https://www.example.com/authorization/decisions#bulk',
    {
      method: 'POST',
      body: inputBody,
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    import requests
    headers = {
      'Content-Type': 'application/vnd.sas.authorization.bulk.context+json',
      'Accept': 'application/vnd.sas.authorization.authorized.links+json'
    }
    
    r = requests.post('https://www.example.com/authorization/decisions#bulk', headers = headers)
    
    print(r.json())
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Content-Type": []string{"application/vnd.sas.authorization.bulk.context+json"},
            "Accept": []string{"application/vnd.sas.authorization.authorized.links+json"},
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("POST", "https://www.example.com/authorization/decisions#bulk", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    

    POST /decisions#bulk

    Determines which actions a specified principal is authorized to perform in a specified context. Each requested action is evaluated against its associated permission. Only authorized actions (links) are returned.

    Body parameter

    {
      "bulkLinks": {
        "add": [
          {
            "method": "string",
            "rel": "string",
            "uri": "string",
            "href": "string",
            "title": "string",
            "type": "string",
            "itemType": "string",
            "responseType": "string",
            "responseItemType": "string"
          }
        ],
        "create": [
          {
            "method": "string",
            "rel": "string",
            "uri": "string",
            "href": "string",
            "title": "string",
            "type": "string",
            "itemType": "string",
            "responseType": "string",
            "responseItemType": "string"
          }
        ],
        "delete": [
          {
            "method": "string",
            "rel": "string",
            "uri": "string",
            "href": "string",
            "title": "string",
            "type": "string",
            "itemType": "string",
            "responseType": "string",
            "responseItemType": "string"
          }
        ],
        "read": [
          {
            "method": "string",
            "rel": "string",
            "uri": "string",
            "href": "string",
            "title": "string",
            "type": "string",
            "itemType": "string",
            "responseType": "string",
            "responseItemType": "string"
          }
        ],
        "remove": [
          {
            "method": "string",
            "rel": "string",
            "uri": "string",
            "href": "string",
            "title": "string",
            "type": "string",
            "itemType": "string",
            "responseType": "string",
            "responseItemType": "string"
          }
        ],
        "secure": [
          {
            "method": "string",
            "rel": "string",
            "uri": "string",
            "href": "string",
            "title": "string",
            "type": "string",
            "itemType": "string",
            "responseType": "string",
            "responseItemType": "string"
          }
        ],
        "update": [
          {
            "method": "string",
            "rel": "string",
            "uri": "string",
            "href": "string",
            "title": "string",
            "type": "string",
            "itemType": "string",
            "responseType": "string",
            "responseItemType": "string"
          }
        ]
      },
      "request": {
        "uri": "string",
        "method": "string",
        "queryString": "string",
        "parameters": {},
        "locale": "string",
        "headers": {},
        "contentLength": 0,
        "contentType": "string",
        "protocol": "string",
        "serverName": "string",
        "serverPort": 0,
        "serverIp": "string",
        "remoteHost": "string",
        "remoteIp": "string",
        "requestDate": 0,
        "timeStamp": "string"
      },
      "principals": [
        {
          "name": "string",
          "type": "user",
          "version": 0
        }
      ],
      "permission": "add",
      "parameters": {},
      "matchParams": false,
      "eachNamed": {},
      "version": 0
    }
    
    Parameters
    Name In Type Required Description
    body body bulkAuthorizationContext true The requested actions and contextual details. Bulk information must be included as a map of permissions to arrays of links.

    Example responses

    200 Response

    {
      "grantedLinks": [
        {
          "method": "string",
          "rel": "string",
          "uri": "string",
          "href": "string",
          "title": "string",
          "type": "string",
          "itemType": "string",
          "responseType": "string",
          "responseItemType": "string"
        }
      ],
      "prohibitedLinks": [
        {
          "method": "string",
          "rel": "string",
          "uri": "string",
          "href": "string",
          "title": "string",
          "type": "string",
          "itemType": "string",
          "responseType": "string",
          "responseItemType": "string"
        }
      ],
      "version": 0
    }
    
    Responses
    Status Meaning Description Schema
    200 OK The request succeeded. authorizedLinks
    400 Bad Request The request was invalid. Returned if no URIs are provided in the context to authorize. None

    Metadata

    Contains operations that provide information about this API.

    Code samples

    # You can also use wget
    curl -X GET https://www.example.com/authorization/ \
      -H 'Accept: application/vnd.sas.api+json'
    
    
    
    const headers = {
      'Accept':'application/vnd.sas.api+json'
    };
    
    fetch('https://www.example.com/authorization/',
    {
      method: 'GET',
    
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    import requests
    headers = {
      'Accept': 'application/vnd.sas.api+json'
    }
    
    r = requests.get('https://www.example.com/authorization/', headers = headers)
    
    print(r.json())
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Accept": []string{"application/vnd.sas.api+json"},
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("GET", "https://www.example.com/authorization/", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    

    GET /

    Clients should use this top-level endpoint and the appropriate link relationship to find the specific endpoint of interest.

    Example responses

    200 Response

    {
      "version": 1,
      "links": [
        {
          "method": "string",
          "rel": "string",
          "uri": "string",
          "href": "string",
          "title": "string",
          "type": "string",
          "itemType": "string",
          "responseType": "string",
          "responseItemType": "string"
        }
      ]
    }
    
    Status Meaning Description Schema
    200 OK The request succeeded. Inline

    Status Code 200

    API

    Name Type Required Restrictions Description
    » version integer true none The version number of the API representation. This is version 1.
    » links [permissionsToLinks] true none The API's top-level links.
    »» Link object false none A link to a related operation or resource.
    »»» method string false none The HTTP method for the link.
    »»» rel string true none The relationship of the link to the resource.
    »»» uri string false none The relative URI for the link.
    »»» href string false none The URL for the link.
    »»» title string false none The title for the link.
    »»» type string false none The media type or link type for the link.
    »»» itemType string false none If this is a link to a container, itemType is the media type or link type for the items in the container.
    »»» responseType string false none The media type or link type of the response body for a PUT, POST, or PATCH operation.
    »»» responseItemType string false none The media type or link type of the items in the response body for a PUT, POST, or PATCH operation.

    Get a localized list of rule types

    Code samples

    # You can also use wget
    curl -X GET https://www.example.com/authorization/localizations/types \
      -H 'Accept: application/vnd.sas.collection+json' \
      -H 'Accept-Language: string'
    
    
    
    const headers = {
      'Accept':'application/vnd.sas.collection+json',
      'Accept-Language':'string'
    };
    
    fetch('https://www.example.com/authorization/localizations/types',
    {
      method: 'GET',
    
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    import requests
    headers = {
      'Accept': 'application/vnd.sas.collection+json',
      'Accept-Language': 'string'
    }
    
    r = requests.get('https://www.example.com/authorization/localizations/types', headers = headers)
    
    print(r.json())
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Accept": []string{"application/vnd.sas.collection+json"},
            "Accept-Language": []string{"string"},
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("GET", "https://www.example.com/authorization/localizations/types", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    

    GET /localizations/types

    Provides localized versions of type enums for use as display labels in a graphical user interface. The names are localized to the accept-language of the header.

    Parameters
    Name In Type Required Description
    Accept-Language header string false Enumerates the language(s) the client prefers the response in. This can be used to provide localized data where available.

    Example responses

    200 Response

    {
      "name": "string",
      "start": 0,
      "limit": 0,
      "count": 0,
      "accept": "string",
      "links": [
        {
          "method": "string",
          "rel": "string",
          "uri": "string",
          "href": "string",
          "title": "string",
          "type": "string",
          "itemType": "string",
          "responseType": "string",
          "responseItemType": "string"
        }
      ],
      "version": 0,
      "items": [
        {
          "value": "string",
          "localizedValue": "string"
        }
      ]
    }
    
    Responses
    Status Meaning Description Schema
    200 OK The request succeeded. localizedValueCollection

    Get a localized list of principal types

    Code samples

    # You can also use wget
    curl -X GET https://www.example.com/authorization/localizations/principalTypes \
      -H 'Accept: application/vnd.sas.collection+json' \
      -H 'Accept-Language: string'
    
    
    
    const headers = {
      'Accept':'application/vnd.sas.collection+json',
      'Accept-Language':'string'
    };
    
    fetch('https://www.example.com/authorization/localizations/principalTypes',
    {
      method: 'GET',
    
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    import requests
    headers = {
      'Accept': 'application/vnd.sas.collection+json',
      'Accept-Language': 'string'
    }
    
    r = requests.get('https://www.example.com/authorization/localizations/principalTypes', headers = headers)
    
    print(r.json())
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Accept": []string{"application/vnd.sas.collection+json"},
            "Accept-Language": []string{"string"},
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("GET", "https://www.example.com/authorization/localizations/principalTypes", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    

    GET /localizations/principalTypes

    Provides localized versions of principal type enums for use as display labels in a graphical user interface. The names are localized to the accept-language of the header.

    Parameters
    Name In Type Required Description
    Accept-Language header string false Enumerates the language(s) the client prefers the response in. This can be used to provide localized data where available.

    Example responses

    200 Response

    {
      "name": "string",
      "start": 0,
      "limit": 0,
      "count": 0,
      "accept": "string",
      "links": [
        {
          "method": "string",
          "rel": "string",
          "uri": "string",
          "href": "string",
          "title": "string",
          "type": "string",
          "itemType": "string",
          "responseType": "string",
          "responseItemType": "string"
        }
      ],
      "version": 0,
      "items": [
        {
          "value": "string",
          "localizedValue": "string"
        }
      ]
    }
    
    Responses
    Status Meaning Description Schema
    200 OK The request succeeded. localizedValueCollection

    Get a localized list of permission names

    Code samples

    # You can also use wget
    curl -X GET https://www.example.com/authorization/localizations/permissions \
      -H 'Accept: application/vnd.sas.collection+json' \
      -H 'Accept-Language: string'
    
    
    
    const headers = {
      'Accept':'application/vnd.sas.collection+json',
      'Accept-Language':'string'
    };
    
    fetch('https://www.example.com/authorization/localizations/permissions',
    {
      method: 'GET',
    
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    import requests
    headers = {
      'Accept': 'application/vnd.sas.collection+json',
      'Accept-Language': 'string'
    }
    
    r = requests.get('https://www.example.com/authorization/localizations/permissions', headers = headers)
    
    print(r.json())
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Accept": []string{"application/vnd.sas.collection+json"},
            "Accept-Language": []string{"string"},
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("GET", "https://www.example.com/authorization/localizations/permissions", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    

    GET /localizations/permissions

    Provides localized versions of permission enums for use as display labels in a graphical user interface. The names are localized to the accept-language of the header.

    Parameters
    Name In Type Required Description
    Accept-Language header string false Enumerates the language(s) the client prefers the response in. This can be used to provide localized data where available.

    Example responses

    200 Response

    {
      "name": "string",
      "start": 0,
      "limit": 0,
      "count": 0,
      "accept": "string",
      "links": [
        {
          "method": "string",
          "rel": "string",
          "uri": "string",
          "href": "string",
          "title": "string",
          "type": "string",
          "itemType": "string",
          "responseType": "string",
          "responseItemType": "string"
        }
      ],
      "version": 0,
      "items": [
        {
          "value": "string",
          "localizedValue": "string"
        }
      ]
    }
    
    Responses
    Status Meaning Description Schema
    200 OK The request succeeded. localizedValueCollection

    Shares

    Get shares

    Code samples

    # You can also use wget
    curl -X GET https://www.example.com/authorization/shares \
      -H 'Accept: application/vnd.sas.collection+json'
    
    
    
    const headers = {
      'Accept':'application/vnd.sas.collection+json'
    };
    
    fetch('https://www.example.com/authorization/shares',
    {
      method: 'GET',
    
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    import requests
    headers = {
      'Accept': 'application/vnd.sas.collection+json'
    }
    
    r = requests.get('https://www.example.com/authorization/shares', headers = headers)
    
    print(r.json())
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Accept": []string{"application/vnd.sas.collection+json"},
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("GET", "https://www.example.com/authorization/shares", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    

    GET /shares

    Retrieves some or all shares, with or without paging.

    Parameters
    Name In Type Required Description
    start query integer false The index number for the first share in a page.
    limit query integer false The maximum number of shares to return per page.
    filter query string(filter-criteria) false Constraints on which shares to retrieve. Here are the supported filters and criteria:
    • sharedBy (eq, ne, startsWith, endsWith, contains)
    • sharedWith (eq, ne, startsWith, endsWith, contains)
    • resourceUri (eq, ne, startsWith, endsWith, contains)
    • name (eq, ne, startsWith, endsWith, contains)
    • type (eq, ne)
    sortBy query string(sort-criteria) false Instructions for sorting the retrieved shares. You can sort by name or description in ascending or descending order.

    Example responses

    200 Response

    {
      "name": "string",
      "start": 0,
      "limit": 0,
      "count": 0,
      "accept": "string",
      "links": [
        {
          "method": "string",
          "rel": "string",
          "uri": "string",
          "href": "string",
          "title": "string",
          "type": "string",
          "itemType": "string",
          "responseType": "string",
          "responseItemType": "string"
        }
      ],
      "version": 0,
      "items": [
        {
          "sharedWith": "string",
          "resourceUri": "string",
          "name": "string",
          "sharedWithType": "user",
          "type": "read",
          "enabled": true,
          "version": 0,
          "links": [
            {
              "method": "string",
              "rel": "string",
              "uri": "string",
              "href": "string",
              "title": "string",
              "type": "string",
              "itemType": "string",
              "responseType": "string",
              "responseItemType": "string"
            }
          ],
          "id": "string",
          "createdBy": "string",
          "creationTimeStamp": "2019-08-24T14:15:22Z",
          "modifiedBy": "string",
          "modifiedTimeStamp": "2019-08-24T14:15:22Z"
        }
      ]
    }
    
    Responses
    Status Meaning Description Schema
    200 OK The request succeeded. savedShareCollection
    400 Bad Request The request was invalid. Returned if any query criteria (sortBy, filter, limit, start) are invalid. error2

    Create a new share

    Code samples

    # You can also use wget
    curl -X POST https://www.example.com/authorization/shares \
      -H 'Content-Type: application/vnd.sas.authorization.share+json' \
      -H 'Accept: application/vnd.sas.authorization.share+json' \
      -H 'Content-Type: string' \
      -H 'Accept: string'
    
    
    const inputBody = '{
      "sharedWith": "string",
      "resourceUri": "string",
      "name": "string",
      "sharedWithType": "user",
      "type": "read",
      "enabled": true,
      "version": 0,
      "links": [
        {
          "method": "string",
          "rel": "string",
          "uri": "string",
          "href": "string",
          "title": "string",
          "type": "string",
          "itemType": "string",
          "responseType": "string",
          "responseItemType": "string"
        }
      ]
    }';
    const headers = {
      'Content-Type':'application/vnd.sas.authorization.share+json',
      'Accept':'application/vnd.sas.authorization.share+json',
      'Content-Type':'string',
      'Accept':'string'
    };
    
    fetch('https://www.example.com/authorization/shares',
    {
      method: 'POST',
      body: inputBody,
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    import requests
    headers = {
      'Content-Type': 'application/vnd.sas.authorization.share+json',
      'Accept': 'application/vnd.sas.authorization.share+json',
      'Content-Type': 'string',
      'Accept': 'string'
    }
    
    r = requests.post('https://www.example.com/authorization/shares', headers = headers)
    
    print(r.json())
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Content-Type": []string{"application/vnd.sas.authorization.share+json"},
            "Accept": []string{"application/vnd.sas.authorization.share+json"},
            "Content-Type": []string{"string"},
            "Accept": []string{"string"},
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("POST", "https://www.example.com/authorization/shares", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    

    POST /shares

    Creates a new share that has a system-generated ID.

    Body parameter

    {
      "sharedWith": "string",
      "resourceUri": "string",
      "name": "string",
      "sharedWithType": "user",
      "type": "read",
      "enabled": true,
      "version": 0,
      "links": [
        {
          "method": "string",
          "rel": "string",
          "uri": "string",
          "href": "string",
          "title": "string",
          "type": "string",
          "itemType": "string",
          "responseType": "string",
          "responseItemType": "string"
        }
      ]
    }
    
    Parameters
    Name In Type Required Description
    Content-Type header string false Specifies the format of the incoming share. Supported media types are:
    • application/json
    • application/vnd.sas.authorization.share+json
    Accept header string false Specifies the desired format of the returned share. Supported media types are:
    • application/json
    • application/vnd.sas.authorization.share+json
    body body share true The properties of the new share.

    Example responses

    201 Response

    {
      "sharedWith": "string",
      "resourceUri": "string",
      "name": "string",
      "sharedWithType": "user",
      "type": "read",
      "enabled": true,
      "version": 0,
      "links": [
        {
          "method": "string",
          "rel": "string",
          "uri": "string",
          "href": "string",
          "title": "string",
          "type": "string",
          "itemType": "string",
          "responseType": "string",
          "responseItemType": "string"
        }
      ],
      "id": "string",
      "createdBy": "string",
      "creationTimeStamp": "2019-08-24T14:15:22Z",
      "modifiedBy": "string",
      "modifiedTimeStamp": "2019-08-24T14:15:22Z"
    }
    
    Responses
    Status Meaning Description Schema
    201 Created A new share was created. savedShare
    400 Bad Request The request was invalid. Returned if the specified share is invalid. None
    Response Headers
    Status Header Type Format Description
    201 Content-Type string Type of returned content.
    201 Last-Modified string Timestamp of when share was last modified.
    201 Location string Relative URI of the share's path.
    201 ETag string The entity tag for the share.

    Patch shares

    Code samples

    # You can also use wget
    curl -X PATCH https://www.example.com/authorization/shares \
      -H 'Content-Type: application/json-patch+json' \
      -H 'Accept: application/vnd.sas.collection+json'
    
    
    const inputBody = '[
      {
        "value": {
          "sharedWith": "string",
          "resourceUri": "string",
          "name": "string",
          "sharedWithType": "user",
          "type": "read",
          "enabled": true,
          "version": 0,
          "links": [
            {
              "method": "string",
              "rel": "string",
              "uri": "string",
              "href": "string",
              "title": "string",
              "type": "string",
              "itemType": "string",
              "responseType": "string",
              "responseItemType": "string"
            }
          ]
        },
        "op": "add",
        "path": null
      }
    ]';
    const headers = {
      'Content-Type':'application/json-patch+json',
      'Accept':'application/vnd.sas.collection+json'
    };
    
    fetch('https://www.example.com/authorization/shares',
    {
      method: 'PATCH',
      body: inputBody,
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    import requests
    headers = {
      'Content-Type': 'application/json-patch+json',
      'Accept': 'application/vnd.sas.collection+json'
    }
    
    r = requests.patch('https://www.example.com/authorization/shares', headers = headers)
    
    print(r.json())
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Content-Type": []string{"application/json-patch+json"},
            "Accept": []string{"application/vnd.sas.collection+json"},
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("PATCH", "https://www.example.com/authorization/shares", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    

    PATCH /shares

    Performs a set of share management actions as specified in a JSON patch. The actions are performed synchronously and transactionally. A resource collection of all created and revised shares is returned. If the patch is not successfully applied, changes are rolled back.

    For every action, the patch must specify an operation (add, replace, remove, test, or copy) and a target URI (for example, /authorization/shares/{shareId} or, to create a new share, /authorization/shares). Each add and replace operation requires a valid share representation.

    Body parameter

    [
      {
        "value": {
          "sharedWith": "string",
          "resourceUri": "string",
          "name": "string",
          "sharedWithType": "user",
          "type": "read",
          "enabled": true,
          "version": 0,
          "links": [
            {
              "method": "string",
              "rel": "string",
              "uri": "string",
              "href": "string",
              "title": "string",
              "type": "string",
              "itemType": "string",
              "responseType": "string",
              "responseItemType": "string"
            }
          ]
        },
        "op": "add",
        "path": null
      }
    ]
    
    Parameters
    Name In Type Required Description
    body body sharePatchOperation true JSON patch describing operations to perform and identifying the target shares.

    Example responses

    200 Response

    {
      "name": "string",
      "start": 0,
      "limit": 0,
      "count": 0,
      "accept": "string",
      "links": [
        {
          "method": "string",
          "rel": "string",
          "uri": "string",
          "href": "string",
          "title": "string",
          "type": "string",
          "itemType": "string",
          "responseType": "string",
          "responseItemType": "string"
        }
      ],
      "version": 0,
      "items": [
        {
          "sharedWith": "string",
          "resourceUri": "string",
          "name": "string",
          "sharedWithType": "user",
          "type": "read",
          "enabled": true,
          "version": 0,
          "links": [
            {
              "method": "string",
              "rel": "string",
              "uri": "string",
              "href": "string",
              "title": "string",
              "type": "string",
              "itemType": "string",
              "responseType": "string",
              "responseItemType": "string"
            }
          ],
          "id": "string",
          "createdBy": "string",
          "creationTimeStamp": "2019-08-24T14:15:22Z",
          "modifiedBy": "string",
          "modifiedTimeStamp": "2019-08-24T14:15:22Z"
        }
      ]
    }
    
    Responses
    Status Meaning Description Schema
    200 OK The request succeeded. Returned if the patch was applied successfully. savedShareCollection
    400 Bad Request The request was invalid. Returned if the specified share patch is invalid. error2
    412 Precondition Failed The If-Match request header did not match the resource's entity tag. error2
    422 Unprocessable Entity Unprocessable Entity. Returned if the patch request is syntactically valid but would result in a resource state that is inconsistent or invalid. error2

    Delete a share

    Code samples

    # You can also use wget
    curl -X DELETE https://www.example.com/authorization/shares/{shareId}
    
    
    
    fetch('https://www.example.com/authorization/shares/{shareId}',
    {
      method: 'DELETE'
    
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    import requests
    
    r = requests.delete('https://www.example.com/authorization/shares/{shareId}')
    
    print(r.json())
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("DELETE", "https://www.example.com/authorization/shares/{shareId}", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    

    DELETE /shares/{shareId}

    Deletes a specified share.

    Parameters
    Name In Type Required Description
    shareId path string true The ID of the share to delete.
    Responses
    Status Meaning Description Schema
    204 No Content The share was deleted. None
    404 Not Found No share with the specified ID was found. None

    Get a share

    Code samples

    # You can also use wget
    curl -X GET https://www.example.com/authorization/shares/{shareId} \
      -H 'Accept: application/vnd.sas.authorization.share+json'
    
    
    
    const headers = {
      'Accept':'application/vnd.sas.authorization.share+json'
    };
    
    fetch('https://www.example.com/authorization/shares/{shareId}',
    {
      method: 'GET',
    
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    import requests
    headers = {
      'Accept': 'application/vnd.sas.authorization.share+json'
    }
    
    r = requests.get('https://www.example.com/authorization/shares/{shareId}', headers = headers)
    
    print(r.json())
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Accept": []string{"application/vnd.sas.authorization.share+json"},
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("GET", "https://www.example.com/authorization/shares/{shareId}", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    

    GET /shares/{shareId}

    Retrieves a specified share.

    Parameters
    Name In Type Required Description
    shareId path string true The ID of the share to retrieve.

    Example responses

    200 Response

    {
      "sharedWith": "string",
      "resourceUri": "string",
      "name": "string",
      "sharedWithType": "user",
      "type": "read",
      "enabled": true,
      "version": 0,
      "links": [
        {
          "method": "string",
          "rel": "string",
          "uri": "string",
          "href": "string",
          "title": "string",
          "type": "string",
          "itemType": "string",
          "responseType": "string",
          "responseItemType": "string"
        }
      ],
      "id": "string",
      "createdBy": "string",
      "creationTimeStamp": "2019-08-24T14:15:22Z",
      "modifiedBy": "string",
      "modifiedTimeStamp": "2019-08-24T14:15:22Z"
    }
    
    Responses
    Status Meaning Description Schema
    200 OK The request succeeded. savedShare
    404 Not Found No share with the specified ID was found. None
    Response Headers
    Status Header Type Format Description
    200 Content-Type string Type of returned content.
    200 Last-Modified string Timestamp of when share was last modified.
    200 Location string Relative URI of the share's path.
    200 ETag string The entity tag for the share.

    Update a share

    Code samples

    # You can also use wget
    curl -X PUT https://www.example.com/authorization/shares/{shareId} \
      -H 'Content-Type: application/vnd.sas.authorization.share+json' \
      -H 'Accept: application/vnd.sas.authorization.share+json' \
      -H 'If-Match: string'
    
    
    const inputBody = '{
      "sharedWith": "string",
      "resourceUri": "string",
      "name": "string",
      "sharedWithType": "user",
      "type": "read",
      "enabled": true,
      "version": 0,
      "links": [
        {
          "method": "string",
          "rel": "string",
          "uri": "string",
          "href": "string",
          "title": "string",
          "type": "string",
          "itemType": "string",
          "responseType": "string",
          "responseItemType": "string"
        }
      ]
    }';
    const headers = {
      'Content-Type':'application/vnd.sas.authorization.share+json',
      'Accept':'application/vnd.sas.authorization.share+json',
      'If-Match':'string'
    };
    
    fetch('https://www.example.com/authorization/shares/{shareId}',
    {
      method: 'PUT',
      body: inputBody,
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    import requests
    headers = {
      'Content-Type': 'application/vnd.sas.authorization.share+json',
      'Accept': 'application/vnd.sas.authorization.share+json',
      'If-Match': 'string'
    }
    
    r = requests.put('https://www.example.com/authorization/shares/{shareId}', headers = headers)
    
    print(r.json())
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Content-Type": []string{"application/vnd.sas.authorization.share+json"},
            "Accept": []string{"application/vnd.sas.authorization.share+json"},
            "If-Match": []string{"string"},
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("PUT", "https://www.example.com/authorization/shares/{shareId}", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    

    PUT /shares/{shareId}

    Updates a share by completely replacing it with specified values.

    Body parameter

    {
      "sharedWith": "string",
      "resourceUri": "string",
      "name": "string",
      "sharedWithType": "user",
      "type": "read",
      "enabled": true,
      "version": 0,
      "links": [
        {
          "method": "string",
          "rel": "string",
          "uri": "string",
          "href": "string",
          "title": "string",
          "type": "string",
          "itemType": "string",
          "responseType": "string",
          "responseItemType": "string"
        }
      ]
    }
    
    Parameters
    Name In Type Required Description
    shareId path string true The ID of the share to update.
    If-Match header string true The entity tag obtained from the most recent ETag response header. Must match the current entity tag for the share.
    body body share true The properties of the share.

    Example responses

    200 Response

    {
      "sharedWith": "string",
      "resourceUri": "string",
      "name": "string",
      "sharedWithType": "user",
      "type": "read",
      "enabled": true,
      "version": 0,
      "links": [
        {
          "method": "string",
          "rel": "string",
          "uri": "string",
          "href": "string",
          "title": "string",
          "type": "string",
          "itemType": "string",
          "responseType": "string",
          "responseItemType": "string"
        }
      ],
      "id": "string",
      "createdBy": "string",
      "creationTimeStamp": "2019-08-24T14:15:22Z",
      "modifiedBy": "string",
      "modifiedTimeStamp": "2019-08-24T14:15:22Z"
    }
    
    Responses
    Status Meaning Description Schema
    200 OK The request succeeded. Returned if the object was updated. savedShare
    400 Bad Request The request was invalid. Returned if the format of the request does not match the schema for the media type used or there is no existing object with the given ID. Also can be returned if the ID passed in the request payload does not match the ID in the URI. error2
    412 Precondition Failed The If-Match request header did not match the resource's entity tag. error2
    Response Headers
    Status Header Type Format Description
    200 ETag string The entity tag for the share.

    Get sharing configuration

    Code samples

    # You can also use wget
    curl -X GET https://www.example.com/authorization/shares/configuration \
      -H 'Accept: application/vnd.sas.properties+json'
    
    
    
    const headers = {
      'Accept':'application/vnd.sas.properties+json'
    };
    
    fetch('https://www.example.com/authorization/shares/configuration',
    {
      method: 'GET',
    
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    import requests
    headers = {
      'Accept': 'application/vnd.sas.properties+json'
    }
    
    r = requests.get('https://www.example.com/authorization/shares/configuration', headers = headers)
    
    print(r.json())
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Accept": []string{"application/vnd.sas.properties+json"},
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("GET", "https://www.example.com/authorization/shares/configuration", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    

    GET /shares/configuration

    Gets property values that specify how sharing is configured. Currently, there are two properties that configure sharing: sas.authorization.share.enabled and sas.authorization.share.reshare.enabled. The first determines whether sharing is enabled at all in the system while the second determines whether users are allowed to grant reshare permission on objects. There can be additional properties in the future.

    Example responses

    200 Response

    {
      "version": 1,
      "properties": [
        {
          "name": "string",
          "value": "string"
        }
      ],
      "links": [
        {
          "method": "string",
          "rel": "string",
          "uri": "string",
          "href": "string",
          "title": "string",
          "type": "string",
          "itemType": "string",
          "responseType": "string",
          "responseItemType": "string"
        }
      ]
    }
    
    Responses
    Status Meaning Description Schema
    200 OK The request succeeded. Inline
    Response Schema

    Status Code 200

    API

    Name Type Required Restrictions Description
    » version integer false none The version number of the API representation. This is version 1.
    » properties [any] true none A list of name/value pairs.
    »» Property object false none A pair consisting of a string name and a string value. This is an element of application/vnd.sas.properties
    »»» name string true none The property name.
    »»» value string true none The property value.
    » links [permissionsToLinks] false none Links to associated resources and operartions. APIs may provide links for the link relations self',update(to replace the attributes),patch` (to update some attributes) or others.
    »» Link object false none A link to a related operation or resource.
    »»» method string false none The HTTP method for the link.
    »»» rel string true none The relationship of the link to the resource.
    »»» uri string false none The relative URI for the link.
    »»» href string false none The URL for the link.
    »»» title string false none The title for the link.
    »»» type string false none The media type or link type for the link.
    »»» itemType string false none If this is a link to a container, itemType is the media type or link type for the items in the container.
    »»» responseType string false none The media type or link type of the response body for a PUT, POST, or PATCH operation.
    »»» responseItemType string false none The media type or link type of the items in the response body for a PUT, POST, or PATCH operation.

    Schemas

    authorizationRule

    {
      "condition": "string",
      "containerUri": "string",
      "expirationTimeStamp": "2019-08-24T14:15:22Z",
      "filter": "string",
      "contentType": "string",
      "acceptType": "string",
      "acceptItemType": "string",
      "objectUri": "string",
      "permissions": [
        "add"
      ],
      "principal": "string",
      "principalType": "user",
      "reason": "string",
      "type": "grant",
      "version": 0,
      "description": "string",
      "enabled": true,
      "matchParams": false,
      "links": [
        {
          "method": "string",
          "rel": "string",
          "uri": "string",
          "href": "string",
          "title": "string",
          "type": "string",
          "itemType": "string",
          "responseType": "string",
          "responseItemType": "string"
        }
      ]
    }
    
    

    Authorization Rule

    Properties
    Name Type Required Restrictions Description
    condition string false none A Spring Expression Language (SpEL) expression that limits the applicability of the rule. The rule applies only in authorization contexts in which the expression evaluates to 'true'.
    containerUri string false none A relative URI that represents the container aspect of a container object, such as a folder. Rules that target a container URI affect access that the container conveys to its child members.
    expirationTimeStamp string(date-time) false none The date and time at which the rule expires. Expired rules should be disregarded and deleted.
    filter string false none Filter criteria for the rule's target object (or objects). This property is not currently in use.
    contentType string false none Media type of the object that is handled by an endpoint. If set, rules will only apply to endpoints that consume resources of this type. Most rules do not specify a content type.
    acceptType string false none Media type of the object returned by an endpoint. If set, rules will only apply to endpoints that produce resources of this type. Most rules do not specify an accept type.
    acceptItemType string false none Media type of object in a resource collection that is returned by an endpoint. If set, rules will only apply to endpoints that produce a resource collection containing resources of this type. Most rules do not specify an accept item type.
    objectUri string true none A relative URI or ANT-path pattern that represents a resource or set of resources. Most rules target an object URI.
    permissions [string] true none The specific actions that the rule affects (for example: read, update, delete, create, secure, add, or remove).
    principal string true none Specifies the ID of a user or group to which the rule applies. Use this property in conjunction with the principalType property.
    principalType string true none The type of principal or construct to which the rule applies.
    reason string false none Information that a client can display to end users for diagnostic purposes. For example, a prohibit rule’s reason could be displayed to an end user as part of an 'access denied' message.
    type string true none Indicates whether the rule blocks (prohibit) or attempts to provide (grant) access to the specified principal.
    version integer(int32) false none The version of the rule representation. The current representation version is 8.
    description string false none Information that documents the rule for administrative purposes.
    enabled boolean false none Indicates whether the rule is enabled.
    matchParams boolean false none Indicates whether the rule applies to only those requests whose query parameters exactly match the rule target.
    links links false none Zero or more links that are to related resources and actions.
    Enumerated Values
    Property Value
    principalType user
    principalType group
    principalType authenticatedUsers
    principalType everyone
    principalType guest
    type grant
    type prohibit

    identifiableAuthorizationRule

    {
      "condition": "string",
      "containerUri": "string",
      "expirationTimeStamp": "2019-08-24T14:15:22Z",
      "filter": "string",
      "contentType": "string",
      "acceptType": "string",
      "acceptItemType": "string",
      "objectUri": "string",
      "permissions": [
        "add"
      ],
      "principal": "string",
      "principalType": "user",
      "reason": "string",
      "type": "grant",
      "version": 0,
      "description": "string",
      "enabled": true,
      "matchParams": false,
      "links": [
        {
          "method": "string",
          "rel": "string",
          "uri": "string",
          "href": "string",
          "title": "string",
          "type": "string",
          "itemType": "string",
          "responseType": "string",
          "responseItemType": "string"
        }
      ],
      "ruleId": "string"
    }
    
    

    Identifiable Authorization Rule

    Properties
    Name Type Required Restrictions Description
    Identifiable Authorization Rule any false none Any authorization rule that can be referenced by a unique identifier. This can be a savedAuthorizationRule or an unsaved authorization rule that has a client-specified identifier.

    allOf

    Name Type Required Restrictions Description
    anonymous authorizationRule false none An authorization rule that does not have a known ID. The rule has not been saved or the ID is unavailable for some other reason. Compare with SavedAuthorizationRule.

    and

    Name Type Required Restrictions Description
    anonymous object false none none
    » ruleId string false none The unique identifier for the rule.

    savedAuthorizationRule

    {
      "condition": "string",
      "containerUri": "string",
      "expirationTimeStamp": "2019-08-24T14:15:22Z",
      "filter": "string",
      "contentType": "string",
      "acceptType": "string",
      "acceptItemType": "string",
      "objectUri": "string",
      "permissions": [
        "add"
      ],
      "principal": "string",
      "principalType": "user",
      "reason": "string",
      "type": "grant",
      "version": 0,
      "description": "string",
      "enabled": true,
      "matchParams": false,
      "links": [
        {
          "method": "string",
          "rel": "string",
          "uri": "string",
          "href": "string",
          "title": "string",
          "type": "string",
          "itemType": "string",
          "responseType": "string",
          "responseItemType": "string"
        }
      ],
      "ruleId": "string",
      "createdBy": "string",
      "creationTimeStamp": "2019-08-24T14:15:22Z",
      "modifiedBy": "string",
      "modifiedTimeStamp": "2019-08-24T14:15:22Z"
    }
    
    

    Saved Authorization Rule

    Properties
    Name Type Required Restrictions Description
    Saved Authorization Rule any false none An authorization rule that has a known rule ID and has been persisted.

    allOf

    Name Type Required Restrictions Description
    anonymous identifiableAuthorizationRule false none Any authorization rule that can be referenced by a unique identifier. This can be a savedAuthorizationRule or an unsaved authorization rule that has a client-specified identifier.

    and

    Name Type Required Restrictions Description
    anonymous object false none none
    » createdBy string false none The ID of the user who created the rule.
    » creationTimeStamp string(date-time) false none The date and time at which the rule was created.
    » modifiedBy string false none The ID of the last user to modify the rule.
    » modifiedTimeStamp string(date-time) false none The date and time at which the rule was last modified.

    savedAuthorizationRuleCollection

    {
      "name": "string",
      "start": 0,
      "limit": 0,
      "count": 0,
      "accept": "string",
      "links": [
        {
          "method": "string",
          "rel": "string",
          "uri": "string",
          "href": "string",
          "title": "string",
          "type": "string",
          "itemType": "string",
          "responseType": "string",
          "responseItemType": "string"
        }
      ],
      "version": 0,
      "items": [
        {
          "condition": "string",
          "containerUri": "string",
          "expirationTimeStamp": "2019-08-24T14:15:22Z",
          "filter": "string",
          "contentType": "string",
          "acceptType": "string",
          "acceptItemType": "string",
          "objectUri": "string",
          "permissions": [
            "add"
          ],
          "principal": "string",
          "principalType": "user",
          "reason": "string",
          "type": "grant",
          "version": 0,
          "description": "string",
          "enabled": true,
          "matchParams": false,
          "links": [
            {
              "method": "string",
              "rel": "string",
              "uri": "string",
              "href": "string",
              "title": "string",
              "type": "string",
              "itemType": "string",
              "responseType": "string",
              "responseItemType": "string"
            }
          ],
          "ruleId": "string",
          "createdBy": "string",
          "creationTimeStamp": "2019-08-24T14:15:22Z",
          "modifiedBy": "string",
          "modifiedTimeStamp": "2019-08-24T14:15:22Z"
        }
      ]
    }
    
    

    Resource Collection of Authorization Rules

    Properties
    Name Type Required Restrictions Description
    Resource Collection of Authorization Rules any false none A collection of saved authorization rules.

    allOf

    Name Type Required Restrictions Description
    anonymous object false none This is a base schema used to define paginated collections of resources. This base schema is extended by other schemas in APIs by adding an 'items' array property. These extensions define the application/vnd.sas.collection media type (version 2)
    » name string false none The name of the collection.
    » start integer(int64) false none The zero-based index of the first item in the collection.
    » limit integer false none The number of items that were requested for the collection.
    » count integer(int64) false none If populated indicates the number of items in the collection.
    » accept string false none A space-delimited list of media types from which an Accept header may be constructed.
    » links [permissionsToLinks] false none The links that apply to the collection.
    » version integer false none The version number of the collection representation. This representation is version 2.

    and

    Name Type Required Restrictions Description
    anonymous object false none The array of application/vnd.sas.authorization.rule+json representations.
    » items [savedAuthorizationRule] false none [An authorization rule that has a known rule ID and has been persisted.]

    principal

    {
      "name": "string",
      "type": "user",
      "version": 0
    }
    
    

    Principal

    Properties
    Name Type Required Restrictions Description
    name string false none The ID of the user or group. If the principalType refers to a construct, no value is specified for t his property.
    type string false none The type of the principal, or a construct.
    version integer(int32) false none The principal media type version. The version described here is version 1.
    Enumerated Values
    Property Value
    type user
    type group

    authorizationContext

    {
      "request": {
        "uri": "string",
        "method": "string",
        "queryString": "string",
        "parameters": {},
        "locale": "string",
        "headers": {},
        "contentLength": 0,
        "contentType": "string",
        "protocol": "string",
        "serverName": "string",
        "serverPort": 0,
        "serverIp": "string",
        "remoteHost": "string",
        "remoteIp": "string",
        "requestDate": 0,
        "timeStamp": "string"
      },
      "principals": [
        {
          "name": "string",
          "type": "user",
          "version": 0
        }
      ],
      "permission": "add",
      "parameters": {},
      "matchParams": false,
      "eachNamed": {},
      "version": 0
    }
    
    

    Authorization Context

    Properties
    Name Type Required Restrictions Description
    request authorizationContextRequest false none A description of the HTTP request that is associated with an authorization request.
    principals [principal] false none The set of principals representing the actor performing the action.
    permission string true none A type of access.
    parameters object false none A map of keys to objects that represent the parameters and return object of a method being invoked. This can be null or empty.
    matchParams boolean false none Whether the authorization service should strictly match query parameters in this context against a rule.
    eachNamed object false none Map of parameter names to a new name that should be used in rule condition evaluation for collections. For example, if a parameter being used for evaluation is a collection named 'items', then eachNamed can map 'items' to 'item' so that item in the collection can be evaluated independently against a rule that references the '#item' variable.
    version integer(int32) false none The authorization context's media type version. The version described here is version 1.
    Enumerated Values
    Property Value
    permission add
    permission create
    permission delete
    permission read
    permission remove
    permission secure
    permission update

    bulkAuthorizationContext

    {
      "bulkLinks": {
        "add": [
          {
            "method": "string",
            "rel": "string",
            "uri": "string",
            "href": "string",
            "title": "string",
            "type": "string",
            "itemType": "string",
            "responseType": "string",
            "responseItemType": "string"
          }
        ],
        "create": [
          {
            "method": "string",
            "rel": "string",
            "uri": "string",
            "href": "string",
            "title": "string",
            "type": "string",
            "itemType": "string",
            "responseType": "string",
            "responseItemType": "string"
          }
        ],
        "delete": [
          {
            "method": "string",
            "rel": "string",
            "uri": "string",
            "href": "string",
            "title": "string",
            "type": "string",
            "itemType": "string",
            "responseType": "string",
            "responseItemType": "string"
          }
        ],
        "read": [
          {
            "method": "string",
            "rel": "string",
            "uri": "string",
            "href": "string",
            "title": "string",
            "type": "string",
            "itemType": "string",
            "responseType": "string",
            "responseItemType": "string"
          }
        ],
        "remove": [
          {
            "method": "string",
            "rel": "string",
            "uri": "string",
            "href": "string",
            "title": "string",
            "type": "string",
            "itemType": "string",
            "responseType": "string",
            "responseItemType": "string"
          }
        ],
        "secure": [
          {
            "method": "string",
            "rel": "string",
            "uri": "string",
            "href": "string",
            "title": "string",
            "type": "string",
            "itemType": "string",
            "responseType": "string",
            "responseItemType": "string"
          }
        ],
        "update": [
          {
            "method": "string",
            "rel": "string",
            "uri": "string",
            "href": "string",
            "title": "string",
            "type": "string",
            "itemType": "string",
            "responseType": "string",
            "responseItemType": "string"
          }
        ]
      },
      "request": {
        "uri": "string",
        "method": "string",
        "queryString": "string",
        "parameters": {},
        "locale": "string",
        "headers": {},
        "contentLength": 0,
        "contentType": "string",
        "protocol": "string",
        "serverName": "string",
        "serverPort": 0,
        "serverIp": "string",
        "remoteHost": "string",
        "remoteIp": "string",
        "requestDate": 0,
        "timeStamp": "string"
      },
      "principals": [
        {
          "name": "string",
          "type": "user",
          "version": 0
        }
      ],
      "permission": "add",
      "parameters": {},
      "matchParams": false,
      "eachNamed": {},
      "version": 0
    }
    
    

    Bulk Authorization Context

    Properties
    Name Type Required Restrictions Description
    Bulk Authorization Context authorizationContext false none Contextual information about an action that a principal is attempting, including one or more links that should be authorized against a supplied permission. Represented by media type application/vnd.sas.authorization.bulk.context+json.
    bulkLinks permissionsToLinks true none A map of permissions to link arrays. The keys of this map are the permissions that the link values are authorized for.

    {
      "add": [
        {
          "method": "string",
          "rel": "string",
          "uri": "string",
          "href": "string",
          "title": "string",
          "type": "string",
          "itemType": "string",
          "responseType": "string",
          "responseItemType": "string"
        }
      ],
      "create": [
        {
          "method": "string",
          "rel": "string",
          "uri": "string",
          "href": "string",
          "title": "string",
          "type": "string",
          "itemType": "string",
          "responseType": "string",
          "responseItemType": "string"
        }
      ],
      "delete": [
        {
          "method": "string",
          "rel": "string",
          "uri": "string",
          "href": "string",
          "title": "string",
          "type": "string",
          "itemType": "string",
          "responseType": "string",
          "responseItemType": "string"
        }
      ],
      "read": [
        {
          "method": "string",
          "rel": "string",
          "uri": "string",
          "href": "string",
          "title": "string",
          "type": "string",
          "itemType": "string",
          "responseType": "string",
          "responseItemType": "string"
        }
      ],
      "remove": [
        {
          "method": "string",
          "rel": "string",
          "uri": "string",
          "href": "string",
          "title": "string",
          "type": "string",
          "itemType": "string",
          "responseType": "string",
          "responseItemType": "string"
        }
      ],
      "secure": [
        {
          "method": "string",
          "rel": "string",
          "uri": "string",
          "href": "string",
          "title": "string",
          "type": "string",
          "itemType": "string",
          "responseType": "string",
          "responseItemType": "string"
        }
      ],
      "update": [
        {
          "method": "string",
          "rel": "string",
          "uri": "string",
          "href": "string",
          "title": "string",
          "type": "string",
          "itemType": "string",
          "responseType": "string",
          "responseItemType": "string"
        }
      ]
    }
    
    

    Permissions to Links

    Properties
    Name Type Required Restrictions Description
    add [any] false none An array of links that should be authorized against the add permission.
    » Link object false none A link to a related operation or resource.
    »» method string false none The HTTP method for the link.
    »» rel string true none The relationship of the link to the resource.
    »» uri string false none The relative URI for the link.
    »» href string false none The URL for the link.
    »» title string false none The title for the link.
    »» type string false none The media type or link type for the link.
    »» itemType string false none If this is a link to a container, itemType is the media type or link type for the items in the container.
    »» responseType string false none The media type or link type of the response body for a PUT, POST, or PATCH operation.
    »» responseItemType string false none The media type or link type of the items in the response body for a PUT, POST, or PATCH operation.
    create [permissionsToLinks] false none An array of links that should be authorized against the create permission.
    delete [permissionsToLinks] false none An array of links that should be authorized against the delete permission.
    read [permissionsToLinks] false none An array of links that should be authorized against the read permission.
    remove [permissionsToLinks] false none An array of links that should be authorized against the remove permission.
    secure [permissionsToLinks] false none An array of links that should be authorized against the secure permission.
    update [permissionsToLinks] false none An array of links that should be authorized against the update permission.

    authorizationContextRequest

    {
      "uri": "string",
      "method": "string",
      "queryString": "string",
      "parameters": {},
      "locale": "string",
      "headers": {},
      "contentLength": 0,
      "contentType": "string",
      "protocol": "string",
      "serverName": "string",
      "serverPort": 0,
      "serverIp": "string",
      "remoteHost": "string",
      "remoteIp": "string",
      "requestDate": 0,
      "timeStamp": "string"
    }
    
    

    Authorization Context Request

    Properties
    Name Type Required Restrictions Description
    uri string false none The relative URI of the request, excluding any query parameters.
    method string false none The HTTP method that is used by the caller.
    queryString string false none The query string portion of the caller request, if any.
    parameters object false none The request parameters map.
    locale string false none The preferred locale that the client accepts content in.
    headers object false none A map of HTTP header names to their values.
    contentLength integer(int32) false none The length, in bytes, of the request body.
    contentType string false none The MIME type of the body of the request.
    protocol string false none The protocol of the request.
    serverName string false none The name of the server to which the request was sent.
    serverPort integer(int32) false none The port number of the server to which the request was sent.
    serverIp string false none The IP address of the server to which the request was sent.
    remoteHost string false none The fully qualified name of the client (or the last proxy) that sent the request.
    remoteIp string false none The IP address of the client (or the last proxy) that sent the request.
    requestDate integer(int32) false none The date on which the request was sent, represented as the number of milliseconds since January 1, 1970 GMT.
    timeStamp string false none The date on which the request was sent, represented as a W3C/ISO 8601 compliant timestamp string using yyyy-MM-dd'T'HH:mm:ss.SSSZ format.

    explanations

    "{'/foo/123': [... explanation array ...], '/bar/123': [... explanation array ...]}"
    
    

    Explanations

    Properties
    Name Type Required Restrictions Description
    Explanations string false none A map of relative URI keys to an array of Explanation values. Each explanation in each array explains authorization decisions for one principal.
    version integer(int32) false none The version of the explanation representation. The current representation version is 1.
    explanations [explanation] false none [An explanation of access for one principal.]

    explanation

    "{'principal': {'name': 'test-user', 'type': 'user'}, 'read': {... read explanation ...}, 'update': {... update explanation ...}, 'so on, for each permission...':{...}}"
    
    

    Explanation

    Properties
    Name Type Required Restrictions Description
    principal principal false none A specific user or group.
    add permissionExplanation false none An explanation of access for one principal and permission. Includes explanations for permissions conveyed by containing objects.
    create permissionExplanation false none An explanation of access for one principal and permission. Includes explanations for permissions conveyed by containing objects.
    delete permissionExplanation false none An explanation of access for one principal and permission. Includes explanations for permissions conveyed by containing objects.
    read permissionExplanation false none An explanation of access for one principal and permission. Includes explanations for permissions conveyed by containing objects.
    remove permissionExplanation false none An explanation of access for one principal and permission. Includes explanations for permissions conveyed by containing objects.
    secure permissionExplanation false none An explanation of access for one principal and permission. Includes explanations for permissions conveyed by containing objects.
    update permissionExplanation false none An explanation of access for one principal and permission. Includes explanations for permissions conveyed by containing objects.

    individualExplanation

    {
      "result": "grant",
      "grantFactor": {
        "direct": true,
        "condition": "string",
        "contributingRules": [
          {
            "method": "string",
            "rel": "string",
            "uri": "string",
            "href": "string",
            "title": "string",
            "type": "string",
            "itemType": "string",
            "responseType": "string",
            "responseItemType": "string"
          }
        ]
      },
      "prohibitFactor": {
        "direct": true,
        "condition": "string",
        "contributingRules": [
          {
            "method": "string",
            "rel": "string",
            "uri": "string",
            "href": "string",
            "title": "string",
            "type": "string",
            "itemType": "string",
            "responseType": "string",
            "responseItemType": "string"
          }
        ]
      }
    }
    
    

    Individual Explanation

    Properties
    Name Type Required Restrictions Description
    result string false none The ultimate access result for the defined principal and permission. A result of 'conditional' means that access might be either granted or denied, depending on the impact of request-time circumstances on evaluation of relevant conditions.
    grantFactor factor false none Information about the source or cause of the result. Includes a list of applicable rules, indication of whether any of those rules has a condition, and whether the result is direct (a rule directly targets the defined object and is directly assigned to the defined principal).
    prohibitFactor factor false none Information about the source or cause of the result. Includes a list of applicable rules, indication of whether any of those rules has a condition, and whether the result is direct (a rule directly targets the defined object and is directly assigned to the defined principal).
    Enumerated Values
    Property Value
    result grant
    result prohibit
    result conditional

    permissionExplanation

    {
      "result": "grant",
      "grantFactor": {
        "direct": true,
        "condition": "string",
        "contributingRules": [
          {
            "method": "string",
            "rel": "string",
            "uri": "string",
            "href": "string",
            "title": "string",
            "type": "string",
            "itemType": "string",
            "responseType": "string",
            "responseItemType": "string"
          }
        ]
      },
      "prohibitFactor": {
        "direct": true,
        "condition": "string",
        "contributingRules": [
          {
            "method": "string",
            "rel": "string",
            "uri": "string",
            "href": "string",
            "title": "string",
            "type": "string",
            "itemType": "string",
            "responseType": "string",
            "responseItemType": "string"
          }
        ]
      },
      "conveyedExplanation": {
        "result": "grant",
        "grantFactor": {
          "direct": true,
          "condition": "string",
          "contributingRules": [
            {
              "method": "string",
              "rel": "string",
              "uri": "string",
              "href": "string",
              "title": "string",
              "type": "string",
              "itemType": "string",
              "responseType": "string",
              "responseItemType": "string"
            }
          ]
        },
        "prohibitFactor": {
          "direct": true,
          "condition": "string",
          "contributingRules": [
            {
              "method": "string",
              "rel": "string",
              "uri": "string",
              "href": "string",
              "title": "string",
              "type": "string",
              "itemType": "string",
              "responseType": "string",
              "responseItemType": "string"
            }
          ]
        }
      }
    }
    
    

    Permission Explanation

    Properties
    Name Type Required Restrictions Description
    Permission Explanation any false none An explanation of access for one principal and permission. Includes explanations for permissions conveyed by containing objects.

    allOf

    Name Type Required Restrictions Description
    anonymous individualExplanation false none An explanation of access for one principal and permission.

    and

    Name Type Required Restrictions Description
    anonymous object false none none
    » conveyedExplanation individualExplanation false none An explanation of access for one principal and permission.

    factor

    {
      "direct": true,
      "condition": "string",
      "contributingRules": [
        {
          "method": "string",
          "rel": "string",
          "uri": "string",
          "href": "string",
          "title": "string",
          "type": "string",
          "itemType": "string",
          "responseType": "string",
          "responseItemType": "string"
        }
      ]
    }
    
    

    Factor

    Properties
    Name Type Required Restrictions Description
    direct boolean false none Indicates whether the result comes from a rule that targets the defined object directly (via objectUri) and is directly assigned to the defined principal. If false, the result comes from another source, such as inheritance a parent object), membership (a parent group), or the absence of applicable rules.
    condition string false none The condition that affects access, if any.
    contributingRules [permissionsToLinks] false none An array of links that indicate which rules contributed to this factor. If empty or null, then no explicit rules contributed and the result comes from the inherit semantics of the system (for example, prohibit is implicit if there is no relevant grant rule).

    ruleJob

    {
      "state": "pending",
      "actions": [
        {
          "rule": {
            "condition": "string",
            "containerUri": "string",
            "expirationTimeStamp": "2019-08-24T14:15:22Z",
            "filter": "string",
            "contentType": "string",
            "acceptType": "string",
            "acceptItemType": "string",
            "objectUri": "string",
            "permissions": [
              "add"
            ],
            "principal": "string",
            "principalType": "user",
            "reason": "string",
            "type": "grant",
            "version": 0,
            "description": "string",
            "enabled": true,
            "matchParams": false,
            "links": [
              {
                "method": "string",
                "rel": "string",
                "uri": "string",
                "href": "string",
                "title": "string",
                "type": "string",
                "itemType": "string",
                "responseType": "string",
                "responseItemType": "string"
              }
            ]
          },
          "type": "create",
          "status": "pending"
        }
      ],
      "links": [
        {
          "method": "string",
          "rel": "string",
          "uri": "string",
          "href": "string",
          "title": "string",
          "type": "string",
          "itemType": "string",
          "responseType": "string",
          "responseItemType": "string"
        }
      ]
    }
    
    

    Rule Job

    Properties
    Name Type Required Restrictions Description
    state string false none Defines the current state of an action.
    actions [ruleAction] false none A set of actions to be performed on defined rules. These can be create, update, or delete actions. Actions are performed in their arrayed order.
    links links false none Zero or more links that are to related resources and actions.
    Enumerated Values
    Property Value
    state pending
    state running
    state completed
    state completedWithErrors
    state failed

    ruleAction

    {
      "rule": {
        "condition": "string",
        "containerUri": "string",
        "expirationTimeStamp": "2019-08-24T14:15:22Z",
        "filter": "string",
        "contentType": "string",
        "acceptType": "string",
        "acceptItemType": "string",
        "objectUri": "string",
        "permissions": [
          "add"
        ],
        "principal": "string",
        "principalType": "user",
        "reason": "string",
        "type": "grant",
        "version": 0,
        "description": "string",
        "enabled": true,
        "matchParams": false,
        "links": [
          {
            "method": "string",
            "rel": "string",
            "uri": "string",
            "href": "string",
            "title": "string",
            "type": "string",
            "itemType": "string",
            "responseType": "string",
            "responseItemType": "string"
          }
        ]
      },
      "type": "create",
      "status": "pending"
    }
    
    

    Rule Action

    Properties
    Name Type Required Restrictions Description
    rule authorizationRule true none An authorization rule that does not have a known ID. The rule has not been saved or the ID is unavailable for some other reason. Compare with SavedAuthorizationRule.
    type string true none The type of action to be performed on a rule
    status string false none Defines the current state of an action.
    Enumerated Values
    Property Value
    type create
    type update
    type delete
    status pending
    status running
    status completed
    status completedWithErrors
    status failed

    rulePatchOperation

    {
      "value": {
        "condition": "string",
        "containerUri": "string",
        "expirationTimeStamp": "2019-08-24T14:15:22Z",
        "filter": "string",
        "contentType": "string",
        "acceptType": "string",
        "acceptItemType": "string",
        "objectUri": "string",
        "permissions": [
          "add"
        ],
        "principal": "string",
        "principalType": "user",
        "reason": "string",
        "type": "grant",
        "version": 0,
        "description": "string",
        "enabled": true,
        "matchParams": false,
        "links": [
          {
            "method": "string",
            "rel": "string",
            "uri": "string",
            "href": "string",
            "title": "string",
            "type": "string",
            "itemType": "string",
            "responseType": "string",
            "responseItemType": "string"
          }
        ]
      },
      "op": "add",
      "path": null
    }
    
    

    Rule Patch Operation

    Properties
    Name Type Required Restrictions Description
    value authorizationRule false none An authorization rule that does not have a known ID. The rule has not been saved or the ID is unavailable for some other reason. Compare with SavedAuthorizationRule.
    op string true none The type of operation to perform on the defined rule.
    path any true none The URI of the rule.
    Enumerated Values
    Property Value
    op add
    op replace
    op remove
    op test
    op copy

    [
      {
        "method": "string",
        "rel": "string",
        "uri": "string",
        "href": "string",
        "title": "string",
        "type": "string",
        "itemType": "string",
        "responseType": "string",
        "responseItemType": "string"
      }
    ]
    
    

    Links

    Properties
    Name Type Required Restrictions Description
    Links [permissionsToLinks] false none Zero or more links that are to related resources and actions.

    localizedValueCollection

    {
      "name": "string",
      "start": 0,
      "limit": 0,
      "count": 0,
      "accept": "string",
      "links": [
        {
          "method": "string",
          "rel": "string",
          "uri": "string",
          "href": "string",
          "title": "string",
          "type": "string",
          "itemType": "string",
          "responseType": "string",
          "responseItemType": "string"
        }
      ],
      "version": 0,
      "items": [
        {
          "value": "string",
          "localizedValue": "string"
        }
      ]
    }
    
    

    Resource Collection of Localized Values

    Properties
    Name Type Required Restrictions Description
    Resource Collection of Localized Values any false none A collection of localized values.

    allOf

    Name Type Required Restrictions Description
    anonymous savedAuthorizationRuleCollection false none This is a base schema used to define paginated collections of resources. This base schema is extended by other schemas in APIs by adding an 'items' array property. These extensions define the application/vnd.sas.collection media type (version 2)

    and

    Name Type Required Restrictions Description
    anonymous object false none The array of localizedValue representations.
    » items [localizedValue] false none [A name-value pair of the form (value: localizedValue).]

    localizedValue

    {
      "value": "string",
      "localizedValue": "string"
    }
    
    

    Localized Value

    Properties
    Name Type Required Restrictions Description
    value string false none The original, unlocalized value.
    localizedValue string false none The corresponding localized value.

    {
      "grantedLinks": [
        {
          "method": "string",
          "rel": "string",
          "uri": "string",
          "href": "string",
          "title": "string",
          "type": "string",
          "itemType": "string",
          "responseType": "string",
          "responseItemType": "string"
        }
      ],
      "prohibitedLinks": [
        {
          "method": "string",
          "rel": "string",
          "uri": "string",
          "href": "string",
          "title": "string",
          "type": "string",
          "itemType": "string",
          "responseType": "string",
          "responseItemType": "string"
        }
      ],
      "version": 0
    }
    
    

    Authorized Links

    Properties
    Name Type Required Restrictions Description
    grantedLinks [permissionsToLinks] false none An array of link objects that are granted based on the permission requested.
    prohibitedLinks [permissionsToLinks] false none An array of link objects that are prohibited based on the permission requested.
    version integer(int32) false none The version of the authorized links format that is being referenced.

    errorResponse

    {
      "statusCode": 0,
      "errorCode": 0,
      "message": "string",
      "details": [
        "string"
      ],
      "remediation": "string",
      "errors": [
        null
      ],
      "id": "string",
      "version": 0,
      "links": {
        "method": "string",
        "rel": "string",
        "uri": "string",
        "href": "string",
        "title": "string",
        "type": "string",
        "itemType": "string",
        "responseType": "string",
        "responseItemType": "string"
      }
    }
    
    

    Error Response

    Properties
    Name Type Required Restrictions Description
    statusCode integer(int32) false none HTTP status code.
    errorCode integer(int32) false none An optional error code that indicates what went wrong.
    message string false none A message that describes the error.
    details [string] false none An array of strings that provide more information about what went wrong.
    remediation string false none An optional string that describes steps that can be taken to fix the problem.
    errors [errorResponse] false none A nested array of root causes or related errors.
    id string false none The identifier for the error.
    version integer(int32) false none The version of the error response format that is being referenced.
    links permissionsToLinks false none A link to a related operation or resource.

    hypothetical

    {
      "version": 0,
      "patch": [
        {
          "value": {
            "condition": "string",
            "containerUri": "string",
            "expirationTimeStamp": "2019-08-24T14:15:22Z",
            "filter": "string",
            "contentType": "string",
            "acceptType": "string",
            "acceptItemType": "string",
            "objectUri": "string",
            "permissions": [
              "add"
            ],
            "principal": "string",
            "principalType": "user",
            "reason": "string",
            "type": "grant",
            "version": 0,
            "description": "string",
            "enabled": true,
            "matchParams": false,
            "links": [
              {
                "method": "string",
                "rel": "string",
                "uri": "string",
                "href": "string",
                "title": "string",
                "type": "string",
                "itemType": "string",
                "responseType": "string",
                "responseItemType": "string"
              }
            ]
          },
          "op": "add",
          "path": null
        }
      ],
      "uris": [
        "string"
      ]
    }
    
    

    Hypothetical

    Properties
    Name Type Required Restrictions Description
    version integer(int32) false none The version of the resource selection format that is being referenced.
    patch [rulePatchOperation] false none An array of patch operations to apply to the existing rules.
    uris [string] false none The URIs for which to create the explanations.

    share

    {
      "sharedWith": "string",
      "resourceUri": "string",
      "name": "string",
      "sharedWithType": "user",
      "type": "read",
      "enabled": true,
      "version": 0,
      "links": [
        {
          "method": "string",
          "rel": "string",
          "uri": "string",
          "href": "string",
          "title": "string",
          "type": "string",
          "itemType": "string",
          "responseType": "string",
          "responseItemType": "string"
        }
      ]
    }
    
    

    Share

    Properties
    Name Type Required Restrictions Description
    sharedWith string true none The principal name of the share recipient.
    resourceUri string true none A relative URI that represents a resource. All shares must target a resource URI.
    name string false none The user-friendly name of the shared resource.
    sharedWithType string true none The type of principal to which the share applies.
    type string true none The level of access that the share provides.
    enabled boolean false none Flag indicating whether the current share is in effect or not.
    version integer(int32) false none The version of the share representation. The current representation version is 2.
    links links false none Zero or more links that are to related resources and actions.
    Enumerated Values
    Property Value
    sharedWithType user
    sharedWithType group
    sharedWithType authenticatedUsers
    sharedWithType everyone
    sharedWithType guest
    type read
    type readEdit
    type readShare
    type readEditShare

    savedShare

    {
      "sharedWith": "string",
      "resourceUri": "string",
      "name": "string",
      "sharedWithType": "user",
      "type": "read",
      "enabled": true,
      "version": 0,
      "links": [
        {
          "method": "string",
          "rel": "string",
          "uri": "string",
          "href": "string",
          "title": "string",
          "type": "string",
          "itemType": "string",
          "responseType": "string",
          "responseItemType": "string"
        }
      ],
      "id": "string",
      "createdBy": "string",
      "creationTimeStamp": "2019-08-24T14:15:22Z",
      "modifiedBy": "string",
      "modifiedTimeStamp": "2019-08-24T14:15:22Z"
    }
    
    

    Saved Share

    Properties
    Name Type Required Restrictions Description
    Saved Share any false none Any share that can be referenced by a unique identifier and has been persisted.

    allOf

    Name Type Required Restrictions Description
    anonymous share false none A share that does not have a known ID or sharedBy value. The share has not been saved or the ID is unavailable for some other reason. Compare with SavedShare.

    and

    Name Type Required Restrictions Description
    anonymous object false none none
    » id string false none The unique identifier for the share.
    » createdBy string false none The ID of the user who created the share.
    » creationTimeStamp string(date-time) false none The date and time at which the share was created.
    » modifiedBy string false none The ID of the last user to modify the share.
    » modifiedTimeStamp string(date-time) false none The date and time at which the share was last modified.

    savedShareCollection

    {
      "name": "string",
      "start": 0,
      "limit": 0,
      "count": 0,
      "accept": "string",
      "links": [
        {
          "method": "string",
          "rel": "string",
          "uri": "string",
          "href": "string",
          "title": "string",
          "type": "string",
          "itemType": "string",
          "responseType": "string",
          "responseItemType": "string"
        }
      ],
      "version": 0,
      "items": [
        {
          "sharedWith": "string",
          "resourceUri": "string",
          "name": "string",
          "sharedWithType": "user",
          "type": "read",
          "enabled": true,
          "version": 0,
          "links": [
            {
              "method": "string",
              "rel": "string",
              "uri": "string",
              "href": "string",
              "title": "string",
              "type": "string",
              "itemType": "string",
              "responseType": "string",
              "responseItemType": "string"
            }
          ],
          "id": "string",
          "createdBy": "string",
          "creationTimeStamp": "2019-08-24T14:15:22Z",
          "modifiedBy": "string",
          "modifiedTimeStamp": "2019-08-24T14:15:22Z"
        }
      ]
    }
    
    

    Resource Collection of Shares

    Properties
    Name Type Required Restrictions Description
    Resource Collection of Shares any false none A collection of saved shares.

    allOf

    Name Type Required Restrictions Description
    anonymous savedAuthorizationRuleCollection false none This is a base schema used to define paginated collections of resources. This base schema is extended by other schemas in APIs by adding an 'items' array property. These extensions define the application/vnd.sas.collection media type (version 2)

    and

    Name Type Required Restrictions Description
    anonymous object false none none
    » items [savedShare] false none The array of application/vnd.sas.authorization.rule+json representations.

    sharePatchOperation

    {
      "value": {
        "sharedWith": "string",
        "resourceUri": "string",
        "name": "string",
        "sharedWithType": "user",
        "type": "read",
        "enabled": true,
        "version": 0,
        "links": [
          {
            "method": "string",
            "rel": "string",
            "uri": "string",
            "href": "string",
            "title": "string",
            "type": "string",
            "itemType": "string",
            "responseType": "string",
            "responseItemType": "string"
          }
        ]
      },
      "op": "add",
      "path": null
    }
    
    

    Share Patch Operation

    Properties
    Name Type Required Restrictions Description
    value share false none A share that does not have a known ID or sharedBy value. The share has not been saved or the ID is unavailable for some other reason. Compare with SavedShare.
    op string true none The type of operation to perform on the defined share.
    path any true none The URI of the share.
    Enumerated Values
    Property Value
    op add
    op replace
    op remove

    error2

    {
      "message": "string",
      "id": "string",
      "errorCode": 0,
      "httpStatusCode": 0,
      "details": [
        "string"
      ],
      "remediation": "string",
      "errors": [
        null
      ],
      "links": [
        {
          "method": "string",
          "rel": "string",
          "uri": "string",
          "href": "string",
          "title": "string",
          "type": "string",
          "itemType": "string",
          "responseType": "string",
          "responseItemType": "string"
        }
      ],
      "version": 0
    }
    
    

    Error

    Properties
    Name Type Required Restrictions Description
    message string false none The message for the error.
    id string false none The string ID for the error.
    errorCode integer false none The numeric ID for the error.
    httpStatusCode integer true none The HTTP status code for the error.
    details [string] false none Messages that provide additional details about the cause of the error.
    remediation string false none A message that describes how to resolve the error.
    errors [error2] false none Any additional errors that occurred.
    links [permissionsToLinks] false none The links that apply to the error.
    version integer true none The version number of the error representation. This representation is version 2.

    validation

    {
      "version": 0,
      "valid": true,
      "error": {},
      "links": [
        {
          "method": "string",
          "rel": "string",
          "uri": "string",
          "href": "string",
          "title": "string",
          "type": "string",
          "itemType": "string",
          "responseType": "string",
          "responseItemType": "string"
        }
      ]
    }
    
    

    Validation Response

    Properties
    Name Type Required Restrictions Description
    version integer true none This media type's schema version number. This representation is version 1.
    valid boolean true none true if and only if the validation was successful.
    error object false none An error object that describes how the validation failed. This member is omitted if the value for the valid property is true.
    links [permissionsToLinks] false none An array of links to related resources and actions.

    Examples

    Github Examples

    Detailed examples on how to use this API can be found on Github.

    Media Type Samples

    application/vnd.sas.authorization.rule

    The application/vnd.sas.authorization.rule media type describes the complete details of an authorization rule. The schema is at authorizationRule.

    application/vnd.sas.authorization.rule+json

    Here is an example of the JSON representation of this media type:

    { "type": "grant", "permissions": [ "read" ], "principalType": "authenticatedUsers", "objectUri": "/preferences/", "description": "Allow access to a service root.", "matchParams": false, "version": 5, "links": [ { "method": "GET", "rel": "self", "href": "/authorization/rules/3288b305-981f-4b8d-b440-0911eabc3fac", "uri": "/authorization/rules/3288b305-981f-4b8d-b440-0911eabc3fac", "type": "application/vnd.sas.authorization.rule" }, { "method": "PUT", "rel": "update", "href": "/authorization/rules/3288b305-981f-4b8d-b440-0911eabc3fac", "uri": "/authorization/rules/3288b305-981f-4b8d-b440-0911eabc3fac", "type": "application/vnd.sas.authorization.rule", "responseType": "application/vnd.sas.authorization.rule" }, { "method": "DELETE", "rel": "delete", "href": "/authorization/rules/3288b305-981f-4b8d-b440-0911eabc3fac", "uri": "/authorization/rules/3288b305-981f-4b8d-b440-0911eabc3fac" } ], "id": "3288b305-981f-4b8d-b440-0911eabc3fac", "modifiedTimestamp": "2016-08-27T04:09:42.150Z", "createdTimestamp": "2016-08-27T04:09:42.150Z", "createdBy": "bob", "modifiedBy": "bob", "enabled": true }

    application/vnd.sas.authorization.decision

    The application/vnd.sas.authorization.decision media type represents the decision that the authorization system has made as to whether an action can occur or not. This type simply represents a json Boolean value indicating whether the action can occur (true) or not (false). The returned value is a string.

    application/vnd.sas.authorization.decision+json

    Here is an example of the JSON representation of this media type:

    { true }

    application/vnd.sas.authorization.explanations

    The application/vnd.sas.authorization.explanations media type represents the implicit and explicit grant (or prohibit) state of all permissions for all relevant principals for a set of objects. The common use for this media type is explaining effective access in an administrative UI.

    This media type represents a list of Explanation objects.

    The schema is at explanations.

    application/vnd.sas.authorization.explanations+json

    Here is an example of the JSON representation of this media type:

    { "principal":{ "version":1, "name":"testprincipal", "type":"user" }, "permissions":{ "read":{ "result":"grant", "grantFactor":{ "direct":true, "contributingRules":[ { "method":"GET", "rel":"directContributingRule", "href":"/authorization/rules/6084bd1a-582c-45b0-8ef4-4045c0d10d2f", "uri":"/authorization/rules/6084bd1a-582c-45b0-8ef4-4045c0d10d2f" }, { "method":"GET", "rel":"directContributingRule", "href":"/authorization/rules/a07598bf-cb6a-409e-980f-d33f07b921d4", "uri":"/authorization/rules/a07598bf-cb6a-409e-980f-d33f07b921d4" } ] } }, "add":{ "result":"grant", "grantFactor":{ "direct":true, "contributingRules":[ { "method":"GET", "rel":"directContributingRule", "href":"/authorization/rules/6084bd1a-582c-45b0-8ef4-4045c0d10d2f", "uri":"/authorization/rules/6084bd1a-582c-45b0-8ef4-4045c0d10d2f" }, { "method":"GET", "rel":"directContributingRule", "href":"/authorization/rules/a07598bf-cb6a-409e-980f-d33f07b921d4", "uri":"/authorization/rules/a07598bf-cb6a-409e-980f-d33f07b921d4" } ] } }, "delete":{ "result":"grant", "grantFactor":{ "direct":true, "contributingRules":[ { "method":"GET", "rel":"directContributingRule", "href":"/authorization/rules/6084bd1a-582c-45b0-8ef4-4045c0d10d2f", "uri":"/authorization/rules/6084bd1a-582c-45b0-8ef4-4045c0d10d2f" }, { "method":"GET", "rel":"directContributingRule", "href":"/authorization/rules/a07598bf-cb6a-409e-980f-d33f07b921d4", "uri":"/authorization/rules/a07598bf-cb6a-409e-980f-d33f07b921d4" } ] } }, "create":{ "result":"grant", "grantFactor":{ "direct":true, "contributingRules":[ { "method":"GET", "rel":"directContributingRule", "href":"/authorization/rules/6084bd1a-582c-45b0-8ef4-4045c0d10d2f", "uri":"/authorization/rules/6084bd1a-582c-45b0-8ef4-4045c0d10d2f" }, { "method":"GET", "rel":"directContributingRule", "href":"/authorization/rules/a07598bf-cb6a-409e-980f-d33f07b921d4", "uri":"/authorization/rules/a07598bf-cb6a-409e-980f-d33f07b921d4" } ] } }, "secure":{ "result":"grant", "grantFactor":{ "direct":true, "contributingRules":[ { "method":"GET", "rel":"directContributingRule", "href":"/authorization/rules/6084bd1a-582c-45b0-8ef4-4045c0d10d2f", "uri":"/authorization/rules/6084bd1a-582c-45b0-8ef4-4045c0d10d2f" }, { "method":"GET", "rel":"directContributingRule", "href":"/authorization/rules/a07598bf-cb6a-409e-980f-d33f07b921d4", "uri":"/authorization/rules/a07598bf-cb6a-409e-980f-d33f07b921d4" } ] } }, "remove":{ "result":"grant", "grantFactor":{ "direct":true, "contributingRules":[ { "method":"GET", "rel":"directContributingRule", "href":"/authorization/rules/6084bd1a-582c-45b0-8ef4-4045c0d10d2f", "uri":"/authorization/rules/6084bd1a-582c-45b0-8ef4-4045c0d10d2f" }, { "method":"GET", "rel":"directContributingRule", "href":"/authorization/rules/a07598bf-cb6a-409e-980f-d33f07b921d4", "uri":"/authorization/rules/a07598bf-cb6a-409e-980f-d33f07b921d4" } ] } }, "update":{ "result":"grant", "grantFactor":{ "direct":true, "contributingRules":[ { "method":"GET", "rel":"directContributingRule", "href":"/authorization/rules/6084bd1a-582c-45b0-8ef4-4045c0d10d2f", "uri":"/authorization/rules/6084bd1a-582c-45b0-8ef4-4045c0d10d2f" }, { "method":"GET", "rel":"directContributingRule", "href":"/authorization/rules/a07598bf-cb6a-409e-980f-d33f07b921d4", "uri":"/authorization/rules/a07598bf-cb6a-409e-980f-d33f07b921d4" } ] } } }, "read":{ "result":"grant", "grantFactor":{ "direct":true, "contributingRules":[ { "method":"GET", "rel":"directContributingRule", "href":"/authorization/rules/6084bd1a-582c-45b0-8ef4-4045c0d10d2f", "uri":"/authorization/rules/6084bd1a-582c-45b0-8ef4-4045c0d10d2f" }, { "method":"GET", "rel":"directContributingRule", "href":"/authorization/rules/a07598bf-cb6a-409e-980f-d33f07b921d4", "uri":"/authorization/rules/a07598bf-cb6a-409e-980f-d33f07b921d4" } ] } }, "add":{ "result":"grant", "grantFactor":{ "direct":true, "contributingRules":[ { "method":"GET", "rel":"directContributingRule", "href":"/authorization/rules/6084bd1a-582c-45b0-8ef4-4045c0d10d2f", "uri":"/authorization/rules/6084bd1a-582c-45b0-8ef4-4045c0d10d2f" }, { "method":"GET", "rel":"directContributingRule", "href":"/authorization/rules/a07598bf-cb6a-409e-980f-d33f07b921d4", "uri":"/authorization/rules/a07598bf-cb6a-409e-980f-d33f07b921d4" } ] } }, "delete":{ "result":"grant", "grantFactor":{ "direct":true, "contributingRules":[ { "method":"GET", "rel":"directContributingRule", "href":"/authorization/rules/6084bd1a-582c-45b0-8ef4-4045c0d10d2f", "uri":"/authorization/rules/6084bd1a-582c-45b0-8ef4-4045c0d10d2f" }, { "method":"GET", "rel":"directContributingRule", "href":"/authorization/rules/a07598bf-cb6a-409e-980f-d33f07b921d4", "uri":"/authorization/rules/a07598bf-cb6a-409e-980f-d33f07b921d4" } ] } }, "create":{ "result":"grant", "grantFactor":{ "direct":true, "contributingRules":[ { "method":"GET", "rel":"directContributingRule", "href":"/authorization/rules/6084bd1a-582c-45b0-8ef4-4045c0d10d2f", "uri":"/authorization/rules/6084bd1a-582c-45b0-8ef4-4045c0d10d2f" }, { "method":"GET", "rel":"directContributingRule", "href":"/authorization/rules/a07598bf-cb6a-409e-980f-d33f07b921d4", "uri":"/authorization/rules/a07598bf-cb6a-409e-980f-d33f07b921d4" } ] } }, "secure":{ "result":"grant", "grantFactor":{ "direct":true, "contributingRules":[ { "method":"GET", "rel":"directContributingRule", "href":"/authorization/rules/6084bd1a-582c-45b0-8ef4-4045c0d10d2f", "uri":"/authorization/rules/6084bd1a-582c-45b0-8ef4-4045c0d10d2f" }, { "method":"GET", "rel":"directContributingRule", "href":"/authorization/rules/a07598bf-cb6a-409e-980f-d33f07b921d4", "uri":"/authorization/rules/a07598bf-cb6a-409e-980f-d33f07b921d4" } ] } }, "remove":{ "result":"grant", "grantFactor":{ "direct":true, "contributingRules":[ { "method":"GET", "rel":"directContributingRule", "href":"/authorization/rules/6084bd1a-582c-45b0-8ef4-4045c0d10d2f", "uri":"/authorization/rules/6084bd1a-582c-45b0-8ef4-4045c0d10d2f" }, { "method":"GET", "rel":"directContributingRule", "href":"/authorization/rules/a07598bf-cb6a-409e-980f-d33f07b921d4", "uri":"/authorization/rules/a07598bf-cb6a-409e-980f-d33f07b921d4" } ] } }, "update":{ "result":"grant", "grantFactor":{ "direct":true, "contributingRules":[ { "method":"GET", "rel":"directContributingRule", "href":"/authorization/rules/6084bd1a-582c-45b0-8ef4-4045c0d10d2f", "uri":"/authorization/rules/6084bd1a-582c-45b0-8ef4-4045c0d10d2f" }, { "method":"GET", "rel":"directContributingRule", "href":"/authorization/rules/a07598bf-cb6a-409e-980f-d33f07b921d4", "uri":"/authorization/rules/a07598bf-cb6a-409e-980f-d33f07b921d4" } ] } } }

    application/vnd.sas.authorization.context

    The application/vnd.sas.authorization.context media type represents the authorization context.

    The authorization context contains the information that is relevant to a specific authorization decision.

    The schema is at authorizationContext.

    application/vnd.sas.authorization.context+json

    Here is an example of the JSON representation of this media type:

    { "request":{ "uri":"/test/123" }, "principals":[ { "name":"testprincipal", "type":"user" } ], "permission":"read", "parameters":{}, "properties":{}, "links":{}, "bulkLinks":{}, "matchParams":false, "eachNamed":{} }

    application/vnd.sas.authorization.rule.job

    The application/vnd.sas.authorization.rule.job media type represents a set of rule CRUD actions to be performed asynchronously by the authorization service.

    Each action must specify an application/vnd.sas.authorization.rule to act on. For create actions, this representation does not require a valid rule ID, because a rule ID is generated automatically when the new rule is created. For update and delete actions, the representation must contain a valid rule ID that matches an existing rule.

    The schema is at ruleJob.

    application/vnd.sas.authorization.rule.async+json

    Here is an example of the JSON representation of this media type:

    { "state":"pending", "actions":[ { "rule":{ "type":"grant", "permissions":[ "add", "create", "delete", "read", "remove", "secure", "update" ], "principal":"testprincipal", "principalType":"user", "objectUri":"/test/**", "mediaType":"application/vnd.sas.test", "reason":"Because I'm testing", "matchParams":false, "version":5, "enabled":true }, "type":"create", "state":"pending" } ] }

    application/vnd.sas.authorization.explanation.hypothetical

    The vnd.sas.authorization.explanation.hypothetical media type represents a set of URIs that provide hypothetical explanations and a JSON patch that contains a series of hypothetical actions to be applied to the rules collection before creating those explanations.

    The schema is at hypothetical.

    application/vnd.sas.authorization.explanation.hypothetical+json

    Here is an example of the JSON representation of this media type:

    { "uris": [ "/test/conditionalGrant" ], "patch": [ { "op": "add", "path": "/authorization/rules/fc320a06-51de-46bc-a8e7-3922a33f9d27", "value": { "type": "grant", "permissions": [ "remove", "add", "read", "secure", "create", "delete", "update" ], "principal": "somePrincipal", "principalType": "user", "containerUri": null, "objectUri": "/test/conditionalGrant", "mediaType": "application/vnd.sas.test", "condition": "isFoo()"