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

    Annotations

    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.

    Base URLs:

    Code samples

    # You can also use wget
    curl -X GET https://www.example.com/annotations/ \
      -H 'Authorization: Bearer <access-token-goes-here>' \ 
      -H 'Accept: application/vnd.sas.api+json'
    
    
    var headers = {
      'Accept':'application/vnd.sas.api+json'
    
    };
    
    $.ajax({
      url: 'https://www.example.com/annotations/',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    import requests
    headers = {
      'Accept': 'application/vnd.sas.api+json'
    }
    
    r = requests.get('https://www.example.com/annotations/', params={
    
    }, headers = headers)
    
    print r.json()
    
    

    GET /

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

    Example responses

    200

    {
      "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/
    
    
    
    $.ajax({
      url: 'https://www.example.com/annotations/',
      method: 'head',
    
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    import requests
    
    r = requests.head('https://www.example.com/annotations/', params={
    
    )
    
    print r.json()
    
    

    HEAD /

    Checks whether the Annotations API is available.

    Responses

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

    Import an annotation

    Code samples

    # You can also use wget
    curl -X POST https://www.example.com/annotations/annotations#import \
      -H 'Content-Type: application/vnd.sas.transfer.object+json' \
      -H 'Authorization: Bearer <access-token-goes-here>' \ 
      -H 'Accept: application/vnd.sas.summary+json'
    
    
    var headers = {
      'Content-Type':'application/vnd.sas.transfer.object+json',
      'Accept':'application/vnd.sas.summary+json'
    
    };
    
    $.ajax({
      url: 'https://www.example.com/annotations/annotations#import',
      method: 'post',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    import requests
    headers = {
      'Content-Type': 'application/vnd.sas.transfer.object+json',
      'Accept': 'application/vnd.sas.summary+json'
    }
    
    r = requests.post('https://www.example.com/annotations/annotations#import', params={
    
    }, headers = headers)
    
    print r.json()
    
    

    POST /annotations#import

    Create an annotation from transferable data. Except for the original annotation ID, all other annotation properties are preserved.

    Body parameter

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

    Parameters

    Parameter In Type Required Description
    body body createAnnotation true The annotation to import.

    Example responses

    201

    {
      "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 imported. annotation
    400 Bad Request The request was invalid. 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.

    Import an update to an existing annotation using a transfer object

    Code samples

    # You can also use wget
    curl -X PUT https://www.example.com/annotations/annotations/{annotationId}#importUpdate \
      -H 'Content-Type: application/vnd.sas.transfer.object+json' \
      -H 'Authorization: Bearer <access-token-goes-here>' \ 
      -H 'Accept: application/vnd.sas.annotation+json' \
      -H 'If-Match: string'
    
    
    var headers = {
      'Content-Type':'application/vnd.sas.transfer.object+json',
      'Accept':'application/vnd.sas.annotation+json',
      'If-Match':'string'
    
    };
    
    $.ajax({
      url: 'https://www.example.com/annotations/annotations/{annotationId}#importUpdate',
      method: 'put',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    import requests
    headers = {
      'Content-Type': 'application/vnd.sas.transfer.object+json',
      'Accept': 'application/vnd.sas.annotation+json',
      'If-Match': 'string'
    }
    
    r = requests.put('https://www.example.com/annotations/annotations/{annotationId}#importUpdate', params={
    
    }, headers = headers)
    
    print r.json()
    
    

    PUT /annotations/{annotationId}#importUpdate

    Updates an existing annotation using transferable data.

    Body parameter

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

    Parameters

    Parameter 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

    {
      "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
    404 Not Found The annotation 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 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.

    Get an annotation in transferable format

    Code samples

    # You can also use wget
    curl -X GET https://www.example.com/annotations/annotations/{annotationId}#export \
      -H 'Authorization: Bearer <access-token-goes-here>' \ 
      -H 'Accept: application/vnd.sas.transfer.object+json'
    
    
    var headers = {
      'Accept':'application/vnd.sas.transfer.object+json'
    
    };
    
    $.ajax({
      url: 'https://www.example.com/annotations/annotations/{annotationId}#export',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    import requests
    headers = {
      'Accept': 'application/vnd.sas.transfer.object+json'
    }
    
    r = requests.get('https://www.example.com/annotations/annotations/{annotationId}#export', params={
    
    }, headers = headers)
    
    print r.json()
    
    

    GET /annotations/{annotationId}#export

    Returns the transferable data of the specified annotation.

    Parameters

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

    Example responses

    200

    {
      "version": 0,
      "id": "string",
      "summary": {},
      "content": {},
      "connectors": [
        {}
      ]
    }
    

    Responses

    Status Meaning Description Schema
    200 OK The annotation was exported. transferObject
    404 Not Found The 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.

    Get all annotations

    Code samples

    # You can also use wget
    curl -X GET https://www.example.com/annotations/annotations \
      -H 'Authorization: Bearer <access-token-goes-here>' \ 
      -H 'Accept: application/vnd.sas.collection+json'
    
    
    var headers = {
      'Accept':'application/vnd.sas.collection+json'
    
    };
    
    $.ajax({
      url: 'https://www.example.com/annotations/annotations',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    import requests
    headers = {
      'Accept': 'application/vnd.sas.collection+json'
    }
    
    r = requests.get('https://www.example.com/annotations/annotations', params={
    
    }, headers = headers)
    
    print r.json()
    
    

    GET /annotations

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

    Parameters

    Parameter 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

    {
      "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 'Authorization: Bearer <access-token-goes-here>' \ 
      -H 'Accept: application/vnd.sas.annotation+json'
    
    
    var headers = {
      'Content-Type':'application/vnd.sas.annotation+json',
      'Accept':'application/vnd.sas.annotation+json'
    
    };
    
    $.ajax({
      url: 'https://www.example.com/annotations/annotations',
      method: 'post',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    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', params={
    
    }, headers = headers)
    
    print r.json()
    
    

    POST /annotations

    Creates an annotation from the specified request.

    Body parameter

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

    Parameters

    Parameter 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

    {
      "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 'Authorization: Bearer <access-token-goes-here>' \ 
      -H 'Accept: application/vnd.sas.collection+json'
    
    
    var headers = {
      'Content-Type':'application/vnd.sas.selection+json',
      'Accept':'application/vnd.sas.collection+json'
    
    };
    
    $.ajax({
      url: 'https://www.example.com/annotations/annotations#multi',
      method: 'post',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    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', params={
    
    }, headers = headers)
    
    print r.json()
    
    

    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

    Parameter In Type Required Description
    body body selection true Selects resourceUris for which associated annotations are to be found.

    Example responses

    200

    {
      "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 'Authorization: Bearer <access-token-goes-here>' \ 
      -H 'Accept: application/vnd.sas.annotation+json'
    
    
    var headers = {
      'Accept':'application/vnd.sas.annotation+json'
    
    };
    
    $.ajax({
      url: 'https://www.example.com/annotations/annotations/{annotationId}',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    import requests
    headers = {
      'Accept': 'application/vnd.sas.annotation+json'
    }
    
    r = requests.get('https://www.example.com/annotations/annotations/{annotationId}', params={
    
    }, headers = headers)
    
    print r.json()
    
    

    GET /annotations/{annotationId}

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

    Parameters

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

    Example responses

    200

    {
      "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}
    
    
    
    $.ajax({
      url: 'https://www.example.com/annotations/annotations/{annotationId}',
      method: 'head',
    
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    import requests
    
    r = requests.head('https://www.example.com/annotations/annotations/{annotationId}', params={
    
    )
    
    print r.json()
    
    

    HEAD /annotations/{annotationId}

    Returns header information and verifies that the annotation exists.

    Parameters

    Parameter 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 'Authorization: Bearer <access-token-goes-here>' \ 
      -H 'Accept: application/vnd.sas.annotation+json' \
      -H 'If-Match: string'
    
    
    var headers = {
      'Content-Type':'application/vnd.sas.annotation+json',
      'Accept':'application/vnd.sas.annotation+json',
      'If-Match':'string'
    
    };
    
    $.ajax({
      url: 'https://www.example.com/annotations/annotations/{annotationId}',
      method: 'put',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    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}', params={
    
    }, headers = headers)
    
    print r.json()
    
    

    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

    Parameter 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

    {
      "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 'Authorization: Bearer <access-token-goes-here>' \ 
      -H 'Accept: */*'
    
    
    var headers = {
      'Accept':'*/*'
    
    };
    
    $.ajax({
      url: 'https://www.example.com/annotations/annotations/{annotationId}',
      method: 'delete',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    import requests
    headers = {
      'Accept': '*/*'
    }
    
    r = requests.delete('https://www.example.com/annotations/annotations/{annotationId}', params={
    
    }, headers = headers)
    
    print r.json()
    
    

    DELETE /annotations/{annotationId}

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

    Parameters

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

    Example responses

    404

    Responses

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

    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 'Authorization: Bearer <access-token-goes-here>' \ 
      -H 'Accept: application/vnd.sas.collection+json'
    
    
    var headers = {
      'Accept':'application/vnd.sas.collection+json'
    
    };
    
    $.ajax({
      url: 'https://www.example.com/annotations/annotations/{annotationId}/members',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    import requests
    headers = {
      'Accept': 'application/vnd.sas.collection+json'
    }
    
    r = requests.get('https://www.example.com/annotations/annotations/{annotationId}/members', params={
    
    }, headers = headers)
    
    print r.json()
    
    

    GET /annotations/{annotationId}/members

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

    Parameters

    Parameter 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

    {
      "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 'Authorization: Bearer <access-token-goes-here>' \ 
      -H 'Accept: application/vnd.sas.annotation.member+json'
    
    
    var headers = {
      'Content-Type':'application/vnd.sas.annotation.member+json',
      'Accept':'application/vnd.sas.annotation.member+json'
    
    };
    
    $.ajax({
      url: 'https://www.example.com/annotations/annotations/{annotationId}/members',
      method: 'post',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    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', params={
    
    }, headers = headers)
    
    print r.json()
    
    

    POST /annotations/{annotationId}/members

    Creates an annotation member from the provided request.

    Body parameter

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

    Parameters

    Parameter 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

    {
      "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 'Authorization: Bearer <access-token-goes-here>' \ 
      -H 'Accept: application/vnd.sas.annotation.member+json'
    
    
    var headers = {
      'Accept':'application/vnd.sas.annotation.member+json'
    
    };
    
    $.ajax({
      url: 'https://www.example.com/annotations/annotations/{annotationId}/members/{memberId}',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    import requests
    headers = {
      'Accept': 'application/vnd.sas.annotation.member+json'
    }
    
    r = requests.get('https://www.example.com/annotations/annotations/{annotationId}/members/{memberId}', params={
    
    }, headers = headers)
    
    print r.json()
    
    

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

    Retrieves the member for the given annotation and member ID.

    Parameters

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

    Example responses

    200

    {
      "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 header information and 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 'Authorization: Bearer <access-token-goes-here>' \ 
      -H 'Accept: */*'
    
    
    var headers = {
      'Accept':'*/*'
    
    };
    
    $.ajax({
      url: 'https://www.example.com/annotations/annotations/{annotationId}/members/{memberId}',
      method: 'head',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    import requests
    headers = {
      'Accept': '*/*'
    }
    
    r = requests.head('https://www.example.com/annotations/annotations/{annotationId}/members/{memberId}', params={
    
    }, headers = headers)
    
    print r.json()
    
    

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

    Returns header information and verifies that the member exists.

    Parameters

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

    Example responses

    400

    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 'Authorization: Bearer <access-token-goes-here>' \ 
      -H 'Accept: application/vnd.sas.annotation.member+json' \
      -H 'If-Match: string'
    
    
    var headers = {
      'Content-Type':'application/vnd.sas.annotation.member+json',
      'Accept':'application/vnd.sas.annotation.member+json',
      'If-Match':'string'
    
    };
    
    $.ajax({
      url: 'https://www.example.com/annotations/annotations/{annotationId}/members/{memberId}',
      method: 'put',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    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}', params={
    
    }, headers = headers)
    
    print r.json()
    
    

    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

    Parameter 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

    {
      "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 'Authorization: Bearer <access-token-goes-here>' \ 
      -H 'Accept: */*'
    
    
    var headers = {
      'Accept':'*/*'
    
    };
    
    $.ajax({
      url: 'https://www.example.com/annotations/annotations/{annotationId}/members/{memberId}',
      method: 'delete',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    import requests
    headers = {
      'Accept': '*/*'
    }
    
    r = requests.delete('https://www.example.com/annotations/annotations/{annotationId}/members/{memberId}', params={
    
    }, headers = headers)
    
    print r.json()
    
    

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

    Deletes the member for the specified annotation and member ID.

    Parameters

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

    Example responses

    404

    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 'Authorization: Bearer <access-token-goes-here>' \ 
      -H 'Accept: application/vnd.sas.collection+json'
    
    
    var headers = {
      'Content-Type':'application/vnd.sas.selection+json',
      'Accept':'application/vnd.sas.collection+json'
    
    };
    
    $.ajax({
      url: 'https://www.example.com/annotations/members#multi',
      method: 'post',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    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', params={
    
    }, headers = headers)
    
    print r.json()
    
    

    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

    Parameter In Type Required Description
    body body selection true Selects annotationIds for which associated members are to be found.

    Example responses

    200

    {
      "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

    Properties

    Annotation

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

    createAnnotation

    Properties

    Create Annotation

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

    updateAnnotation

    Properties

    Update Annotation

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

    annotationCollection

    Properties

    Annotation Collection

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

    member

    Properties

    Member

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

    createMember

    Properties

    Create Member

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

    updateMember

    Properties

    Update Member

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

    memberCollection

    Properties

    Member Collection

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

    transferObject

    Properties

    Transfer Object

    Name Type Required Description
    version integer false The version number of the transfer object.
    id string false The unique transfer object identifier.
    summary object false The details of the annotation.
    content object false The encoded data of the transfer object.
    connectors [object] false Items that are associated with the transfer object.

    api

    Properties

    API

    Name Type Required Description
    links [annotation/properties/links/items] false The API base links.

    error2

    Properties

    Error

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

    selection

    Properties

    Selection

    Name Type Required Description
    version integer true The schema version number of this media type. This representation is version 1.
    template string(uri) false 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 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 An array of resource IDs or URIs
    links [annotation/properties/links/items] false An array of links to related resources and actions.
    Enumerated Values
    Property Value
    type id
    type uri
    type mixed

    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.

    Resources

    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.

    Media Types

    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.

    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.

    Authorization

    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.

    Base URLs:

    Get authorization rules

    Code samples

    # You can also use wget
    curl -X GET https://www.example.com/authorization/rules \
      -H 'Authorization: Bearer <access-token-goes-here>' \ 
      -H 'Accept: application/vnd.sas.collection+json' \
      -H 'Accept-Item: string'
    
    
    var headers = {
      'Accept':'application/vnd.sas.collection+json',
      'Accept-Item':'string'
    
    };
    
    $.ajax({
      url: 'https://www.example.com/authorization/rules',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    import requests
    headers = {
      'Accept': 'application/vnd.sas.collection+json',
      'Accept-Item': 'string'
    }
    
    r = requests.get('https://www.example.com/authorization/rules', params={
    
    }, headers = headers)
    
    print r.json()
    
    

    GET /rules

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

    Parameters

    Parameter 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

    {
      "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": "2018-12-19T15:20:48Z",
          "filter": "string",
          "mediaType": "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": "2018-12-19T15:20:48Z",
          "modifiedBy": "string",
          "modifiedTimeStamp": "2018-12-19T15:20:48Z"
        }
      ]
    }
    

    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 'Authorization: Bearer <access-token-goes-here>' \ 
      -H 'Accept: application/vnd.sas.authorization.rule+json' \
      -H 'Content-Type: string' \
      -H 'Authorization: Bearer <access-token-goes-here>' \ 
      -H 'Accept: string'
    
    
    var headers = {
      'Content-Type':'application/vnd.sas.authorization.rule+json',
      'Accept':'application/vnd.sas.authorization.rule+json',
      'Content-Type':'string',
      'Accept':'string'
    
    };
    
    $.ajax({
      url: 'https://www.example.com/authorization/rules',
      method: 'post',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    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', params={
    
    }, headers = headers)
    
    print r.json()
    
    

    POST /rules

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

    Body parameter

    {
      "condition": "string",
      "containerUri": "string",
      "expirationTimeStamp": "2018-12-19T15:20:48Z",
      "filter": "string",
      "mediaType": "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

    Parameter 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

    {
      "condition": "string",
      "containerUri": "string",
      "expirationTimeStamp": "2018-12-19T15:20:48Z",
      "filter": "string",
      "mediaType": "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": "2018-12-19T15:20:48Z",
      "modifiedBy": "string",
      "modifiedTimeStamp": "2018-12-19T15:20:48Z"
    }
    

    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 'Authorization: Bearer <access-token-goes-here>' \ 
      -H 'Accept: application/vnd.sas.collection+json'
    
    
    var headers = {
      'Content-Type':'application/json-patch+json',
      'Accept':'application/vnd.sas.collection+json'
    
    };
    
    $.ajax({
      url: 'https://www.example.com/authorization/rules',
      method: 'patch',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    import requests
    headers = {
      'Content-Type': 'application/json-patch+json',
      'Accept': 'application/vnd.sas.collection+json'
    }
    
    r = requests.patch('https://www.example.com/authorization/rules', params={
    
    }, headers = headers)
    
    print r.json()
    
    

    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": "2018-12-19T15:20:48Z",
          "filter": "string",
          "mediaType": "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

    Parameter In Type Required Description
    body body array[object] true JSON patch describing operations to perform and identifying the target rules.

    Example responses

    200

    {
      "state": "pending",
      "actions": [
        {
          "rule": {
            "condition": "string",
            "containerUri": "string",
            "expirationTimeStamp": "2018-12-19T15:20:48Z",
            "filter": "string",
            "mediaType": "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}
    
    
    
    $.ajax({
      url: 'https://www.example.com/authorization/rules/{ruleId}',
      method: 'delete',
    
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    import requests
    
    r = requests.delete('https://www.example.com/authorization/rules/{ruleId}', params={
    
    )
    
    print r.json()
    
    

    DELETE /rules/{ruleId}

    Deletes a specified authorization rule.

    Parameters

    Parameter 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 'Authorization: Bearer <access-token-goes-here>' \ 
      -H 'Accept: application/vnd.sas.authorization.rule+json'
    
    
    var headers = {
      'Accept':'application/vnd.sas.authorization.rule+json'
    
    };
    
    $.ajax({
      url: 'https://www.example.com/authorization/rules/{ruleId}',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    import requests
    headers = {
      'Accept': 'application/vnd.sas.authorization.rule+json'
    }
    
    r = requests.get('https://www.example.com/authorization/rules/{ruleId}', params={
    
    }, headers = headers)
    
    print r.json()
    
    

    GET /rules/{ruleId}

    Retrieves a specified authorization rule.

    Parameters

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

    Example responses

    200

    {
      "condition": "string",
      "containerUri": "string",
      "expirationTimeStamp": "2018-12-19T15:20:48Z",
      "filter": "string",
      "mediaType": "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": "2018-12-19T15:20:48Z",
      "modifiedBy": "string",
      "modifiedTimeStamp": "2018-12-19T15:20:48Z"
    }
    

    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 'Authorization: Bearer <access-token-goes-here>' \ 
      -H 'Accept: application/vnd.sas.authorization.rule+json' \
      -H 'If-Match: string'
    
    
    var headers = {
      'Content-Type':'application/vnd.sas.authorization.rule+json',
      'Accept':'application/vnd.sas.authorization.rule+json',
      'If-Match':'string'
    
    };
    
    $.ajax({
      url: 'https://www.example.com/authorization/rules/{ruleId}',
      method: 'put',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    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}', params={
    
    }, headers = headers)
    
    print r.json()
    
    

    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": "2018-12-19T15:20:48Z",
      "filter": "string",
      "mediaType": "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

    Parameter 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

    {
      "condition": "string",
      "containerUri": "string",
      "expirationTimeStamp": "2018-12-19T15:20:48Z",
      "filter": "string",
      "mediaType": "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": "2018-12-19T15:20:48Z",
      "modifiedBy": "string",
      "modifiedTimeStamp": "2018-12-19T15:20:48Z"
    }
    

    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 'Authorization: Bearer <access-token-goes-here>' \ 
      -H 'Accept: application/vnd.sas.authorization.rule.job+json' \
      -H 'Authorization: Bearer <access-token-goes-here>' \ 
      -H 'Accept: string' \
      -H 'Content-Type: string'
    
    
    var headers = {
      'Content-Type':'application/vnd.sas.authorization.rule.job+json',
      'Accept':'application/vnd.sas.authorization.rule.job+json',
      'Accept':'string',
      'Content-Type':'string'
    
    };
    
    $.ajax({
      url: 'https://www.example.com/authorization/rules/jobs',
      method: 'post',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    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', params={
    
    }, headers = headers)
    
    print r.json()
    
    

    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 which 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": "2018-12-19T15:20:48Z",
            "filter": "string",
            "mediaType": "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

    Parameter 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

    {
      "state": "pending",
      "actions": [
        {
          "rule": {
            "condition": "string",
            "containerUri": "string",
            "expirationTimeStamp": "2018-12-19T15:20:48Z",
            "filter": "string",
            "mediaType": "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 'Authorization: Bearer <access-token-goes-here>' \ 
      -H 'Accept: application/vnd.sas.authorization.rule.job+json'
    
    
    var headers = {
      'Accept':'application/vnd.sas.authorization.rule.job+json'
    
    };
    
    $.ajax({
      url: 'https://www.example.com/authorization/rules/jobs/{jobId}',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    import requests
    headers = {
      'Accept': 'application/vnd.sas.authorization.rule.job+json'
    }
    
    r = requests.get('https://www.example.com/authorization/rules/jobs/{jobId}', params={
    
    }, headers = headers)
    
    print r.json()
    
    

    GET /rules/jobs/{jobId}

    Retrieves descriptive information about a specified rule job.

    Parameters

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

    Example responses

    200

    {
      "state": "pending",
      "actions": [
        {
          "rule": {
            "condition": "string",
            "containerUri": "string",
            "expirationTimeStamp": "2018-12-19T15:20:48Z",
            "filter": "string",
            "mediaType": "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}
    
    
    
    $.ajax({
      url: 'https://www.example.com/authorization/rules/jobs/{jobId}',
      method: 'delete',
    
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    import requests
    
    r = requests.delete('https://www.example.com/authorization/rules/jobs/{jobId}', params={
    
    )
    
    print r.json()
    
    

    DELETE /rules/jobs/{jobId}

    Deletes a specified rule job.

    Parameters

    Parameter 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 'Authorization: Bearer <access-token-goes-here>' \ 
      -H 'Accept: text/plain'
    
    
    var headers = {
      'Accept':'text/plain'
    
    };
    
    $.ajax({
      url: 'https://www.example.com/authorization/rules/jobs/{jobId}/state',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    import requests
    headers = {
      'Accept': 'text/plain'
    }
    
    r = requests.get('https://www.example.com/authorization/rules/jobs/{jobId}/state', params={
    
    }, headers = headers)
    
    print r.json()
    
    

    GET /rules/jobs/{jobId}/state

    Retrieves status information for a specified rule job.

    Parameters

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

    Example responses

    200

    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 'Authorization: Bearer <access-token-goes-here>' \ 
      -H 'Accept: application/vnd.sas.validation+json'
    
    
    var headers = {
      'Content-Type':'text/plain',
      'Accept':'application/vnd.sas.validation+json'
    
    };
    
    $.ajax({
      url: 'https://www.example.com/authorization/commons/validations/conditions',
      method: 'post',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    import requests
    headers = {
      'Content-Type': 'text/plain',
      'Accept': 'application/vnd.sas.validation+json'
    }
    
    r = requests.post('https://www.example.com/authorization/commons/validations/conditions', params={
    
    }, headers = headers)
    
    print r.json()
    
    

    POST /commons/validations/conditions

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

    Body parameter

    "string"
    

    Parameters

    Parameter In Type Required Description
    body body string true The string that constitutes a rule condition.

    Example responses

    200

    {
      "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 'Authorization: Bearer <access-token-goes-here>' \ 
      -H 'Accept: application/vnd.sas.validation+json'
    
    
    var headers = {
      'Content-Type':'application/vnd.sas.authorization.rule+json',
      'Accept':'application/vnd.sas.validation+json'
    
    };
    
    $.ajax({
      url: 'https://www.example.com/authorization/commons/validations/rules',
      method: 'post',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    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', params={
    
    }, headers = headers)
    
    print r.json()
    
    

    POST /commons/validations/rules

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

    Body parameter

    {
      "condition": "string",
      "containerUri": "string",
      "expirationTimeStamp": "2018-12-19T15:20:48Z",
      "filter": "string",
      "mediaType": "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

    Parameter In Type Required Description
    body body authorizationRule true The properties of the rule.

    Example responses

    200

    {
      "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 'Authorization: Bearer <access-token-goes-here>' \ 
      -H 'Accept: application/vnd.sas.validation+json' \
      -H 'If-Match: string'
    
    
    var headers = {
      'Content-Type':'application/vnd.sas.authorization.rule+json',
      'Accept':'application/vnd.sas.validation+json',
      'If-Match':'string'
    
    };
    
    $.ajax({
      url: 'https://www.example.com/authorization/commons/validations/rules/{ruleId}',
      method: 'put',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    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}', params={
    
    }, headers = headers)
    
    print r.json()
    
    

    PUT /commons/validations/rules/{ruleId}

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

    Body parameter

    {
      "condition": "string",
      "containerUri": "string",
      "expirationTimeStamp": "2018-12-19T15:20:48Z",
      "filter": "string",
      "mediaType": "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

    Parameter 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

    {
      "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 'Authorization: Bearer <access-token-goes-here>' \ 
      -H 'Accept: application/vnd.sas.validation+json'
    
    
    var headers = {
      'Accept':'application/vnd.sas.validation+json'
    
    };
    
    $.ajax({
      url: 'https://www.example.com/authorization/commons/validations/rules/{ruleId}',
      method: 'delete',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    import requests
    headers = {
      'Accept': 'application/vnd.sas.validation+json'
    }
    
    r = requests.delete('https://www.example.com/authorization/commons/validations/rules/{ruleId}', params={
    
    }, headers = headers)
    
    print r.json()
    
    

    DELETE /commons/validations/rules/{ruleId}

    Determines whether a specified authorization rule exists.

    Parameters

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

    Example responses

    200

    {
      "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

    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 'Authorization: Bearer <access-token-goes-here>' \ 
      -H 'Accept: application/vnd.sas.authorization.decision+json'
    
    
    var headers = {
      'Content-Type':'application/vnd.sas.authorization.context+json',
      'Accept':'application/vnd.sas.authorization.decision+json'
    
    };
    
    $.ajax({
      url: 'https://www.example.com/authorization/decisions',
      method: 'post',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    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', params={
    
    }, headers = headers)
    
    print r.json()
    
    

    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

    Parameter In Type Required Description
    body body authorizationContext true The requested action and contextual details.

    Example responses

    200

    true
    

    Responses

    Status Meaning Description Schema
    200 OK The request succeeded. boolean
    400 Bad Request The request was invalid. Returned if the authorization context is invalid. None

    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 'Authorization: Bearer <access-token-goes-here>' \ 
      -H 'Accept: application/vnd.sas.authorization.explanations+json'
    
    
    var headers = {
      'Content-Type':'application/vnd.sas.selection+json',
      'Accept':'application/vnd.sas.authorization.explanations+json'
    
    };
    
    $.ajax({
      url: 'https://www.example.com/authorization/decisions#explanation',
      method: 'post',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    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', params={
    
    }, headers = headers)
    
    print r.json()
    
    

    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

    Parameter 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

    "{'/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 with explanations

    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 'Authorization: Bearer <access-token-goes-here>' \ 
      -H 'Accept: application/vnd.sas.authorization.explanations+json'
    
    
    var headers = {
      'Content-Type':'application/vnd.sas.authorization.explanation.hypothetical+json',
      'Accept':'application/vnd.sas.authorization.explanations+json'
    
    };
    
    $.ajax({
      url: 'https://www.example.com/authorization/decisions#hypotheticalExplanation',
      method: 'post',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    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', params={
    
    }, headers = headers)
    
    print r.json()
    
    

    POST /decisions#hypotheticalExplanation

    Provides decisions and explanations that incorporate unsaved changes to authorization rules. A client supplies 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": "2018-12-19T15:20:48Z",
            "filter": "string",
            "mediaType": "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

    Parameter 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

    "{'/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 'Authorization: Bearer <access-token-goes-here>' \ 
      -H 'Accept: application/vnd.sas.authorization.authorized.links+json'
    
    
    var headers = {
      'Content-Type':'application/vnd.sas.authorization.bulk.context+json',
      'Accept':'application/vnd.sas.authorization.authorized.links+json'
    
    };
    
    $.ajax({
      url: 'https://www.example.com/authorization/decisions#bulk',
      method: 'post',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    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', params={
    
    }, headers = headers)
    
    print r.json()
    
    

    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

    Parameter In Type Required Description
    body body bulkAuthorizationContext true The requested actions (as a map of permissions to arrays of links) and contextual details.

    Example responses

    200

    {
      "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

    Code samples

    # You can also use wget
    curl -X GET https://www.example.com/authorization/ \
      -H 'Authorization: Bearer <access-token-goes-here>' \ 
      -H 'Accept: application/vnd.sas.api+json'
    
    
    var headers = {
      'Accept':'application/vnd.sas.api+json'
    
    };
    
    $.ajax({
      url: 'https://www.example.com/authorization/',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    import requests
    headers = {
      'Accept': 'application/vnd.sas.api+json'
    }
    
    r = requests.get('https://www.example.com/authorization/', params={
    
    }, headers = headers)
    
    print r.json()
    
    

    GET /

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

    Example responses

    200

    {
      "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

    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 'Authorization: Bearer <access-token-goes-here>' \ 
      -H 'Accept: application/vnd.sas.collection+json' \
      -H 'Accept-Language: string'
    
    
    var headers = {
      'Accept':'application/vnd.sas.collection+json',
      'Accept-Language':'string'
    
    };
    
    $.ajax({
      url: 'https://www.example.com/authorization/localizations/types',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    import requests
    headers = {
      'Accept': 'application/vnd.sas.collection+json',
      'Accept-Language': 'string'
    }
    
    r = requests.get('https://www.example.com/authorization/localizations/types', params={
    
    }, headers = headers)
    
    print r.json()
    
    

    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

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

    Example responses

    200

    {
      "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 'Authorization: Bearer <access-token-goes-here>' \ 
      -H 'Accept: application/vnd.sas.collection+json' \
      -H 'Accept-Language: string'
    
    
    var headers = {
      'Accept':'application/vnd.sas.collection+json',
      'Accept-Language':'string'
    
    };
    
    $.ajax({
      url: 'https://www.example.com/authorization/localizations/principalTypes',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    import requests
    headers = {
      'Accept': 'application/vnd.sas.collection+json',
      'Accept-Language': 'string'
    }
    
    r = requests.get('https://www.example.com/authorization/localizations/principalTypes', params={
    
    }, headers = headers)
    
    print r.json()
    
    

    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

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

    Example responses

    200

    {
      "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 'Authorization: Bearer <access-token-goes-here>' \ 
      -H 'Accept: application/vnd.sas.collection+json' \
      -H 'Accept-Language: string'
    
    
    var headers = {
      'Accept':'application/vnd.sas.collection+json',
      'Accept-Language':'string'
    
    };
    
    $.ajax({
      url: 'https://www.example.com/authorization/localizations/permissions',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    import requests
    headers = {
      'Accept': 'application/vnd.sas.collection+json',
      'Accept-Language': 'string'
    }
    
    r = requests.get('https://www.example.com/authorization/localizations/permissions', params={
    
    }, headers = headers)
    
    print r.json()
    
    

    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

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

    Example responses

    200

    {
      "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 shares

    Code samples

    # You can also use wget
    curl -X GET https://www.example.com/authorization/shares \
      -H 'Authorization: Bearer <access-token-goes-here>' \ 
      -H 'Accept: application/vnd.sas.collection+json'
    
    
    var headers = {
      'Accept':'application/vnd.sas.collection+json'
    
    };
    
    $.ajax({
      url: 'https://www.example.com/authorization/shares',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    import requests
    headers = {
      'Accept': 'application/vnd.sas.collection+json'
    }
    
    r = requests.get('https://www.example.com/authorization/shares', params={
    
    }, headers = headers)
    
    print r.json()
    
    

    GET /shares

    Retrieves some or all shares, with or without paging.

    Parameters

    Parameter 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

    {
      "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",
          "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": "2018-12-19T15:20:48Z",
          "modifiedBy": "string",
          "modifiedTimeStamp": "2018-12-19T15:20:48Z"
        }
      ]
    }
    

    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 'Authorization: Bearer <access-token-goes-here>' \ 
      -H 'Accept: application/vnd.sas.authorization.share+json' \
      -H 'Content-Type: string' \
      -H 'Authorization: Bearer <access-token-goes-here>' \ 
      -H 'Accept: string'
    
    
    var headers = {
      'Content-Type':'application/vnd.sas.authorization.share+json',
      'Accept':'application/vnd.sas.authorization.share+json',
      'Content-Type':'string',
      'Accept':'string'
    
    };
    
    $.ajax({
      url: 'https://www.example.com/authorization/shares',
      method: 'post',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    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', params={
    
    }, headers = headers)
    
    print r.json()
    
    

    POST /shares

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

    Body parameter

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

    Parameters

    Parameter 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

    {
      "sharedWith": "string",
      "resourceUri": "string",
      "name": "string",
      "sharedWithType": "user",
      "type": "read",
      "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": "2018-12-19T15:20:48Z",
      "modifiedBy": "string",
      "modifiedTimeStamp": "2018-12-19T15:20:48Z"
    }
    

    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 'Authorization: Bearer <access-token-goes-here>' \ 
      -H 'Accept: application/vnd.sas.collection+json'
    
    
    var headers = {
      'Content-Type':'application/json-patch+json',
      'Accept':'application/vnd.sas.collection+json'
    
    };
    
    $.ajax({
      url: 'https://www.example.com/authorization/shares',
      method: 'patch',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    import requests
    headers = {
      'Content-Type': 'application/json-patch+json',
      'Accept': 'application/vnd.sas.collection+json'
    }
    
    r = requests.patch('https://www.example.com/authorization/shares', params={
    
    }, headers = headers)
    
    print r.json()
    
    

    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",
          "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

    Parameter In Type Required Description
    body body array[object] true JSON patch describing operations to perform and identifying the target shares.

    Example responses

    200

    {
      "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",
          "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": "2018-12-19T15:20:48Z",
          "modifiedBy": "string",
          "modifiedTimeStamp": "2018-12-19T15:20:48Z"
        }
      ]
    }
    

    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}
    
    
    
    $.ajax({
      url: 'https://www.example.com/authorization/shares/{shareId}',
      method: 'delete',
    
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    import requests
    
    r = requests.delete('https://www.example.com/authorization/shares/{shareId}', params={
    
    )
    
    print r.json()
    
    

    DELETE /shares/{shareId}

    Deletes a specified share.

    Parameters

    Parameter 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 'Authorization: Bearer <access-token-goes-here>' \ 
      -H 'Accept: application/vnd.sas.authorization.share+json'
    
    
    var headers = {
      'Accept':'application/vnd.sas.authorization.share+json'
    
    };
    
    $.ajax({
      url: 'https://www.example.com/authorization/shares/{shareId}',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    import requests
    headers = {
      'Accept': 'application/vnd.sas.authorization.share+json'
    }
    
    r = requests.get('https://www.example.com/authorization/shares/{shareId}', params={
    
    }, headers = headers)
    
    print r.json()
    
    

    GET /shares/{shareId}

    Retrieves a specified share.

    Parameters

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

    Example responses

    200

    {
      "sharedWith": "string",
      "resourceUri": "string",
      "name": "string",
      "sharedWithType": "user",
      "type": "read",
      "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": "2018-12-19T15:20:48Z",
      "modifiedBy": "string",
      "modifiedTimeStamp": "2018-12-19T15:20:48Z"
    }
    

    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 'Authorization: Bearer <access-token-goes-here>' \ 
      -H 'Accept: application/vnd.sas.authorization.share+json' \
      -H 'If-Match: string'
    
    
    var headers = {
      'Content-Type':'application/vnd.sas.authorization.share+json',
      'Accept':'application/vnd.sas.authorization.share+json',
      'If-Match':'string'
    
    };
    
    $.ajax({
      url: 'https://www.example.com/authorization/shares/{shareId}',
      method: 'put',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    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}', params={
    
    }, headers = headers)
    
    print r.json()
    
    

    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",
      "version": 0,
      "links": [
        {
          "method": "string",
          "rel": "string",
          "uri": "string",
          "href": "string",
          "title": "string",
          "type": "string",
          "itemType": "string",
          "responseType": "string",
          "responseItemType": "string"
        }
      ]
    }
    

    Parameters

    Parameter 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

    {
      "sharedWith": "string",
      "resourceUri": "string",
      "name": "string",
      "sharedWithType": "user",
      "type": "read",
      "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": "2018-12-19T15:20:48Z",
      "modifiedBy": "string",
      "modifiedTimeStamp": "2018-12-19T15:20:48Z"
    }
    

    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 an 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 'Authorization: Bearer <access-token-goes-here>' \ 
      -H 'Accept: application/vnd.sas.properties+json'
    
    
    var headers = {
      'Accept':'application/vnd.sas.properties+json'
    
    };
    
    $.ajax({
      url: 'https://www.example.com/authorization/shares/configuration',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    import requests
    headers = {
      'Accept': 'application/vnd.sas.properties+json'
    }
    
    r = requests.get('https://www.example.com/authorization/shares/configuration', params={
    
    }, headers = headers)
    
    print r.json()
    
    

    GET /shares/configuration

    Gets property values that define 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 may be additional properties in the future.

    Example responses

    200

    {
      "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

    Schemas

    authorizationRule

    Properties

    Authorization Rule

    Name Type Required Description
    condition string false 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 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 The date and time at which the rule expires. Expired rules should be disregarded and deleted.
    filter string false Filter criteria for the rule's target object (or objects). This property is not currently in use.
    mediaType string false A type of object, such as report. Rules that target a media type affect all object instances for that media type. Most rules do not specify a media type.
    objectUri string true A relative URI or ANT-path pattern that represents a resource or set of resources. Most rules target an object URI.
    permissions [string] true The specific actions that the rule affects (for example: read, update, delete, create, secure, add, or remove).
    principal string true 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 The type of principal or construct to which the rule applies.
    reason string false 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 Indicates whether the rule blocks (prohibit) or attempts to provide (grant) access to the specified principal.
    version integer(int32) false The version of the rule representation. The current representation version is 8.
    description string false Information that documents the rule for administrative purposes.
    enabled boolean false Indicates whether the rule is enabled.
    matchParams boolean false Indicates whether the rule applies to only those requests whose query parameters exactly match the rule target.
    links links false 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

    Properties

    Identifiable Authorization Rule

    Name Type Required Description
    Identifiable Authorization Rule any false 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 Description
    anonymous authorizationRule false 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 Description
    anonymous object false
    » ruleId string false The unique identifier for the rule.

    savedAuthorizationRule

    Properties

    Saved Authorization Rule

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

    allOf

    Name Type Required Description
    anonymous identifiableAuthorizationRule false 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 Description
    anonymous object false
    » createdBy string false The ID of the user who created the rule.
    » creationTimeStamp string(date-time) false The date and time at which the rule was created.
    » modifiedBy string false The ID of the last user to modify the rule.
    » modifiedTimeStamp string(date-time) false The date and time at which the rule was last modified.

    savedAuthorizationRuleCollection

    Properties

    Resource Collection of Authorization Rules

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

    allOf

    Name Type Required Description
    anonymous object false 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 The name of the collection.
    » start integer(int64) false The zero-based index of the first item in the collection.
    » limit integer false The number of items that were requested for the collection.
    » count integer(int64) false The number of items in the collection.
    » accept string false A space-delimited list of media types from which an Accept header may be constructed.
    » links [permissionsToLinks/properties/update/items] false The links that apply to the collection.
    » version integer false The version number of the collection representation. This representation is version 2.

    and

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

    principal

    Properties

    Principal

    Name Type Required Description
    name string false 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 The type of the principal, or a construct.
    version integer(int32) false The principal media type version. The version described here is version 1.
    Enumerated Values
    Property Value
    type user
    type group

    authorizationContext

    Properties

    Authorization Context

    Name Type Required Description
    request authorizationContextRequest false A description of the HTTP request that is associated with an authorization request.
    principals [principal] false The set of principals representing the actor performing the action.
    permission string true A type of access.
    parameters object false 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 Whether the authorization service should strictly match query parameters in this context against a rule.
    eachNamed object false 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 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

    Properties

    Bulk Authorization Context

    Name Type Required Description
    Bulk Authorization Context authorizationContext false 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 A map of permissions to link arrays. The keys of this map are the permissions that the link values will be authorized for.

    Properties

    Permissions to Links

    Name Type Required Description
    add [permissionsToLinks/properties/update/items] false An array of links that should be authorized against the add permission.
    create [permissionsToLinks/properties/update/items] false An array of links that should be authorized against the create permission.
    delete [permissionsToLinks/properties/update/items] false An array of links that should be authorized against the delete permission.
    read [permissionsToLinks/properties/update/items] false An array of links that should be authorized against the read permission.
    remove [permissionsToLinks/properties/update/items] false An array of links that should be authorized against the remove permission.
    secure [permissionsToLinks/properties/update/items] false An array of links that should be authorized against the secure permission.
    update [any] false An array of links that should be authorized against the update permission.
    » Link object false A link to a related operation or resource.
    »» method string false The HTTP method for the link.
    »» rel string true The relationship of the link to the resource.
    »» uri string false The relative URI for the link.
    »» href string false The URL for the link.
    »» title string false The title for the link.
    »» type string false The media type or link type for the link.
    »» itemType string false 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 The media type or link type of the response body for a PUT, POST, or PATCH operation.
    »» responseItemType string false The media type or link type of the items in the response body for a PUT, POST, or PATCH operation.

    authorizationContextRequest

    Properties

    Authorization Context Request

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

    explanations

    Properties

    Explanations

    Name Type Required Description
    Explanations string false 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 The version of the explanation representation. The current representation version is 1.
    explanations [explanation] false [An explanation of access for one principal.]

    explanation

    Properties

    Explanation

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

    individualExplanation

    Properties

    Individual Explanation

    Name Type Required Description
    result string false The ultimate access result for the specified 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 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 specified object and is directly assigned to the specified principal).
    prohibitFactor factor false 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 specified object and is directly assigned to the specified principal).
    Enumerated Values
    Property Value
    result grant
    result prohibit
    result conditional

    permissionExplanation

    Properties

    Permission Explanation

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

    allOf

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

    and

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

    factor

    Properties

    Factor

    Name Type Required Description
    direct boolean false Indicates whether the result comes from a rule that targets the specified object directly (via objectUri) and is directly assigned to the specified 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 The condition that affects access, if any.
    contributingRules [permissionsToLinks/properties/update/items] false 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

    Properties

    Rule Job

    Name Type Required Description
    state string false Defines the current state of an action.
    actions [ruleAction] false A set of actions to be performed on specified rules. These can be create, update, or delete actions. Actions are performed in their arrayed order.
    links links false 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

    Properties

    Rule Action

    Name Type Required Description
    rule authorizationRule true 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 The type of action to be performed on a rule
    status string false 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

    Properties

    Rule Patch Operation

    Name Type Required Description
    value authorizationRule false 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 The type of operation to perform on the specified rule.
    path any true The URI of the rule.
    Enumerated Values
    Property Value
    op add
    op replace
    op remove
    op test
    op copy

    Properties

    Links

    Name Type Required Description
    Links [permissionsToLinks/properties/update/items] false Zero or more links that are to related resources and actions.

    localizedValueCollection

    Properties

    Resource Collection of Localized Values

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

    allOf

    Name Type Required Description
    anonymous savedAuthorizationRuleCollection/allOf/0 false 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 Description
    anonymous object false The array of localizedValue representations.
    » items [localizedValue] false [A name-value pair of the form (value: localizedValue).]

    localizedValue

    Properties

    Localized Value

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

    Properties

    Authorized Links

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

    errorResponse

    Properties

    Error Response

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

    hypothetical

    Properties

    Hypothetical

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

    share

    Properties

    Share

    Name Type Required Description
    sharedWith string true The principal name of the share recipient.
    resourceUri string true A relative URI that represents a resource. All shares must target a resource URI.
    name string false The user-friendly name of the shared resource.
    sharedWithType string true The type of principal to which the share applies.
    type string true The level of access that the share provides.
    version integer(int32) false The version of the share representation. The current representation version is 2.
    links links false 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

    Properties

    Saved Share

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

    allOf

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

    savedShareCollection

    Properties

    Resource Collection of Shares

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

    allOf

    Name Type Required Description
    anonymous savedAuthorizationRuleCollection/allOf/0 false 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 Description
    anonymous object false
    » items [savedShare] false The array of application/vnd.sas.authorization.rule+json representations.

    sharePatchOperation

    Properties

    Share Patch Operation

    Name Type Required Description
    value share false 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 The type of operation to perform on the specified share.
    path any true The URI of the share.
    Enumerated Values
    Property Value
    op add
    op replace
    op remove

    error2

    Properties

    Error

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

    validation

    Properties

    Validation Response

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

    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.

    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.

    Resources

    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.

    Note that all GET operations have a corresponding HEAD which is identical except for HEAD semantics. The GET / response includes the following links:

    Relation Method Description
    authorize POST Obtains an authorization decision for the specified action and authorization context.
    URI: /authorization/decisions
    Type: application/vnd.sas.authorization.context
    rules GET Retrieves a list of all rules.
    URI: /authorization/rules
    Type: application/vnd.sas.collection
    createRule POST Creates a new rule.
    URI: /authorization/rules
    Type: application/vnd.sas.authorization.rule
    getRule GET Retrieves an existing rule by its ID.
    URI: /authorization/rules/{ruleId}
    Type: application/vnd.sas.authorization.rule
    createOrUpdateRule PUT Creates or updates a rule with a specified ID. (To create a rule that has a system-generated ID, use POST on /rules.)
    URI: /authorization/rules/{ruleId}
    Type: application/vnd.sas.authorization.rule
    deleteRule DELETE Deletes an existing rule.
    URI: /authorization/rules/{ruleId}
    patchRules PATCH Applies a JSON patch to the rules collection. Supported JSON patch operations are 'add', 'replace', 'remove', 'copy', and 'test'.
    URI: /authorization/rules
    Type: application/json-patch+json
    createDecisionExplanation POST Obtains a decision explanation for the specified action and authorization context. The decision explanation details all of the factors that are relevant to the decision.
    URI: /authorization/decision
    Type: application/vnd.sas.selection
    createHypotheticalDecisionExplanation POST Obtains a hypothetical decision explanation for the specified action and authorization context, with the hypothetical rules applied. The decision explanation details all of the factors that are relevant to the hypothetical decision.
    URI: /authorization/decision
    Type: application/vnd.sas.authorization.explanation.hypothetical
    localizedTypes GET Retrieves a list of localized rule type values.
    URI: /authorization/localizations/types
    Type: application/vnd.sas.collection
    localizedPermissions GET Retrieves a list of localized permission values.
    URI: /authorization/localizations/permissions
    Type: application/vnd.sas.collection
    localizedPrincipalTypes GET Retrieves a list of localized principal type values.
    URI: /authorization/localizations/principalTypes
    Type: application/vnd.sas.collection
    createRuleFromTransferObject POST Creates a rule from the provided transfer object.
    URI: /authorization/rules
    Type: application/vnd.sas.transfer.object
    getRuleAsTransferObject GET Retrieves a transfer object representation of a rule.
    URI: /authorization/rules/{ruleId}
    updateRuleFromTransferObject PUT Updates a rule from the provided transfer object.
    URI: /authorization/rules/{ruleId}
    Type: application/vnd.sas.transfer.object
    getRuleJob GET Retrieves a rule job.
    URI: /authorization/rules/jobs/{jobId}
    deleteRuleJob DELETE Deletes a rule job.
    URI: /authorization/rules/jobs/{jobId}
    getRuleJobState GET Retrieves a rule job's current state.
    URI: /authorization/rules/jobs/{jobId}/state
    createRuleJob POST Creates a new rule job.
    URI: /authorization/rules/jobs
    Type: application/vnd.sas.authorization.rule.job
    validateCondition POST Validates the syntax of a potential rule condition.
    URI: /authorization/rules/conditionValidation
    Type: text/plain
    shares GET Retrieves a list of all shares.
    URI: /authorization/shares
    Type: application/vnd.sas.collection
    createShare POST Creates a new share.
    URI: /authorization/shares
    Type: application/vnd.sas.authorization.share
    share GET Retrieves an existing share by its ID.
    URI: /authorization/shares/{shareId}
    Type: application/vnd.sas.authorization.share
    updateShare PUT Updates a share with a specified ID.
    URI: /authorization/shares/{shareId}
    Type: application/vnd.sas.authorization.share
    deleteShare DELETE Deletes an existing share.
    URI: /authorization/shares/{shareId}
    patchShares PATCH Applies a JSON patch to the shares collection. Supported JSON patch operations are 'add', 'replace', and 'remove'.
    URI: /authorization/shares
    Type: application/json-patch+json
    shareConfiguration GET Gets property values that define how sharing is configured.
    URI: /authorization/shares/configuration
    Type: application/vnd.sas.collection

    Collection Resources

    Path: /rules

    This API provides collections of rules. Members of the /rules collection are rules, /rules/{ruleId}.

    The rules collection representation is application/vnd.sas.collection. The collection items are application/vnd.sas.authorization.rule resources.

    Responses include the following links:

    Relation Method Description
    self GET Returns the current page from the collection.
    collection GET Returns the first page of the collection, without sorting or filtering criteria.
    prev GET Returns the previous page of the collection.
    first GET Returns the first page of the collection.
    next GET Returns the next page of the collection.
    last GET Returns the last page of the collection.
    Sorting and Filtering

    These collections can be sorted and filtered using the ?sortBy= and ?filter= query parameters.

    Filtering and sorting can use the following members of the Rule:

    Path: /localizations/types

    This API provides collections of localized string values of rule types. Members of the /localizations/types collection are localized strings.

    Path: /localizations/permissions

    This API provides collections of localized string values of permissions. Members of the /localizations/permissions collection are localized strings.

    Path: /localizations/principalTypes

    This API provides collections of localized string values of principal types. Members of the /localizations/principalTypes collection are localized strings.

    Single Item Resources

    Path: /rules/{ruleId}

    A specific rule.

    Each rule instance includes the following links:

    Relation Method Description
    self GET Retrieves this rule.
    update PUT Updates this rule.
    delete DELETE Deletes this rule.

    Media Types

    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: json { "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: json { 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: json { "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: json { "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: json { "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: json { "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()", "filter": null, "reason": "Because I'm testing", "description": null, "matchParams": false, "version": 8, "id": "fc320a06-51de-46bc-a8e7-3922a33f9d27", "enabled": true } } ], "version": 1 }

    application/vnd.sas.authorization.share

    The application/vnd.sas.authorization.share media type describes the complete details of a share. The schema is at share.

    application/vnd.sas.authorization.share+json

    Here is an example of the JSON representation of this media type: json { "type": "readEdit", "sharedWith": "testUser", "sharedWithType": "user", "sharedBy": "currentUser", "resourceUri": "/files/files/4288b305-981f-4b8d-b440-0911eabe3faf", "name": "test file", "version": 2, "links": [ { "method": "GET", "rel": "self", "href": "/authorization/shares/3288b305-981f-4b8d-b440-0911eabc3fac", "uri": "/authorization/shares/3288b305-981f-4b8d-b440-0911eabc3fac", "type": "application/vnd.sas.authorization.share" }, { "method": "PUT", "rel": "update", "href": "/authorization/shares/3288b305-981f-4b8d-b440-0911eabc3fac", "uri": "/authorization/shares/3288b305-981f-4b8d-b440-0911eabc3fac", "type": "application/vnd.sas.authorization.share", "responseType": "application/vnd.sas.authorization.share" }, { "method": "DELETE", "rel": "delete", "href": "/authorization/shares/3288b305-981f-4b8d-b440-0911eabc3fac", "uri": "/authorization/shares/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": "currentUser", "modifiedBy": "currentUser" }

    Error Codes

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

    Files

    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 Files API provides persistence of files, such as comment attachments, report images, and so on.

    Base URLs:

    Code samples

    # You can also use wget
    curl -X GET https://www.example.com/files/ \
      -H 'Authorization: Bearer <access-token-goes-here>' \ 
      -H 'Accept: application/vnd.sas.api+json'
    
    
    var headers = {
      'Accept':'application/vnd.sas.api+json'
    
    };
    
    $.ajax({
      url: 'https://www.example.com/files/',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    import requests
    headers = {
      'Accept': 'application/vnd.sas.api+json'
    }
    
    r = requests.get('https://www.example.com/files/', params={
    
    }, headers = headers)
    
    print r.json()
    
    

    GET /

    Returns a list of links to the top-level resources that are surfaced through the API. These top-level links include create and retrieve operations for /files.

    Example responses

    200

    {
      "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
    404 Not Found The service is not available. None

    Check the state of the service

    Code samples

    # You can also use wget
    curl -X HEAD https://www.example.com/files/
    
    
    
    $.ajax({
      url: 'https://www.example.com/files/',
      method: 'head',
    
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    import requests
    
    r = requests.head('https://www.example.com/files/', params={
    
    )
    
    print r.json()
    
    

    HEAD /

    Indicates whether the service is available.

    Responses

    Status Meaning Description Schema
    200 OK The request succeeded. The service is available. None
    404 Not Found The service is not available. None

    Get file resources

    Code samples

    # You can also use wget
    curl -X GET https://www.example.com/files/files \
      -H 'Authorization: Bearer <access-token-goes-here>' \ 
      -H 'Accept: application/vnd.sas.collection+json' \
      -H 'Accept-Item: string'
    
    
    var headers = {
      'Accept':'application/vnd.sas.collection+json',
      'Accept-Item':'string'
    
    };
    
    $.ajax({
      url: 'https://www.example.com/files/files',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    import requests
    headers = {
      'Accept': 'application/vnd.sas.collection+json',
      'Accept-Item': 'string'
    }
    
    r = requests.get('https://www.example.com/files/files', params={
    
    }, headers = headers)
    
    print r.json()
    
    

    GET /files

    Retrieves file resources for the specified criteria. Standard paging, filtering, and sorting options are available.

    Parameters

    Parameter In Type Required Description
    Accept-Item header string false The file resource media type value. If not specified, the API returns the latest version.
    parentUri query string false The URI of the associated object or parent object.
    fields query string false The specific fields to return.
    start query integer(int64) false The offset of the first member to return. The default value is 0.
    limit query integer(int64) false The maximum number of members to return. The default value is 10.
    filter query string false The filter criteria to apply to the returned member collection.
    sortBy query string false The sort to apply to the returned member collection.

    Example responses

    200

    {
      "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": [
        {
          "parentUri": "string",
          "properties": {
            "property1": "string",
            "property2": "string"
          },
          "contentDisposition": "string",
          "contentType": "string",
          "createdBy": "string",
          "creationTimeStamp": "2018-12-19T15:20:49Z",
          "description": "string",
          "documentType": "string",
          "encoding": "string",
          "id": "string",
          "links": [
            {
              "method": "string",
              "rel": "string",
              "uri": "string",
              "href": "string",
              "title": "string",
              "type": "string",
              "itemType": "string",
              "responseType": "string",
              "responseItemType": "string"
            }
          ],
          "modifiedBy": "string",
          "modifiedTimeStamp": "2018-12-19T15:20:49Z",
          "name": "string",
          "size": 0
        }
      ]
    }
    

    Responses

    Status Meaning Description Schema
    200 OK The request succeeded. If files are found for the specified criteria, they are returned in a collection. If no files are found, an empty collection is returned. fileResourceCollection
    400 Bad Request The request was invalid. The limit parameter cannot be less than 0 or greater than 10000. error2

    Delete file resources

    Code samples

    # You can also use wget
    curl -X DELETE https://www.example.com/files/files?parentUri=string
    
    
    
    $.ajax({
      url: 'https://www.example.com/files/files',
      method: 'delete',
      data: '?parentUri=string',
    
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    import requests
    
    r = requests.delete('https://www.example.com/files/files', params={
      'parentUri': 'string'
    )
    
    print r.json()
    
    

    DELETE /files

    Deletes file resources for the specified parentUri. If the user is not authorized to delete all the matching files, no files are deleted.

    Parameters

    Parameter In Type Required Description
    parentUri query string true The parent URI that is associated with the file resources to be deleted.

    Responses

    Status Meaning Description Schema
    204 No Content The file resources for the specified parentUri were successfully deleted. None
    404 Not Found No file resources exist for the specified parentUri. None

    Create new file resource

    Code samples

    # You can also use wget
    curl -X POST https://www.example.com/files/files#multipartUpload \
      -H 'Content-Type: multipart/form-data' \
      -H 'Authorization: Bearer <access-token-goes-here>' \ 
      -H 'Accept: application/vnd.sas.file+json' \
      -H 'Content-Type: string' \
      -H 'Content-Disposition: string'
    
    
    var headers = {
      'Content-Type':'multipart/form-data',
      'Accept':'application/vnd.sas.file+json',
      'Content-Type':'string',
      'Content-Disposition':'string'
    
    };
    
    $.ajax({
      url: 'https://www.example.com/files/files#multipartUpload',
      method: 'post',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    import requests
    headers = {
      'Content-Type': 'multipart/form-data',
      'Accept': 'application/vnd.sas.file+json',
      'Content-Type': 'string',
      'Content-Disposition': 'string'
    }
    
    r = requests.post('https://www.example.com/files/files#multipartUpload', params={
    
    }, headers = headers)
    
    print r.json()
    
    

    POST /files#multipartUpload

    Creates a new file resource by passing a file in the form of a multipart request.

    Body parameter

    filename: string
    file: string
    
    

    Parameters

    Parameter In Type Required Description
    Content-Type header string false The MIME type for the multipart request. You must specify "multipart/form-data; boundary={boundaryString}". You can specify the actual MIME type of the file by using Content-Type as form data in the request body.
    Content-Disposition header string false The content disposition. This indicates whether the content is expected to be displayed inline in a browser (as a Web page or part of a Web page) or as an attachment that is downloaded and saved locally. If a filename is specified in the header, it is used as the default name of the file.
    expirationTimeStamp query string false A timestamp that indicates when to expire the file. If not specified, the file does not expire.
    parentFolderUri query string false The URI of the folder in which to add the file.
    body body object false
    » filename body string false The name of the file. Clients must specify name of the file as form data in the request body.
    » file body string(binary) false The actual file contents. The content should be listed in the format of standard form data in the request body. Only one file is permitted in a multipart request.

    Example responses

    201

    {
      "parentUri": "string",
      "properties": {
        "property1": "string",
        "property2": "string"
      },
      "contentDisposition": "string",
      "contentType": "string",
      "createdBy": "string",
      "creationTimeStamp": "2018-12-19T15:20:49Z",
      "description": "string",
      "documentType": "string",
      "encoding": "string",
      "id": "string",
      "links": [
        {
          "method": "string",
          "rel": "string",
          "uri": "string",
          "href": "string",
          "title": "string",
          "type": "string",
          "itemType": "string",
          "responseType": "string",
          "responseItemType": "string"
        }
      ],
      "modifiedBy": "string",
      "modifiedTimeStamp": "2018-12-19T15:20:49Z",
      "name": "string",
      "size": 0
    }
    

    Responses

    Status Meaning Description Schema
    201 Created The file was created and returned in the response body. fileResource
    400 Bad Request The request was invalid. A validation error occurred and the file cannot be created. Check the response for more information. Common reasons for this issue are as follows: the file is empty, the file is larger than the permitted size, the file type is not supported, or the multipart request contains more than one file. error2
    409 Conflict The request could not be completed due to a conflict with the current state of the resource. A file with the specified name cannot be created in the folder. The file already exists in the folder. error2
    Response Headers
    Status Header Type Format Description
    201 ETag string The entity tag for the file resource.
    201 Last-Modified string The last modified timestamp of the file resource.
    201 Location string The URI of the file resource.

    Get file resources for multiple parentUris

    Code samples

    # You can also use wget
    curl -X POST https://www.example.com/files/files#fetchFilesForMultipleParentUri \
      -H 'Content-Type: application/vnd.sas.selection+json' \
      -H 'Authorization: Bearer <access-token-goes-here>' \ 
      -H 'Accept: application/vnd.sas.collection+json' \
      -H 'Accept-Item: string'
    
    
    var headers = {
      'Content-Type':'application/vnd.sas.selection+json',
      'Accept':'application/vnd.sas.collection+json',
      'Accept-Item':'string'
    
    };
    
    $.ajax({
      url: 'https://www.example.com/files/files#fetchFilesForMultipleParentUri',
      method: 'post',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    import requests
    headers = {
      'Content-Type': 'application/vnd.sas.selection+json',
      'Accept': 'application/vnd.sas.collection+json',
      'Accept-Item': 'string'
    }
    
    r = requests.post('https://www.example.com/files/files#fetchFilesForMultipleParentUri', params={
    
    }, headers = headers)
    
    print r.json()
    
    

    POST /files#fetchFilesForMultipleParentUri

    Retrieves the file resources that are associated with multiple parentUri specifications. Request the parentUri values in the body. The returned collection is grouped by parentUri.

    Body parameter

    {
      "version": 0,
      "template": "string",
      "type": "string",
      "resources": {
        "id": [
          "string"
        ]
      }
    }
    

    Parameters

    Parameter In Type Required Description
    Accept-Item header string false The file resource media type value. If not specified, the API returns the latest version.
    body body fileSelection true Multiple parentUri values specified as an array of string values. The file resources that are associated with each parentUri are retrieved.

    Example responses

    200

    {
      "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": [
        {
          "parentUri": "string",
          "properties": {
            "property1": "string",
            "property2": "string"
          },
          "contentDisposition": "string",
          "contentType": "string",
          "createdBy": "string",
          "creationTimeStamp": "2018-12-19T15:20:49Z",
          "description": "string",
          "documentType": "string",
          "encoding": "string",
          "id": "string",
          "links": [
            {
              "method": "string",
              "rel": "string",
              "uri": "string",
              "href": "string",
              "title": "string",
              "type": "string",
              "itemType": "string",
              "responseType": "string",
              "responseItemType": "string"
            }
          ],
          "modifiedBy": "string",
          "modifiedTimeStamp": "2018-12-19T15:20:49Z",
          "name": "string",
          "size": 0
        }
      ]
    }
    

    Responses

    Status Meaning Description Schema
    200 OK The request succeeded. If files are found for the specified criteria, they are returned in a collection. If no files are found, an empty collection is returned. fileResourceCollection
    400 Bad Request The request was invalid. A validation error occurred and the file cannot be created. Check the response for more information. Common reasons for this issue are as follows: the file is empty, the file is larger than the permitted size, the file type is not supported, or the multipart request contains more than one file. error2

    Check if a file resource exists

    Code samples

    # You can also use wget
    curl -X HEAD https://www.example.com/files/files/{fileId}
    
    
    
    $.ajax({
      url: 'https://www.example.com/files/files/{fileId}',
      method: 'head',
    
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    import requests
    
    r = requests.head('https://www.example.com/files/files/{fileId}', params={
    
    )
    
    print r.json()
    
    

    HEAD /files/{fileId}

    Determines if a file resource exists for the specified fileId.

    Parameters

    Parameter In Type Required Description
    fileId path string true Identifier of the file resource.

    Responses

    Status Meaning Description Schema
    200 OK The request succeeded. The file resource exists. None
    404 Not Found No file resource exists for the specified identifier. None
    Response Headers
    Status Header Type Format Description
    200 ETag string The entity tag for the file resource.
    200 Last-Modified string Last modified timestamp of the file resource.

    Get a file resource

    Code samples

    # You can also use wget
    curl -X GET https://www.example.com/files/files/{fileId} \
      -H 'Authorization: Bearer <access-token-goes-here>' \ 
      -H 'Accept: application/vnd.sas.file+json'
    
    
    var headers = {
      'Accept':'application/vnd.sas.file+json'
    
    };
    
    $.ajax({
      url: 'https://www.example.com/files/files/{fileId}',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    import requests
    headers = {
      'Accept': 'application/vnd.sas.file+json'
    }
    
    r = requests.get('https://www.example.com/files/files/{fileId}', params={
    
    }, headers = headers)
    
    print r.json()
    
    

    GET /files/{fileId}

    Retrieves a file resource by specifying a fileId.

    Parameters

    Parameter In Type Required Description
    fileId path string true Identifier of the file resource.

    Example responses

    200

    {
      "parentUri": "string",
      "properties": {
        "property1": "string",
        "property2": "string"
      },
      "contentDisposition": "string",
      "contentType": "string",
      "createdBy": "string",
      "creationTimeStamp": "2018-12-19T15:20:49Z",
      "description": "string",
      "documentType": "string",
      "encoding": "string",
      "id": "string",
      "links": [
        {
          "method": "string",
          "rel": "string",
          "uri": "string",
          "href": "string",
          "title": "string",
          "type": "string",
          "itemType": "string",
          "responseType": "string",
          "responseItemType": "string"
        }
      ],
      "modifiedBy": "string",
      "modifiedTimeStamp": "2018-12-19T15:20:49Z",
      "name": "string",
      "size": 0
    }
    

    Responses

    Status Meaning Description Schema
    200 OK The request succeeded. The file was found and returned in the response body. fileResource
    404 Not Found No file resource exists for the specified identifier. None
    Response Headers
    Status Header Type Format Description
    200 ETag string The entity tag for the file resource.
    200 Last-Modified string The last modified timestamp of the file resource.

    Update file resource

    Code samples

    # You can also use wget
    curl -X PATCH https://www.example.com/files/files/{fileId} \
      -H 'Content-Type: application/vnd.sas.file+json' \
      -H 'Authorization: Bearer <access-token-goes-here>' \ 
      -H 'Accept: application/vnd.sas.file+json' \
      -H 'If-Match: string' \
      -H 'If-Unmodified-Since: string'
    
    
    var headers = {
      'Content-Type':'application/vnd.sas.file+json',
      'Accept':'application/vnd.sas.file+json',
      'If-Match':'string',
      'If-Unmodified-Since':'string'
    
    };
    
    $.ajax({
      url: 'https://www.example.com/files/files/{fileId}',
      method: 'patch',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    import requests
    headers = {
      'Content-Type': 'application/vnd.sas.file+json',
      'Accept': 'application/vnd.sas.file+json',
      'If-Match': 'string',
      'If-Unmodified-Since': 'string'
    }
    
    r = requests.patch('https://www.example.com/files/files/{fileId}', params={
    
    }, headers = headers)
    
    print r.json()
    
    

    PATCH /files/{fileId}

    Updates the file resource information. The user can change the following attributes: name, description, parentUri, documentType, contentDisposition, properties, and expirationTimeStamp.

    Body parameter

    {
      "parentUri": "string",
      "properties": {
        "property1": "string",
        "property2": "string"
      },
      "contentDisposition": "string",
      "description": "string",
      "documentType": "string",
      "name": "string"
    }
    

    Parameters

    Parameter In Type Required Description
    If-Match header string false The entity tag obtained from the most recent ETag response header.
    If-Unmodified-Since header string false The timestamp obtained from the most recent Last-Modified response header. This is ignored when If-Match is specified.
    fileId path string true Identifier of the file resource to update.
    body body fileToPatch true The file resource to update.

    Example responses

    200

    {
      "parentUri": "string",
      "properties": {
        "property1": "string",
        "property2": "string"
      },
      "contentDisposition": "string",
      "contentType": "string",
      "createdBy": "string",
      "creationTimeStamp": "2018-12-19T15:20:49Z",
      "description": "string",
      "documentType": "string",
      "encoding": "string",
      "id": "string",
      "links": [
        {
          "method": "string",
          "rel": "string",
          "uri": "string",
          "href": "string",
          "title": "string",
          "type": "string",
          "itemType": "string",
          "responseType": "string",
          "responseItemType": "string"
        }
      ],
      "modifiedBy": "string",
      "modifiedTimeStamp": "2018-12-19T15:20:49Z",
      "name": "string",
      "size": 0
    }
    

    Responses

    Status Meaning Description Schema
    200 OK The request succeeded. The updates were applied and the new object data is returned in the response body. fileResource
    400 Bad Request The request was invalid. A validation error occurred. Check the string returned in the response for more information. A possible cause is that the filename is not specified in the request body. error2
    404 Not Found No file resource exists for the specified identifier. None
    412 Precondition Failed The If-Match request header did not match the resource's entity tag, or the If-Unmodified-Since request header did not match the resource's last modified timestamp. Another operation modified the resource. Get an updated representation of the resource before reattempting the request. error2
    428 Precondition Required The request headers did not include a If-Match or If-Unmodified-Since precondition. Set appropriate the values for the If-Unmodified-Since and If-Match request headers before reattempting the request. error2
    Response Headers
    Status Header Type Format Description
    200 ETag string The entity tag for current resource.
    200 Last-Modified string The last modified timestamp of the resource.

    Delete file resource

    Code samples

    # You can also use wget
    curl -X DELETE https://www.example.com/files/files/{fileId}
    
    
    
    $.ajax({
      url: 'https://www.example.com/files/files/{fileId}',
      method: 'delete',
    
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    import requests
    
    r = requests.delete('https://www.example.com/files/files/{fileId}', params={
    
    )
    
    print r.json()
    
    

    DELETE /files/{fileId}

    Deletes the file resource.

    Parameters

    Parameter In Type Required Description
    fileId path string true Identifier of the file resource to delete.

    Responses

    Status Meaning Description Schema
    204 No Content The file resource was deleted. None
    404 Not Found No file resource exists for the specified identifier. None

    Get file resource content

    Code samples

    # You can also use wget
    curl -X GET https://www.example.com/files/files/{fileId}/content \
      -H 'If-Range: string' \
      -H 'Range: string'
    
    
    var headers = {
      'If-Range':'string',
      'Range':'string'
    
    };
    
    $.ajax({
      url: 'https://www.example.com/files/files/{fileId}/content',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    import requests
    headers = {
      'If-Range': 'string',
      'Range': 'string'
    }
    
    r = requests.get('https://www.example.com/files/files/{fileId}/content', params={
    
    }, headers = headers)
    
    print r.json()
    
    

    GET /files/{fileId}/content

    Retrieves the content of the file resource.

    Parameters

    Parameter In Type Required Description
    fileId path string true Identifier of the file resource for which to fetch content.
    changeContentDisposition query boolean false Specifies whether or not to use the persisted content-disposition value. If set to true and word "attachment" appears in the content-disposition, then it is changed to "inline". No other changes are made to the content-disposition value.
    If-Range header string false A conditional range request. The client must specify the previously returned ETag as the If-Range header value. This determines whether the resource has been modified. If it has been modified, the whole file is returned. Otherwise, partial content is returned using the Range header.
    Range header string false A specific range request. The value specifies the required byte range, for example, bytes=0-100.

    Responses

    Status Meaning Description Schema
    200 OK The request succeeded. The stream is returned in the response body. None
    206 Partial Content The partial content request succeeded. The requested range of data is in the response body. None
    404 Not Found No content found for the specified identifier. None
    416 Range Not Satisfiable The range specified using Range header is not satisfiable. None

    Update file resource content

    Code samples

    # You can also use wget
    curl -X PUT https://www.example.com/files/files/{fileId}/content \
      -H 'Content-Type: multipart/form-data' \
      -H 'Authorization: Bearer <access-token-goes-here>' \ 
      -H 'Accept: application/vnd.sas.file+json' \
      -H 'If-Match: string' \
      -H 'If-Unmodified-Since: string' \
      -H 'Content-Type: string' \
      -H 'Content-Disposition: string'
    
    
    var headers = {
      'Content-Type':'multipart/form-data',
      'Accept':'application/vnd.sas.file+json',
      'If-Match':'string',
      'If-Unmodified-Since':'string',
      'Content-Type':'string',
      'Content-Disposition':'string'
    
    };
    
    $.ajax({
      url: 'https://www.example.com/files/files/{fileId}/content',
      method: 'put',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    import requests
    headers = {
      'Content-Type': 'multipart/form-data',
      'Accept': 'application/vnd.sas.file+json',
      'If-Match': 'string',
      'If-Unmodified-Since': 'string',
      'Content-Type': 'string',
      'Content-Disposition': 'string'
    }
    
    r = requests.put('https://www.example.com/files/files/{fileId}/content', params={
    
    }, headers = headers)
    
    print r.json()
    
    

    PUT /files/{fileId}/content

    Updates the content of the file resource.

    Body parameter

    file: string
    
    

    Parameters

    Parameter In Type Required Description
    fileId path string true Identifier of the file resource for which to fetch content.
    If-Match header string false The entity tag obtained from the most recent ETag response header.
    If-Unmodified-Since header string false The timestamp obtained from the most recent Last-Modified response header. This is ignored when If-Match is specified.
    Content-Type header string true The content type. Specify as "multipart/form-data" if using a multipart request or specify the actual MIME type of the file if the request is a raw data upload.
    Content-Disposition header string false The content disposition. The previously assigned value can be changed. This indicates whether the content is expected to be displayed inline in a browser (as a Web page or part of a Web page) or as an attachment that is downloaded and saved locally. If a filename is specified in the header, it is used as the default name of the file.
    body body object false
    » file body string(binary) true The file data. If using a raw data upload request, the request body should contain only the file data (actual file content). If using a multipart request, request body should be in multipart/form-data format, where the file data (actual file content) is listed as file in the form data. Only one file is permitted in a multipart request.

    Example responses

    200

    {
      "parentUri": "string",
      "properties": {
        "property1": "string",
        "property2": "string"
      },
      "contentDisposition": "string",
      "contentType": "string",
      "createdBy": "string",
      "creationTimeStamp": "2018-12-19T15:20:49Z",
      "description": "string",
      "documentType": "string",
      "encoding": "string",
      "id": "string",
      "links": [
        {
          "method": "string",
          "rel": "string",
          "uri": "string",
          "href": "string",
          "title": "string",
          "type": "string",
          "itemType": "string",
          "responseType": "string",
          "responseItemType": "string"
        }
      ],
      "modifiedBy": "string",
      "modifiedTimeStamp": "2018-12-19T15:20:49Z",
      "name": "string",
      "size": 0
    }
    

    Responses

    Status Meaning Description Schema
    200 OK The request succeeded. The updates were applied and the new file data is returned in the response body. fileResource
    400 Bad Request The request was invalid. A validation error occurred and the file cannot be updated. Check the response for more information. Common reasons for this issue are as follows: the file is empty, the file is larger than the permitted size, the file type is not supported, or the multipart request contains more than one file. error2
    404 Not Found No file resource exists for the specified identifier. None
    412 Precondition Failed The If-Match request header did not match the file resource's entity tag, or the If-Unmodified-Since request header did not match the file resource's last modified timestamp. Another operation modified the file resource. Get an updated representation of the file resource before reattempting the request. error2
    428 Precondition Required The request headers did not include a If-Match or If-Unmodified-Since precondition. Set appropriate the values for the If-Unmodified-Since and If-Match request headers before reattempting the request. error2
    Response Headers
    Status Header Type Format Description
    200 ETag string The entity tag for the file resource.
    200 Last-Modified string The last modified timestamp of the file resource.

    Copy an existing file

    Code samples

    # You can also use wget
    curl -X POST https://www.example.com/files/files/{fileId}/copy \
      -H 'Authorization: Bearer <access-token-goes-here>' \ 
      -H 'Accept: application/vnd.sas.file+json' \
      -H 'Content-Disposition: string'
    
    
    var headers = {
      'Accept':'application/vnd.sas.file+json',
      'Content-Disposition':'string'
    
    };
    
    $.ajax({
      url: 'https://www.example.com/files/files/{fileId}/copy',
      method: 'post',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    import requests
    headers = {
      'Accept': 'application/vnd.sas.file+json',
      'Content-Disposition': 'string'
    }
    
    r = requests.post('https://www.example.com/files/files/{fileId}/copy', params={
    
    }, headers = headers)
    
    print r.json()
    
    

    POST /files/{fileId}/copy

    If the user has Read access to the specified file, copies the file.

    Parameters

    Parameter In Type Required Description
    fileId path string true The identifier of the file resource for which to fetch content.
    Content-Disposition header string false The content disposition. The previously assigned value can be changed. This indicates whether the content is expected to be displayed inline in a browser (as a Web page or part of a Web page) or as an attachment that is downloaded and saved locally. If a filename is specified in the header, it is used as the default name of the file.
    expirationTimeStamp query string false The date and time at which the file expires. If not specified, the file never expires.
    parentFolderUri query string false The URI of the folder in which to add the file.

    Example responses

    201

    {
      "parentUri": "string",
      "properties": {
        "property1": "string",
        "property2": "string"
      },
      "contentDisposition": "string",
      "contentType": "string",
      "createdBy": "string",
      "creationTimeStamp": "2018-12-19T15:20:49Z",
      "description": "string",
      "documentType": "string",
      "encoding": "string",
      "id": "string",
      "links": [
        {
          "method": "string",
          "rel": "string",
          "uri": "string",
          "href": "string",
          "title": "string",
          "type": "string",
          "itemType": "string",
          "responseType": "string",
          "responseItemType": "string"
        }
      ],
      "modifiedBy": "string",
      "modifiedTimeStamp": "2018-12-19T15:20:49Z",
      "name": "string",
      "size": 0
    }
    

    Responses

    Status Meaning Description Schema
    201 Created The file was created and returned in the response body. fileResource
    404 Not Found A file resource does not exist for the specified source file. error2
    409 Conflict The request could not be completed due to a conflict with the current state of the resource. A file with the specified name cannot be created in the folder. The file already exists in the folder. error2
    Response Headers
    Status Header Type Format Description
    201 ETag string The entity tag for the file resource.
    201 Last-Modified string The last modified timestamp of the file resource.
    201 Location string The URI of the file resource.

    Get indexable representations for parentUris

    Code samples

    # You can also use wget
    curl -X POST https://www.example.com/files/files#fetchIndexableRepresentationCollection \
      -H 'Content-Type: application/vnd.sas.selection+json' \
      -H 'Authorization: Bearer <access-token-goes-here>' \ 
      -H 'Accept: application/vnd.sas.collection+json' \
      -H 'Accept-Item: string'
    
    
    var headers = {
      'Content-Type':'application/vnd.sas.selection+json',
      'Accept':'application/vnd.sas.collection+json',
      'Accept-Item':'string'
    
    };
    
    $.ajax({
      url: 'https://www.example.com/files/files#fetchIndexableRepresentationCollection',
      method: 'post',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    import requests
    headers = {
      'Content-Type': 'application/vnd.sas.selection+json',
      'Accept': 'application/vnd.sas.collection+json',
      'Accept-Item': 'string'
    }
    
    r = requests.post('https://www.example.com/files/files#fetchIndexableRepresentationCollection', params={
    
    }, headers = headers)
    
    print r.json()
    
    

    POST /files#fetchIndexableRepresentationCollection

    Retrieves indexable representations of files that are associated with multiple parentUri specifications. Request the parentUri values in the body. The returned collection is grouped by parentUri.

    Body parameter

    {
      "version": 0,
      "template": "string",
      "type": "string",
      "resources": {
        "id": [
          "string"
        ]
      }
    }
    

    Parameters

    Parameter In Type Required Description
    Accept-Item header string true The value of the file resource media type. Must be specified as "application/vnd.sas.search.indexable.data".
    body body fileSelection true Multiple parentUri values specified as an array of string values. The file resources that are associated with each parentUri are retrieved. This selection media type is file service specific.

    Example responses

    200

    {
      "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": [
        {
          "parentUri": "string",
          "properties": {
            "property1": "string",
            "property2": "string"
          },
          "contentDisposition": "string",
          "contentType": "string",
          "createdBy": "string",
          "creationTimeStamp": "2018-12-19T15:20:49Z",
          "description": "string",
          "documentType": "string",
          "encoding": "string",
          "id": "string",
          "links": [
            {
              "method": "string",
              "rel": "string",
              "uri": "string",
              "href": "string",
              "title": "string",
              "type": "string",
              "itemType": "string",
              "responseType": "string",
              "responseItemType": "string"
            }
          ],
          "modifiedBy": "string",
          "modifiedTimeStamp": "2018-12-19T15:20:49Z",
          "name": "string",
          "size": 0
        }
      ]
    }
    

    Responses

    Status Meaning Description Schema
    200 OK The request succeeded. If files are found for the specified criteria, they are returned in a collection. If no files are found, an empty collection is returned. fileResourceCollection
    400 Bad Request The request was invalid. A validation error occurred and the file cannot be created. Check the response for more information. Common reasons for this issue are as follows: the file is empty, the file is larger than the permitted size, the file type is not supported, or the multipart request contains more than one file. error2

    Get indexable representations for files

    Code samples

    # You can also use wget
    curl -X GET https://www.example.com/files/files#getIndexableRepresentationCollection \
      -H 'Authorization: Bearer <access-token-goes-here>' \ 
      -H 'Accept: application/vnd.sas.collection+json' \
      -H 'Accept-Item: string'
    
    
    var headers = {
      'Accept':'application/vnd.sas.collection+json',
      'Accept-Item':'string'
    
    };
    
    $.ajax({
      url: 'https://www.example.com/files/files#getIndexableRepresentationCollection',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    import requests
    headers = {
      'Accept': 'application/vnd.sas.collection+json',
      'Accept-Item': 'string'
    }
    
    r = requests.get('https://www.example.com/files/files#getIndexableRepresentationCollection', params={
    
    }, headers = headers)
    
    print r.json()
    
    

    GET /files#getIndexableRepresentationCollection

    Retrieves indexable representations of file resources for the specified criteria. Standard paging, filtering, and sorting options are available.

    Parameters

    Parameter In Type Required Description
    Accept-Item header string true The value of the file resource media type. Must be specified as "application/vnd.sas.search.indexable.data".
    parentUri query string false The URI of the associated object or parent object.
    fields query string false The specific fields to return.
    start query integer(int64) false The offset of the first member to return. The default is 0.
    limit query integer(int64) false The maximum number of members to return. The default value is 10.
    filter query string false The filter criteria to apply to the returned member collection.
    sortBy query string false The sort to apply to the returned member collection.

    Example responses

    200

    {
      "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": [
        {
          "version": 0,
          "properties": [
            {
              "name": "string",
              "value": "string"
            }
          ],
          "resourceUri": "string",
          "sasType": "string"
        }
      ]
    }
    

    Responses

    Status Meaning Description Schema
    200 OK The request succeeded. If files are found for the specified criteria, indexable representations are returned in a collection. If no files are found, an empty collection is returned. fileResourceIndexCollection
    400 Bad Request The request was invalid. The limit parameter cannot be less than 0 or greater than 10000. error2

    Get generic indexable representation

    Code samples

    # You can also use wget
    curl -X GET https://www.example.com/files/files/{fileId}#getIndexableRepresentation \
      -H 'Authorization: Bearer <access-token-goes-here>' \ 
      -H 'Accept: application/vnd.sas.search.indexable.data+json'
    
    
    var headers = {
      'Accept':'application/vnd.sas.search.indexable.data+json'
    
    };
    
    $.ajax({
      url: 'https://www.example.com/files/files/{fileId}#getIndexableRepresentation',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    import requests
    headers = {
      'Accept': 'application/vnd.sas.search.indexable.data+json'
    }
    
    r = requests.get('https://www.example.com/files/files/{fileId}#getIndexableRepresentation', params={
    
    }, headers = headers)
    
    print r.json()
    
    

    GET /files/{fileId}#getIndexableRepresentation

    Retrieves a generic indexable representation of file for the specified identifier.

    Parameters

    Parameter In Type Required Description
    fileId path string true Identifier of the file resource.

    Example responses

    200

    {
      "version": 0,
      "properties": [
        {
          "name": "string",
          "value": "string"
        }
      ],
      "resourceUri": "string",
      "sasType": "string"
    }
    

    Responses

    Status Meaning Description Schema
    200 OK The request succeeded. The file was found and the indexable representation is returned in the response body. fileResourceIndex
    404 Not Found No file resource exists for the specified identifier. None

    Get summary representations

    Code samples

    # You can also use wget
    curl -X GET https://www.example.com/files/files#getSummaryRepresentationCollection \
      -H 'Authorization: Bearer <access-token-goes-here>' \ 
      -H 'Accept: application/vnd.sas.collection+json' \
      -H 'Accept-Item: string'
    
    
    var headers = {
      'Accept':'application/vnd.sas.collection+json',
      'Accept-Item':'string'
    
    };
    
    $.ajax({
      url: 'https://www.example.com/files/files#getSummaryRepresentationCollection',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    import requests
    headers = {
      'Accept': 'application/vnd.sas.collection+json',
      'Accept-Item': 'string'
    }
    
    r = requests.get('https://www.example.com/files/files#getSummaryRepresentationCollection', params={
    
    }, headers = headers)
    
    print r.json()
    
    

    GET /files#getSummaryRepresentationCollection

    Retrieves summary representations of file resources for the specified criteria. Standard paging, filtering, and sorting options are available.

    Parameters

    Parameter In Type Required Description
    Accept-Item header string true The value of the file resource media type. Must be specified as "application/vnd.sas.summary".
    parentUri query string false The URI of the associated object or parent object.
    fields query string false The specific fields to return.
    start query integer(int64) false The offset of the first member to return. The default value is 0.
    limit query integer(int64) false The maximum number of members to return. The default value is 10.
    filter query string false The filter criteria to apply to the returned member collection.
    sortBy query string false The sort to apply to the returned member collection.

    Example responses

    200

    {
      "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": [
        {
          "createdBy": "string",
          "creationTimeStamp": "2018-12-19T15:20:49Z",
          "description": "string",
          "id": "string",
          "links": [
            {
              "method": "string",
              "rel": "string",
              "uri": "string",
              "href": "string",
              "title": "string",
              "type": "string",
              "itemType": "string",
              "responseType": "string",
              "responseItemType": "string"
            }
          ],
          "modifiedBy": "string",
          "modifiedTimeStamp": "2018-12-19T15:20:49Z",
          "name": "string",
          "expirationTimeStamp": "string",
          "version": 0
        }
      ]
    }
    

    Responses

    Status Meaning Description Schema
    200 OK The request succeeded. If files are found for the specified criteria, summary representations are returned in a collection. If no files are found, an empty collection is returned. fileResourceSummaryCollection
    400 Bad Request The request was invalid. The limit parameter cannot be less than 0 or greater than 10000. error2

    Get generic summary representation

    Code samples

    # You can also use wget
    curl -X GET https://www.example.com/files/files/{fileId}#getSummaryRepresentation \
      -H 'Authorization: Bearer <access-token-goes-here>' \ 
      -H 'Accept: application/vnd.sas.search.summary+json'
    
    
    var headers = {
      'Accept':'application/vnd.sas.search.summary+json'
    
    };
    
    $.ajax({
      url: 'https://www.example.com/files/files/{fileId}#getSummaryRepresentation',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    import requests
    headers = {
      'Accept': 'application/vnd.sas.search.summary+json'
    }
    
    r = requests.get('https://www.example.com/files/files/{fileId}#getSummaryRepresentation', params={
    
    }, headers = headers)
    
    print r.json()
    
    

    GET /files/{fileId}#getSummaryRepresentation

    Retrieves a generic summary representation of a file for specified identifier.

    Parameters

    Parameter In Type Required Description
    fileId path string true Identifier of the file resource.

    Example responses

    200

    {
      "createdBy": "string",
      "creationTimeStamp": "2018-12-19T15:20:49Z",
      "description": "string",
      "id": "string",
      "links": [
        {
          "method": "string",
          "rel": "string",
          "uri": "string",
          "href": "string",
          "title": "string",
          "type": "string",
          "itemType": "string",
          "responseType": "string",
          "responseItemType": "string"
        }
      ],
      "modifiedBy": "string",
      "modifiedTimeStamp": "2018-12-19T15:20:49Z",
      "name": "string",
      "expirationTimeStamp": "string",
      "version": 0
    }
    

    Responses

    Status Meaning Description Schema
    200 OK The request succeeded. The file was found and a summary representation is returned in the response body. fileResourceSummary
    404 Not Found No file resource exists for the specified identifier. None

    Schemas

    fileSelection

    Properties

    Selection

    Name Type Required Description
    version integer true The schema version number of this media type. This representation is version 1.
    template string false A URI template.
    type string false A template that specifies whether the resources array contains IDs, URIs, or both.
    resources object true An array of resource IDs or URIs.
    » id [string] false A list that contains fileIds, URIs, or parentUris.

    file

    Properties

    File

    Name Type Required Description
    File string false The file to be uploaded.

    fileToPatch

    Properties

    File to Patch

    Name Type Required Description
    parentUri string false The URI of the object that is either associated or linked with file resource.
    properties object false The properties that are specific to this file. Each property uses a "key" : "value" format. A comma is used as the separator between properties.
    » additionalProperties string false
    contentDisposition string false The value for the Content-Disposition header. This will be set in response when downloading the file.
    description string false The description of the file resource.
    documentType string false The type of the file resource.
    name string true The name of the file resource.

    fileResourceCollection

    Properties

    File Resource Collection

    Name Type Required Description
    File Resource Collection any false A collection of file representations.

    allOf

    Name Type Required Description
    anonymous object false 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 The name of the collection.
    » start integer(int64) false The zero-based index of the first item in the collection.
    » limit integer false The number of items that were requested for the collection.
    » count integer(int64) false The number of items in the collection.
    » accept string false A space-delimited list of media types from which an Accept header may be constructed.
    » links [links] false The links that apply to the collection.
    » version integer false The version number of the collection representation. This representation is version 2.

    and

    Name Type Required Description
    anonymous object false
    » items [fileResource] false The array of application/vnd.sas.file representations.

    fileResource

    Properties

    File Resource

    Name Type Required Description
    parentUri string false The URI of the object that is either associated or linked with the file resource.
    properties object false Properties specific to this file. Each property uses a "key" : "value" format. A comma is used as a separator between properties.
    » additionalProperties string false
    contentDisposition string false Value for the Content-Disposition header. It will be set in response when downloading the file.
    contentType string false The type of the content.
    createdBy string false The name of the author.
    creationTimeStamp string(date-time) false The timestamp of when file resource was created.
    description string false The description of the file resource.
    documentType string false The type of the file resource.
    encoding string false The encoding of the file resource.
    id string false The identifier of the file resource.
    links [any] false Links that apply to this file resource. The links are: "self", "content", "patch", "update", and "delete".
    » Link object false A link to a related operation or resource.
    »» method string false The HTTP method for the link.
    »» rel string true The relationship of the link to the resource.
    »» uri string false The relative URI for the link.
    »» href string false The URL for the link.
    »» title string false The title for the link.
    »» type string false The media type or link type for the link.
    »» itemType string false 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 The media type or link type of the response body for a PUT, POST, or PATCH operation.
    »» responseItemType string false The media type or link type of the items in the response body for a PUT, POST, or PATCH operation.
    » modifiedBy string false The name of the user who modified this file resource.
    » modifiedTimeStamp string(date-time) false Timestamp of when file resource was modified.
    » name string false Name of the file resource.
    » size integer false Byte size of the file resource content.

    fileResourceIndexCollection

    Properties

    File Resource Indexable Collection

    Name Type Required Description
    File Resource Indexable Collection any false A collection of file representations.

    allOf

    Name Type Required Description
    anonymous fileResourceCollection false 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 Description
    anonymous object false
    » items [fileResourceIndex] false The array of file indexable representations.

    fileResourceIndex

    Properties

    File Resource Indexable Data

    Name Type Required Description
    version integer false The version of the representation.
    properties [indexableDataElement] false
    resourceUri string false The URI of the representation.
    sasType string false The sasType of the representation.

    indexableDataElement

    Properties

    Indexable Data Element

    Name Type Required Description
    name string false The name of the field.
    value string false The value of the field.

    fileResourceSummaryCollection

    Properties

    File Resource Summary Collection

    Name Type Required Description
    File Resource Summary Collection any false A collection of file representations.

    allOf

    Name Type Required Description
    anonymous fileResourceCollection false 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 Description
    anonymous object false
    » items [fileResourceSummary] false The array of file resource summary representations.

    fileResourceSummary

    Properties

    File Resource Summary

    Name Type Required Description
    createdBy string false The name of the author.
    creationTimeStamp string(date-time) false The timestamp of when file resource was created.
    description string false The description of the file resource.
    id string false The identifier of the file resource.
    links [links] false The alternate link to fetch the complete representation of the file resource, for example, vnd.sas.file.
    modifiedBy string false The name of the user who modified the file resource.
    modifiedTimeStamp string(date-time) false The timestamp of when file resource was modified.
    name string false The name of the file.
    expirationTimeStamp string false The timestamp of when to expire the file.
    version integer false The version of the media type.

    error2

    Properties

    Error

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

    Usage Notes

    Overview

    The Files API provides a generic platform to clients for persisting and retrieving files, such as documents, attachments, and reports. The file can be associated with the URI of another identifiable object (for example, a parentUri). Every file must have an assigned content type and name. Files can be retrieved individually by using the file's identifier or as a list of files by using a parentUri. Each file has its content stream associated with it.

    After creation, the metadata that is associated with the file or the actual content can be updated. A single file can be deleted by using a specific ID. Multiple files can be deleted by specifying a parentUri.

    A file can be uploaded via raw request or multipart form request.

    Supported Features

    The Files API provides the following functions, each with associated default user settings:

    File Service Administration

    By default, the Files API blocks a file upload when any of the following conditions exist:

    Change the Permissible File Size

    To modify the 100 MB upload limit, specify the applicable value (in bytes) to the files.maxFileSize Consul property. For example, to set a 10 MB limit, set files.maxFileSize=10485760.

    Change Blocked Media Types

    To determine whether uploading is permitted for a specific file type, the Files API checks the Content-Type in the request. If approved, the Files API then scans the file content to determine the actual content type. To modify the list of blocked types, specify the applicable types to the files.blockedTypes Consul property. Separate multiple values by using a comma. For example, to block .zip, .exe, and plain text files, set files.blockedTypes=application/zip,application/x-msdownload,text/plain.

    Prevent Content Scan for Secured Types

    To skip content scanning by the Files API, specify the applicable media types to the sas.files.securedTypes Consul property. Separate multiple values by using a comma. If the Content-Type value for a request matches a type specified for the sas.files.securedTypes property, the Files API does not perform a content scan. It is recommended that you use this feature only if absolutely necessary and, if used, you should specify a local media type for the sas.files.securedTypes property and for the Content-Type when uploading the file.

    Terminology

    file resource

    indicates the meta representation of a file.

    stream

    indicates the data stream for the actual content of a file.

    Resources

    Resource Relationships

    Type Attribute Description
    String id The identifier for the file. This is set internally and cannot be changed.
    contentType The content type of the source file. This is set and managed internally.
    createdBy The owner of the file. This is set internally and cannot be changed.
    encoding The character encoding of the content. This is set and managed internally.
    modifiedBy The user who last modified the file. This is set and managed internally.
    name The name of the file. This is initialized internally and can be changed after initialization.
    parentUri The reference URI of the parent, owner, or associated object. This is managed by the end user.
    contentDisposition The content disposition to use while downloading the file. This is managed by the end user.
    description A brief description of the files. This is managed by the end user.
    documentType The document type of the file. This is managed by the end user.
    expirationTimeStamp The date and time at which the file expires or is deleted. This is managed by the end user.
    Date creationTimeStamp The date of file creation. This is set internally and cannot be changed.
    modifiedTimeStamp The date that the file was last modified. This is set and managed internally.
    List <Link> links A collection of links that represent the supported operations for the current resource. The following links are supported:
  • self : GET - A link to retrieve the metadata of the file.
  • patch : PATCH - A link to update the metadata of the file.
  • delete : DELETE - A link to delete the current file resource.
  • content : GET - A link to download the actual content of the file.
  • updateContent : PUT - A link to update the actual content of the file.
  • Long size The size of the actual content. This is set and managed internally.
    Map <String, String> properties A mapping of key/value pairs that can be used to provide more information about the file. This is managed by the end user.

    Root

    Path: /

    The root of the API. This resource contains links to the top-level resources in the API.

    The GET / response includes the following links:

    Relation Method Description
    checkState HEAD Checks the state of the service.
    URI: /files/files
    Response type: [application/json]
    create POST Uploads a file. Note that Type */* indicates that the content-type is dynamic. The end user must provide the actual content-type to file service, not */*.
    URI: /files/files
    Request type: */*
    Response type: application/vnd.sas.file
    files GET Returns a collection of files.
    URI: /files/files
    Response type: application/vnd.sas.collection
    bulkFiles POST Returns a collection of files for multiple parentUri entries using application/vnd.sas.selection in the request body.
    URI: /files/files
    Request type: application/vnd.sas.selection
    Response type: application/vnd.sas.collection

    File

    Path: /files/{fileId}

    This endpoint returns the file resource or metadata of the file.

    Links from the file resource include the following:

    Relation Method Description
    self GET Returns the meta representation of the file resource.
    URI: /files/files/{fileId}
    Response type: [application/vnd.sas.file]
    alternate GET Returns the summary representation of the file resource.
    URI: /files/files/{fileId}
    Response type: [application/vnd.sas.summary]
    content GET Downloads the actual content of the file. The type is the contentType from vnd.sas.file.
    URI: /files/files/{fileId}/content
    Response type: [*/*]
    update PUT Updates the meta information of the file resource.
    URI: /files/files/{fileId}
    Request type: application/vnd.sas.file
    Response type: application/vnd.sas.file
    patch PATCH Updates the meta information of the file resource.
    URI: /files/files/{fileId}
    Request type: application/vnd.sas.file
    Response type: application/vnd.sas.file
    updateContent PUT Updates the actual content of the file. Note that Type */* indicates that content-type is dynamic. The end-user must pass on actual content-type to file service, not */*.
    URI: /files/files/{fileId}/content
    Request type: */*
    Response type: application/vnd.sas.file
    delete DELETE Removes the file resource.
    URI: /files/files/{fileId}
    create POST Uploads a file. Note that Type */* indicates that content-type is dynamic. The end user must pass on actual content-type to file service, not */*.
    URI: /files/files
    Request type: */*
    Response type: application/vnd.sas.file
    copyFile POST If the user has Read access to the file, copies the file.
    URI: /files/files/{fileId}/copy
    Response type: application/vnd.sas.file

    File Collection

    Path: /files

    This endpoint returns the collection of file resource.

    Links from the collection include the following:

    Relation Method Description
    self GET Returns the current page from the collection.
    prev GET Returns the previous page of the collection. This link is omitted if the current view is on the first page.
    next GET Returns the next page of 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 the collection. This link is omitted if the current view is on the first page.

    Media Types

    application/vnd.sas.file

    Provides metadata about the file resource. The schema is here: file Resource

    application/vnd.sas.file+json

    The following is an example of the JSON representation of this media type: { "creationTimeStamp": "2017-10-31T10:12:12.164Z", "modifiedTimeStamp": "2017-10-31T10:12:47.097Z", "createdBy": "bob", "modifiedBy": "bob", "id": "317359c7-f70e-49fb-95a7-78fb2e02c0f0", "parentUri": "/reports/reports/9504285d-5ee5-4754-8430-730ffab4d7e5", "properties": { "myprop2": "propVal2", "myprop1": "propVal1", "myprop4": "propVal4", "myprop3": "propVal3" }, "contentDisposition": "attachment; filename=Attributes.csv;", "contentType": "text/plain", "description": "This file is created for temporary purpose", "documentType": "Plain_TextDoc", "encoding": "UTF-8", "links": [ { "method": "GET", "rel": "self", "href": "/files/files/317359c7-f70e-49fb-95a7-78fb2e02c0f0", "uri": "/files/files/317359c7-f70e-49fb-95a7-78fb2e02c0f0", "type": "application/vnd.sas.file" }, { "method": "GET", "rel": "alternate", "href": "/files/files/317359c7-f70e-49fb-95a7-78fb2e02c0f0", "uri": "/files/files/317359c7-f70e-49fb-95a7-78fb2e02c0f0", "type": "application/vnd.sas.summary" }, { "method": "PATCH", "rel": "patch", "href": "/files/files/317359c7-f70e-49fb-95a7-78fb2e02c0f0", "uri": "/files/files/317359c7-f70e-49fb-95a7-78fb2e02c0f0", "type": "application/vnd.sas.file", "responseType": "application/vnd.sas.file" }, { "method": "PUT", "rel": "update", "href": "/files/files/317359c7-f70e-49fb-95a7-78fb2e02c0f0", "uri": "/files/files/317359c7-f70e-49fb-95a7-78fb2e02c0f0", "type": "application/vnd.sas.file", "responseType": "application/vnd.sas.file" }, { "method": "DELETE", "rel": "delete", "href": "/files/files/317359c7-f70e-49fb-95a7-78fb2e02c0f0", "uri": "/files/files/317359c7-f70e-49fb-95a7-78fb2e02c0f0" }, { "method": "GET", "rel": "content", "href": "/files/files/317359c7-f70e-49fb-95a7-78fb2e02c0f0/content", "uri": "/files/files/317359c7-f70e-49fb-95a7-78fb2e02c0f0/content", "type": "text/plain" }, { "method": "PUT", "rel": "updateContent", "href": "/files/files/317359c7-f70e-49fb-95a7-78fb2e02c0f0/content", "uri": "/files/files/317359c7-f70e-49fb-95a7-78fb2e02c0f0/content", "type": "/", "responseType": "application/vnd.sas.file" }, { "method": "POST", "rel": "create", "href": "/files/files", "uri": "/files/files", "type": "/", "responseType": "application/vnd.sas.file" } ], "name": "TempFile", "size": 4918, "expirationTimeStamp": "2017-12-04T15:14:40.084Z", "version": 2 }

    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. See application/vnd.sas.collection.

    Folders

    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 Folders API provides an organizational structure for SAS and external content. It can also be used for favorites folders or a history of objects accessed. The resources that are stored in folders (members) use a URI to point back to those resources.

    Base URLs:

    Code samples

    # You can also use wget
    curl -X GET https://www.example.com/folders/
    
    
    
    $.ajax({
      url: 'https://www.example.com/folders/',
      method: 'get',
    
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    import requests
    
    r = requests.get('https://www.example.com/folders/', params={
    
    )
    
    print r.json()
    
    

    GET /

    Returns a list of links to the top-level collections surfaced through this API. These top-level links include /folders and /ancestors.

    Status Meaning Description Schema
    200 OK The request succeeded. None

    Get a list of root folders

    Code samples

    # You can also use wget
    curl -X GET https://www.example.com/folders/rootFolders \
      -H 'Authorization: Bearer <access-token-goes-here>' \ 
      -H 'Accept: application/vnd.sas.collection+json'
    
    
    var headers = {
      'Accept':'application/vnd.sas.collection+json'
    
    };
    
    $.ajax({
      url: 'https://www.example.com/folders/rootFolders',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    import requests
    headers = {
      'Accept': 'application/vnd.sas.collection+json'
    }
    
    r = requests.get('https://www.example.com/folders/rootFolders', params={
    
    }, headers = headers)
    
    print r.json()
    
    

    GET /rootFolders

    Returns a list of root folders. Standard paging, filtering, and sorting options are provided.

    Parameters

    Parameter In Type Required Description
    start query integer false 0-based offset of first folder to return. Defaults to 0.
    limit query integer false Maximum number of folders to return. Defaults to 20.
    filter query string(filter-criteria) false Filter criteria for returned folders. See Filtering in REST APIs.
    Any member of the Folder object can be used to filter the results: id, name, description, createdBy, modifiedBy, properties, folderType, or parent. Date fields currently cannot be used to filter results.
    sortBy query string(sort-criteria) false Sort returned folder. See Sorting in REST APIs.
    The default sort order is name:ascending. Other valid sorting options are
  • added the timestamp when the item was added to the folder
  • name the folder name
  • Example responses

    200

    {
      "name": "string",
      "start": 0,
      "limit": 0,
      "count": 0,
      "accept": "string",
      "links": [
        {
          "method": "string",
          "rel": "string",
          "uri": "string",
          "href": "string"
        }
      ],
      "items": [
        {
          "id": "string",
          "name": "string",
          "description": "string",
          "parentFolderUri": "string",
          "creationTimeStamp": "2018-12-19T15:20:50Z",
          "modifiedTimeStamp": "2018-12-19T15:20:50Z",
          "createdBy": "string",
          "modifiedBy": "string",
          "type": "string",
          "iconUri": "string",
          "memberCount": 0,
          "links": [
            {
              "method": "string",
              "rel": "string",
              "uri": "string",
              "href": "string"
            }
          ],
          "properties": {
            "property1": "string",
            "property2": "string"
          }
        }
      ],
      "version": 0
    }
    

    Responses

    Status Meaning Description Schema
    200 OK The request succeeded. folderCollection
    400 Bad Request The request was invalid. An invalid filter or combination of request parameters was provided. errorResponse

    Get a list of folders

    Code samples

    # You can also use wget
    curl -X GET https://www.example.com/folders/folders \
      -H 'Authorization: Bearer <access-token-goes-here>' \ 
      -H 'Accept: application/vnd.sas.collection+json' \
      -H 'Accept-Language: string' \
      -H 'Accept-Item: string'
    
    
    var headers = {
      'Accept':'application/vnd.sas.collection+json',
      'Accept-Language':'string',
      'Accept-Item':'string'
    
    };
    
    $.ajax({
      url: 'https://www.example.com/folders/folders',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    import requests
    headers = {
      'Accept': 'application/vnd.sas.collection+json',
      'Accept-Language': 'string',
      'Accept-Item': 'string'
    }
    
    r = requests.get('https://www.example.com/folders/folders', params={
    
    }, headers = headers)
    
    print r.json()
    
    

    GET /folders

    Returns a list of folders. Standard paging, filtering, and sorting options are provided.

    Parameters

    Parameter In Type Required Description
    start query integer false 0-based offset of first folder to return. Defaults to 0.
    limit query integer false Maximum number of folders to return. Defaults to 20.
    filter query string(filter-criteria) false Filter criteria for returned folders. See Filtering in REST APIs.
    Any member of the Folder object can be used to filter the results: id, name, description, createdBy, modifiedBy, properties, folderType, or parent. Date fields currently cannot be used to filter results.
    Sample queries
    • Get Root Folders: /folders?filter=isNull(parent)
    • Get folders by name: /folders?filter=contains(name, 'Sample')
    • Get folders by folderType: /folders?filter=in(folderType, 'history', 'favorites')
    sortBy query string(sort-criteria) false Sort returned folder. See Sorting in REST APIs.
    The default sort order is name:ascending. Other valid sorting options are
    • orderNum the order specified by the user
    • added the timestamp when the item was added to the folder
    • name the folder name
    childUri query string(relative URI) false Return only folders containing a child member with the specified URI. For now, childUri, referenceUri, memberUri, and filter are mutually exclusive. The childUri has special semantics, because it should return only a single item. The URL form /folders/.?childUri={resourceUri} can be used to return a single item.
    referenceUri query string(relative URI) false Return only folders containing a reference member with the specified URI. For now, childUri, referenceUri, memberUri, and filter are mutually exclusive.
    memberUri query string(relative URI) false Return only folders containing any member with the specified URI. For now, childUri, referenceUri, memberUri, and filter are mutually exclusive.
    Accept-Language header string false Enumerates the languages that the client prefers to use for the response. This can be used to provide localized data where available.
    Accept-Item header string false If provided, this should be an alternative media type that the service recognizes. If the media type is not one that the service can provide, a 406 response is returned.

    Example responses

    200

    {
      "name": "string",
      "start": 0,
      "limit": 0,
      "count": 0,
      "accept": "string",
      "links": [
        {
          "method": "string",
          "rel": "string",
          "uri": "string",
          "href": "string"
        }
      ],
      "items": [
        {
          "id": "string",
          "name": "string",
          "description": "string",
          "parentFolderUri": "string",
          "creationTimeStamp": "2018-12-19T15:20:50Z",
          "modifiedTimeStamp": "2018-12-19T15:20:50Z",
          "createdBy": "string",
          "modifiedBy": "string",
          "type": "string",
          "iconUri": "string",
          "memberCount": 0,
          "links": [
            {
              "method": "string",
              "rel": "string",
              "uri": "string",
              "href": "string"
            }
          ],
          "properties": {
            "property1": "string",
            "property2": "string"
          }
        }
      ],
      "version": 0
    }
    

    Responses

    Status Meaning Description Schema
    200 OK The request succeeded. folderCollection
    400 Bad Request The request was invalid. An invalid filter or combination of request parameters was provided. errorResponse

    Create a new folder

    Code samples

    # You can also use wget
    curl -X POST https://www.example.com/folders/folders?parentFolderUri=string \
      -H 'Content-Type: application/vnd.sas.content.folder+json' \
      -H 'Authorization: Bearer <access-token-goes-here>' \ 
      -H 'Accept: application/vnd.sas.content.folder+json'
    
    
    var headers = {
      'Content-Type':'application/vnd.sas.content.folder+json',
      'Accept':'application/vnd.sas.content.folder+json'
    
    };
    
    $.ajax({
      url: 'https://www.example.com/folders/folders',
      method: 'post',
      data: '?parentFolderUri=string',
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    import requests
    headers = {
      'Content-Type': 'application/vnd.sas.content.folder+json',
      'Accept': 'application/vnd.sas.content.folder+json'
    }
    
    r = requests.post('https://www.example.com/folders/folders', params={
      'parentFolderUri': 'string'
    }, headers = headers)
    
    print r.json()
    
    

    POST /folders

    Creates a new empty folder. Members can be added to the folder using the /folders/{folderId}/members endpoint. This service maintains name uniqueness at any given level in the folder structure. In other words, if you try to create a root folder named "newRootFolder", and a root folder with that name exists, the operation fails with a 409 status. If you try to create a subfolder using the ?parentFolderUri parameter, and the parent already has a subfolder with the same name, the operation fails with a 409 status.

    Body parameter

    {
      "name": "Test Folder 1",
      "description": "A Test Folder",
      "type": "folder"
    }
    

    Parameters

    Parameter In Type Required Description
    parentFolderUri query string(relative URI) true URI of folder to add new folder as a child. This parameter is required. An explicit value of "none" indicates that the client wants to create a root folder.
    body body folderIn true Folder

    Example responses

    201

    {
      "id": "string",
      "name": "string",
      "description": "string",
      "parentFolderUri": "string",
      "creationTimeStamp": "2018-12-19T15:20:50Z",
      "modifiedTimeStamp": "2018-12-19T15:20:50Z",
      "createdBy": "string",
      "modifiedBy": "string",
      "type": "string",
      "iconUri": "string",
      "memberCount": 0,
      "links": [
        {
          "method": "string",
          "rel": "string",
          "uri": "string",
          "href": "string"
        }
      ],
      "properties": {
        "property1": "string",
        "property2": "string"
      }
    }
    

    Responses

    Status Meaning Description Schema
    201 Created A folder was created. folder
    400 Bad Request The request was invalid. The parentFolderUri is not a valid folder, or does not exist. A malformed request body also returns this status. errorResponse
    404 Not Found No folder exists at the requested path. errorResponse
    Response Headers
    Status Header Type Format Description
    201 Location string The URI of the newly created folder.
    201 Etag string A tag that identifies this revision of this object.

    Get a folder with a path or a child URI

    Code samples

    # You can also use wget
    curl -X GET https://www.example.com/folders/folders/@item \
      -H 'Authorization: Bearer <access-token-goes-here>' \ 
      -H 'Accept: application/vnd.sas.content.folder+json'
    
    
    var headers = {
      'Accept':'application/vnd.sas.content.folder+json'
    
    };
    
    $.ajax({
      url: 'https://www.example.com/folders/folders/@item',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    import requests
    headers = {
      'Accept': 'application/vnd.sas.content.folder+json'
    }
    
    r = requests.get('https://www.example.com/folders/folders/@item', params={
    
    }, headers = headers)
    
    print r.json()
    
    

    GET /folders/@item

    Get a folder with a resource wildcard. Either a path or a child URI is required. The result must be exactly one matching folder. If the childUri parameter is provided, the parent folder of the member with the matching URI is returned, if it exists. If the path is provided, it must be a slash-delimited path to the desired folder.

    Parameters

    Parameter In Type Required Description
    childUri query string false The URI of a resource whose parent folder you want to return. This can be a folder or non-folder resource.
    path query string false The slash-delimited path to a folder. For example, /root/child/grandchild/greatgrandchild would return the folder greatgrandchild.

    Example responses

    200

    {
      "id": "string",
      "name": "string",
      "description": "string",
      "parentFolderUri": "string",
      "creationTimeStamp": "2018-12-19T15:20:50Z",
      "modifiedTimeStamp": "2018-12-19T15:20:50Z",
      "createdBy": "string",
      "modifiedBy": "string",
      "type": "string",
      "iconUri": "string",
      "memberCount": 0,
      "links": [
        {
          "method": "string",
          "rel": "string",
          "uri": "string",
          "href": "string"
        }
      ],
      "properties": {
        "property1": "string",
        "property2": "string"
      }
    }
    

    Responses

    Status Meaning Description Schema
    200 OK The request succeeded. The folder was found and returned. folder
    400 Bad Request The request was invalid. Either no path or childUri was provided in the request, or the request was badly formatted. errorResponse
    404 Not Found No folder exists which matches the criteria. errorResponse
    Response Headers
    Status Header Type Format Description
    200 Last-Modified string the ISO8601 date string representing the timestamp of the last update to this folder.
    200 Etag string A tag that identifies this revision of this object.

    Get a folder

    Code samples

    # You can also use wget
    curl -X GET https://www.example.com/folders/folders/{folderId} \
      -H 'Authorization: Bearer <access-token-goes-here>' \ 
      -H 'Accept: application/vnd.sas.content.folder+json' \
      -H 'Accept-Language: string'
    
    
    var headers = {
      'Accept':'application/vnd.sas.content.folder+json',
      'Accept-Language':'string'
    
    };
    
    $.ajax({
      url: 'https://www.example.com/folders/folders/{folderId}',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    import requests
    headers = {
      'Accept': 'application/vnd.sas.content.folder+json',
      'Accept-Language': 'string'
    }
    
    r = requests.get('https://www.example.com/folders/folders/{folderId}', params={
    
    }, headers = headers)
    
    print r.json()
    
    

    GET /folders/{folderId}

    Returns the specified folder.

    Parameters

    Parameter In Type Required Description
    folderId path string(object-id) true The identifier of a specific folder, or one of the delegate strings @myFolder, @appDataFolder, @myHistory, @myFavorites, or @public.
    Accept-Language header string false Enumerates the languages that the client prefers to use for the response. This can be used to provide localized data where available.

    Example responses

    200

    {
      "id": "string",
      "name": "string",
      "description": "string",
      "parentFolderUri": "string",
      "creationTimeStamp": "2018-12-19T15:20:50Z",
      "modifiedTimeStamp": "2018-12-19T15:20:50Z",
      "createdBy": "string",
      "modifiedBy": "string",
      "type": "string",
      "iconUri": "string",
      "memberCount": 0,
      "links": [
        {
          "method": "string",
          "rel": "string",
          "uri": "string",
          "href": "string"
        }
      ],
      "properties": {
        "property1": "string",
        "property2": "string"
      }
    }
    

    Responses

    Status Meaning Description Schema
    200 OK The request succeeded. The folder was returned. folder
    400 Bad Request An invalid delegate string was specified' errorResponse
    404 Not Found No folder exists at the requested path. errorResponse
    Response Headers
    Status Header Type Format Description
    200 Last-Modified string The RFC 1123 date string representing the timestamp of the last update to this folder.
    200 Etag string A tag that identifies this revision of this object.

    Delete a folder

    Code samples

    # You can also use wget
    curl -X DELETE https://www.example.com/folders/folders/{folderId} \
      -H 'Authorization: Bearer <access-token-goes-here>' \ 
      -H 'Accept: */*'
    
    
    var headers = {
      'Accept':'*/*'
    
    };
    
    $.ajax({
      url: 'https://www.example.com/folders/folders/{folderId}',
      method: 'delete',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    import requests
    headers = {
      'Accept': '*/*'
    }
    
    r = requests.delete('https://www.example.com/folders/folders/{folderId}', params={
    
    }, headers = headers)
    
    print r.json()
    
    

    DELETE /folders/{folderId}

    The specified folder is deleted. If the folder is not empty, a recursive option can be specified to indicate a recursive delete. If the folder is not empty and no recursive option is present, an error response will be returned. Any non-folder content will not be deleted.

    Parameters

    Parameter In Type Required Description
    folderId path string(object-id) true The identifier of a specific folder, or one of the delegate strings @myFolder, @appDataFolder, @myHistory, @myFavorites, or @public.
    recursive query boolean false do a recursive delete of the folder

    Example responses

    400

    Responses

    Status Meaning Description Schema
    204 No Content The folder was deleted. None
    400 Bad Request The request was invalid. The folder was not empty, and recursive was not specified. errorResponse
    404 Not Found No folder exists at the requested path. errorResponse
    409 Conflict The folder has children, and no recursive=true option was provided, or the folder contains non-folder children. errorResponse

    Update a folder

    Code samples

    # You can also use wget
    curl -X PUT https://www.example.com/folders/folders/{folderId} \
      -H 'Content-Type: application/vnd.sas.content.folder+json' \
      -H 'Authorization: Bearer <access-token-goes-here>' \ 
      -H 'Accept: application/vnd.sas.content.folder+json' \
      -H 'If-Match: string' \
      -H 'If-Unmodified-Since: string'
    
    
    var headers = {
      'Content-Type':'application/vnd.sas.content.folder+json',
      'Accept':'application/vnd.sas.content.folder+json',
      'If-Match':'string',
      'If-Unmodified-Since':'string'
    
    };
    
    $.ajax({
      url: 'https://www.example.com/folders/folders/{folderId}',
      method: 'put',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    import requests
    headers = {
      'Content-Type': 'application/vnd.sas.content.folder+json',
      'Accept': 'application/vnd.sas.content.folder+json',
      'If-Match': 'string',
      'If-Unmodified-Since': 'string'
    }
    
    r = requests.put('https://www.example.com/folders/folders/{folderId}', params={
    
    }, headers = headers)
    
    print r.json()
    
    

    PUT /folders/{folderId}

    Replaces an existing folder.

    Body parameter

    {
      "name": "Test Folder 1",
      "description": "A Test Folder",
      "type": "folder"
    }
    

    Parameters

    Parameter In Type Required Description
    folderId path string(object-id) true The identifier of a specific folder, or of one of the delegate strings @myFolder, @appDataFolder, @myHistory, @myFavorites, or @public.
    If-Match header string false The ETag that was returned from a GET, POST, or PUT of this folder.
    If-Unmodified-Since header string false The value of the lastModified date of the folder. If the folder has been updated since this time, the update fails.
    body body folderIn true Folder

    Example responses

    200

    {
      "id": "string",
      "name": "string",
      "description": "string",
      "parentFolderUri": "string",
      "creationTimeStamp": "2018-12-19T15:20:50Z",
      "modifiedTimeStamp": "2018-12-19T15:20:50Z",
      "createdBy": "string",
      "modifiedBy": "string",
      "type": "string",
      "iconUri": "string",
      "memberCount": 0,
      "links": [
        {
          "method": "string",
          "rel": "string",
          "uri": "string",
          "href": "string"
        }
      ],
      "properties": {
        "property1": "string",
        "property2": "string"
      }
    }
    

    Responses

    Status Meaning Description Schema
    200 OK The request succeeded. The folder was updated. folder
    400 Bad Request The request was invalid. errorResponse
    404 Not Found No folder exists at the requested path. errorResponse
    412 Precondition Failed The If-Match request header did not match the resource's entity tag, or the If-Unmodified-Since request header did not match the resource's last modified timestamp. errorResponse
    Response Headers
    Status Header Type Format Description
    200 Last-Modified string The ISO8601 date string representing the timestamp of the last update to this folder.
    200 Etag string A tag that identifies this revision of this object.

    Make a partial update to a folder

    Code samples

    # You can also use wget
    curl -X PATCH https://www.example.com/folders/folders/{folderId} \
      -H 'Content-Type: application/vnd.sas.content.folder+json' \
      -H 'Authorization: Bearer <access-token-goes-here>' \ 
      -H 'Accept: application/vnd.sas.content.folder+json' \
      -H 'If-Match: string' \
      -H 'If-Unmodified-Since: string'
    
    
    var headers = {
      'Content-Type':'application/vnd.sas.content.folder+json',
      'Accept':'application/vnd.sas.content.folder+json',
      'If-Match':'string',
      'If-Unmodified-Since':'string'
    
    };
    
    $.ajax({
      url: 'https://www.example.com/folders/folders/{folderId}',
      method: 'patch',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    import requests
    headers = {
      'Content-Type': 'application/vnd.sas.content.folder+json',
      'Accept': 'application/vnd.sas.content.folder+json',
      'If-Match': 'string',
      'If-Unmodified-Since': 'string'
    }
    
    r = requests.patch('https://www.example.com/folders/folders/{folderId}', params={
    
    }, headers = headers)
    
    print r.json()
    
    

    PATCH /folders/{folderId}

    Updates the provided fields of a folder. The client can provide a sparsely populated object, and only the non-null fields contribute to the updates. A body such as { "name": "NewFolderName" } causes the folder to have its name changed, but no other field is affected. The full resulting object is returned in the response.

    Body parameter

    {
      "name": "Test Folder 1",
      "description": "A Test Folder",
      "type": "folder"
    }
    

    Parameters

    Parameter In Type Required Description
    folderId path string(object-id) true The identifier of a specific folder, or of one of the delegate strings @myFolder, @appDataFolder, @myHistory, @myFavorites, or @public.
    If-Match header string false The ETag that was returned from a GET, POST, or PUT of this folder.
    If-Unmodified-Since header string false The value of the lastModified date of the folder. If the folder has been updated since this time, the update fails.
    body body folderIn true A sparsely populated Folder object. Only the fields being updated need to be provided.

    Example responses

    200

    {
      "id": "string",
      "name": "string",
      "description": "string",
      "parentFolderUri": "string",
      "creationTimeStamp": "2018-12-19T15:20:50Z",
      "modifiedTimeStamp": "2018-12-19T15:20:50Z",
      "createdBy": "string",
      "modifiedBy": "string",
      "type": "string",
      "iconUri": "string",
      "memberCount": 0,
      "links": [
        {
          "method": "string",
          "rel": "string",
          "uri": "string",
          "href": "string"
        }
      ],
      "properties": {
        "property1": "string",
        "property2": "string"
      }
    }
    

    Responses

    Status Meaning Description Schema
    200 OK The request succeeded. The folder was updated. folder
    400 Bad Request The request was invalid. The JSON was malformed, or invalid for the request. errorResponse
    404 Not Found No folder exists at the requested path. errorResponse
    409 Conflict The request could not be completed due to a conflict with the current state of the resource. Changing the name as requested would cause a naming conflict. errorResponse
    412 Precondition Failed The If-Match request header did not match the resource's entity tag, or the If-Unmodified-Since request header did not match the resource's last modified timestamp. errorResponse
    422 Unprocessable Entity The request cannot be processed. One or more elements of the body are invalid. errorResponse
    Response Headers
    Status Header Type Format Description
    200 Last-Modified string The RFC 1123 date string representing the timestamp of the last update to this folder.
    200 Etag string A tag that identifies this revision of this object.

    Get the folders for a given set of delegate names

    Code samples

    # You can also use wget
    curl -X GET https://www.example.com/folders/delegateFolders \
      -H 'Authorization: Bearer <access-token-goes-here>' \ 
      -H 'Accept: application/json'
    
    
    var headers = {
      'Accept':'application/json'
    
    };
    
    $.ajax({
      url: 'https://www.example.com/folders/delegateFolders',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    import requests
    headers = {
      'Accept': 'application/json'
    }
    
    r = requests.get('https://www.example.com/folders/delegateFolders', params={
    
    }, headers = headers)
    
    print r.json()
    
    

    GET /delegateFolders

    Returns the folders for the given set of delegate names, or all delegate folders if no names are provided.

    Parameters

    Parameter In Type Required Description
    name query string false The name of the delegate (including the leading '@') desired. Multiple values of the name parameter can be provided.

    Example responses

    200

    {
      "name": "string",
      "start": 0,
      "limit": 0,
      "count": 0,
      "accept": "string",
      "links": [
        {
          "method": "string",
          "rel": "string",
          "uri": "string",
          "href": "string"
        }
      ],
      "items": [
        {
          "id": "string",
          "name": "string",
          "description": "string",
          "parentFolderUri": "string",
          "creationTimeStamp": "2018-12-19T15:20:50Z",
          "modifiedTimeStamp": "2018-12-19T15:20:50Z",
          "createdBy": "string",
          "modifiedBy": "string",
          "type": "string",
          "iconUri": "string",
          "memberCount": 0,
          "links": [
            {
              "method": "string",
              "rel": "string",
              "uri": "string",
              "href": "string"
            }
          ],
          "properties": {
            "property1": "string",
            "property2": "string"
          }
        }
      ],
      "version": 0
    }
    

    Responses

    Status Meaning Description Schema
    200 OK The request succeeded. folderCollection

    Find an object by path

    Code samples

    # You can also use wget
    curl -X POST https://www.example.com/folders/paths \
      -H 'Content-Type: application/vnd.sas.content.folder.path+json' \
      -H 'Authorization: Bearer <access-token-goes-here>' \ 
      -H 'Accept: application/vnd.sas.summary+json'
    
    
    var headers = {
      'Content-Type':'application/vnd.sas.content.folder.path+json',
      'Accept':'application/vnd.sas.summary+json'
    
    };
    
    $.ajax({
      url: 'https://www.example.com/folders/paths',
      method: 'post',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    import requests
    headers = {
      'Content-Type': 'application/vnd.sas.content.folder.path+json',
      'Accept': 'application/vnd.sas.summary+json'
    }
    
    r = requests.post('https://www.example.com/folders/paths', params={
    
    }, headers = headers)
    
    print r.json()
    
    

    POST /paths

    Find an object, if it exists, by path. The client provides an ordered list of parent folder names, the object name, and the object content type.

    Body parameter

    {
      "items": [
        "string"
      ],
      "contentType": "string"
    }
    

    Parameters

    Parameter In Type Required Description
    body body path true The set of parent names, the object name, and the object content type.

    Example responses

    200

    {
      "id": "string",
      "type": "string",
      "name": "string",
      "description": "string",
      "links": [
        {
          "method": "string",
          "rel": "string",
          "uri": "string",
          "href": "string"
        }
      ]
    }
    

    Responses

    Status Meaning Description Schema
    200 OK The object was found and returned as a summary object. resourceSummary
    400 Bad Request The request was invalid. The request body was malformed or is absent. errorResponse
    404 Not Found No object with the specified type exists at the requested path. errorResponse

    Validate that a member can be named or renamed to the given value without creating a conflict

    Code samples

    # You can also use wget
    curl -X PUT https://www.example.com/folders/commons/validations/folders/{folderId}/members/{memberId}/name?value=string&type=string \
      -H 'Authorization: Bearer <access-token-goes-here>' \ 
      -H 'Accept: application/vnd.sas.validation+json'
    
    
    var headers = {
      'Accept':'application/vnd.sas.validation+json'
    
    };
    
    $.ajax({
      url: 'https://www.example.com/folders/commons/validations/folders/{folderId}/members/{memberId}/name',
      method: 'put',
      data: '?value=string&type=string',
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    import requests
    headers = {
      'Accept': 'application/vnd.sas.validation+json'
    }
    
    r = requests.put('https://www.example.com/folders/commons/validations/folders/{folderId}/members/{memberId}/name', params={
      'value': 'string',  'type': 'string'
    }, headers = headers)
    
    print r.json()
    
    

    PUT /commons/validations/folders/{folderId}/members/{memberId}/name

    This endpoint can be used by a client to test whether creating or renaming a member would create a naming conflict before actually attempting the operation. When creating a new member, a memberId of @new indicates that the attempted operation would create a new member, where a folderId of @root is a placeholder representing the root level of the folder hierarchy. For example,
    PUT /commons/validations/folders/@root/members/@new/name?value=TestFolder1&type=folder
    would check if one could successfully create a root folder named TestFolder1 and respond appropriately.
    PUT /commons/validations/folders/@myFolder/members/@new/name?value=TestReport1&type=report
    would check whether a new member named TestReport1 of type report could be added to the user's My Folder.

    Parameters

    Parameter In Type Required Description
    folderId path string true The identifier of the folder whose members are to be checked. A value of @root indicates checking a root-level folder, and type must be folder.
    memberId path string true If a rename is being attempted, the identifier of the member being renamed. If a new member is being created, the @new placeholder is used.
    value query string true The name to be tested.
    type query string true The type of the member to be tested. Members of the same type have to be named uniquely, so both the new name and type are required.

    Example responses

    200

    {
      "version": 0,
      "errorResponse": {
        "message": "string",
        "errorCode": 0,
        "httpStatusCode": 0,
        "remediation": "string",
        "details": [
          "string"
        ]
      },
      "valid": true,
      "links": [
        {
          "method": "string",
          "rel": "string",
          "uri": "string",
          "href": "string"
        }
      ]
    }
    

    Responses

    Status Meaning Description Schema
    200 OK The new name is acceptable based on the current state of the repository. validationResponse
    400 Bad Request The request was invalid. errorResponse

    Get a list of folder members

    Code samples

    # You can also use wget
    curl -X GET https://www.example.com/folders/folders/{folderId}/members \
      -H 'Authorization: Bearer <access-token-goes-here>' \ 
      -H 'Accept: application/vnd.sas.collection+json' \
      -H 'Accept-Language: string'
    
    
    var headers = {
      'Accept':'application/vnd.sas.collection+json',
      'Accept-Language':'string'
    
    };
    
    $.ajax({
      url: 'https://www.example.com/folders/folders/{folderId}/members',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    import requests
    headers = {
      'Accept': 'application/vnd.sas.collection+json',
      'Accept-Language': 'string'
    }
    
    r = requests.get('https://www.example.com/folders/folders/{folderId}/members', params={
    
    }, headers = headers)
    
    print r.json()
    
    

    GET /folders/{folderId}/members

    Returns a list of folder members. Standard paging, filtering, and sorting options are available. The media type of the returned collection items is application/vnd.sas.content.folder.member. Default sorting for this collection is name:ascending, unless the folder is of the history folder type. Default sorting for history folders is added:descending, which orders the elements starting with the most recently added.

    Parameters

    Parameter In Type Required Description
    folderId path string(object-id) true The identifier of a specific folder, or of one of the delegate strings @myFolder, @appDataFolder, @myHistory, @myFavorites, or @public.
    start query integer(int64) false Offset of first member to return. Defaults to 0.
    limit query integer(int64) false Maximum number of members to return. Defaults to 20.
    filter query string false Filter criteria for returned members. See Filtering in REST APIs. For example, you can filter for a member with a given name as a way to test if a folder already has a member with that name: ?filter=eq(name, 'bobsyouruncle')
    sortBy query string false Sort returned collection of members. See Sorting in REST APIs. The member collection can be sorted by folders first by using sortBy=eq(contentType,'folder'):descending Use :ascending to soft by folders last. Specifying sortBy=eq(contentType,'folder'):descending,name:ascending,type:ascending sorts by folders first, then by name, then by type.
    recursive query boolean false If true, the members of the requested folder, plus all of its descendants, are returned in a flat list (no order is guaranteed). Reference members that refer to folders are not followed unless the followReferences parameter is true. The value of this parameter defaults to false.
    followReferences query boolean false If true, references to other folders are followed when returning the recursive list of members. If recursive is false, then the value of this parameter is meaningless. The value of this parameter defaults to false.
    Accept-Language header string false Enumerates the languages that the client prefers to use for the response. This can be used to provide localized data where available.

    Example responses

    200

    {
      "name": "string",
      "start": 0,
      "limit": 0,
      "count": 0,
      "accept": "string",
      "links": [
        {
          "method": "string",
          "rel": "string",
          "uri": "string",
          "href": "string"
        }
      ],
      "items": [
        {
          "id": "string",
          "uri": "string",
          "added": "2018-12-19T15:20:50Z",
          "type": "string",
          "parentFolderUri": "string",
          "name": "string",
          "description": "string",
          "createdBy": "string",
          "creationTimeStamp": "2018-12-19T15:20:50Z",
          "modifiedBy": "string",
          "modifiedTimeStamp": "2018-12-19T15:20:50Z",
          "contentType": "string",
          "iconUri": "string",
          "orderNum": 0,
          "links": [
            {
              "method": "string",
              "rel": "string",
              "uri": "string",
              "href": "string"
            }
          ]
        }
      ],
      "version": 0
    }
    

    Responses

    Status Meaning Description Schema
    200 OK The request succeeded. A list of folder members was returned. memberCollection
    400 Bad Request The request was invalid. An invalid filter or combination of request parameters was provided. errorResponse
    404 Not Found No folder exists at the requested path. errorResponse

    Add a member to a folder

    Code samples

    # You can also use wget
    curl -X POST https://www.example.com/folders/folders/{folderId}/members \
      -H 'Content-Type: application/vnd.sas.content.folder.member+json' \
      -H 'Authorization: Bearer <access-token-goes-here>' \ 
      -H 'Accept: application/vnd.sas.content.folder.member+json'
    
    
    var headers = {
      'Content-Type':'application/vnd.sas.content.folder.member+json',
      'Accept':'application/vnd.sas.content.folder.member+json'
    
    };
    
    $.ajax({
      url: 'https://www.example.com/folders/folders/{folderId}/members',
      method: 'post',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    import requests
    headers = {
      'Content-Type': 'application/vnd.sas.content.folder.member+json',
      'Accept': 'application/vnd.sas.content.folder.member+json'
    }
    
    r = requests.post('https://www.example.com/folders/folders/{folderId}/members', params={
    
    }, headers = headers)
    
    print r.json()
    
    

    POST /folders/{folderId}/members

    Adds a new member to the folder. If the member type is 'child' and the object referenced is already a member of any folder (including the specified parent), this operation fails with a 409 status (conflict). If the object being added is a folder, this method checks that the name is unique (among other members that are of the same type). If a name collision occurs, a 409 status is returned.

    Body parameter

    {
      "name": "Test Object",
      "type": "child",
      "uri": "/objekts/e8cdb3af-30d8-423d-92a1-6f3bf1dffbb9",
      "contentType": "objekt"
    }
    

    Parameters

    Parameter In Type Required Description
    folderId path string(object-id) true The identifier of a specific folder, or of one of the delegate strings @myFolder, @appDataFolder, @myHistory, @myFavorites, or @public.
    abortOnMetadataFailure query boolean false If true, the member creation is aborted if the GET to retrieve the member metadata fails. If false, the member creation succeeds regardless of the metadata retrieval status. Defaults to false.
    body body memberIn true Member.

    Example responses

    200

    {
      "id": "string",
      "uri": "string",
      "added": "2018-12-19T15:20:50Z",
      "type": "string",
      "parentFolderUri": "string",
      "name": "string",
      "description": "string",
      "createdBy": "string",
      "creationTimeStamp": "2018-12-19T15:20:50Z",
      "modifiedBy": "string",
      "modifiedTimeStamp": "2018-12-19T15:20:50Z",
      "contentType": "string",
      "iconUri": "string",
      "orderNum": 0,
      "links": [
        {
          "method": "string",
          "rel": "string",
          "uri": "string",
          "href": "string"
        }
      ]
    }
    

    Responses

    Status Meaning Description Schema
    200 OK The request succeeded. The member was updated. member
    201 Created A member was created. member
    400 Bad Request The request was invalid. There was an attempt to make a folder its own parent. errorResponse
    404 Not Found No folder exists at the requested path. errorResponse
    409 Conflict The request could not be completed due to a conflict with the current state of the resource. The URI already exists as a child in this folder or another folder. errorResponse
    422 Unprocessable Entity History creation failed because the metadata retrieval failed. errorResponse
    Response Headers
    Status Header Type Format Description
    200 Location string The URI to the newly created object.
    200 Etag string A tag that identifies this revision of this object.
    201 Location string The URI of the newly created member.

    Get a folder member

    Code samples

    # You can also use wget
    curl -X GET https://www.example.com/folders/folders/{folderId}/members/{memberId} \
      -H 'Authorization: Bearer <access-token-goes-here>' \ 
      -H 'Accept: application/vnd.sas.content.folder.member+json'
    
    
    var headers = {
      'Accept':'application/vnd.sas.content.folder.member+json'
    
    };
    
    $.ajax({
      url: 'https://www.example.com/folders/folders/{folderId}/members/{memberId}',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    import requests
    headers = {
      'Accept': 'application/vnd.sas.content.folder.member+json'
    }
    
    r = requests.get('https://www.example.com/folders/folders/{folderId}/members/{memberId}', params={
    
    }, headers = headers)
    
    print r.json()
    
    

    GET /folders/{folderId}/members/{memberId}

    Returns the specified member.

    Parameters

    Parameter In Type Required Description
    folderId path string(object-id) true The identifier of a specific folder, or of one of the delegate strings @myFolder, @appDataFolder, @myHistory, @myFavorites, or @public.
    memberId path string true Member id.

    Example responses

    200

    {
      "id": "string",
      "uri": "string",
      "added": "2018-12-19T15:20:50Z",
      "type": "string",
      "parentFolderUri": "string",
      "name": "string",
      "description": "string",
      "createdBy": "string",
      "creationTimeStamp": "2018-12-19T15:20:50Z",
      "modifiedBy": "string",
      "modifiedTimeStamp": "2018-12-19T15:20:50Z",
      "contentType": "string",
      "iconUri": "string",
      "orderNum": 0,
      "links": [
        {
          "method": "string",
          "rel": "string",
          "uri": "string",
          "href": "string"
        }
      ]
    }
    

    Responses

    Status Meaning Description Schema
    200 OK The folder member was returned. member
    404 Not Found No member exists at the requested path. errorResponse
    Response Headers
    Status Header Type Format Description
    200 Last-Modified string The ISO8601 timestamp representing the last time this member was updated.
    200 Etag string A tag that identifies this revision of this object.

    Remove a member from a folder

    Code samples

    # You can also use wget
    curl -X DELETE https://www.example.com/folders/folders/{folderId}/members/{memberId} \
      -H 'Authorization: Bearer <access-token-goes-here>' \ 
      -H 'Accept: */*'
    
    
    var headers = {
      'Accept':'*/*'
    
    };
    
    $.ajax({
      url: 'https://www.example.com/folders/folders/{folderId}/members/{memberId}',
      method: 'delete',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    import requests
    headers = {
      'Accept': '*/*'
    }
    
    r = requests.delete('https://www.example.com/folders/folders/{folderId}/members/{memberId}', params={
    
    }, headers = headers)
    
    print r.json()
    
    

    DELETE /folders/{folderId}/members/{memberId}

    Removes the specified member from the folder. This does not delete the target resource. The proper way to delete a resource is to use the resource's persistence service to delete it. Using that service generates an event that causes the folders service to clean up any members that have that target resource's URI.

    Parameters

    Parameter In Type Required Description
    folderId path string(object-id) true The identifier of a specific folder, or of one of the delegate strings @myFolder, @appDataFolder, @myHistory, @myFavorites, or @public.
    memberId path string true Member id.

    Example responses

    404

    Responses

    Status Meaning Description Schema
    204 No Content The member was deleted. None
    404 Not Found No member exists at the requested path. errorResponse

    Update a folder member

    Code samples

    # You can also use wget
    curl -X PUT https://www.example.com/folders/folders/{folderId}/members/{memberId} \
      -H 'Content-Type: application/vnd.sas.content.folder.member+json' \
      -H 'Authorization: Bearer <access-token-goes-here>' \ 
      -H 'Accept: application/vnd.sas.content.folder.member+json' \
      -H 'If-Match: string' \
      -H 'If-Unmodified-Since: string'
    
    
    var headers = {
      'Content-Type':'application/vnd.sas.content.folder.member+json',
      'Accept':'application/vnd.sas.content.folder.member+json',
      'If-Match':'string',
      'If-Unmodified-Since':'string'
    
    };
    
    $.ajax({
      url: 'https://www.example.com/folders/folders/{folderId}/members/{memberId}',
      method: 'put',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    import requests
    headers = {
      'Content-Type': 'application/vnd.sas.content.folder.member+json',
      'Accept': 'application/vnd.sas.content.folder.member+json',
      'If-Match': 'string',
      'If-Unmodified-Since': 'string'
    }
    
    r = requests.put('https://www.example.com/folders/folders/{folderId}/members/{memberId}', params={
    
    }, headers = headers)
    
    print r.json()
    
    

    PUT /folders/{folderId}/members/{memberId}

    Replaces an existing folder member. Changing the parentUri affects a move operation. Neither the URI or the type of the member can be changed.

    Body parameter

    {
      "name": "Test Object",
      "type": "child",
      "uri": "/objekts/e8cdb3af-30d8-423d-92a1-6f3bf1dffbb9",
      "contentType": "objekt"
    }
    

    Parameters

    Parameter In Type Required Description
    folderId path string(object-id) true The identifier of a specific folder, or of one of the delegate strings @myFolder, @appDataFolder, @myHistory, @myFavorites, or @public.
    memberId path string true Member id.
    If-Match header string false The ETag that was returned from a GET, POST, or PUT of this folder.
    If-Unmodified-Since header string false The value of the lastModified date of the folder. If the folder has been updated since this time, the update fails.
    body body memberIn true Member.

    Example responses

    200

    {
      "id": "string",
      "uri": "string",
      "added": "2018-12-19T15:20:50Z",
      "type": "string",
      "parentFolderUri": "string",
      "name": "string",
      "description": "string",
      "createdBy": "string",
      "creationTimeStamp": "2018-12-19T15:20:50Z",
      "modifiedBy": "string",
      "modifiedTimeStamp": "2018-12-19T15:20:50Z",
      "contentType": "string",
      "iconUri": "string",
      "orderNum": 0,
      "links": [
        {
          "method": "string",
          "rel": "string",
          "uri": "string",
          "href": "string"
        }
      ]
    }
    

    Responses

    Status Meaning Description Schema
    200 OK The member was updated. member
    400 Bad Request The request was invalid. The JSON or some other element was malformed. errorResponse
    404 Not Found No member exists at the requested path. errorResponse
    412 Precondition Failed The If-Match request header did not match the resource's entity tag, or the If-Unmodified-Since request header did not match the resource's last modified timestamp. The ETag provided does not match the current version of the object, or the last modified date does not match. errorResponse
    Response Headers
    Status Header Type Format Description
    200 Last-Modified string The ISO8601 date string representing the timestamp of the last update to this member.
    200 Etag string A tag that identifies this revision of this object.

    Make a partial update to a folder member

    Code samples

    # You can also use wget
    curl -X PATCH https://www.example.com/folders/folders/{folderId}/members/{memberId} \
      -H 'Content-Type: application/vnd.sas.content.folder.member+json' \
      -H 'Authorization: Bearer <access-token-goes-here>' \ 
      -H 'Accept: application/vnd.sas.content.folder.member+json' \
      -H 'If-Match: string' \
      -H 'If-Unmodified-Since: string'
    
    
    var headers = {
      'Content-Type':'application/vnd.sas.content.folder.member+json',
      'Accept':'application/vnd.sas.content.folder.member+json',
      'If-Match':'string',
      'If-Unmodified-Since':'string'
    
    };
    
    $.ajax({
      url: 'https://www.example.com/folders/folders/{folderId}/members/{memberId}',
      method: 'patch',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    import requests
    headers = {
      'Content-Type': 'application/vnd.sas.content.folder.member+json',
      'Accept': 'application/vnd.sas.content.folder.member+json',
      'If-Match': 'string',
      'If-Unmodified-Since': 'string'
    }
    
    r = requests.patch('https://www.example.com/folders/folders/{folderId}/members/{memberId}', params={
    
    }, headers = headers)
    
    print r.json()
    
    

    PATCH /folders/{folderId}/members/{memberId}

    Updates the provided fields of a member. The client can provide a sparsely populated object, and only the non-null fields contribute to the updates. So, a body like { "name": "NewMemberName" } causes the member to have its name changed, but no other field is affected. The full resulting object is returned in the response.

    Body parameter

    {
      "name": "Test Object",
      "type": "child",
      "uri": "/objekts/e8cdb3af-30d8-423d-92a1-6f3bf1dffbb9",
      "contentType": "objekt"
    }
    

    Parameters

    Parameter In Type Required Description
    folderId path string(object-id) true The identifier of a specific folder, or of one of the delegate strings @myFolder, @appDataFolder, @myHistory, @myFavorites, or @public.
    memberId path string true Member id.
    If-Match header string false The ETag that was returned from a GET, POST, or PUT of this folder.
    If-Unmodified-Since header string false The value of the lastModified date of the folder. If the folder has been updated since this time, the update fails.
    body body memberIn true A sparsely populated member. Only the non-null fields are updated in the persisted member.

    Example responses

    200

    {
      "id": "string",
      "uri": "string",
      "added": "2018-12-19T15:20:50Z",
      "type": "string",
      "parentFolderUri": "string",
      "name": "string",
      "description": "string",
      "createdBy": "string",
      "creationTimeStamp": "2018-12-19T15:20:50Z",
      "modifiedBy": "string",
      "modifiedTimeStamp": "2018-12-19T15:20:50Z",
      "contentType": "string",
      "iconUri": "string",
      "orderNum": 0,
      "links": [
        {
          "method": "string",
          "rel": "string",
          "uri": "string",
          "href": "string"
        }
      ]
    }
    

    Responses

    Status Meaning Description Schema
    200 OK The member was updated. member
    400 Bad Request The request was invalid. The JSON or some other element was malformed. errorResponse
    404 Not Found No member exists at the requested path. errorResponse
    409 Conflict The request could not be completed due to a conflict with the current state of the resource. The name change requested would create a naming conflict. errorResponse
    412 Precondition Failed The If-Match request header did not match the resource's entity tag, or the If-Unmodified-Since request header did not match the resource's last modified timestamp. errorResponse
    422 Unprocessable Entity One or more elements of the body is invalid. errorResponse
    Response Headers
    Status Header Type Format Description
    200 Last-Modified string The RFC 1123 date string representing the timestamp of the last update to this member.
    200 Etag string A tag that identifies this revision of this object.

    Update the modification date for a history member

    Code samples

    # You can also use wget
    curl -X POST https://www.example.com/folders/folders/{folderId}/histories \
      -H 'Content-Type: application/vnd.sas.content.folder.member+json' \
      -H 'Authorization: Bearer <access-token-goes-here>' \ 
      -H 'Accept: application/vnd.sas.content.folder.member+json'
    
    
    var headers = {
      'Content-Type':'application/vnd.sas.content.folder.member+json',
      'Accept':'application/vnd.sas.content.folder.member+json'
    
    };
    
    $.ajax({
      url: 'https://www.example.com/folders/folders/{folderId}/histories',
      method: 'post',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    import requests
    headers = {
      'Content-Type': 'application/vnd.sas.content.folder.member+json',
      'Accept': 'application/vnd.sas.content.folder.member+json'
    }
    
    r = requests.post('https://www.example.com/folders/folders/{folderId}/histories', params={
    
    }, headers = headers)
    
    print r.json()
    
    

    POST /folders/{folderId}/histories

    Updates the modification date for a history member. If the object URI exists as a reference in the history folder, the information including the added field is updated. If it does not exist, a new member is added, and an eviction is performed if the folder is already at the maximum members threshold.

    Body parameter

    {
      "name": "Test Object",
      "type": "child",
      "uri": "/objekts/e8cdb3af-30d8-423d-92a1-6f3bf1dffbb9",
      "contentType": "objekt"
    }
    

    Parameters

    Parameter In Type Required Description
    folderId path string(object-id) true The identifier of a specific history folder, or the delegate string: @myHistory.
    abortOnMetadataFailure query boolean false If true, if the GET to retrieve the member metadata fails, abort the member creation. If false, the member creation succeeds regardless of the metadata retrieval status. Defaults to false.
    body body memberIn true Member.

    Example responses

    200

    {
      "id": "string",
      "uri": "string",
      "added": "2018-12-19T15:20:50Z",
      "type": "string",
      "parentFolderUri": "string",
      "name": "string",
      "description": "string",
      "createdBy": "string",
      "creationTimeStamp": "2018-12-19T15:20:50Z",
      "modifiedBy": "string",
      "modifiedTimeStamp": "2018-12-19T15:20:50Z",
      "contentType": "string",
      "iconUri": "string",
      "orderNum": 0,
      "links": [
        {
          "method": "string",
          "rel": "string",