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

    Annotations

    Base URLs:

    Terms of service Email: SAS Developers Web: SAS Developers

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

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

    Usage Notes

    Overview

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

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

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

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

    Terminology

    Error Codes

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

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

    Operations

    Root

    Contains the operations for the root resource of this API.

    Code samples

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

    GET /

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

    Example responses

    List of endpoints for annotations service.

    {
      "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"
        }
      ],
      "version": 1
    }
    
    {
      "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"
        }
      ],
      "version": 1
    }
    
    Status Meaning Description Schema
    200 OK The API link list is available. api
    Response Headers
    Status Header Type Format Description
    200 Content-Type string No description

    Check API availability

    Code samples

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

    HEAD /

    Checks whether the Annotations API is available.

    Responses
    Status Meaning Description Schema
    200 OK The API is available. None
    Response Headers
    Status Header Type Format Description
    200 Content-Type string No description

    Annotations

    Contains the operations to support annotations.

    Get all annotations

    Code samples

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

    GET /annotations

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

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

    /annotations/annotations?sortBy=name:descending

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

    Example responses

    Get all annotations.

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

    this is an example of an error that could be returned for bad requests

    {
      "version": 2,
      "message": "example error message",
      "httpStatusCode": 400
    }
    
    {
      "version": 2,
      "message": "example error message",
      "httpStatusCode": 400
    }
    
    Responses
    Status Meaning Description Schema
    200 OK The collection of annotations is available. annotationCollection
    400 Bad Request The request was invalid. error2
    Response Headers
    Status Header Type Format Description
    200 Content-Type string No description

    Create an annotation

    Code samples

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

    POST /annotations

    Creates an annotation from the specified request.

    Body parameter

    Request body for create annotation end point.

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

    Example responses

    Response body for create annotation end point.

    {
      "creationTimeStamp": "2018-03-26T19:50:09.935Z",
      "modifiedTimeStamp": "2018-03-26T19:50:09.935Z",
      "createdBy": "sasboot",
      "modifiedBy": "sasboot",
      "id": "2a902411-4f81-4819-9263-203cf0ff29ce",
      "name": "newAnnotationName",
      "domain": "newDomainLabel",
      "version": 1,
      "label": "newAnnotationLabel",
      "description": "newDescriptionLabel",
      "links": [
        {
          "method": "GET",
          "rel": "self",
          "href": "/annotations/annotations/2a902411-4f81-4819-9263-203cf0ff29ce",
          "uri": "/annotations/annotations/2a902411-4f81-4819-9263-203cf0ff29ce",
          "type": "application/vnd.sas.annotation"
        },
        {
          "method": "PUT",
          "rel": "update",
          "href": "/annotations/annotations/2a902411-4f81-4819-9263-203cf0ff29ce",
          "uri": "/annotations/annotations/2a902411-4f81-4819-9263-203cf0ff29ce",
          "type": "application/vnd.sas.annotation",
          "responseType": "application/vnd.sas.annotation"
        },
        {
          "method": "DELETE",
          "rel": "delete",
          "href": "/annotations/annotations/2a902411-4f81-4819-9263-203cf0ff29ce",
          "uri": "/annotations/annotations/2a902411-4f81-4819-9263-203cf0ff29ce"
        },
        {
          "method": "GET",
          "rel": "up",
          "href": "/annotations/annotations",
          "uri": "/annotations/annotations",
          "type": "application/vnd.sas.collection",
          "itemType": "application/vnd.sas.annotation"
        },
        {
          "method": "GET",
          "rel": "members",
          "href": "/annotations/annotations/2a902411-4f81-4819-9263-203cf0ff29ce/members",
          "uri": "/annotations/annotations/2a902411-4f81-4819-9263-203cf0ff29ce/members",
          "type": "application/vnd.sas.collection",
          "itemType": "application/vnd.sas.annotation.member"
        }
      ]
    }
    
    {
      "creationTimeStamp": "2018-03-26T19:50:09.935Z",
      "modifiedTimeStamp": "2018-03-26T19:50:09.935Z",
      "createdBy": "sasboot",
      "modifiedBy": "sasboot",
      "id": "2a902411-4f81-4819-9263-203cf0ff29ce",
      "name": "newAnnotationName",
      "domain": "newDomainLabel",
      "version": 1,
      "label": "newAnnotationLabel",
      "description": "newDescriptionLabel",
      "links": [
        {
          "method": "GET",
          "rel": "self",
          "href": "/annotations/annotations/2a902411-4f81-4819-9263-203cf0ff29ce",
          "uri": "/annotations/annotations/2a902411-4f81-4819-9263-203cf0ff29ce",
          "type": "application/vnd.sas.annotation"
        },
        {
          "method": "PUT",
          "rel": "update",
          "href": "/annotations/annotations/2a902411-4f81-4819-9263-203cf0ff29ce",
          "uri": "/annotations/annotations/2a902411-4f81-4819-9263-203cf0ff29ce",
          "type": "application/vnd.sas.annotation",
          "responseType": "application/vnd.sas.annotation"
        },
        {
          "method": "DELETE",
          "rel": "delete",
          "href": "/annotations/annotations/2a902411-4f81-4819-9263-203cf0ff29ce",
          "uri": "/annotations/annotations/2a902411-4f81-4819-9263-203cf0ff29ce"
        },
        {
          "method": "GET",
          "rel": "up",
          "href": "/annotations/annotations",
          "uri": "/annotations/annotations",
          "type": "application/vnd.sas.collection",
          "itemType": "application/vnd.sas.annotation"
        },
        {
          "method": "GET",
          "rel": "members",
          "href": "/annotations/annotations/2a902411-4f81-4819-9263-203cf0ff29ce/members",
          "uri": "/annotations/annotations/2a902411-4f81-4819-9263-203cf0ff29ce/members",
          "type": "application/vnd.sas.collection",
          "itemType": "application/vnd.sas.annotation.member"
        }
      ]
    }
    

    this is an example of an error that could be returned for bad requests

    {
      "version": 2,
      "message": "example error message",
      "httpStatusCode": 400
    }
    
    {
      "version": 2,
      "message": "example error message",
      "httpStatusCode": 400
    }
    
    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://example.com/annotations/annotations#multi \
      -H 'Authorization: Bearer <access-token-goes-here>' \
      -H 'Content-Type: application/vnd.sas.selection+json' \
      -H 'Accept: application/vnd.sas.collection+json'
    
    
    const inputBody = '{
      "resources": [
        "uri",
        "uri2"
      ],
      "version": 2
    }';
    const headers = {
      'Content-Type':'application/vnd.sas.selection+json',
      'Accept':'application/vnd.sas.collection+json'
    };
    
    fetch('https://example.com/annotations/annotations#multi',
    {
      method: 'POST',
      body: inputBody,
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    import requests
    headers = {
      'Content-Type': 'application/vnd.sas.selection+json',
      'Accept': 'application/vnd.sas.collection+json'
    }
    
    r = requests.post('https://example.com/annotations/annotations#multi', headers = headers)
    
    print(r.json())
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Content-Type": []string{"application/vnd.sas.selection+json"},
            "Accept": []string{"application/vnd.sas.collection+json"},
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("POST", "https://example.com/annotations/annotations#multi", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    

    POST /annotations#multi

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

    Body parameter

    Get Annotations by Associated Resource URIs

    {
      "resources": [
        "uri",
        "uri2"
      ],
      "version": 2
    }
    
    Parameters
    Name In Type Required Description
    body body selection true Selects resourceUris for which associated annotations are to be found.

    Example responses

    Annotations returned corresponsding to the associated resource URI

    {
      "links": [
        {
          "method": "POST",
          "rel": "collection",
          "href": "/annotations/annotations",
          "uri": "/annotations/annotations",
          "type": "application/vnd.sas.selection",
          "responseType": "application/vnd.sas.collection"
        }
      ],
      "name": "annotations",
      "accept": "application/vnd.sas.annotation",
      "start": 0,
      "count": 2,
      "items": [
        {
          "creationTimeStamp": "2018-03-26T19:50:09.935Z",
          "modifiedTimeStamp": "2018-03-26T19:50:09.935Z",
          "createdBy": "sasboot",
          "modifiedBy": "sasboot",
          "id": "2a902411-4f81-4819-9263-203cf0ff29ce",
          "name": "newAnnotationName",
          "domain": "newDomainLabel",
          "version\"": 1,
          "label": "newAnnotationLabel",
          "description": "newDescriptionLabel",
          "links": [
            {
              "method": "GET",
              "rel": "self",
              "href": "/annotations/annotations/2a902411-4f81-4819-9263-203cf0ff29ce",
              "uri": "/annotations/annotations/2a902411-4f81-4819-9263-203cf0ff29ce",
              "type": "application/vnd.sas.annotation\""
            },
            {
              "method": "PUT",
              "rel": "update",
              "href": "/annotations/annotations/2a902411-4f81-4819-9263-203cf0ff29ce",
              "uri": "/annotations/annotations/2a902411-4f81-4819-9263-203cf0ff29ce",
              "type": "application/vnd.sas.annotation",
              "responseType": "application/vnd.sas.annotation\""
            },
            {
              "method": "DELETE",
              "rel": "delete",
              "href": "/annotations/annotations/2a902411-4f81-4819-9263-203cf0ff29ce",
              "uri": "/annotations/annotations/2a902411-4f81-4819-9263-203cf0ff29ce\""
            },
            {
              "method": "GET",
              "rel": "up",
              "href": "/annotations/annotations",
              "uri": "/annotations/annotations",
              "type": "application/vnd.sas.collection",
              "itemType": "application/vnd.sas.annotation\""
            },
            {
              "method": "GET",
              "rel": "members",
              "href": "/annotations/annotations/2a902411-4f81-4819-9263-203cf0ff29ce/members",
              "uri": "/annotations/annotations/2a902411-4f81-4819-9263-203cf0ff29ce/members",
              "type": "application/vnd.sas.collection",
              "itemType": "application/vnd.sas.annotation.member"
            }
          ]
        }
      ]
    }
    
    {
      "links": [
        {
          "method": "POST",
          "rel": "collection",
          "href": "/annotations/annotations",
          "uri": "/annotations/annotations",
          "type": "application/vnd.sas.selection",
          "responseType": "application/vnd.sas.collection"
        }
      ],
      "name": "annotations",
      "accept": "application/vnd.sas.annotation",
      "start": 0,
      "count": 2,
      "items": [
        {
          "creationTimeStamp": "2018-03-26T19:50:09.935Z",
          "modifiedTimeStamp": "2018-03-26T19:50:09.935Z",
          "createdBy": "sasboot",
          "modifiedBy": "sasboot",
          "id": "2a902411-4f81-4819-9263-203cf0ff29ce",
          "name": "newAnnotationName",
          "domain": "newDomainLabel",
          "version\"": 1,
          "label": "newAnnotationLabel",
          "description": "newDescriptionLabel",
          "links": [
            {
              "method": "GET",
              "rel": "self",
              "href": "/annotations/annotations/2a902411-4f81-4819-9263-203cf0ff29ce",
              "uri": "/annotations/annotations/2a902411-4f81-4819-9263-203cf0ff29ce",
              "type": "application/vnd.sas.annotation\""
            },
            {
              "method": "PUT",
              "rel": "update",
              "href": "/annotations/annotations/2a902411-4f81-4819-9263-203cf0ff29ce",
              "uri": "/annotations/annotations/2a902411-4f81-4819-9263-203cf0ff29ce",
              "type": "application/vnd.sas.annotation",
              "responseType": "application/vnd.sas.annotation\""
            },
            {
              "method": "DELETE",
              "rel": "delete",
              "href": "/annotations/annotations/2a902411-4f81-4819-9263-203cf0ff29ce",
              "uri": "/annotations/annotations/2a902411-4f81-4819-9263-203cf0ff29ce\""
            },
            {
              "method": "GET",
              "rel": "up",
              "href": "/annotations/annotations",
              "uri": "/annotations/annotations",
              "type": "application/vnd.sas.collection",
              "itemType": "application/vnd.sas.annotation\""
            },
            {
              "method": "GET",
              "rel": "members",
              "href": "/annotations/annotations/2a902411-4f81-4819-9263-203cf0ff29ce/members",
              "uri": "/annotations/annotations/2a902411-4f81-4819-9263-203cf0ff29ce/members",
              "type": "application/vnd.sas.collection",
              "itemType": "application/vnd.sas.annotation.member"
            }
          ]
        }
      ]
    }
    

    this is an example of an error that could be returned for bad requests

    {
      "version": 2,
      "message": "example error message",
      "httpStatusCode": 400
    }
    
    {
      "version": 2,
      "message": "example error message",
      "httpStatusCode": 400
    }
    
    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. error2
    Response Headers
    Status Header Type Format Description
    200 Content-Type string No description

    Get an annotation

    Code samples

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

    GET /annotations/{annotationId}

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

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

    Example responses

    Example for annotation.

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

    example of an error that might be returned on a 404 response

    {
      "message": "not found",
      "httpStatusCode": 404,
      "version": 2
    }
    
    {
      "message": "not found",
      "httpStatusCode": 404,
      "version": 2
    }
    
    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://example.com/annotations/annotations/{annotationId} \
      -H 'Authorization: Bearer <access-token-goes-here>' \
      -H 'If-Match: string'
    
    
    
    const headers = {
      'If-Match':'string'
    };
    
    fetch('https://example.com/annotations/annotations/{annotationId}',
    {
      method: 'HEAD',
    
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    import requests
    headers = {
      'If-Match': 'string'
    }
    
    r = requests.head('https://example.com/annotations/annotations/{annotationId}', headers = headers)
    
    print(r.json())
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "If-Match": []string{"string"},
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("HEAD", "https://example.com/annotations/annotations/{annotationId}", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    

    HEAD /annotations/{annotationId}

    Returns header information and verifies that the annotation exists.

    Parameters
    Name In Type Required Description
    annotationId path string true The annotation ID.
    If-Match header string false The value of the ETag that was returned from a GET or previous PUT of this type. This header is optional, but if provided, this MUST match exactly the current value of the etag of the object.
    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://example.com/annotations/annotations/{annotationId} \
      -H 'Authorization: Bearer <access-token-goes-here>' \
      -H 'Content-Type: application/vnd.sas.annotation+json' \
      -H 'Accept: application/vnd.sas.annotation+json' \
      -H 'If-Match: string'
    
    
    const inputBody = '{
      "id": "b4be3b98-2643-4699-92e6-43bad70b531c",
      "domain": "Changed",
      "name": "Changed",
      "label": "Changed",
      "description": "Changed"
    }';
    const headers = {
      'Content-Type':'application/vnd.sas.annotation+json',
      'Accept':'application/vnd.sas.annotation+json',
      'If-Match':'string'
    };
    
    fetch('https://example.com/annotations/annotations/{annotationId}',
    {
      method: 'PUT',
      body: inputBody,
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    import requests
    headers = {
      'Content-Type': 'application/vnd.sas.annotation+json',
      'Accept': 'application/vnd.sas.annotation+json',
      'If-Match': 'string'
    }
    
    r = requests.put('https://example.com/annotations/annotations/{annotationId}', headers = headers)
    
    print(r.json())
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Content-Type": []string{"application/vnd.sas.annotation+json"},
            "Accept": []string{"application/vnd.sas.annotation+json"},
            "If-Match": []string{"string"},
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("PUT", "https://example.com/annotations/annotations/{annotationId}", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    

    PUT /annotations/{annotationId}

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

    Body parameter

    Request Body to update the annotation

    {
      "id": "b4be3b98-2643-4699-92e6-43bad70b531c",
      "domain": "Changed",
      "name": "Changed",
      "label": "Changed",
      "description": "Changed"
    }
    
    Parameters
    Name In Type Required Description
    annotationId path string true The annotation ID.
    If-Match header string false The Etag that was returned from a GET, POST, or PUT of this annotation.
    body body updateAnnotation true The annotation to update.

    Example responses

    Response body for update annotation endpoint.

    {
      "creationTimeStamp": "2022-03-08T12:28:17.470Z",
      "createdBy": "sasadm",
      "modifiedTimeStamp": "2022-03-08T12:30:03.640Z",
      "modifiedBy": "sasadm",
      "version": 1,
      "id": "b4be3b98-2643-4699-92e6-43bad70b531c",
      "name": "Changed",
      "domain": "Changed",
      "label": "Changed",
      "description": "Changed",
      "links": [
        {
          "method": "GET",
          "rel": "self",
          "href": "/annotations/annotations/b4be3b98-2643-4699-92e6-43bad70b531c",
          "uri": "/annotations/annotations/b4be3b98-2643-4699-92e6-43bad70b531c",
          "type": "application/vnd.sas.annotation"
        },
        {
          "method": "PUT",
          "rel": "update",
          "href": "/annotations/annotations/b4be3b98-2643-4699-92e6-43bad70b531c",
          "uri": "/annotations/annotations/b4be3b98-2643-4699-92e6-43bad70b531c",
          "type": "application/vnd.sas.annotation",
          "responseType": "application/vnd.sas.annotation"
        },
        {
          "method": "DELETE",
          "rel": "delete",
          "href": "/annotations/annotations/b4be3b98-2643-4699-92e6-43bad70b531c",
          "uri": "/annotations/annotations/b4be3b98-2643-4699-92e6-43bad70b531c"
        },
        {
          "method": "GET",
          "rel": "up",
          "href": "/annotations/annotations",
          "uri": "/annotations/annotations",
          "type": "application/vnd.sas.collection",
          "itemType": "application/vnd.sas.annotation"
        },
        {
          "method": "GET",
          "rel": "members",
          "href": "/annotations/annotations/b4be3b98-2643-4699-92e6-43bad70b531c/members",
          "uri": "/annotations/annotations/b4be3b98-2643-4699-92e6-43bad70b531c/members",
          "type": "application/vnd.sas.collection",
          "itemType": "application/vnd.sas.annotation.member"
        }
      ]
    }
    
    {
      "creationTimeStamp": "2022-03-08T12:28:17.470Z",
      "createdBy": "sasadm",
      "modifiedTimeStamp": "2022-03-08T12:30:03.640Z",
      "modifiedBy": "sasadm",
      "version": 1,
      "id": "b4be3b98-2643-4699-92e6-43bad70b531c",
      "name": "Changed",
      "domain": "Changed",
      "label": "Changed",
      "description": "Changed",
      "links": [
        {
          "method": "GET",
          "rel": "self",
          "href": "/annotations/annotations/b4be3b98-2643-4699-92e6-43bad70b531c",
          "uri": "/annotations/annotations/b4be3b98-2643-4699-92e6-43bad70b531c",
          "type": "application/vnd.sas.annotation"
        },
        {
          "method": "PUT",
          "rel": "update",
          "href": "/annotations/annotations/b4be3b98-2643-4699-92e6-43bad70b531c",
          "uri": "/annotations/annotations/b4be3b98-2643-4699-92e6-43bad70b531c",
          "type": "application/vnd.sas.annotation",
          "responseType": "application/vnd.sas.annotation"
        },
        {
          "method": "DELETE",
          "rel": "delete",
          "href": "/annotations/annotations/b4be3b98-2643-4699-92e6-43bad70b531c",
          "uri": "/annotations/annotations/b4be3b98-2643-4699-92e6-43bad70b531c"
        },
        {
          "method": "GET",
          "rel": "up",
          "href": "/annotations/annotations",
          "uri": "/annotations/annotations",
          "type": "application/vnd.sas.collection",
          "itemType": "application/vnd.sas.annotation"
        },
        {
          "method": "GET",
          "rel": "members",
          "href": "/annotations/annotations/b4be3b98-2643-4699-92e6-43bad70b531c/members",
          "uri": "/annotations/annotations/b4be3b98-2643-4699-92e6-43bad70b531c/members",
          "type": "application/vnd.sas.collection",
          "itemType": "application/vnd.sas.annotation.member"
        }
      ]
    }
    

    this is an example of an error that could be returned for bad requests

    {
      "version": 2,
      "message": "example error message",
      "httpStatusCode": 400
    }
    
    {
      "version": 2,
      "message": "example error message",
      "httpStatusCode": 400
    }
    

    example of an error that might be returned on a 412 response

    {
      "message": "The specified \"If-Match\" header value did not match the value in the conditional PUT request for the object.",
      "httpStatusCode": 412,
      "version": 2
    }
    
    {
      "message": "The specified \"If-Match\" header value did not match the value in the conditional PUT request for the object.",
      "httpStatusCode": 412,
      "version": 2
    }
    

    example of an error that might be returned on a 415 response

    {
      "message": "Unsupported Media Type",
      "httpStatusCode": 415,
      "version": 2
    }
    
    {
      "message": "Unsupported Media Type",
      "httpStatusCode": 415,
      "version": 2
    }
    

    example of an error that might be returned on a 428 response

    {
      "message": "The PUT request must include an eTag in the \"if-match\" header, or a \"last-modified\" timestamp in the \"if-unmodified-since\" header.",
      "httpStatusCode": 428,
      "version": 2
    }
    
    {
      "message": "The PUT request must include an eTag in the \"if-match\" header, or a \"last-modified\" timestamp in the \"if-unmodified-since\" header.",
      "httpStatusCode": 428,
      "version": 2
    }
    
    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://example.com/annotations/annotations/{annotationId} \
      -H 'Authorization: Bearer <access-token-goes-here>' \
      -H 'Accept: application/vnd.sas.error+json'
    
    
    
    const headers = {
      'Accept':'application/vnd.sas.error+json'
    };
    
    fetch('https://example.com/annotations/annotations/{annotationId}',
    {
      method: 'DELETE',
    
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    import requests
    headers = {
      'Accept': 'application/vnd.sas.error+json'
    }
    
    r = requests.delete('https://example.com/annotations/annotations/{annotationId}', headers = headers)
    
    print(r.json())
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Accept": []string{"application/vnd.sas.error+json"},
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("DELETE", "https://example.com/annotations/annotations/{annotationId}", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    

    DELETE /annotations/{annotationId}

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

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

    Example responses

    example of an error that might be returned on a 404 response

    {
      "message": "not found",
      "httpStatusCode": 404,
      "version": 2
    }
    
    Responses
    Status Meaning Description Schema
    204 No Content The annotation was deleted. None
    404 Not Found The annotation does not exist. error2

    Members

    Contains the operations to support members.

    Get member objects for an annotation

    Code samples

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

    GET /annotations/{annotationId}/members

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

    Parameters
    Name In Type Required Description
    annotationId path string true The annotation ID.
    start query integer false The starting index of the first annotation in a page. The default is 0.
    limit query integer false The maximum number of members to return in this page of results. The actual number of returned members might be less if the collection has been exhausted. The default is 10.
    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

    Get member obejcts for an annotation.

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

    example of an error that might be returned on a 404 response

    {
      "message": "not found",
      "httpStatusCode": 404,
      "version": 2
    }
    
    {
      "message": "not found",
      "httpStatusCode": 404,
      "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
    Response Headers
    Status Header Type Format Description
    200 Content-Type string No description
    200 Last-Modified string The ISO8601 date string that represents the timestamp.
    200 Etag string A tag that identifies this revision of this object.

    Create an annotation member

    Code samples

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

    POST /annotations/{annotationId}/members

    Creates an annotation member from the provided request.

    Body parameter

    Sample request body for creating a member

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

    Example responses

    Response body for create member endpoint

    {
      "creationTimeStamp": "2018-03-26T19:58:04.918Z",
      "modifiedTimeStamp": "2018-03-26T19:58:04.918Z",
      "createdBy": "sasboot",
      "modifiedBy": "sasboot",
      "version": 1,
      "id": "04c2d36b-0f7a-4e1b-a546-a80ffbe35bf9",
      "annotationId": "2a902411-4f81-4819-9263-203cf0ff29ce",
      "resourceType": "type",
      "resourceUri": "uri",
      "value": "objectValue",
      "links": [
        {
          "method": "GET",
          "rel": "annotation",
          "href": "/annotations/annotations/2a902411-4f81-4819-9263-203cf0ff29ce",
          "uri": "/annotations/annotations/2a902411-4f81-4819-9263-203cf0ff29ce",
          "type": "application/vnd.sas.annotation\""
        },
        {
          "method": "GET",
          "rel": "self",
          "href": "/annotations/annotations/2a902411-4f81-4819-9263-203cf0ff29ce/members/04c2d36b-0f7a-4e1b-a546-a80ffbe35bf9",
          "uri": "/annotations/annotations/2a902411-4f81-4819-9263-203cf0ff29ce/members/04c2d36b-0f7a-4e1b-a546-a80ffbe35bf9",
          "type": "application/vnd.sas.annotation.member"
        },
        {
          "method": "PUT",
          "rel": "update",
          "href": "/annotations/annotations/2a902411-4f81-4819-9263-203cf0ff29ce/members/04c2d36b-0f7a-4e1b-a546-a80ffbe35bf9",
          "uri": "/annotations/annotations/2a902411-4f81-4819-9263-203cf0ff29ce/members/04c2d36b-0f7a-4e1b-a546-a80ffbe35bf9",
          "type": "application/vnd.sas.annotation.member",
          "responseType": "application/vnd.sas.annotation.member"
        },
        {
          "method": "DELETE",
          "rel": "delete",
          "href": "/annotations/annotations/2a902411-4f81-4819-9263-203cf0ff29ce/members/04c2d36b-0f7a-4e1b-a546-a80ffbe35bf9",
          "uri": "/annotations/annotations/2a902411-4f81-4819-9263-203cf0ff29ce/members/04c2d36b-0f7a-4e1b-a546-a80ffbe35bf9"
        },
        {
          "method": "GET",
          "rel": "up",
          "href": "/annotations/annotations/2a902411-4f81-4819-9263-203cf0ff29ce/members",
          "uri": "/annotations/annotations/2a902411-4f81-4819-9263-203cf0ff29ce/members",
          "type": "application/vnd.sas.annotation.member",
          "responseType": "application/vnd.sas.annotation.member"
        }
      ]
    }
    
    {
      "creationTimeStamp": "2018-03-26T19:58:04.918Z",
      "modifiedTimeStamp": "2018-03-26T19:58:04.918Z",
      "createdBy": "sasboot",
      "modifiedBy": "sasboot",
      "version": 1,
      "id": "04c2d36b-0f7a-4e1b-a546-a80ffbe35bf9",
      "annotationId": "2a902411-4f81-4819-9263-203cf0ff29ce",
      "resourceType": "type",
      "resourceUri": "uri",
      "value": "objectValue",
      "links": [
        {
          "method": "GET",
          "rel": "annotation",
          "href": "/annotations/annotations/2a902411-4f81-4819-9263-203cf0ff29ce",
          "uri": "/annotations/annotations/2a902411-4f81-4819-9263-203cf0ff29ce",
          "type": "application/vnd.sas.annotation\""
        },
        {
          "method": "GET",
          "rel": "self",
          "href": "/annotations/annotations/2a902411-4f81-4819-9263-203cf0ff29ce/members/04c2d36b-0f7a-4e1b-a546-a80ffbe35bf9",
          "uri": "/annotations/annotations/2a902411-4f81-4819-9263-203cf0ff29ce/members/04c2d36b-0f7a-4e1b-a546-a80ffbe35bf9",
          "type": "application/vnd.sas.annotation.member"
        },
        {
          "method": "PUT",
          "rel": "update",
          "href": "/annotations/annotations/2a902411-4f81-4819-9263-203cf0ff29ce/members/04c2d36b-0f7a-4e1b-a546-a80ffbe35bf9",
          "uri": "/annotations/annotations/2a902411-4f81-4819-9263-203cf0ff29ce/members/04c2d36b-0f7a-4e1b-a546-a80ffbe35bf9",
          "type": "application/vnd.sas.annotation.member",
          "responseType": "application/vnd.sas.annotation.member"
        },
        {
          "method": "DELETE",
          "rel": "delete",
          "href": "/annotations/annotations/2a902411-4f81-4819-9263-203cf0ff29ce/members/04c2d36b-0f7a-4e1b-a546-a80ffbe35bf9",
          "uri": "/annotations/annotations/2a902411-4f81-4819-9263-203cf0ff29ce/members/04c2d36b-0f7a-4e1b-a546-a80ffbe35bf9"
        },
        {
          "method": "GET",
          "rel": "up",
          "href": "/annotations/annotations/2a902411-4f81-4819-9263-203cf0ff29ce/members",
          "uri": "/annotations/annotations/2a902411-4f81-4819-9263-203cf0ff29ce/members",
          "type": "application/vnd.sas.annotation.member",
          "responseType": "application/vnd.sas.annotation.member"
        }
      ]
    }
    

    this is an example of an error that could be returned for bad requests

    {
      "version": 2,
      "message": "example error message",
      "httpStatusCode": 400
    }
    
    {
      "version": 2,
      "message": "example error message",
      "httpStatusCode": 400
    }
    

    example of an error that might be returned on a 404 response

    {
      "message": "not found",
      "httpStatusCode": 404,
      "version": 2
    }
    
    {
      "message": "not found",
      "httpStatusCode": 404,
      "version": 2
    }
    
    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://example.com/annotations/annotations/{annotationId}/members/{memberId} \
      -H 'Authorization: Bearer <access-token-goes-here>' \
      -H 'Accept: application/vnd.sas.annotation.member+json'
    
    
    
    const headers = {
      'Accept':'application/vnd.sas.annotation.member+json'
    };
    
    fetch('https://example.com/annotations/annotations/{annotationId}/members/{memberId}',
    {
      method: 'GET',
    
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    import requests
    headers = {
      'Accept': 'application/vnd.sas.annotation.member+json'
    }
    
    r = requests.get('https://example.com/annotations/annotations/{annotationId}/members/{memberId}', headers = headers)
    
    print(r.json())
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Accept": []string{"application/vnd.sas.annotation.member+json"},
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("GET", "https://example.com/annotations/annotations/{annotationId}/members/{memberId}", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    

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

    Retrieves the member for the given annotation and member ID.

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

    Example responses

    Response body to get the member for given annotationId and memberId

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

    this is an example of an error that could be returned for bad requests

    {
      "version": 2,
      "message": "example error message",
      "httpStatusCode": 400
    }
    

    example of an error that might be returned on a 404 response

    {
      "message": "not found",
      "httpStatusCode": 404,
      "version": 2
    }
    
    Responses
    Status Meaning Description Schema
    200 OK The annotation member was retrieved. member
    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.

    Get headers verify that the member exists

    Code samples

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

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

    Returns header information and verifies that the member exists.

    Parameters
    Name In Type Required Description
    annotationId path string true The annotation ID.
    memberId path string true The member ID.
    If-Match header string false The value of the ETag that was returned from a GET or previous PUT of this type. This header is optional, but if provided, this MUST match exactly the current value of the etag of the object.

    Example responses

    this is an example of an error that could be returned for bad requests

    {
      "version": 2,
      "message": "example error message",
      "httpStatusCode": 400
    }
    

    example of an error that might be returned on a 404 response

    {
      "message": "not found",
      "httpStatusCode": 404,
      "version": 2
    }
    
    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://example.com/annotations/annotations/{annotationId}/members/{memberId} \
      -H 'Authorization: Bearer <access-token-goes-here>' \
      -H 'Content-Type: application/vnd.sas.annotation.member+json' \
      -H 'Accept: application/vnd.sas.annotation.member+json' \
      -H 'If-Match: string'
    
    
    const inputBody = '{
      "creationTimeStamp": "2022-03-09T06:05:43.955Z",
      "createdBy": "sasadm",
      "modifiedTimeStamp": "2022-03-09T06:05:43.955Z",
      "modifiedBy": "sasadm",
      "version": 1,
      "id": "bd853c18-9faf-4f9a-a31a-3cdfc6bf866a",
      "annotationId": "b00feed8-cd6a-4ed8-8608-d57256663b93",
      "resourceType": "folder",
      "resourceUri": "/files/files/b8cdad41-81a6-4c67-a741-bc618705fd65",
      "value": "this updates"
    }';
    const headers = {
      'Content-Type':'application/vnd.sas.annotation.member+json',
      'Accept':'application/vnd.sas.annotation.member+json',
      'If-Match':'string'
    };
    
    fetch('https://example.com/annotations/annotations/{annotationId}/members/{memberId}',
    {
      method: 'PUT',
      body: inputBody,
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    import requests
    headers = {
      'Content-Type': 'application/vnd.sas.annotation.member+json',
      'Accept': 'application/vnd.sas.annotation.member+json',
      'If-Match': 'string'
    }
    
    r = requests.put('https://example.com/annotations/annotations/{annotationId}/members/{memberId}', headers = headers)
    
    print(r.json())
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Content-Type": []string{"application/vnd.sas.annotation.member+json"},
            "Accept": []string{"application/vnd.sas.annotation.member+json"},
            "If-Match": []string{"string"},
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("PUT", "https://example.com/annotations/annotations/{annotationId}/members/{memberId}", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    

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

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

    Body parameter

    Request body to update member endpoint

    {
      "creationTimeStamp": "2022-03-09T06:05:43.955Z",
      "createdBy": "sasadm",
      "modifiedTimeStamp": "2022-03-09T06:05:43.955Z",
      "modifiedBy": "sasadm",
      "version": 1,
      "id": "bd853c18-9faf-4f9a-a31a-3cdfc6bf866a",
      "annotationId": "b00feed8-cd6a-4ed8-8608-d57256663b93",
      "resourceType": "folder",
      "resourceUri": "/files/files/b8cdad41-81a6-4c67-a741-bc618705fd65",
      "value": "this updates"
    }
    
    Parameters
    Name In Type Required Description
    annotationId path string true The annotation ID.
    memberId path string true The member ID to update or replace.
    If-Match header string false The Etag that was returned from a GET, POST, or PUT of this annotation.
    body body updateMember true The member object.

    Example responses

    Response body to update member endpoint

    {
      "creationTimeStamp": "2022-03-09T06:05:43.955Z",
      "createdBy": "sasadm",
      "modifiedTimeStamp": "2022-03-09T06:22:59.189Z",
      "modifiedBy": "sasadm",
      "version": 1,
      "id": "bd853c18-9faf-4f9a-a31a-3cdfc6bf866a",
      "annotationId": "b00feed8-cd6a-4ed8-8608-d57256663b93",
      "resourceType": "folder",
      "resourceUri": "/files/files/b8cdad41-81a6-4c67-a741-bc618705fd65",
      "value": "this updates",
      "links": [
        {
          "method": "GET",
          "rel": "self",
          "href": "/annotations/annotations/b00feed8-cd6a-4ed8-8608-d57256663b93/members/bd853c18-9faf-4f9a-a31a-3cdfc6bf866a",
          "uri": "/annotations/annotations/b00feed8-cd6a-4ed8-8608-d57256663b93/members/bd853c18-9faf-4f9a-a31a-3cdfc6bf866a",
          "type": "application/vnd.sas.annotation.member"
        },
        {
          "method": "PUT",
          "rel": "update",
          "href": "/annotations/annotations/b00feed8-cd6a-4ed8-8608-d57256663b93/members/bd853c18-9faf-4f9a-a31a-3cdfc6bf866a",
          "uri": "/annotations/annotations/b00feed8-cd6a-4ed8-8608-d57256663b93/members/bd853c18-9faf-4f9a-a31a-3cdfc6bf866a",
          "type": "application/vnd.sas.annotation.member",
          "responseType": "application/vnd.sas.annotation.member"
        },
        {
          "method": "DELETE",
          "rel": "delete",
          "href": "/annotations/annotations/b00feed8-cd6a-4ed8-8608-d57256663b93/members/bd853c18-9faf-4f9a-a31a-3cdfc6bf866a",
          "uri": "/annotations/annotations/b00feed8-cd6a-4ed8-8608-d57256663b93/members/bd853c18-9faf-4f9a-a31a-3cdfc6bf866a"
        },
        {
          "method": "GET",
          "rel": "up",
          "href": "/annotations/annotations/b00feed8-cd6a-4ed8-8608-d57256663b93/members",
          "uri": "/annotations/annotations/b00feed8-cd6a-4ed8-8608-d57256663b93/members",
          "type": "application/vnd.sas.collection",
          "itemType": "application/vnd.sas.annotation.member"
        },
        {
          "method": "GET",
          "rel": "annotation",
          "href": "/annotations/annotations/b00feed8-cd6a-4ed8-8608-d57256663b93",
          "uri": "/annotations/annotations/b00feed8-cd6a-4ed8-8608-d57256663b93",
          "type": "application/vnd.sas.annotation"
        }
      ]
    }
    
    {
      "creationTimeStamp": "2022-03-09T06:05:43.955Z",
      "createdBy": "sasadm",
      "modifiedTimeStamp": "2022-03-09T06:22:59.189Z",
      "modifiedBy": "sasadm",
      "version": 1,
      "id": "bd853c18-9faf-4f9a-a31a-3cdfc6bf866a",
      "annotationId": "b00feed8-cd6a-4ed8-8608-d57256663b93",
      "resourceType": "folder",
      "resourceUri": "/files/files/b8cdad41-81a6-4c67-a741-bc618705fd65",
      "value": "this updates",
      "links": [
        {
          "method": "GET",
          "rel": "self",
          "href": "/annotations/annotations/b00feed8-cd6a-4ed8-8608-d57256663b93/members/bd853c18-9faf-4f9a-a31a-3cdfc6bf866a",
          "uri": "/annotations/annotations/b00feed8-cd6a-4ed8-8608-d57256663b93/members/bd853c18-9faf-4f9a-a31a-3cdfc6bf866a",
          "type": "application/vnd.sas.annotation.member"
        },
        {
          "method": "PUT",
          "rel": "update",
          "href": "/annotations/annotations/b00feed8-cd6a-4ed8-8608-d57256663b93/members/bd853c18-9faf-4f9a-a31a-3cdfc6bf866a",
          "uri": "/annotations/annotations/b00feed8-cd6a-4ed8-8608-d57256663b93/members/bd853c18-9faf-4f9a-a31a-3cdfc6bf866a",
          "type": "application/vnd.sas.annotation.member",
          "responseType": "application/vnd.sas.annotation.member"
        },
        {
          "method": "DELETE",
          "rel": "delete",
          "href": "/annotations/annotations/b00feed8-cd6a-4ed8-8608-d57256663b93/members/bd853c18-9faf-4f9a-a31a-3cdfc6bf866a",
          "uri": "/annotations/annotations/b00feed8-cd6a-4ed8-8608-d57256663b93/members/bd853c18-9faf-4f9a-a31a-3cdfc6bf866a"
        },
        {
          "method": "GET",
          "rel": "up",
          "href": "/annotations/annotations/b00feed8-cd6a-4ed8-8608-d57256663b93/members",
          "uri": "/annotations/annotations/b00feed8-cd6a-4ed8-8608-d57256663b93/members",
          "type": "application/vnd.sas.collection",
          "itemType": "application/vnd.sas.annotation.member"
        },
        {
          "method": "GET",
          "rel": "annotation",
          "href": "/annotations/annotations/b00feed8-cd6a-4ed8-8608-d57256663b93",
          "uri": "/annotations/annotations/b00feed8-cd6a-4ed8-8608-d57256663b93",
          "type": "application/vnd.sas.annotation"
        }
      ]
    }
    

    this is an example of an error that could be returned for bad requests

    {
      "version": 2,
      "message": "example error message",
      "httpStatusCode": 400
    }
    
    {
      "version": 2,
      "message": "example error message",
      "httpStatusCode": 400
    }
    

    example of an error that might be returned on a 404 response

    {
      "message": "not found",
      "httpStatusCode": 404,
      "version": 2
    }
    
    {
      "message": "not found",
      "httpStatusCode": 404,
      "version": 2
    }
    

    example of an error that might be returned on a 412 response

    {
      "message": "The specified \"If-Match\" header value did not match the value in the conditional PUT request for the object.",
      "httpStatusCode": 412,
      "version": 2
    }
    
    {
      "message": "The specified \"If-Match\" header value did not match the value in the conditional PUT request for the object.",
      "httpStatusCode": 412,
      "version": 2
    }
    

    example of an error that might be returned on a 415 response

    {
      "message": "Unsupported Media Type",
      "httpStatusCode": 415,
      "version": 2
    }
    
    {
      "message": "Unsupported Media Type",
      "httpStatusCode": 415,
      "version": 2
    }
    

    example of an error that might be returned on a 428 response

    {
      "message": "The PUT request must include an eTag in the \"if-match\" header, or a \"last-modified\" timestamp in the \"if-unmodified-since\" header.",
      "httpStatusCode": 428,
      "version": 2
    }
    
    {
      "message": "The PUT request must include an eTag in the \"if-match\" header, or a \"last-modified\" timestamp in the \"if-unmodified-since\" header.",
      "httpStatusCode": 428,
      "version": 2
    }
    
    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://example.com/annotations/annotations/{annotationId}/members/{memberId} \
      -H 'Authorization: Bearer <access-token-goes-here>' \
      -H 'Accept: application/vnd.sas.error+json'
    
    
    
    const headers = {
      'Accept':'application/vnd.sas.error+json'
    };
    
    fetch('https://example.com/annotations/annotations/{annotationId}/members/{memberId}',
    {
      method: 'DELETE',
    
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    import requests
    headers = {
      'Accept': 'application/vnd.sas.error+json'
    }
    
    r = requests.delete('https://example.com/annotations/annotations/{annotationId}/members/{memberId}', headers = headers)
    
    print(r.json())
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Accept": []string{"application/vnd.sas.error+json"},
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("DELETE", "https://example.com/annotations/annotations/{annotationId}/members/{memberId}", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    

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

    Deletes the member for the specified annotation and member ID.

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

    Example responses

    example of an error that might be returned on a 404 response

    {
      "message": "not found",
      "httpStatusCode": 404,
      "version": 2
    }
    
    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://example.com/annotations/members#multi \
      -H 'Authorization: Bearer <access-token-goes-here>' \
      -H 'Content-Type: application/vnd.sas.selection+json' \
      -H 'Accept: application/vnd.sas.collection+json'
    
    
    const inputBody = '{
      "resources": [
        "26e2df43-aeaf-475d-a64e-7baafb8a4eca",
        "2a902411-4f81-4819-9263-203cf0ff29ce"
      ],
      "version": 2
    }';
    const headers = {
      'Content-Type':'application/vnd.sas.selection+json',
      'Accept':'application/vnd.sas.collection+json'
    };
    
    fetch('https://example.com/annotations/members#multi',
    {
      method: 'POST',
      body: inputBody,
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    import requests
    headers = {
      'Content-Type': 'application/vnd.sas.selection+json',
      'Accept': 'application/vnd.sas.collection+json'
    }
    
    r = requests.post('https://example.com/annotations/members#multi', headers = headers)
    
    print(r.json())
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Content-Type": []string{"application/vnd.sas.selection+json"},
            "Accept": []string{"application/vnd.sas.collection+json"},
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("POST", "https://example.com/annotations/members#multi", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    

    POST /members#multi

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

    Body parameter

    Get Members by Annotation IDs

    {
      "resources": [
        "26e2df43-aeaf-475d-a64e-7baafb8a4eca",
        "2a902411-4f81-4819-9263-203cf0ff29ce"
      ],
      "version": 2
    }
    
    Parameters
    Name In Type Required Description
    body body selection true Selects annotationIds for which associated members are to be found.

    Example responses

    Get Members by Annotation IDs

    {
      "links": [
        {
          "method": "POST",
          "rel": "collection",
          "href": "/annotations/members",
          "uri": "/annotations/members",
          "type": "application/vnd.sas.selection",
          "responseType": "application/vnd.sas.collection"
        }
      ],
      "name": "members",
      "accept": "application/vnd.sas.annotation.member",
      "start": 0,
      "count": 3,
      "items": [
        {
          "creationTimeStamp": "2018-03-26T19:58:04.918Z",
          "modifiedTimeStamp": "2018-03-26T19:58:04.918Z",
          "createdBy": "sasboot",
          "modifiedBy": "sasboot",
          "version\"": "1,",
          "id": "04c2d36b-0f7a-4e1b-a546-a80ffbe35bf9",
          "annotationId": "2a902411-4f81-4819-9263-203cf0ff29ce",
          "resourceType": "type",
          "resourceUri": "uri",
          "value": "objectValue",
          "links": [
            {
              "method": "GET",
              "rel": "annotation",
              "href": "/annotations/annotations/2a902411-4f81-4819-9263-203cf0ff29ce",
              "uri": "/annotations/annotations/2a902411-4f81-4819-9263-203cf0ff29ce",
              "type": "application/vnd.sas.annotation"
            },
            {
              "method": "GET",
              "rel": "self",
              "href": "/annotations/annotations/2a902411-4f81-4819-9263-203cf0ff29ce/members/04c2d36b-0f7a-4e1b-a546-a80ffbe35bf9",
              "uri": "/annotations/annotations/2a902411-4f81-4819-9263-203cf0ff29ce/members/04c2d36b-0f7a-4e1b-a546-a80ffbe35bf9",
              "type": "application/vnd.sas.annotation.member\""
            },
            {
              "method": "PUT",
              "rel": "update",
              "href": "/annotations/annotations/2a902411-4f81-4819-9263-203cf0ff29ce/members/04c2d36b-0f7a-4e1b-a546-a80ffbe35bf9",
              "uri": "/annotations/annotations/2a902411-4f81-4819-9263-203cf0ff29ce/members/04c2d36b-0f7a-4e1b-a546-a80ffbe35bf9",
              "type": "application/vnd.sas.annotation.member",
              "responseType": "application/vnd.sas.annotation.member\""
            },
            {
              "method": "DELETE",
              "rel": "delete",
              "href": "/annotations/annotations/2a902411-4f81-4819-9263-203cf0ff29ce/members/04c2d36b-0f7a-4e1b-a546-a80ffbe35bf9",
              "uri": "/annotations/annotations/2a902411-4f81-4819-9263-203cf0ff29ce/members/04c2d36b-0f7a-4e1b-a546-a80ffbe35bf9\""
            },
            {
              "method": "GET",
              "rel": "up",
              "href": "/annotations/annotations/2a902411-4f81-4819-9263-203cf0ff29ce/members",
              "uri": "/annotations/annotations/2a902411-4f81-4819-9263-203cf0ff29ce/members",
              "type": "application/vnd.sas.annotation.member",
              "responseType": "application/vnd.sas.annotation.member"
            }
          ]
        },
        {
          "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": "type",
          "resourceUri": "uri2",
          "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",
              "responseType": "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"
            }
          ]
        },
        {
          "creationTimeStamp": "2018-03-26T20:16:57.732Z",
          "modifiedTimeStamp": "2018-03-26T20:16:57.732Z",
          "createdBy": "sasboot",
          "modifiedBy": "sasboot",
          "version": 1,
          "id": "13aab93d-7699-4f17-8074-0953d1183020",
          "annotationId": "26e2df43-aeaf-475d-a64e-7baafb8a4eca",
          "resourceType": "type",
          "resourceUri": "uri3",
          "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/13aab93d-7699-4f17-8074-0953d1183020",
              "uri": "/annotations/annotations/26e2df43-aeaf-475d-a64e-7baafb8a4eca/members/13aab93d-7699-4f17-8074-0953d1183020",
              "type": "application/vnd.sas.annotation.member"
            },
            {
              "method": "PUT",
              "rel": "update",
              "href": "/annotations/annotations/26e2df43-aeaf-475d-a64e-7baafb8a4eca/members/13aab93d-7699-4f17-8074-0953d1183020",
              "uri": "/annotations/annotations/26e2df43-aeaf-475d-a64e-7baafb8a4eca/members/13aab93d-7699-4f17-8074-0953d1183020",
              "type": "application/vnd.sas.annotation.member",
              "responseType": "application/vnd.sas.annotation.member"
            },
            {
              "method": "DELETE",
              "rel": "delete",
              "href": "/annotations/annotations/26e2df43-aeaf-475d-a64e-7baafb8a4eca/members/13aab93d-7699-4f17-8074-0953d1183020",
              "uri": "/annotations/annotations/26e2df43-aeaf-475d-a64e-7baafb8a4eca/members/13aab93d-7699-4f17-8074-0953d1183020"
            },
            {
              "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": 2147483647,
      "version": 2
    }
    
    {
      "links": [
        {
          "method": "POST",
          "rel": "collection",
          "href": "/annotations/members",
          "uri": "/annotations/members",
          "type": "application/vnd.sas.selection",
          "responseType": "application/vnd.sas.collection"
        }
      ],
      "name": "members",
      "accept": "application/vnd.sas.annotation.member",
      "start": 0,
      "count": 3,
      "items": [
        {
          "creationTimeStamp": "2018-03-26T19:58:04.918Z",
          "modifiedTimeStamp": "2018-03-26T19:58:04.918Z",
          "createdBy": "sasboot",
          "modifiedBy": "sasboot",
          "version\"": "1,",
          "id": "04c2d36b-0f7a-4e1b-a546-a80ffbe35bf9",
          "annotationId": "2a902411-4f81-4819-9263-203cf0ff29ce",
          "resourceType": "type",
          "resourceUri": "uri",
          "value": "objectValue",
          "links": [
            {
              "method": "GET",
              "rel": "annotation",
              "href": "/annotations/annotations/2a902411-4f81-4819-9263-203cf0ff29ce",
              "uri": "/annotations/annotations/2a902411-4f81-4819-9263-203cf0ff29ce",
              "type": "application/vnd.sas.annotation"
            },
            {
              "method": "GET",
              "rel": "self",
              "href": "/annotations/annotations/2a902411-4f81-4819-9263-203cf0ff29ce/members/04c2d36b-0f7a-4e1b-a546-a80ffbe35bf9",
              "uri": "/annotations/annotations/2a902411-4f81-4819-9263-203cf0ff29ce/members/04c2d36b-0f7a-4e1b-a546-a80ffbe35bf9",
              "type": "application/vnd.sas.annotation.member\""
            },
            {
              "method": "PUT",
              "rel": "update",
              "href": "/annotations/annotations/2a902411-4f81-4819-9263-203cf0ff29ce/members/04c2d36b-0f7a-4e1b-a546-a80ffbe35bf9",
              "uri": "/annotations/annotations/2a902411-4f81-4819-9263-203cf0ff29ce/members/04c2d36b-0f7a-4e1b-a546-a80ffbe35bf9",
              "type": "application/vnd.sas.annotation.member",
              "responseType": "application/vnd.sas.annotation.member\""
            },
            {
              "method": "DELETE",
              "rel": "delete",
              "href": "/annotations/annotations/2a902411-4f81-4819-9263-203cf0ff29ce/members/04c2d36b-0f7a-4e1b-a546-a80ffbe35bf9",
              "uri": "/annotations/annotations/2a902411-4f81-4819-9263-203cf0ff29ce/members/04c2d36b-0f7a-4e1b-a546-a80ffbe35bf9\""
            },
            {
              "method": "GET",
              "rel": "up",
              "href": "/annotations/annotations/2a902411-4f81-4819-9263-203cf0ff29ce/members",
              "uri": "/annotations/annotations/2a902411-4f81-4819-9263-203cf0ff29ce/members",
              "type": "application/vnd.sas.annotation.member",
              "responseType": "application/vnd.sas.annotation.member"
            }
          ]
        },
        {
          "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": "type",
          "resourceUri": "uri2",
          "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",
              "responseType": "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"
            }
          ]
        },
        {
          "creationTimeStamp": "2018-03-26T20:16:57.732Z",
          "modifiedTimeStamp": "2018-03-26T20:16:57.732Z",
          "createdBy": "sasboot",
          "modifiedBy": "sasboot",
          "version": 1,
          "id": "13aab93d-7699-4f17-8074-0953d1183020",
          "annotationId": "26e2df43-aeaf-475d-a64e-7baafb8a4eca",
          "resourceType": "type",
          "resourceUri": "uri3",
          "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/13aab93d-7699-4f17-8074-0953d1183020",
              "uri": "/annotations/annotations/26e2df43-aeaf-475d-a64e-7baafb8a4eca/members/13aab93d-7699-4f17-8074-0953d1183020",
              "type": "application/vnd.sas.annotation.member"
            },
            {
              "method": "PUT",
              "rel": "update",
              "href": "/annotations/annotations/26e2df43-aeaf-475d-a64e-7baafb8a4eca/members/13aab93d-7699-4f17-8074-0953d1183020",
              "uri": "/annotations/annotations/26e2df43-aeaf-475d-a64e-7baafb8a4eca/members/13aab93d-7699-4f17-8074-0953d1183020",
              "type": "application/vnd.sas.annotation.member",
              "responseType": "application/vnd.sas.annotation.member"
            },
            {
              "method": "DELETE",
              "rel": "delete",
              "href": "/annotations/annotations/26e2df43-aeaf-475d-a64e-7baafb8a4eca/members/13aab93d-7699-4f17-8074-0953d1183020",
              "uri": "/annotations/annotations/26e2df43-aeaf-475d-a64e-7baafb8a4eca/members/13aab93d-7699-4f17-8074-0953d1183020"
            },
            {
              "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": 2147483647,
      "version": 2
    }
    

    this is an example of an error that could be returned for bad requests

    {
      "version": 2,
      "message": "example error message",
      "httpStatusCode": 400
    }
    
    {
      "version": 2,
      "message": "example error message",
      "httpStatusCode": 400
    }
    
    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. error2
    Response Headers
    Status Header Type Format Description
    200 Content-Type string No description

    Schemas

    annotation

    {
      "version": 0,
      "id": "string",
      "domain": "string",
      "name": "string",
      "label": "string",
      "description": "string",
      "createdBy": "string",
      "modifiedBy": "string",
      "creationTimeStamp": "string",
      "modifiedTimeStamp": "string",
      "links": [
        {
          "method": "string",
          "rel": "string",
          "uri": "string",
          "href": "string",
          "title": "string",
          "type": "string",
          "itemType": "string",
          "responseType": "string",
          "responseItemType": "string"
        }
      ]
    }
    
    

    Annotation

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

    createAnnotation

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

    Create Annotation

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

    updateAnnotation

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

    Update Annotation

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

    annotationCollection

    {
      "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"
        }
      ],
      "items": [
        {
          "version": 0,
          "id": "string",
          "domain": "string",
          "name": "string",
          "label": "string",
          "description": "string",
          "createdBy": "string",
          "modifiedBy": "string",
          "creationTimeStamp": "string",
          "modifiedTimeStamp": "string",
          "links": [
            {
              "method": "string",
              "rel": "string",
              "uri": "string",
              "href": "string",
              "title": "string",
              "type": "string",
              "itemType": "string",
              "responseType": "string",
              "responseItemType": "string"
            }
          ]
        }
      ],
      "version": 0
    }
    
    

    Annotation Collection

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

    member

    {
      "version": 0,
      "id": "string",
      "annotationId": "string",
      "resourceUri": "string",
      "resourceType": "string",
      "value": "string",
      "createdBy": "string",
      "modifiedBy": "string",
      "creationTimeStamp": "string",
      "modifiedTimeStamp": "string",
      "links": [
        {
          "method": "string",
          "rel": "string",
          "uri": "string",
          "href": "string",
          "title": "string",
          "type": "string",
          "itemType": "string",
          "responseType": "string",
          "responseItemType": "string"
        }
      ]
    }
    
    

    Member

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

    createMember

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

    Create Member

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

    updateMember

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

    Update Member

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

    memberCollection

    {
      "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"
        }
      ],
      "items": [
        {
          "version": 0,
          "id": "string",
          "annotationId": "string",
          "resourceUri": "string",
          "resourceType": "string",
          "value": "string",
          "createdBy": "string",
          "modifiedBy": "string",
          "creationTimeStamp": "string",
          "modifiedTimeStamp": "string",
          "links": [
            {
              "method": "string",
              "rel": "string",
              "uri": "string",
              "href": "string",
              "title": "string",
              "type": "string",
              "itemType": "string",
              "responseType": "string",
              "responseItemType": "string"
            }
          ]
        }
      ],
      "version": 0
    }
    
    

    Member Collection

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

    api

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

    API

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

    error2

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

    Error

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

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

    Link

    Properties
    Name Type Required Restrictions Description
    method string false none The HTTP method for the link.
    rel string true none The relationship of the link to the resource.
    uri string false none The relative URI for the link.
    href string false none The URL for the link.
    title string false none The title for the link.
    type string false none The media type or link type for the link.
    itemType string false none If this is a link to a container, itemType is the media type or link type for the items in the container.
    responseType string false none The media type or link type of the response body for a PUT, POST, or PATCH operation.
    responseItemType string false none The media type or link type of the items in the response body for a PUT, POST, or PATCH operation.

    selection

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

    Selection

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

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

    "uri"
    the array contains resource URIs

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

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

    Examples

    Github Examples

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

    Authorization

    Base URLs:

    Terms of service Email: SAS Developers Web: SAS Developers

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

    Manages authorization rules and makes authorization decisions.

    Overview:

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

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

    • This API enables authorized users to define access by creating and managing authorization rules and shares.
    • This API enables any principal that has the Secure permission for a particular object to create and manage authorization rules that directly target that object.
    • This API enables any principal that has the Secure permission for a particular object to share that object. If re-sharing is enabled, each share recipient can extend the access that they receive to other users and groups.
    • This API enforces authorization rules by making authorization decisions. Each decision is evaluated for a specific authorization context. The decision process is transparent to end users.
    • This API explains its authorization decisions by listing all of the rules and shares that contribute to each decision.
    • This API does not manage access to CAS data (caslibs and tables) or CAS actions.

    Security

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


    Terminology:
    • authorization: the process by which a set of principals is evaluated against defined rules and a requested action to determine whether the user can perform the action.
    • authorization context: information about an authorization request (for example, a target URI, the HTTP headers and verb, the requestor's group memberships, or the time of the request).
    • condition: a logical Spring Expression Language (SpEL) expression that evaluates to either true or false. A rule that includes a condition applies only when the condition is true. For example, you can use a condition to make a rule applicable to only to the creator of an object.
    • container: an object that logically contains the URI of one or more member objects. In parent-child relationship between objects, a container represents a parent.
    • decision: a yes or no answer to an authorization request to perform a particular action. Each authorization decision is based on a specific authorization context.
    • permission: a specific action that a rule affects (for example read, update, delete, create, secure, add, or remove).
    • principal: an entity that represents an individual user or a group.
    • rule: an action or set of actions that is either permitted or prohibited for a given principal or set of principals. A rule can include a condition that limits the circumstances under which the rule applies.
    • share: a simplified abstraction of an authorization rule. Each share identifies a target object (resource), a recipient (principal), and a level of access (type). Each share is backed by a corresponding authorization rule. Shares can help users easily make resources available to each other.

    API Version

    This is version 5 of the Authorization API.

    Changes since version 4

    • Added the 'enabled' flag to the share media type

    Changes since version 3

    • Added sharing endpoints
    • Added media type matching flags for explanation endpoints
    • Added includeShares flag for explanation endpoints


    Error Codes

    HTTP Status Code Error Code Description
    400 12600 The patch 'test' operation failed.
    400 12601 Attempt to parse expression failed.
    400 12700 Request cannot be satisfied because sharing is disabled.
    500 12800 Cannot retrieve group membership info for group.
    500 12801 Cannot retrieve group membership info for user.
    400 12805 Request includes an unsupported principal type.
    404 12807 Request to remove non-existent authorization rule.
    400 12808 Request to remove non-existent group.
    500 12809 Request from an unrecognized user ID.
    403 12810 Illegal attempt to elevate own permissions.
    415 12811 The Accept Item header sprecified an unsupported media type.
    428 12812 The request is missing the If-Match header.
    428 12813 The ETag is out-of-date.

    Operations

    Rules

    Contains operations that create and manage authorization rules.

    Get authorization rules

    Code samples

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

    GET /rules

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

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

    Example responses

    An example of using a known ID to obtain individual authorization rules.

    To add pagination to the request, modify the request like this:

    • GET /authorization/rules?start=0&limit=20

    {
      "type": "grant",
      "permissions": [
        "read"
      ],
      "principal": "testprincipal",
      "principalType": "authenticatedUsers",
      "objectUri": "/preferences/",
      "description": "Allow access to a service root.",
      "matchParams": false,
      "version": 10,
      "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
    }
    
    {
      "type": "grant",
      "permissions": [
        "read"
      ],
      "principal": "testprincipal",
      "principalType": "authenticatedUsers",
      "objectUri": "/preferences/",
      "description": "Allow access to a service root.",
      "matchParams": false,
      "version": 10,
      "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
    }
    
    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
    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.

    Create a new authorization rule

    Code samples

    # You can also use wget
    curl -X POST http://mock-authorization.apifirst.unx.sas.com/authorization/rules \
      -H 'Authorization: Bearer <access-token-goes-here>' \
      -H 'Content-Type: application/vnd.sas.authorization.rule+json' \
      -H 'Accept: application/vnd.sas.authorization.rule+json' \
      -H 'Content-Type: string' \
      -H 'Accept: string'
    
    
    const inputBody = '{
      "type": "grant",
      "permissions": [
        "read"
      ],
      "principal": "MyGroup",
      "principalType": "group",
      "objectUri": "/types/types",
      "version": 10
    }';
    const headers = {
      'Content-Type':'application/vnd.sas.authorization.rule+json',
      'Accept':'application/vnd.sas.authorization.rule+json',
      'Content-Type':'string',
      'Accept':'string'
    };
    
    fetch('http://mock-authorization.apifirst.unx.sas.com/authorization/rules',
    {
      method: 'POST',
      body: inputBody,
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    import requests
    headers = {
      'Content-Type': 'application/vnd.sas.authorization.rule+json',
      'Accept': 'application/vnd.sas.authorization.rule+json',
      'Content-Type': 'string',
      'Accept': 'string'
    }
    
    r = requests.post('http://mock-authorization.apifirst.unx.sas.com/authorization/rules', headers = headers)
    
    print(r.json())
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Content-Type": []string{"application/vnd.sas.authorization.rule+json"},
            "Accept": []string{"application/vnd.sas.authorization.rule+json"},
            "Content-Type": []string{"string"},
            "Accept": []string{"string"},
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("POST", "http://mock-authorization.apifirst.unx.sas.com/authorization/rules", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    

    POST /rules

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

    Body parameter

    {
      "type": "grant",
      "permissions": [
        "read"
      ],
      "principal": "MyGroup",
      "principalType": "group",
      "objectUri": "/types/types",
      "version": 10
    }
    
    Parameters
    Name In Type Required Description
    Content-Type header string false Specifies the format of the incoming rule. Supported media types are:
    • application/vnd.sas.authorization.rule+json;version=1
    • application/vnd.sas.authorization.rule+json;version=2
    • application/vnd.sas.authorization.rule+json;version=3
    • application/vnd.sas.authorization.rule+json;version=4
    • application/vnd.sas.authorization.rule+json;version=5
    • application/vnd.sas.authorization.rule+json;version=6
    • application/vnd.sas.authorization.rule+json;version=7
    • application/vnd.sas.authorization.rule+json;version=8
    • application/vnd.sas.authorization.rule+json;version=9
    • application/vnd.sas.authorization.rule+json;version=10
    Accept header string false Specifies the desired format of the returned rule. Supported media types are:
    • application/vnd.sas.authorization.rule+json;version=1
    • application/vnd.sas.authorization.rule+json;version=2
    • application/vnd.sas.authorization.rule+json;version=3
    • application/vnd.sas.authorization.rule+json;version=4
    • application/vnd.sas.authorization.rule+json;version=5
    • application/vnd.sas.authorization.rule+json;version=6
    • application/vnd.sas.authorization.rule+json;version=7
    • application/vnd.sas.authorization.rule+json;version=8
    • application/vnd.sas.authorization.rule+json;version=9
    • application/vnd.sas.authorization.rule+json;version=10
    body body authorizationRule true The properties of the new rule.

    Example responses

    An example of creating an authorization rule

    {
      "type": "grant",
      "permissions": [
        "read"
      ],
      "principalType": "authenticatedUsers",
      "objectUri": "/preferences/",
      "description": "Allow access to a service root.",
      "matchParams": false,
      "enabled": true,
      "principal": "testprincipal"
    }
    
    {
      "type": "grant",
      "permissions": [
        "read"
      ],
      "principalType": "authenticatedUsers",
      "objectUri": "/preferences/",
      "description": "Allow access to a service root.",
      "matchParams": false,
      "enabled": true,
      "principal": "testprincipal"
    }
    
    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 http://mock-authorization.apifirst.unx.sas.com/authorization/rules \
      -H 'Authorization: Bearer <access-token-goes-here>' \
      -H 'Content-Type: application/json-patch' \
      -H 'Accept: application/vnd.sas.collection+json'
    
    
    const inputBody = '[
      {
        "op": "test",
        "path": "/authorization/rules/00d038a0-e19c-44cf-8fd4-d35a8e112124",
        "value": {
          "type": "grant",
          "permissions": [
            "create",
            "update"
          ],
          "objectUri": "/workflow/definitions",
          "principalType": "group",
          "principal": "group1"
        }
      },
      {
        "op": "remove",
        "path": "/authorization/rules/00d038a0-e19c-44cf-8fd4-d35a8e112124"
      }
    ]';
    const headers = {
      'Content-Type':'application/json-patch',
      'Accept':'application/vnd.sas.collection+json'
    };
    
    fetch('http://mock-authorization.apifirst.unx.sas.com/authorization/rules',
    {
      method: 'PATCH',
      body: inputBody,
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    import requests
    headers = {
      'Content-Type': 'application/json-patch',
      'Accept': 'application/vnd.sas.collection+json'
    }
    
    r = requests.patch('http://mock-authorization.apifirst.unx.sas.com/authorization/rules', headers = headers)
    
    print(r.json())
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Content-Type": []string{"application/json-patch"},
            "Accept": []string{"application/vnd.sas.collection+json"},
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("PATCH", "http://mock-authorization.apifirst.unx.sas.com/authorization/rules", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    

    PATCH /rules

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

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

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

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

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

    Body parameter

    [
      {
        "op": "test",
        "path": "/authorization/rules/00d038a0-e19c-44cf-8fd4-d35a8e112124",
        "value": {
          "type": "grant",
          "permissions": [
            "create",
            "update"
          ],
          "objectUri": "/workflow/definitions",
          "principalType": "group",
          "principal": "group1"
        }
      },
      {
        "op": "remove",
        "path": "/authorization/rules/00d038a0-e19c-44cf-8fd4-d35a8e112124"
      }
    ]
    
    Parameters
    Name In Type Required Description
    body body rulePatchOperation true JSON patch describing operations to perform and identifying the target rules.

    Example responses

    An example of using a condition to set permissions and the objectUri for a defined rule.

    The key data in this example are the following

    • The condition is named 'test'.
    • The condition indicates the existing rule must have type=grant, permissions=[read,update], objectUri=/identities/**, and principalType=authenticated-users.

    If all of these values match, the patch is applied and the following is set:

    • The permissions are set to Read, Update, Delete, and Secure.
    • The objectUri is set to '/identities/*'.

    If any of these values do not match, the patch is not applied.

    [
      [
        {
          "op": "test",
          "path": "/authorization/rules/e7ae0810-a47d-11e7-abc4-cec278b6b50a",
          "value": {
            "type": "grant",
            "permissions": [
              "read",
              "update"
            ],
            "objectUri": "/identities/**",
            "principalType": "authenticated-users"
          }
        },
        {
          "op": "add",
          "path": "/authorization/rules/e7ae0810-a47d-11e7-abc4-cec278b6b50a",
          "value": {
            "permissions": [
              "read",
              "update, delete, secure"
            ],
            "objectUri": "/identities/*"
          }
        }
      ]
    ]
    

    An example of using a combination of defined JSON patch operations to migrate existing rules.

    • The `copy` operation copies the existing rule and any changes that might have been applied to it.
    • The `add` or `replace` operation updates the target rule.
    • The `remove` operation must delete either the original rule or the new rule.
      • To target a rule that does not have a known ID, use the simple token substitution system that this API provides. In a single patch, each new rule that is created by an `add` or `copy` operation is added to a zero-indexed, ordered list.

        Note: An `add` operation can be either a create or an update, depending on whether a rule with the given ID already exists. A rule that is updated is not added to the list of created rules.

        If you know the order in which rules are created within a patch, you can reference any such rule by its index. Use the token @CREATED#@, where '#' is the index of the rule that you are targeting.

        This example assumes that a rule already exists with ID = 'sourceId' and modifies the rule before removing the source rule.

    [
      [
        {
          "op": "copy",
          "from": "/authorization/rules/sourceId",
          "path": "/authorization/rules/"
        },
        {
          "op": "replace",
          "path": "/authorization/rules/@CREATED0@",
          "value": {
            "type": "grant",
            "permissions": [
              "read",
              "update"
            ],
            "objectUri": "/identities/**",
            "principalType": "authenticated-users",
            "reason": "Authenticated Users can read identities, groups, users, members, memberships."
          }
        },
        {
          "op": "remove",
          "path": "/authorization/rules/sourceId"
        }
      ]
    ]
    

    An example of using a condition to set permissions and the objectUri for a defined rule.

    The key data in this example are the following

    • The condition is named 'test'.
    • The condition indicates the existing rule must have type=grant, permissions=[read,update], objectUri=/identities/**, and principalType=authenticated-users.

    If all of these values match, the patch is applied and the following is set:

    • The permissions are set to Read, Update, Delete, and Secure.
    • The objectUri is set to '/identities/*'.

    If any of these values do not match, the patch is not applied.

    [
      [
        {
          "op": "test",
          "path": "/authorization/rules/e7ae0810-a47d-11e7-abc4-cec278b6b50a",
          "value": {
            "type": "grant",
            "permissions": [
              "read",
              "update"
            ],
            "objectUri": "/identities/**",
            "principalType": "authenticated-users"
          }
        },
        {
          "op": "add",
          "path": "/authorization/rules/e7ae0810-a47d-11e7-abc4-cec278b6b50a",
          "value": {
            "permissions": [
              "read",
              "update, delete, secure"
            ],
            "objectUri": "/identities/*"
          }
        }
      ]
    ]
    

    An example of using a combination of defined JSON patch operations to migrate existing rules.

    • The `copy` operation copies the existing rule and any changes that might have been applied to it.
    • The `add` or `replace` operation updates the target rule.
    • The `remove` operation must delete either the original rule or the new rule.
      • To target a rule that does not have a known ID, use the simple token substitution system that this API provides. In a single patch, each new rule that is created by an `add` or `copy` operation is added to a zero-indexed, ordered list.

        Note: An `add` operation can be either a create or an update, depending on whether a rule with the given ID already exists. A rule that is updated is not added to the list of created rules.

        If you know the order in which rules are created within a patch, you can reference any such rule by its index. Use the token @CREATED#@, where '#' is the index of the rule that you are targeting.

        This example assumes that a rule already exists with ID = 'sourceId' and modifies the rule before removing the source rule.

    [
      [
        {
          "op": "copy",
          "from": "/authorization/rules/sourceId",
          "path": "/authorization/rules/"
        },
        {
          "op": "replace",
          "path": "/authorization/rules/@CREATED0@",
          "value": {
            "type": "grant",
            "permissions": [
              "read",
              "update"
            ],
            "objectUri": "/identities/**",
            "principalType": "authenticated-users",
            "reason": "Authenticated Users can read identities, groups, users, members, memberships."
          }
        },
        {
          "op": "remove",
          "path": "/authorization/rules/sourceId"
        }
      ]
    ]
    

    An example of a standard error response

    {
      "errorCode": 400,
      "message": "Bad Request",
      "links": [],
      "version": 2,
      "httpStatusCode": 400
    }
    
    {
      "errorCode": 400,
      "message": "Bad Request",
      "links": [],
      "version": 2,
      "httpStatusCode": 400
    }
    
    {
      "errorCode": 412,
      "message": "Precondition failed",
      "links": [],
      "version": 2,
      "httpStatusCode": 412
    }
    
    {
      "errorCode": 412,
      "message": "Precondition failed",
      "links": [],
      "version": 2,
      "httpStatusCode": 412
    }
    
    {
      "errorCode": 422,
      "message": "Unprocessable Entity",
      "links": [],
      "version": 2,
      "httpStatusCode": 422
    }
    
    {
      "errorCode": 422,
      "message": "Unprocessable Entity",
      "links": [],
      "version": 2,
      "httpStatusCode": 422
    }
    
    {
      "errorCode": 428,
      "message": "Precondition required",
      "links": [],
      "version": 2,
      "httpStatusCode": 428
    }
    
    {
      "errorCode": 428,
      "message": "Precondition required",
      "links": [],
      "version": 2,
      "httpStatusCode": 428
    }
    
    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. errorResponse
    412 Precondition Failed Precondition failed errorResponse
    422 Unprocessable Entity Returned if the patch request is syntactically valid but would result in a resource state that is inconsistent or invalid. errorResponse
    428 Precondition Required Precondition required errorResponse

    Delete an authorization rule

    Code samples

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

    DELETE /rules/{ruleId}

    Deletes a specified authorization rule.

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

    Example responses

    An example of a standard error response

    {
      "errorCode": 404,
      "message": "Not Found",
      "details": [
        {
          "path": "/authorization/rules/fakeId"
        }
      ],
      "links": [],
      "version": 2,
      "httpStatusCode": 404
    }
    
    {
      "errorCode": 404,
      "message": "Not Found",
      "details": [
        {
          "path": "/authorization/rules/fakeId"
        }
      ],
      "links": [],
      "version": 2,
      "httpStatusCode": 404
    }
    
    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. errorResponse

    Get an authorization rule

    Code samples

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

    GET /rules/{ruleId}

    Retrieves a specified authorization rule.

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

    Example responses

    An example of using a known ID to obtain individual authorization rules.

    To add pagination to the request, modify the request like this:

    • GET /authorization/rules?start=0&limit=20

    {
      "type": "grant",
      "permissions": [
        "read"
      ],
      "principal": "testprincipal",
      "principalType": "authenticatedUsers",
      "objectUri": "/preferences/",
      "description": "Allow access to a service root.",
      "matchParams": false,
      "version": 10,
      "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
    }
    
    {
      "type": "grant",
      "permissions": [
        "read"
      ],
      "principal": "testprincipal",
      "principalType": "authenticatedUsers",
      "objectUri": "/preferences/",
      "description": "Allow access to a service root.",
      "matchParams": false,
      "version": 10,
      "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
    }
    

    An example of a standard error response

    {
      "errorCode": 404,
      "message": "Not Found",
      "details": [
        {
          "path": "/authorization/rules/fakeId"
        }
      ],
      "links": [],
      "version": 2,
      "httpStatusCode": 404
    }
    
    {
      "errorCode": 404,
      "message": "Not Found",
      "details": [
        {
          "path": "/authorization/rules/fakeId"
        }
      ],
      "links": [],
      "version": 2,
      "httpStatusCode": 404
    }
    
    Responses
    Status Meaning Description Schema
    200 OK The request succeeded. savedAuthorizationRule
    404 Not Found No authorization rule with the specified ID was found. errorResponse
    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 http://mock-authorization.apifirst.unx.sas.com/authorization/rules/{ruleId} \
      -H 'Authorization: Bearer <access-token-goes-here>' \
      -H 'Content-Type: application/vnd.sas.authorization.rule+json' \
      -H 'Accept: application/vnd.sas.authorization.rule+json' \
      -H 'If-Match: string'
    
    
    const inputBody = '{
      "id": "92d77691-0b05-4468-a3b6-e35fe6fd36f1",
      "type": "grant",
      "permissions": [
        "read"
      ],
      "principal": "MyGroup",
      "principalType": "group",
      "objectUri": "/types/types",
      "version": 10
    }';
    const headers = {
      'Content-Type':'application/vnd.sas.authorization.rule+json',
      'Accept':'application/vnd.sas.authorization.rule+json',
      'If-Match':'string'
    };
    
    fetch('http://mock-authorization.apifirst.unx.sas.com/authorization/rules/{ruleId}',
    {
      method: 'PUT',
      body: inputBody,
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    import requests
    headers = {
      'Content-Type': 'application/vnd.sas.authorization.rule+json',
      'Accept': 'application/vnd.sas.authorization.rule+json',
      'If-Match': 'string'
    }
    
    r = requests.put('http://mock-authorization.apifirst.unx.sas.com/authorization/rules/{ruleId}', headers = headers)
    
    print(r.json())
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Content-Type": []string{"application/vnd.sas.authorization.rule+json"},
            "Accept": []string{"application/vnd.sas.authorization.rule+json"},
            "If-Match": []string{"string"},
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("PUT", "http://mock-authorization.apifirst.unx.sas.com/authorization/rules/{ruleId}", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    

    PUT /rules/{ruleId}

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

    Body parameter

    {
      "id": "92d77691-0b05-4468-a3b6-e35fe6fd36f1",
      "type": "grant",
      "permissions": [
        "read"
      ],
      "principal": "MyGroup",
      "principalType": "group",
      "objectUri": "/types/types",
      "version": 10
    }
    
    Parameters
    Name In Type Required Description
    ruleId path string true The ID of the rule to update or create.
    If-Match header string true The entity tag obtained from the most recent ETag response header. Must match the current entity tag for the rule.
    body body identifiableAuthorizationRule true The properties of the rule.

    Example responses

    An example of using a known ID to obtain individual authorization rules.

    To add pagination to the request, modify the request like this:

    • GET /authorization/rules?start=0&limit=20

    {
      "type": "grant",
      "permissions": [
        "read"
      ],
      "principal": "testprincipal",
      "principalType": "authenticatedUsers",
      "objectUri": "/preferences/",
      "description": "Allow access to a service root.",
      "matchParams": false,
      "version": 10,
      "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
    }
    
    {
      "type": "grant",
      "permissions": [
        "read"
      ],
      "principal": "testprincipal",
      "principalType": "authenticatedUsers",
      "objectUri": "/preferences/",
      "description": "Allow access to a service root.",
      "matchParams": false,
      "version": 10,
      "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
    }
    
    {
      "type": "grant",
      "permissions": [
        "read"
      ],
      "principal": "testprincipal",
      "principalType": "authenticatedUsers",
      "objectUri": "/preferences/",
      "description": "Allow access to a service root.",
      "matchParams": false,
      "version": 10,
      "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
    }
    
    {
      "type": "grant",
      "permissions": [
        "read"
      ],
      "principal": "testprincipal",
      "principalType": "authenticatedUsers",
      "objectUri": "/preferences/",
      "description": "Allow access to a service root.",
      "matchParams": false,
      "version": 10,
      "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
    }
    

    An example of a standard error response

    {
      "errorCode": 412,
      "message": "Precondition failed",
      "links": [],
      "version": 2,
      "httpStatusCode": 412
    }
    
    {
      "errorCode": 412,
      "message": "Precondition failed",
      "links": [],
      "version": 2,
      "httpStatusCode": 412
    }
    
    {
      "errorCode": 412,
      "message": "Precondition failed",
      "links": [],
      "version": 2,
      "httpStatusCode": 412
    }
    
    {
      "errorCode": 428,
      "message": "Precondition required",
      "links": [],
      "version": 2,
      "httpStatusCode": 428
    }
    
    {
      "errorCode": 428,
      "message": "Precondition required",
      "links": [],
      "version": 2,
      "httpStatusCode": 428
    }
    
    {
      "errorCode": 428,
      "message": "Precondition required",
      "links": [],
      "version": 2,
      "httpStatusCode": 428
    }
    
    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 Precondition failed errorResponse
    428 Precondition Required Precondition required errorResponse
    Response Headers
    Status Header Type Format Description
    200 ETag string The entity tag for the rule.
    200 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.
    201 Last-Modified string Timestamp of when rule was last modified.

    Create a rule job

    Code samples

    # You can also use wget
    curl -X POST http://mock-authorization.apifirst.unx.sas.com/authorization/rules/jobs \
      -H 'Authorization: Bearer <access-token-goes-here>' \
      -H 'Content-Type: application/vnd.sas.authorization.rule.job+json' \
      -H 'Accept: application/vnd.sas.authorization.rule.job+json' \
      -H 'Accept: string' \
      -H 'Content-Type: string'
    
    
    const inputBody = '{
      "status": "notStarted",
      "version": 2,
      "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": 9,
            "enabled": true
          },
          "type": "create",
          "status": "pending",
          "state": "pending",
          "priority": 1
        },
        {
          "rule": {
            "type": "grant",
            "permissions": [
              "read"
            ],
            "principal": "testprincipal",
            "principalType": "authenticatedUsers",
            "objectUri": "/test/**",
            "mediaType": "application/vnd.sas.test",
            "reason": "Because I'm testing",
            "matchParams": false,
            "version": 9,
            "enabled": true
          },
          "type": "create",
          "status": "pending",
          "state": "pending",
          "priority": 1
        },
        {
          "rule": {
            "type": "prohibit",
            "permissions": [
              "add",
              "create",
              "delete",
              "read",
              "remove",
              "secure",
              "update"
            ],
            "principal": "testprincipal",
            "principalType": "user",
            "objectUri": "/foo/bar",
            "mediaType": "application/vnd.sas.test",
            "reason": "Because I'm testing",
            "matchParams": false,
            "version": 9,
            "id": "0ee67d20-7b22-4d0f-af3e-fe29ef5b72ed",
            "enabled": true
          },
          "type": "update",
          "status": "pending",
          "state": "pending",
          "priority": 1
        }
      ]
    }';
    const headers = {
      'Content-Type':'application/vnd.sas.authorization.rule.job+json',
      'Accept':'application/vnd.sas.authorization.rule.job+json',
      'Accept':'string',
      'Content-Type':'string'
    };
    
    fetch('http://mock-authorization.apifirst.unx.sas.com/authorization/rules/jobs',
    {
      method: 'POST',
      body: inputBody,
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    import requests
    headers = {
      'Content-Type': 'application/vnd.sas.authorization.rule.job+json',
      'Accept': 'application/vnd.sas.authorization.rule.job+json',
      'Accept': 'string',
      'Content-Type': 'string'
    }
    
    r = requests.post('http://mock-authorization.apifirst.unx.sas.com/authorization/rules/jobs', headers = headers)
    
    print(r.json())
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Content-Type": []string{"application/vnd.sas.authorization.rule.job+json"},
            "Accept": []string{"application/vnd.sas.authorization.rule.job+json"},
            "Accept": []string{"string"},
            "Content-Type": []string{"string"},
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("POST", "http://mock-authorization.apifirst.unx.sas.com/authorization/rules/jobs", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    

    POST /rules/jobs

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

    Body parameter

    An example of creating a rule job that will create two rules and modify an existing rule. To check the current state of the job use:

    • GET /authorization/rules/jobs/cc2cb37c-24e6-4398-b7c8-4b6603bc4608/state

    {
      "status": "notStarted",
      "version": 2,
      "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": 9,
            "enabled": true
          },
          "type": "create",
          "status": "pending",
          "state": "pending",
          "priority": 1
        },
        {
          "rule": {
            "type": "grant",
            "permissions": [
              "read"
            ],
            "principal": "testprincipal",
            "principalType": "authenticatedUsers",
            "objectUri": "/test/**",
            "mediaType": "application/vnd.sas.test",
            "reason": "Because I'm testing",
            "matchParams": false,
            "version": 9,
            "enabled": true
          },
          "type": "create",
          "status": "pending",
          "state": "pending",
          "priority": 1
        },
        {
          "rule": {
            "type": "prohibit",
            "permissions": [
              "add",
              "create",
              "delete",
              "read",
              "remove",
              "secure",
              "update"
            ],
            "principal": "testprincipal",
            "principalType": "user",
            "objectUri": "/foo/bar",
            "mediaType": "application/vnd.sas.test",
            "reason": "Because I'm testing",
            "matchParams": false,
            "version": 9,
            "id": "0ee67d20-7b22-4d0f-af3e-fe29ef5b72ed",
            "enabled": true
          },
          "type": "update",
          "status": "pending",
          "state": "pending",
          "priority": 1
        }
      ]
    }
    
    Parameters
    Name In Type Required Description
    Accept header string false Specifies the desired format of the returned rule job. Supported media types are:
    • application/json
    • application/vnd.sas.authorization.rule.job+json
    • application/vnd.sas.authorization.rule.job+json;version=1
    • application/vnd.sas.authorization.rule.job+json;version=2
    Content-Type header string false Specifies the format of the incoming rule job. Supported media types are:
    • application/json
    • application/vnd.sas.authorization.rule.job+json
    • application/vnd.sas.authorization.rule.job+json;version=1
    • application/vnd.sas.authorization.rule.job+json;version=2
    body body ruleJob true Instructions to create, update, and delete specified rules.

    Example responses

    An example of creating a rule job that will create two rules and modify an existing rule. To check the current state of the job use:

    • GET /authorization/rules/jobs/cc2cb37c-24e6-4398-b7c8-4b6603bc4608/state

    {
      "id": "cc2cb37c-24e6-4398-b7c8-4b6603bc4608",
      "createdBy": "user",
      "status": "notStarted",
      "version": 2,
      "state": "pending",
      "links": [
        {
          "method": "GET",
          "rel": "self",
          "href": "/authorization/rules/jobs/cc2cb37c-24e6-4398-b7c8-4b6603bc4608",
          "uri": "/authorization/rules/jobs/cc2cb37c-24e6-4398-b7c8-4b6603bc4608",
          "type": "application/vnd.sas.authorization.rule.job"
        },
        {
          "method": "GET",
          "rel": "ruleJobState",
          "href": "/authorization/rules/jobs/cc2cb37c-24e6-4398-b7c8-4b6603bc4608/state",
          "uri": "/authorization/rules/jobs/cc2cb37c-24e6-4398-b7c8-4b6603bc4608/state",
          "type": "text/plain"
        }
      ],
      "actions": [
        {
          "id": "29e69b13-7a0f-4939-a7e9-b4400f71f7d8",
          "rule": {
            "type": "prohibit",
            "permissions": [
              "add",
              "create",
              "delete",
              "read",
              "remove",
              "secure",
              "update"
            ],
            "principal": "testprincipal",
            "principalType": "user",
            "objectUri": "/foo/bar",
            "mediaType": "application/vnd.sas.test",
            "reason": "Because I'm testing",
            "matchParams": false,
            "version": 9,
            "id": "0ee67d20-7b22-4d0f-af3e-fe29ef5b72ed",
            "enabled": true
          },
          "type": "create",
          "status": "pending",
          "state": "pending",
          "priority": 1
        },
        {
          "id": "80379599-5ca6-4c80-8487-4d7e4fe62e7b",
          "rule": {
            "type": "prohibit",
            "permissions": [
              "add",
              "create",
              "delete",
              "read",
              "remove",
              "secure",
              "update"
            ],
            "principal": "testprincipal",
            "principalType": "user",
            "objectUri": "/foo/bar",
            "mediaType": "application/vnd.sas.test",
            "reason": "Because I'm testing",
            "matchParams": false,
            "version": 9,
            "id": "0ee67d20-7b22-4d0f-af3e-fe29ef5b72ed",
            "enabled": true
          },
          "type": "create",
          "status": "pending",
          "state": "pending",
          "priority": 1
        },
        {
          "id": "e479a954-4832-4e8c-a18e-b10ab3bf2950",
          "rule": {
            "type": "prohibit",
            "permissions": [
              "add",
              "create",
              "delete",
              "read",
              "remove",
              "secure",
              "update"
            ],
            "principal": "testprincipal",
            "principalType": "user",
            "objectUri": "/foo/bar",
            "mediaType": "application/vnd.sas.test",
            "reason": "Because I'm testing",
            "matchParams": false,
            "version": 9,
            "id": "0ee67d20-7b22-4d0f-af3e-fe29ef5b72ed",
            "enabled": true
          },
          "type": "update",
          "status": "pending",
          "state": "pending",
          "priority": 1
        }
      ]
    }
    
    {
      "id": "cc2cb37c-24e6-4398-b7c8-4b6603bc4608",
      "createdBy": "user",
      "status": "notStarted",
      "version": 2,
      "state": "pending",
      "links": [
        {
          "method": "GET",
          "rel": "self",
          "href": "/authorization/rules/jobs/cc2cb37c-24e6-4398-b7c8-4b6603bc4608",
          "uri": "/authorization/rules/jobs/cc2cb37c-24e6-4398-b7c8-4b6603bc4608",
          "type": "application/vnd.sas.authorization.rule.job"
        },
        {
          "method": "GET",
          "rel": "ruleJobState",
          "href": "/authorization/rules/jobs/cc2cb37c-24e6-4398-b7c8-4b6603bc4608/state",
          "uri": "/authorization/rules/jobs/cc2cb37c-24e6-4398-b7c8-4b6603bc4608/state",
          "type": "text/plain"
        }
      ],
      "actions": [
        {
          "id": "29e69b13-7a0f-4939-a7e9-b4400f71f7d8",
          "rule": {
            "type": "prohibit",
            "permissions": [
              "add",
              "create",
              "delete",
              "read",
              "remove",
              "secure",
              "update"
            ],
            "principal": "testprincipal",
            "principalType": "user",
            "objectUri": "/foo/bar",
            "mediaType": "application/vnd.sas.test",
            "reason": "Because I'm testing",
            "matchParams": false,
            "version": 9,
            "id": "0ee67d20-7b22-4d0f-af3e-fe29ef5b72ed",
            "enabled": true
          },
          "type": "create",
          "status": "pending",
          "state": "pending",
          "priority": 1
        },
        {
          "id": "80379599-5ca6-4c80-8487-4d7e4fe62e7b",
          "rule": {
            "type": "prohibit",
            "permissions": [
              "add",
              "create",
              "delete",
              "read",
              "remove",
              "secure",
              "update"
            ],
            "principal": "testprincipal",
            "principalType": "user",
            "objectUri": "/foo/bar",
            "mediaType": "application/vnd.sas.test",
            "reason": "Because I'm testing",
            "matchParams": false,
            "version": 9,
            "id": "0ee67d20-7b22-4d0f-af3e-fe29ef5b72ed",
            "enabled": true
          },
          "type": "create",
          "status": "pending",
          "state": "pending",
          "priority": 1
        },
        {
          "id": "e479a954-4832-4e8c-a18e-b10ab3bf2950",
          "rule": {
            "type": "prohibit",
            "permissions": [
              "add",
              "create",
              "delete",
              "read",
              "remove",
              "secure",
              "update"
            ],
            "principal": "testprincipal",
            "principalType": "user",
            "objectUri": "/foo/bar",
            "mediaType": "application/vnd.sas.test",
            "reason": "Because I'm testing",
            "matchParams": false,
            "version": 9,
            "id": "0ee67d20-7b22-4d0f-af3e-fe29ef5b72ed",
            "enabled": true
          },
          "type": "update",
          "status": "pending",
          "state": "pending",
          "priority": 1
        }
      ]
    }
    

    An example of a standard error response

    {
      "errorCode": 400,
      "message": "Bad Request",
      "links": [],
      "version": 2,
      "httpStatusCode": 400
    }
    
    {
      "errorCode": 400,
      "message": "Bad Request",
      "links": [],
      "version": 2,
      "httpStatusCode": 400
    }
    
    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. errorResponse
    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 http://mock-authorization.apifirst.unx.sas.com/authorization/rules/jobs/{jobId} \
      -H 'Authorization: Bearer <access-token-goes-here>' \
      -H 'Accept: application/vnd.sas.authorization.rule.job+json'
    
    
    
    const headers = {
      'Accept':'application/vnd.sas.authorization.rule.job+json'
    };
    
    fetch('http://mock-authorization.apifirst.unx.sas.com/authorization/rules/jobs/{jobId}',
    {
      method: 'GET',
    
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    import requests
    headers = {
      'Accept': 'application/vnd.sas.authorization.rule.job+json'
    }
    
    r = requests.get('http://mock-authorization.apifirst.unx.sas.com/authorization/rules/jobs/{jobId}', headers = headers)
    
    print(r.json())
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Accept": []string{"application/vnd.sas.authorization.rule.job+json"},
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("GET", "http://mock-authorization.apifirst.unx.sas.com/authorization/rules/jobs/{jobId}", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    

    GET /rules/jobs/{jobId}

    Retrieves descriptive information about a specified rule job.

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

    Example responses

    An example of creating a rule job that will create two rules and modify an existing rule. To check the current state of the job use:

    • GET /authorization/rules/jobs/cc2cb37c-24e6-4398-b7c8-4b6603bc4608/state

    {
      "id": "cc2cb37c-24e6-4398-b7c8-4b6603bc4608",
      "createdBy": "user",
      "status": "notStarted",
      "version": 2,
      "state": "pending",
      "links": [
        {
          "method": "GET",
          "rel": "self",
          "href": "/authorization/rules/jobs/cc2cb37c-24e6-4398-b7c8-4b6603bc4608",
          "uri": "/authorization/rules/jobs/cc2cb37c-24e6-4398-b7c8-4b6603bc4608",
          "type": "application/vnd.sas.authorization.rule.job"
        },
        {
          "method": "GET",
          "rel": "ruleJobState",
          "href": "/authorization/rules/jobs/cc2cb37c-24e6-4398-b7c8-4b6603bc4608/state",
          "uri": "/authorization/rules/jobs/cc2cb37c-24e6-4398-b7c8-4b6603bc4608/state",
          "type": "text/plain"
        }
      ],
      "actions": [
        {
          "id": "29e69b13-7a0f-4939-a7e9-b4400f71f7d8",
          "rule": {
            "type": "prohibit",
            "permissions": [
              "add",
              "create",
              "delete",
              "read",
              "remove",
              "secure",
              "update"
            ],
            "principal": "testprincipal",
            "principalType": "user",
            "objectUri": "/foo/bar",
            "mediaType": "application/vnd.sas.test",
            "reason": "Because I'm testing",
            "matchParams": false,
            "version": 9,
            "id": "0ee67d20-7b22-4d0f-af3e-fe29ef5b72ed",
            "enabled": true
          },
          "type": "create",
          "status": "pending",
          "state": "pending",
          "priority": 1
        },
        {
          "id": "80379599-5ca6-4c80-8487-4d7e4fe62e7b",
          "rule": {
            "type": "prohibit",
            "permissions": [
              "add",
              "create",
              "delete",
              "read",
              "remove",
              "secure",
              "update"
            ],
            "principal": "testprincipal",
            "principalType": "user",
            "objectUri": "/foo/bar",
            "mediaType": "application/vnd.sas.test",
            "reason": "Because I'm testing",
            "matchParams": false,
            "version": 9,
            "id": "0ee67d20-7b22-4d0f-af3e-fe29ef5b72ed",
            "enabled": true
          },
          "type": "create",
          "status": "pending",
          "state": "pending",
          "priority": 1
        },
        {
          "id": "e479a954-4832-4e8c-a18e-b10ab3bf2950",
          "rule": {
            "type": "prohibit",
            "permissions": [
              "add",
              "create",
              "delete",
              "read",
              "remove",
              "secure",
              "update"
            ],
            "principal": "testprincipal",
            "principalType": "user",
            "objectUri": "/foo/bar",
            "mediaType": "application/vnd.sas.test",
            "reason": "Because I'm testing",
            "matchParams": false,
            "version": 9,
            "id": "0ee67d20-7b22-4d0f-af3e-fe29ef5b72ed",
            "enabled": true
          },
          "type": "update",
          "status": "pending",
          "state": "pending",
          "priority": 1
        }
      ]
    }
    
    {
      "id": "cc2cb37c-24e6-4398-b7c8-4b6603bc4608",
      "createdBy": "user",
      "status": "notStarted",
      "version": 2,
      "state": "pending",
      "links": [
        {
          "method": "GET",
          "rel": "self",
          "href": "/authorization/rules/jobs/cc2cb37c-24e6-4398-b7c8-4b6603bc4608",
          "uri": "/authorization/rules/jobs/cc2cb37c-24e6-4398-b7c8-4b6603bc4608",
          "type": "application/vnd.sas.authorization.rule.job"
        },
        {
          "method": "GET",
          "rel": "ruleJobState",
          "href": "/authorization/rules/jobs/cc2cb37c-24e6-4398-b7c8-4b6603bc4608/state",
          "uri": "/authorization/rules/jobs/cc2cb37c-24e6-4398-b7c8-4b6603bc4608/state",
          "type": "text/plain"
        }
      ],
      "actions": [
        {
          "id": "29e69b13-7a0f-4939-a7e9-b4400f71f7d8",
          "rule": {
            "type": "prohibit",
            "permissions": [
              "add",
              "create",
              "delete",
              "read",
              "remove",
              "secure",
              "update"
            ],
            "principal": "testprincipal",
            "principalType": "user",
            "objectUri": "/foo/bar",
            "mediaType": "application/vnd.sas.test",
            "reason": "Because I'm testing",
            "matchParams": false,
            "version": 9,
            "id": "0ee67d20-7b22-4d0f-af3e-fe29ef5b72ed",
            "enabled": true
          },
          "type": "create",
          "status": "pending",
          "state": "pending",
          "priority": 1
        },
        {
          "id": "80379599-5ca6-4c80-8487-4d7e4fe62e7b",
          "rule": {
            "type": "prohibit",
            "permissions": [
              "add",
              "create",
              "delete",
              "read",
              "remove",
              "secure",
              "update"
            ],
            "principal": "testprincipal",
            "principalType": "user",
            "objectUri": "/foo/bar",
            "mediaType": "application/vnd.sas.test",
            "reason": "Because I'm testing",
            "matchParams": false,
            "version": 9,
            "id": "0ee67d20-7b22-4d0f-af3e-fe29ef5b72ed",
            "enabled": true
          },
          "type": "create",
          "status": "pending",
          "state": "pending",
          "priority": 1
        },
        {
          "id": "e479a954-4832-4e8c-a18e-b10ab3bf2950",
          "rule": {
            "type": "prohibit",
            "permissions": [
              "add",
              "create",
              "delete",
              "read",
              "remove",
              "secure",
              "update"
            ],
            "principal": "testprincipal",
            "principalType": "user",
            "objectUri": "/foo/bar",
            "mediaType": "application/vnd.sas.test",
            "reason": "Because I'm testing",
            "matchParams": false,
            "version": 9,
            "id": "0ee67d20-7b22-4d0f-af3e-fe29ef5b72ed",
            "enabled": true
          },
          "type": "update",
          "status": "pending",
          "state": "pending",
          "priority": 1
        }
      ]
    }
    

    An example of a standard error response

    {
      "errorCode": 404,
      "message": "Not Found",
      "details": [
        {
          "path": "/authorization/rules/fakeId"
        }
      ],
      "links": [],
      "version": 2,
      "httpStatusCode": 404
    }
    
    {
      "errorCode": 404,
      "message": "Not Found",
      "details": [
        {
          "path": "/authorization/rules/fakeId"
        }
      ],
      "links": [],
      "version": 2,
      "httpStatusCode": 404
    }
    
    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. errorResponse
    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.

    Delete a rule job

    Code samples

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

    DELETE /rules/jobs/{jobId}

    Deletes a specified rule job.

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

    Example responses

    An example of a standard error response

    {
      "errorCode": 404,
      "message": "Not Found",
      "details": [
        {
          "path": "/authorization/rules/fakeId"
        }
      ],
      "links": [],
      "version": 2,
      "httpStatusCode": 404
    }
    
    {
      "errorCode": 404,
      "message": "Not Found",
      "details": [
        {
          "path": "/authorization/rules/fakeId"
        }
      ],
      "links": [],
      "version": 2,
      "httpStatusCode": 404
    }
    
    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. errorResponse

    Get the state of a rule job

    Code samples

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

    GET /rules/jobs/{jobId}/state

    Retrieves status information for a specified rule job.

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

    Example responses

    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.

    "pending"
    

    An example of a standard error response

    {
      "errorCode": 404,
      "message": "Not Found",
      "details": [
        {
          "path": "/authorization/rules/fakeId"
        }
      ],
      "links": [],
      "version": 2,
      "httpStatusCode": 404
    }
    
    {
      "errorCode": 404,
      "message": "Not Found",
      "details": [
        {
          "path": "/authorization/rules/fakeId"
        }
      ],
      "links": [],
      "version": 2,
      "httpStatusCode": 404
    }
    
    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. errorResponse
    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.

    Validate the syntax of a specified rule condition

    Code samples

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

    POST /commons/validations/conditions

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

    Body parameter

    An example of a valid SPEL condition

    "currentUser() == #resource?.createdBy"
    
    "currentUser() == #resource?.createdBy"
    
    
    Parameters
    Name In Type Required Description
    body body string true The string that constitutes a rule condition.

    Example responses

    Validate the request but do not execute the request, and return this response to indicate if the request was valid at the time it was made

    {
      "links": [],
      "valid": true,
      "version": 1
    }
    
    Responses
    Status Meaning Description Schema
    200 OK The request succeeded. validation
    400 Bad Request The request was invalid. errorResponse
    Response Headers
    Status Header Type Format Description
    200 Content-Type string Type of returned content.
    200 Location string Relative URI of the rule's path.

    Validate a new rule

    Code samples

    # You can also use wget
    curl -X POST http://mock-authorization.apifirst.unx.sas.com/authorization/commons/validations/rules \
      -H 'Authorization: Bearer <access-token-goes-here>' \
      -H 'Content-Type: application/vnd.sas.authorization.rule+json' \
      -H 'Accept: application/vnd.sas.validation+json'
    
    
    const inputBody = '{
      "id": "92d77691-0b05-4468-a3b6-e35fe6fd36f1",
      "type": "grant",
      "permissions": [
        "read"
      ],
      "principal": "MyGroup",
      "principalType": "group",
      "objectUri": "/types/types",
      "version": 10
    }';
    const headers = {
      'Content-Type':'application/vnd.sas.authorization.rule+json',
      'Accept':'application/vnd.sas.validation+json'
    };
    
    fetch('http://mock-authorization.apifirst.unx.sas.com/authorization/commons/validations/rules',
    {
      method: 'POST',
      body: inputBody,
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    import requests
    headers = {
      'Content-Type': 'application/vnd.sas.authorization.rule+json',
      'Accept': 'application/vnd.sas.validation+json'
    }
    
    r = requests.post('http://mock-authorization.apifirst.unx.sas.com/authorization/commons/validations/rules', headers = headers)
    
    print(r.json())
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Content-Type": []string{"application/vnd.sas.authorization.rule+json"},
            "Accept": []string{"application/vnd.sas.validation+json"},
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("POST", "http://mock-authorization.apifirst.unx.sas.com/authorization/commons/validations/rules", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    

    POST /commons/validations/rules

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

    Body parameter

    {
      "id": "92d77691-0b05-4468-a3b6-e35fe6fd36f1",
      "type": "grant",
      "permissions": [
        "read"
      ],
      "principal": "MyGroup",
      "principalType": "group",
      "objectUri": "/types/types",
      "version": 10
    }
    
    Parameters
    Name In Type Required Description
    body body authorizationRule true The properties of the rule.

    Example responses

    Validate the request but do not execute the request, and return this response to indicate if the request was valid at the time it was made

    {
      "links": [],
      "valid": true,
      "version": 1
    }
    
    Responses
    Status Meaning Description Schema
    200 OK The request succeeded. validation
    400 Bad Request The request was invalid. errorResponse
    Response Headers
    Status Header Type Format Description
    200 Content-Type string Type of returned content.
    200 Location string Relative URI of the rule's path.

    Validate an updated rule

    Code samples

    # You can also use wget
    curl -X PUT http://mock-authorization.apifirst.unx.sas.com/authorization/commons/validations/rules/{ruleId} \
      -H 'Authorization: Bearer <access-token-goes-here>' \
      -H 'Content-Type: application/vnd.sas.authorization.rule+json' \
      -H 'Accept: application/vnd.sas.validation+json' \
      -H 'If-Match: string'
    
    
    const inputBody = '{
      "id": "92d77691-0b05-4468-a3b6-e35fe6fd36f1",
      "type": "grant",
      "permissions": [
        "read"
      ],
      "principal": "MyGroup",
      "principalType": "group",
      "objectUri": "/types/types",
      "version": 10
    }';
    const headers = {
      'Content-Type':'application/vnd.sas.authorization.rule+json',
      'Accept':'application/vnd.sas.validation+json',
      'If-Match':'string'
    };
    
    fetch('http://mock-authorization.apifirst.unx.sas.com/authorization/commons/validations/rules/{ruleId}',
    {
      method: 'PUT',
      body: inputBody,
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    import requests
    headers = {
      'Content-Type': 'application/vnd.sas.authorization.rule+json',
      'Accept': 'application/vnd.sas.validation+json',
      'If-Match': 'string'
    }
    
    r = requests.put('http://mock-authorization.apifirst.unx.sas.com/authorization/commons/validations/rules/{ruleId}', headers = headers)
    
    print(r.json())
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Content-Type": []string{"application/vnd.sas.authorization.rule+json"},
            "Accept": []string{"application/vnd.sas.validation+json"},
            "If-Match": []string{"string"},
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("PUT", "http://mock-authorization.apifirst.unx.sas.com/authorization/commons/validations/rules/{ruleId}", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    

    PUT /commons/validations/rules/{ruleId}

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

    Body parameter

    {
      "id": "92d77691-0b05-4468-a3b6-e35fe6fd36f1",
      "type": "grant",
      "permissions": [
        "read"
      ],
      "principal": "MyGroup",
      "principalType": "group",
      "objectUri": "/types/types",
      "version": 10
    }
    
    Parameters
    Name In Type Required Description
    ruleId path string true The ID of the updated rule.
    If-Match header string true The entity tag obtained from the most recent ETag response header. Must match the current entity tag for the rule.
    body body authorizationRule true The properties of the updated rule.

    Example responses

    Validate the request but do not execute the request, and return this response to indicate if the request was valid at the time it was made

    {
      "links": [],
      "valid": true,
      "version": 1
    }
    

    An example of a standard error response

    {
      "errorCode": 412,
      "message": "Precondition failed",
      "links": [],
      "version": 2,
      "httpStatusCode": 412
    }
    
    {
      "errorCode": 412,
      "message": "Precondition failed",
      "links": [],
      "version": 2,
      "httpStatusCode": 412
    }
    
    {
      "errorCode": 412,
      "message": "Precondition failed",
      "links": [],
      "version": 2,
      "httpStatusCode": 412
    }
    
    {
      "errorCode": 428,
      "message": "Precondition required",
      "links": [],
      "version": 2,
      "httpStatusCode": 428
    }
    
    {
      "errorCode": 428,
      "message": "Precondition required",
      "links": [],
      "version": 2,
      "httpStatusCode": 428
    }
    
    {
      "errorCode": 428,
      "message": "Precondition required",
      "links": [],
      "version": 2,
      "httpStatusCode": 428
    }
    
    Responses
    Status Meaning Description Schema
    200 OK The request succeeded. validation
    400 Bad Request The request was invalid. errorResponse
    412 Precondition Failed Precondition Failed errorResponse
    428 Precondition Required Precondition Required errorResponse
    Response Headers
    Status Header Type Format Description
    200 ETag string The entity tag for the share.
    200 Last-Modified string Timestamp of when share was last modified.

    Verify that a specified rule exists

    Code samples

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

    DELETE /commons/validations/rules/{ruleId}

    Determines whether a specified authorization rule exists.

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

    Example responses

    Validate the request but do not execute the request, and return this response to indicate if the request was valid at the time it was made

    {
      "links": [],
      "valid": true,
      "version": 1
    }
    
    Responses
    Status Meaning Description Schema
    200 OK The request succeeded. validation
    400 Bad Request The request was invalid. errorResponse

    Decisions

    Contains operations that make and explain authorization decisions.

    Obtain an authorization decision

    Code samples

    # You can also use wget
    curl -X POST http://mock-authorization.apifirst.unx.sas.com/authorization/decisions \
      -H 'Authorization: Bearer <access-token-goes-here>' \
      -H 'Content-Type: application/vnd.sas.authorization.context+json' \
      -H 'Accept: application/vnd.sas.authorization.decision+json'
    
    
    const inputBody = '{
      "request": {
        "uri": "/test/123"
      },
      "principals": [
        {
          "version": 1,
          "name": "testuser",
          "type": "user"
        }
      ],
      "permission": "read",
      "parameters": {},
      "properties": {},
      "links": {},
      "bulkLinks": {},
      "matchParams": false,
      "eachNamed": {},
      "returnObjectName": null
    }';
    const headers = {
      'Content-Type':'application/vnd.sas.authorization.context+json',
      'Accept':'application/vnd.sas.authorization.decision+json'
    };
    
    fetch('http://mock-authorization.apifirst.unx.sas.com/authorization/decisions',
    {
      method: 'POST',
      body: inputBody,
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    import requests
    headers = {
      'Content-Type': 'application/vnd.sas.authorization.context+json',
      'Accept': 'application/vnd.sas.authorization.decision+json'
    }
    
    r = requests.post('http://mock-authorization.apifirst.unx.sas.com/authorization/decisions', headers = headers)
    
    print(r.json())
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Content-Type": []string{"application/vnd.sas.authorization.context+json"},
            "Accept": []string{"application/vnd.sas.authorization.decision+json"},
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("POST", "http://mock-authorization.apifirst.unx.sas.com/authorization/decisions", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    

    POST /decisions

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

    Body parameter

    An example of using relevant authorization context to create an authorization decision..

    {
      "request": {
        "uri": "/test/123"
      },
      "principals": [
        {
          "version": 1,
          "name": "testuser",
          "type": "user"
        }
      ],
      "permission": "read",
      "parameters": {},
      "properties": {},
      "links": {},
      "bulkLinks": {},
      "matchParams": false,
      "eachNamed": {},
      "returnObjectName": null
    }
    
    Parameters
    Name In Type Required Description
    body body authorizationContextPerm true The requested action and contextual details.

    Example responses

    A true or false on whether an action is authorized for a user

    true
    
    true
    
    true
    
    true
    
    true
    
    true
    
    true
    
    true
    
    false
    
    false
    
    false
    
    false
    
    Responses
    Status Meaning Description Schema
    200 OK Always returned if the request is successful and the request's Accept header is application/vnd.sas.authorization.direct.decision+json. However, if the Accept header is application/json or application/vnd.sas.authorization.direct.decision+json, 200 is returned only if the request is successful and the decision is true. boolean
    201 Created Always returned if the request is successful and the request's Accept header is text/plain boolean
    400 Bad Request The request was invalid. Returned if the authorization context is invalid. None
    403 Forbidden Returned if the request's Accept header is application/vnd.sas.authorization.decision+json or application/json and the request was completed successfully but the authorization decision is false. boolean
    Response Headers
    Status Header Type Format Description
    200 Content-Type string Type of returned content.
    200 Location string Relative URI of the rule's path.
    201 Content-Type string Type of returned content.
    201 Location string Relative URI of the rule's path.

    Obtain authorization decisions with explanations

    Code samples

    # You can also use wget
    curl -X POST http://mock-authorization.apifirst.unx.sas.com/authorization/decisions#explanation \
      -H 'Authorization: Bearer <access-token-goes-here>' \
      -H 'Content-Type: application/vnd.sas.selection+json' \
      -H 'Accept: application/vnd.sas.authorization.explanations+json'
    
    
    const inputBody = '{
      "type": "uri",
      "resources": [
        "/types/types"
      ],
      "version": 1
    }';
    const headers = {
      'Content-Type':'application/vnd.sas.selection+json',
      'Accept':'application/vnd.sas.authorization.explanations+json'
    };
    
    fetch('http://mock-authorization.apifirst.unx.sas.com/authorization/decisions#explanation',
    {
      method: 'POST',
      body: inputBody,
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    import requests
    headers = {
      'Content-Type': 'application/vnd.sas.selection+json',
      'Accept': 'application/vnd.sas.authorization.explanations+json'
    }
    
    r = requests.post('http://mock-authorization.apifirst.unx.sas.com/authorization/decisions#explanation', headers = headers)
    
    print(r.json())
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Content-Type": []string{"application/vnd.sas.selection+json"},
            "Accept": []string{"application/vnd.sas.authorization.explanations+json"},
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("POST", "http://mock-authorization.apifirst.unx.sas.com/authorization/decisions#explanation", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    

    POST /decisions#explanation

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

    Body parameter

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

    Example responses

    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.

    {
      "version": 1,
      "explanations": [
        {
          "/reports/reports/5f74a445-7b99-42db-ab45-2c71e893feb1": [
            {
              "principal": {
                "version": 1,
                "name": "SASAdministrators",
                "type": "group"
              },
              "read": {
                "result": "grant",
                "grantFactor": {
                  "direct": true,
                  "contributingRules": [
                    {
                      "method": "GET",
                      "rel": "directContributingRule",
                      "href": "/authorization/rules/febcfcde-00ab-41ea-af4d-dff4d51e9e04",
                      "uri": "/authorization/rules/febcfcde-00ab-41ea-af4d-dff4d51e9e04"
                    }
                  ]
                }
              }
            },
            {
              "principal": {
                "version": 1,
                "type": "authenticated-users"
              },
              "read": {
                "result": "prohibit"
              }
            }
          ]
        },
        {
          "/folders/folders/123-456-789": [
            {
              "principal": {
                "version": 1,
                "name": "SASAdministrators",
                "type": "group"
              },
              "read": {
                "result": "grant",
                "grantFactor": {
                  "direct": true,
                  "contributingRules": [
                    {
                      "method": "GET",
                      "rel": "directContributingRule",
                      "href": "/authorization/rules/febcfcde-00ab-41ea-af4d-dff4d51e9e04",
                      "uri": "/authorization/rules/febcfcde-00ab-41ea-af4d-dff4d51e9e04"
                    }
                  ]
                },
                "conveyedExplanation": {
                  "result": "grant",
                  "grantFactor": {
                    "direct": true,
                    "contributingRules": [
                      {
                        "method": "GET",
                        "rel": "directContributingRule",
                        "href": "/authorization/rules/febcfcde-00ab-41ea-af4d-dff4d51e9e04",
                        "uri": "/authorization/rules/febcfcde-00ab-41ea-af4d-dff4d51e9e04"
                      }
                    ]
                  }
                }
              }
            }
          ]
        }
      ]
    }
    
    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
    Response Headers
    Status Header Type Format Description
    200 Content-Type string Type of returned content.
    200 Location string Relative URI of the rule's path.

    Obtain predictive authorization decisions

    Code samples

    # You can also use wget
    curl -X POST http://mock-authorization.apifirst.unx.sas.com/authorization/decisions#hypotheticalExplanation \
      -H 'Authorization: Bearer <access-token-goes-here>' \
      -H 'Content-Type: application/vnd.sas.authorization.explanation.hypothetical+json' \
      -H 'Accept: application/vnd.sas.authorization.explanations+json'
    
    
    const inputBody = '{
      "patch": [
        {
          "op": "test",
          "path": "/authorization/rules/00d038a0-e19c-44cf-8fd4-d35a8e112124",
          "value": {
            "type": "grant",
            "permissions": [
              "create",
              "update"
            ],
            "objectUri": "/workflow/definitions",
            "principalType": "group",
            "principal": "group1"
          }
        },
        {
          "op": "remove",
          "path": "/authorization/rules/00d038a0-e19c-44cf-8fd4-d35a8e112124"
        }
      ],
      "uris": [
        "/workflow/definitions"
      ]
    }';
    const headers = {
      'Content-Type':'application/vnd.sas.authorization.explanation.hypothetical+json',
      'Accept':'application/vnd.sas.authorization.explanations+json'
    };
    
    fetch('http://mock-authorization.apifirst.unx.sas.com/authorization/decisions#hypotheticalExplanation',
    {
      method: 'POST',
      body: inputBody,
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    import requests
    headers = {
      'Content-Type': 'application/vnd.sas.authorization.explanation.hypothetical+json',
      'Accept': 'application/vnd.sas.authorization.explanations+json'
    }
    
    r = requests.post('http://mock-authorization.apifirst.unx.sas.com/authorization/decisions#hypotheticalExplanation', headers = headers)
    
    print(r.json())
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Content-Type": []string{"application/vnd.sas.authorization.explanation.hypothetical+json"},
            "Accept": []string{"application/vnd.sas.authorization.explanations+json"},
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("POST", "http://mock-authorization.apifirst.unx.sas.com/authorization/decisions#hypotheticalExplanation", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    

    POST /decisions#hypotheticalExplanation

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

    Body parameter

    {
      "patch": [
        {
          "op": "test",
          "path": "/authorization/rules/00d038a0-e19c-44cf-8fd4-d35a8e112124",
          "value": {
            "type": "grant",
            "permissions": [
              "create",
              "update"
            ],
            "objectUri": "/workflow/definitions",
            "principalType": "group",
            "principal": "group1"
          }
        },
        {
          "op": "remove",
          "path": "/authorization/rules/00d038a0-e19c-44cf-8fd4-d35a8e112124"
        }
      ],
      "uris": [
        "/workflow/definitions"
      ]
    }
    
    Parameters
    Name In Type Required Description
    additionalUser query array[string] false The ID of an additional user to include. You can specify this parameter multiple times.
    additionalGroup query array[string] false The ID of an additional group to include. You can specify this parameter multiple times.
    includeSystemAccounts query boolean false Whether to provide hypothetical explanations for system accounts (such as sasapp and sas.ops-agentsrv).
    contentType query string false String to match rules' contentType against.
    acceptType query string false String to match rules' acceptType against.
    acceptItemType query string false String to match rules' acceptItemType against.
    includeShares query boolean false Whether to include explanations for shares.
    body body hypothetical true A hypothetical object that consists of one or more URIs and one or more new rules.

    Example responses

    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.

    {
      "version": 1,
      "explanations": [
        {
          "/reports/reports/5f74a445-7b99-42db-ab45-2c71e893feb1": [
            {
              "principal": {
                "version": 1,
                "name": "SASAdministrators",
                "type": "group"
              },
              "read": {
                "result": "grant",
                "grantFactor": {
                  "direct": true,
                  "contributingRules": [
                    {
                      "method": "GET",
                      "rel": "directContributingRule",
                      "href": "/authorization/rules/febcfcde-00ab-41ea-af4d-dff4d51e9e04",
                      "uri": "/authorization/rules/febcfcde-00ab-41ea-af4d-dff4d51e9e04"
                    }
                  ]
                }
              }
            },
            {
              "principal": {
                "version": 1,
                "type": "authenticated-users"
              },
              "read": {
                "result": "prohibit"
              }
            }
          ]
        },
        {
          "/folders/folders/123-456-789": [
            {
              "principal": {
                "version": 1,
                "name": "SASAdministrators",
                "type": "group"
              },
              "read": {
                "result": "grant",
                "grantFactor": {
                  "direct": true,
                  "contributingRules": [
                    {
                      "method": "GET",
                      "rel": "directContributingRule",
                      "href": "/authorization/rules/febcfcde-00ab-41ea-af4d-dff4d51e9e04",
                      "uri": "/authorization/rules/febcfcde-00ab-41ea-af4d-dff4d51e9e04"
                    }
                  ]
                },
                "conveyedExplanation": {
                  "result": "grant",
                  "grantFactor": {
                    "direct": true,
                    "contributingRules": [
                      {
                        "method": "GET",
                        "rel": "directContributingRule",
                        "href": "/authorization/rules/febcfcde-00ab-41ea-af4d-dff4d51e9e04",
                        "uri": "/authorization/rules/febcfcde-00ab-41ea-af4d-dff4d51e9e04"
                      }
                    ]
                  }
                }
              }
            }
          ]
        }
      ]
    }
    
    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
    Response Headers
    Status Header Type Format Description
    200 Content-Type string Type of returned content.
    200 Location string Relative URI of the rule's path.

    Obtain multiple authorization decisions

    Code samples

    # You can also use wget
    curl -X POST http://mock-authorization.apifirst.unx.sas.com/authorization/decisions#bulk \
      -H 'Authorization: Bearer <access-token-goes-here>' \
      -H 'Content-Type: application/vnd.sas.authorization.bulk.context+json' \
      -H 'Accept: application/vnd.sas.authorization.authorized.links+json'
    
    
    const inputBody = '{
      "request": {},
      "principals": [
        {
          "version": 1,
          "name": "testprincipal",
          "type": "user"
        }
      ],
      "permission": "read",
      "parameters": {},
      "properties": {},
      "links": {},
      "bulkLinks": {
        "read": [
          {
            "method": "GET",
            "rel": "fakeRel",
            "href": "/test/123",
            "uri": "/test/123"
          },
          {
            "method": "GET",
            "rel": "fakeRel",
            "href": "/something",
            "uri": "/something"
          },
          {
            "method": "GET",
            "rel": "fakeRel",
            "href": "/test123/123456",
            "uri": "/test123/123456"
          },
          {
            "method": "GET",
            "rel": "fakeRel",
            "href": "/xyz/abc/something",
            "uri": "/xyz/abc/something"
          }
        ]
      },
      "matchParams": false,
      "eachNamed": {},
      "returnObjectName": null
    }';
    const headers = {
      'Content-Type':'application/vnd.sas.authorization.bulk.context+json',
      'Accept':'application/vnd.sas.authorization.authorized.links+json'
    };
    
    fetch('http://mock-authorization.apifirst.unx.sas.com/authorization/decisions#bulk',
    {
      method: 'POST',
      body: inputBody,
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    import requests
    headers = {
      'Content-Type': 'application/vnd.sas.authorization.bulk.context+json',
      'Accept': 'application/vnd.sas.authorization.authorized.links+json'
    }
    
    r = requests.post('http://mock-authorization.apifirst.unx.sas.com/authorization/decisions#bulk', headers = headers)
    
    print(r.json())
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Content-Type": []string{"application/vnd.sas.authorization.bulk.context+json"},
            "Accept": []string{"application/vnd.sas.authorization.authorized.links+json"},
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("POST", "http://mock-authorization.apifirst.unx.sas.com/authorization/decisions#bulk", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    

    POST /decisions#bulk

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

    Body parameter

    An example of using relevant authorization context, as well as a map of permissions to an array of links, to create a bulk authorization decision.

    {
      "request": {},
      "principals": [
        {
          "version": 1,
          "name": "testprincipal",
          "type": "user"
        }
      ],
      "permission": "read",
      "parameters": {},
      "properties": {},
      "links": {},
      "bulkLinks": {
        "read": [
          {
            "method": "GET",
            "rel": "fakeRel",
            "href": "/test/123",
            "uri": "/test/123"
          },
          {
            "method": "GET",
            "rel": "fakeRel",
            "href": "/something",
            "uri": "/something"
          },
          {
            "method": "GET",
            "rel": "fakeRel",
            "href": "/test123/123456",
            "uri": "/test123/123456"
          },
          {
            "method": "GET",
            "rel": "fakeRel",
            "href": "/xyz/abc/something",
            "uri": "/xyz/abc/something"
          }
        ]
      },
      "matchParams": false,
      "eachNamed": {},
      "returnObjectName": null
    }
    
    Parameters
    Name In Type Required Description
    body body bulkAuthorizationContext true The requested actions and contextual details. Bulk information must be included as a map of permissions to arrays of links.

    Example responses

    An example of using relevant authorization context, as well as a map of permissions to an array of links, to create a bulk authorization decision.

    {
      "version": 1,
      "grantedLinks": [
        {
          "method": "GET",
          "rel": "fakeRel",
          "href": "/something",
          "uri": "/something"
        },
        {
          "method": "GET",
          "rel": "fakeRel",
          "href": "/test123/123456",
          "uri": "/test123/123456"
        },
        {
          "method": "GET",
          "rel": "fakeRel",
          "href": "/test/123",
          "uri": "/test/123"
        },
        {
          "method": "GET",
          "rel": "fakeRel",
          "href": "/xyz/abc/something",
          "uri": "/xyz/abc/something"
        }
      ],
      "prohibitedLinks": []
    }
    
    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
    Response Headers
    Status Header Type Format Description
    200 Content-Type string Type of returned content.
    200 Location string Relative URI of the rule's path.

    Shares

    Contains operations that concern shares.

    Get shares

    Code samples

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

    GET /shares

    Retrieves some or all shares, with or without paging.

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

    Example responses

    An example of creating multiple shares that enables another user to read a file that they do not already have access to.

    {
      "value": [
        {
          "type": "read",
          "sharedWith": "testUser",
          "sharedWithType": "user",
          "sharedBy": "currentUser",
          "resourceUri": "/files/files/4288b305-981f-4b8d-b440-0911eabe3faf",
          "name": "test file",
          "enabled": true,
          "version": 3,
          "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"
        },
        {
          "type": "read",
          "sharedWith": "testUser",
          "sharedWithType": "user",
          "sharedBy": "currentUser",
          "resourceUri": "/files/files/file2",
          "name": "test file",
          "enabled": true,
          "version": 3,
          "links": [
            {
              "method": "GET",
              "rel": "self",
              "href": "/authorization/shares/file2",
              "uri": "/authorization/shares/file2",
              "type": "application/vnd.sas.authorization.share"
            },
            {
              "method": "PUT",
              "rel": "update",
              "href": "/authorization/shares/file2",
              "uri": "/authorization/shares/file2",
              "type": "application/vnd.sas.authorization.share",
              "responseType": "application/vnd.sas.authorization.share"
            },
            {
              "method": "DELETE",
              "rel": "delete",
              "href": "/authorization/shares/file2",
              "uri": "/authorization/shares/file2"
            }
          ],
          "id": "3288b305-981f-4b8d-b440-0911eabc3fac",
          "modifiedTimestamp": "2016-08-27T04:09:42.150Z",
          "createdTimestamp": "2016-08-27T04:09:42.150Z",
          "createdBy": "currentUser",
          "modifiedBy": "currentUser"
        }
      ]
    }
    
    {
      "value": [
        {
          "type": "read",
          "sharedWith": "testUser",
          "sharedWithType": "user",
          "sharedBy": "currentUser",
          "resourceUri": "/files/files/4288b305-981f-4b8d-b440-0911eabe3faf",
          "name": "test file",
          "enabled": true,
          "version": 3,
          "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"
        },
        {
          "type": "read",
          "sharedWith": "testUser",
          "sharedWithType": "user",
          "sharedBy": "currentUser",
          "resourceUri": "/files/files/file2",
          "name": "test file",
          "enabled": true,
          "version": 3,
          "links": [
            {
              "method": "GET",
              "rel": "self",
              "href": "/authorization/shares/file2",
              "uri": "/authorization/shares/file2",
              "type": "application/vnd.sas.authorization.share"
            },
            {
              "method": "PUT",
              "rel": "update",
              "href": "/authorization/shares/file2",
              "uri": "/authorization/shares/file2",
              "type": "application/vnd.sas.authorization.share",
              "responseType": "application/vnd.sas.authorization.share"
            },
            {
              "method": "DELETE",
              "rel": "delete",
              "href": "/authorization/shares/file2",
              "uri": "/authorization/shares/file2"
            }
          ],
          "id": "3288b305-981f-4b8d-b440-0911eabc3fac",
          "modifiedTimestamp": "2016-08-27T04:09:42.150Z",
          "createdTimestamp": "2016-08-27T04:09:42.150Z",
          "createdBy": "currentUser",
          "modifiedBy": "currentUser"
        }
      ]
    }
    

    An example of a standard error response

    {
      "errorCode": 400,
      "message": "Bad Request",
      "links": [],
      "version": 2,
      "httpStatusCode": 400
    }
    
    {
      "errorCode": 400,
      "message": "Bad Request",
      "links": [],
      "version": 2,
      "httpStatusCode": 400
    }
    
    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. errorResponse
    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.

    Create a new share

    Code samples

    # You can also use wget
    curl -X POST http://mock-authorization.apifirst.unx.sas.com/authorization/shares \
      -H 'Authorization: Bearer <access-token-goes-here>' \
      -H 'Content-Type: application/vnd.sas.authorization.share+json' \
      -H 'Accept: application/vnd.sas.authorization.share+json' \
      -H 'Content-Type: string' \
      -H 'Accept: string'
    
    
    const inputBody = '{
      "type": "read",
      "sharedWith": "testUser",
      "sharedWithType": "user",
      "resourceUri": "/files/files/4288b305-981f-4b8d-b440-0911eabe3faf",
      "name": "test file"
    }';
    const headers = {
      'Content-Type':'application/vnd.sas.authorization.share+json',
      'Accept':'application/vnd.sas.authorization.share+json',
      'Content-Type':'string',
      'Accept':'string'
    };
    
    fetch('http://mock-authorization.apifirst.unx.sas.com/authorization/shares',
    {
      method: 'POST',
      body: inputBody,
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    import requests
    headers = {
      'Content-Type': 'application/vnd.sas.authorization.share+json',
      'Accept': 'application/vnd.sas.authorization.share+json',
      'Content-Type': 'string',
      'Accept': 'string'
    }
    
    r = requests.post('http://mock-authorization.apifirst.unx.sas.com/authorization/shares', headers = headers)
    
    print(r.json())
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Content-Type": []string{"application/vnd.sas.authorization.share+json"},
            "Accept": []string{"application/vnd.sas.authorization.share+json"},
            "Content-Type": []string{"string"},
            "Accept": []string{"string"},
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("POST", "http://mock-authorization.apifirst.unx.sas.com/authorization/shares", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    

    POST /shares

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

    Body parameter

    An example of creating a share that enables another user to read a file that they do not already have access to.

    {
      "type": "read",
      "sharedWith": "testUser",
      "sharedWithType": "user",
      "resourceUri": "/files/files/4288b305-981f-4b8d-b440-0911eabe3faf",
      "name": "test file"
    }
    
    Parameters
    Name In Type Required Description
    Content-Type header string false Specifies the format of the incoming share. Supported media types are:
    • application/json
    • application/vnd.sas.authorization.share+json
    Accept header string false Specifies the desired format of the returned share. Supported media types are:
    • application/json
    • application/vnd.sas.authorization.share+json
    body body share true The properties of the new share.

    Example responses

    An example of creating a share that enables another user to read a file that they do not already have access to.

    {
      "type": "read",
      "sharedWith": "testUser",
      "sharedWithType": "user",
      "sharedBy": "currentUser",
      "resourceUri": "/files/files/4288b305-981f-4b8d-b440-0911eabe3faf",
      "name": "test file",
      "enabled": true,
      "version": 3,
      "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"
    }
    
    {
      "type": "read",
      "sharedWith": "testUser",
      "sharedWithType": "user",
      "sharedBy": "currentUser",
      "resourceUri": "/files/files/4288b305-981f-4b8d-b440-0911eabe3faf",
      "name": "test file",
      "enabled": true,
      "version": 3,
      "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"
    }
    
    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 http://mock-authorization.apifirst.unx.sas.com/authorization/shares \
      -H 'Authorization: Bearer <access-token-goes-here>' \
      -H 'Content-Type: application/json-patch+json' \
      -H 'Accept: application/vnd.sas.collection+json'
    
    
    const inputBody = '[
      {
        "op": "remove",
        "path": "/authorization/shares/dc47a5c3-df46-4cc2-80ac-02e88540e746"
      }
    ]';
    const headers = {
      'Content-Type':'application/json-patch+json',
      'Accept':'application/vnd.sas.collection+json'
    };
    
    fetch('http://mock-authorization.apifirst.unx.sas.com/authorization/shares',
    {
      method: 'PATCH',
      body: inputBody,
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    import requests
    headers = {
      'Content-Type': 'application/json-patch+json',
      'Accept': 'application/vnd.sas.collection+json'
    }
    
    r = requests.patch('http://mock-authorization.apifirst.unx.sas.com/authorization/shares', headers = headers)
    
    print(r.json())
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Content-Type": []string{"application/json-patch+json"},
            "Accept": []string{"application/vnd.sas.collection+json"},
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("PATCH", "http://mock-authorization.apifirst.unx.sas.com/authorization/shares", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    

    PATCH /shares

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

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

    Body parameter

    [
      {
        "op": "remove",
        "path": "/authorization/shares/dc47a5c3-df46-4cc2-80ac-02e88540e746"
      }
    ]
    
    Parameters
    Name In Type Required Description
    body body sharePatchOperation true JSON patch describing operations to perform and identifying the target shares.

    Example responses

    An example of creating multiple shares that enables another user to read a file that they do not already have access to.

    {
      "value": [
        {
          "type": "read",
          "sharedWith": "testUser",
          "sharedWithType": "user",
          "sharedBy": "currentUser",
          "resourceUri": "/files/files/4288b305-981f-4b8d-b440-0911eabe3faf",
          "name": "test file",
          "enabled": true,
          "version": 3,
          "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"
        },
        {
          "type": "read",
          "sharedWith": "testUser",
          "sharedWithType": "user",
          "sharedBy": "currentUser",
          "resourceUri": "/files/files/file2",
          "name": "test file",
          "enabled": true,
          "version": 3,
          "links": [
            {
              "method": "GET",
              "rel": "self",
              "href": "/authorization/shares/file2",
              "uri": "/authorization/shares/file2",
              "type": "application/vnd.sas.authorization.share"
            },
            {
              "method": "PUT",
              "rel": "update",
              "href": "/authorization/shares/file2",
              "uri": "/authorization/shares/file2",
              "type": "application/vnd.sas.authorization.share",
              "responseType": "application/vnd.sas.authorization.share"
            },
            {
              "method": "DELETE",
              "rel": "delete",
              "href": "/authorization/shares/file2",
              "uri": "/authorization/shares/file2"
            }
          ],
          "id": "3288b305-981f-4b8d-b440-0911eabc3fac",
          "modifiedTimestamp": "2016-08-27T04:09:42.150Z",
          "createdTimestamp": "2016-08-27T04:09:42.150Z",
          "createdBy": "currentUser",
          "modifiedBy": "currentUser"
        }
      ]
    }
    
    {
      "value": [
        {
          "type": "read",
          "sharedWith": "testUser",
          "sharedWithType": "user",
          "sharedBy": "currentUser",
          "resourceUri": "/files/files/4288b305-981f-4b8d-b440-0911eabe3faf",
          "name": "test file",
          "enabled": true,
          "version": 3,
          "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"
        },
        {
          "type": "read",
          "sharedWith": "testUser",
          "sharedWithType": "user",
          "sharedBy": "currentUser",
          "resourceUri": "/files/files/file2",
          "name": "test file",
          "enabled": true,
          "version": 3,
          "links": [
            {
              "method": "GET",
              "rel": "self",
              "href": "/authorization/shares/file2",
              "uri": "/authorization/shares/file2",
              "type": "application/vnd.sas.authorization.share"
            },
            {
              "method": "PUT",
              "rel": "update",
              "href": "/authorization/shares/file2",
              "uri": "/authorization/shares/file2",
              "type": "application/vnd.sas.authorization.share",
              "responseType": "application/vnd.sas.authorization.share"
            },
            {
              "method": "DELETE",
              "rel": "delete",
              "href": "/authorization/shares/file2",
              "uri": "/authorization/shares/file2"
            }
          ],
          "id": "3288b305-981f-4b8d-b440-0911eabc3fac",
          "modifiedTimestamp": "2016-08-27T04:09:42.150Z",
          "createdTimestamp": "2016-08-27T04:09:42.150Z",
          "createdBy": "currentUser",
          "modifiedBy": "currentUser"
        }
      ]
    }
    

    An example of a standard error response

    {
      "errorCode": 400,
      "message": "Bad Request",
      "links": [],
      "version": 2,
      "httpStatusCode": 400
    }
    
    {
      "errorCode": 400,
      "message": "Bad Request",
      "links": [],
      "version": 2,
      "httpStatusCode": 400
    }
    
    {
      "errorCode": 412,
      "message": "Precondition failed",
      "links": [],
      "version": 2,
      "httpStatusCode": 412
    }
    
    {
      "errorCode": 412,
      "message": "Precondition failed",
      "links": [],
      "version": 2,
      "httpStatusCode": 412
    }
    
    {
      "errorCode": 412,
      "message": "Precondition failed",
      "links": [],
      "version": 2,
      "httpStatusCode": 412
    }
    
    {
      "errorCode": 422,
      "message": "Unprocessable Entity",
      "links": [],
      "version": 2,
      "httpStatusCode": 422
    }
    
    {
      "errorCode": 422,
      "message": "Unprocessable Entity",
      "links": [],
      "version": 2,
      "httpStatusCode": 422
    }
    
    {
      "errorCode": 428,
      "message": "Precondition required",
      "links": [],
      "version": 2,
      "httpStatusCode": 428
    }
    
    {
      "errorCode": 428,
      "message": "Precondition required",
      "links": [],
      "version": 2,
      "httpStatusCode": 428
    }
    
    {
      "errorCode": 428,
      "message": "Precondition required",
      "links": [],
      "version": 2,
      "httpStatusCode": 428
    }
    
    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. errorResponse
    412 Precondition Failed Precondition failed errorResponse
    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. errorResponse
    428 Precondition Required Precondition required errorResponse

    Delete a share

    Code samples

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

    DELETE /shares/{shareId}

    Deletes a specified share.

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

    Example responses

    An example of a standard error response

    {
      "errorCode": 404,
      "message": "Not Found",
      "details": [
        {
          "path": "/authorization/rules/fakeId"
        }
      ],
      "links": [],
      "version": 2,
      "httpStatusCode": 404
    }
    
    {
      "errorCode": 404,
      "message": "Not Found",
      "details": [
        {
          "path": "/authorization/rules/fakeId"
        }
      ],
      "links": [],
      "version": 2,
      "httpStatusCode": 404
    }
    
    Responses
    Status Meaning Description Schema
    204 No Content The share was deleted. None
    404 Not Found No share with the specified ID was found. errorResponse

    Get a share

    Code samples

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

    GET /shares/{shareId}

    Retrieves a specified share.

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

    Example responses

    An example of creating a share that enables another user to read a file that they do not already have access to.

    {
      "type": "read",
      "sharedWith": "testUser",
      "sharedWithType": "user",
      "sharedBy": "currentUser",
      "resourceUri": "/files/files/4288b305-981f-4b8d-b440-0911eabe3faf",
      "name": "test file",
      "enabled": true,
      "version": 3,
      "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"
    }
    
    {
      "type": "read",
      "sharedWith": "testUser",
      "sharedWithType": "user",
      "sharedBy": "currentUser",
      "resourceUri": "/files/files/4288b305-981f-4b8d-b440-0911eabe3faf",
      "name": "test file",
      "enabled": true,
      "version": 3,
      "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"
    }
    

    An example of a standard error response

    {
      "errorCode": 404,
      "message": "Not Found",
      "details": [
        {
          "path": "/authorization/rules/fakeId"
        }
      ],
      "links": [],
      "version": 2,
      "httpStatusCode": 404
    }
    
    {
      "errorCode": 404,
      "message": "Not Found",
      "details": [
        {
          "path": "/authorization/rules/fakeId"
        }
      ],
      "links": [],
      "version": 2,
      "httpStatusCode": 404
    }
    
    Responses
    Status Meaning Description Schema
    200 OK The request succeeded. savedShare
    404 Not Found No share with the specified ID was found. errorResponse
    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 http://mock-authorization.apifirst.unx.sas.com/authorization/shares/{shareId} \
      -H 'Authorization: Bearer <access-token-goes-here>' \
      -H 'Content-Type: application/vnd.sas.authorization.share+json' \
      -H 'Accept: application/vnd.sas.authorization.share+json' \
      -H 'If-Match: string'
    
    
    const inputBody = '{
      "type": "read",
      "sharedWith": "testUser",
      "sharedWithType": "user",
      "sharedBy": "currentUser",
      "resourceUri": "/files/files/4288b305-981f-4b8d-b440-0911eabe3faf",
      "name": "test file",
      "version": 3,
      "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"
    }';
    const headers = {
      'Content-Type':'application/vnd.sas.authorization.share+json',
      'Accept':'application/vnd.sas.authorization.share+json',
      'If-Match':'string'
    };
    
    fetch('http://mock-authorization.apifirst.unx.sas.com/authorization/shares/{shareId}',
    {
      method: 'PUT',
      body: inputBody,
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    import requests
    headers = {
      'Content-Type': 'application/vnd.sas.authorization.share+json',
      'Accept': 'application/vnd.sas.authorization.share+json',
      'If-Match': 'string'
    }
    
    r = requests.put('http://mock-authorization.apifirst.unx.sas.com/authorization/shares/{shareId}', headers = headers)
    
    print(r.json())
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Content-Type": []string{"application/vnd.sas.authorization.share+json"},
            "Accept": []string{"application/vnd.sas.authorization.share+json"},
            "If-Match": []string{"string"},
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("PUT", "http://mock-authorization.apifirst.unx.sas.com/authorization/shares/{shareId}", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    

    PUT /shares/{shareId}

    Updates a share by completely replacing it with specified values.

    Body parameter

    {
      "type": "read",
      "sharedWith": "testUser",
      "sharedWithType": "user",
      "sharedBy": "currentUser",
      "resourceUri": "/files/files/4288b305-981f-4b8d-b440-0911eabe3faf",
      "name": "test file",
      "version": 3,
      "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"
    }
    
    Parameters
    Name In Type Required Description
    shareId path string true The ID of the share to update.
    If-Match header string true The entity tag obtained from the most recent ETag response header. Must match the current entity tag for the share.
    body body share true The properties of the share.

    Example responses

    An example of creating a share that enables another user to read a file that they do not already have access to.

    {
      "type": "read",
      "sharedWith": "testUser",
      "sharedWithType": "user",
      "sharedBy": "currentUser",
      "resourceUri": "/files/files/4288b305-981f-4b8d-b440-0911eabe3faf",
      "name": "test file",
      "enabled": true,
      "version": 3,
      "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"
    }
    
    {
      "type": "read",
      "sharedWith": "testUser",
      "sharedWithType": "user",
      "sharedBy": "currentUser",
      "resourceUri": "/files/files/4288b305-981f-4b8d-b440-0911eabe3faf",
      "name": "test file",
      "enabled": true,
      "version": 3,
      "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"
    }
    

    An example of a standard error response

    {
      "errorCode": 400,
      "message": "Bad Request",
      "links": [],
      "version": 2,
      "httpStatusCode": 400
    }
    
    {
      "errorCode": 400,
      "message": "Bad Request",
      "links": [],
      "version": 2,
      "httpStatusCode": 400
    }
    
    {
      "errorCode": 412,
      "message": "Precondition failed",
      "links": [],
      "version": 2,
      "httpStatusCode": 412
    }
    
    {
      "errorCode": 412,
      "message": "Precondition failed",
      "links": [],
      "version": 2,
      "httpStatusCode": 412
    }
    
    {
      "errorCode": 412,
      "message": "Precondition failed",
      "links": [],
      "version": 2,
      "httpStatusCode": 412
    }
    
    {
      "errorCode": 428,
      "message": "Precondition required",
      "links": [],
      "version": 2,
      "httpStatusCode": 428
    }
    
    {
      "errorCode": 428,
      "message": "Precondition required",
      "links": [],
      "version": 2,
      "httpStatusCode": 428
    }
    
    {
      "errorCode": 428,
      "message": "Precondition required",
      "links": [],
      "version": 2,
      "httpStatusCode": 428
    }
    
    Responses
    Status Meaning Description Schema
    200 OK The request succeeded. Returned if the object was updated. savedShare
    400 Bad Request The request was invalid. Returned if the format of the request does not match the schema for the media type used or there is no existing object with the given ID. Also can be returned if the ID passed in the request payload does not match the ID in the URI. errorResponse
    412 Precondition Failed Precondition failed errorResponse
    428 Precondition Required Precondition required errorResponse
    Response Headers
    Status Header Type Format Description
    200 ETag string The entity tag for the share.
    200 Last-Modified string Timestamp of when share was last modified.

    Get sharing configuration

    Code samples

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

    GET /shares/configuration

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

    Example responses

    Gets property values that specify how sharing is configured. sas.authorization.share.enabled determines whether sharing is enabled at all in the system while sas.authorization.share.reshare.enabled determines whether users are allowed to grant reshare permission on objects.

    {
      "sas.authorization.share.reshare.enabled": false,
      "sas.authorization.share.enabled": false
    }
    
    {
      "sas.authorization.share.reshare.enabled": false,
      "sas.authorization.share.enabled": false
    }
    
    Responses
    Status Meaning Description Schema
    200 OK The request succeeded. shareProperties
    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.

    Metadata

    Contains operations that provide information about this API.

    Code samples

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

    GET /

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

    Example responses

    A summary of top-level endpoint and the appropriate link relationship to find the specific endpoint of interest

    {
      "version": 1,
      "links": [
        {
          "method": "POST",
          "rel": "authorize",
          "href": "/authorization/decisions",
          "uri": "/authorization/decisions",
          "type": "application/vnd.sas.authorization.context",
          "responseType": "application/vnd.sas.authorization.decision"
        },
        {
          "method": "POST",
          "rel": "createDirectAuthorizationDecision",
          "href": "/authorization/decisions",
          "uri": "/authorization/decisions",
          "type": "application/vnd.sas.authorization.context",
          "responseType": "application/vnd.sas.authorization.direct.decision+json"
        },
        {
          "method": "POST",
          "rel": "createTextAuthorizationDecision",
          "href": "/authorization/decisions",
          "uri": "/authorization/decisions",
          "type": "application/vnd.sas.authorization.context",
          "responseType": "text/plain"
        },
        {
          "method": "GET",
          "rel": "rules",
          "href": "/authorization/rules",
          "uri": "/authorization/rules",
          "type": "application/vnd.sas.collection",
          "itemType": "application/vnd.sas.authorization.rule"
        },
        {
          "method": "POST",
          "rel": "createRule",
          "href": "/authorization/rules",
          "uri": "/authorization/rules",
          "type": "application/vnd.sas.authorization.rule",
          "responseType": "application/vnd.sas.authorization.rule"
        },
        {
          "method": "GET",
          "rel": "rule",
          "href": "/authorization/rules/{ruleId}",
          "uri": "/authorization/rules/{ruleId}",
          "type": "application/vnd.sas.authorization.rule"
        },
        {
          "method": "PUT",
          "rel": "createOrUpdateRule",
          "href": "/authorization/rules/{ruleId}",
          "uri": "/authorization/rules/{ruleId}",
          "type": "application/vnd.sas.authorization.rule",
          "responseType": "application/vnd.sas.authorization.rule"
        },
        {
          "method": "DELETE",
          "rel": "deleteRule",
          "href": "/authorization/rules/{ruleId}",
          "uri": "/authorization/rules/{ruleId}"
        },
        {
          "method": "PATCH",
          "rel": "patchRules",
          "href": "/authorization/rules",
          "uri": "/authorization/rules",
          "type": "application/json-patch+json",
          "responseType": "application/vnd.sas.collection",
          "responseItemType": "application/vnd.sas.authorization.rule"
        },
        {
          "method": "POST",
          "rel": "createDecisionExplanation",
          "href": "/authorization/decisions",
          "uri": "/authorization/decisions",
          "type": "application/vnd.sas.uriarray; version=1",
          "responseType": "application/vnd.sas.authorization.explanations;version=1"
        },
        {
          "method": "POST",
          "rel": "authorizeLinks",
          "href": "/authorization/decisions",
          "uri": "/authorization/decisions",
          "type": "application/vnd.sas.authorization.bulk.context",
          "responseType": "application/vnd.sas.authorization.authorized.links"
        },
        {
          "method": "POST",
          "rel": "createBulkDecision",
          "href": "/authorization/bulkDecision",
          "uri": "/authorization/bulkDecision",
          "type": "application/vnd.sas.authorization.context",
          "responseType": "application/vnd.sas.authorization.links"
        },
        {
          "method": "GET",
          "rel": "localizedTypes",
          "href": "/authorization/localizations/types",
          "uri": "/authorization/localizations/types",
          "responseType": "application/vnd.sas.collection"
        },
        {
          "method": "GET",
          "rel": "localizedPermissions",
          "href": "/authorization/localizations/permissions",
          "uri": "/authorization/localizations/permissions",
          "responseType": "application/vnd.sas.collection"
        },
        {
          "method": "GET",
          "rel": "localizedPrincipalTypes",
          "href": "/authorization/localizations/principalTypes",
          "uri": "/authorization/localizations/principalTypes",
          "responseType": "application/vnd.sas.collection"
        },
        {
          "method": "POST",
          "rel": "conditionValidation",
          "href": "/authorization/conditionValidation",
          "uri": "/authorization/conditionValidation",
          "responseType": "application/vnd.sas.validation"
        },
        {
          "method": "POST",
          "rel": "validateCondition",
          "href": "/authorization/commons/validations/conditions",
          "uri": "/authorization/commons/validations/conditions",
          "responseType": "application/vnd.sas.error"
        },
        {
          "method": "POST",
          "rel": "validate",
          "href": "/authorization/commons/validations/rules",
          "uri": "/authorization/commons/validations/rules",
          "responseType": "application/vnd.sas.error"
        },
        {
          "method": "PUT",
          "rel": "validateUpdate",
          "href": "/authorization/commons/validations/rules/{ruleId}",
          "uri": "/authorization/commons/validations/rules/{ruleId}",
          "responseType": "application/vnd.sas.error"
        },
        {
          "method": "DELETE",
          "rel": "validateDelete",
          "href": "/authorization/commons/validations/rules/{ruleId}",
          "uri": "/authorization/commons/validations/rules/{ruleId}",
          "responseType": "application/vnd.sas.error"
        },
        {
          "method": "POST",
          "rel": "createRuleJob",
          "href": "/authorization/rules/jobs",
          "uri": "/authorization/rules/jobs",
          "responseType": "application/vnd.sas.authorization.rule.job"
        },
        {
          "method": "GET",
          "rel": "ruleJobs",
          "href": "/authorization/rules/jobs/{jobId}",
          "uri": "/authorization/rules/jobs/{jobId}",
          "type": "application/vnd.sas.authorization.rule.job"
        },
        {
          "method": "GET",
          "rel": "ruleJobState",
          "href": "/authorization/rules/jobs/{jobId}/state",
          "uri": "/authorization/rules/jobs/{jobId}/state",
          "type": "application/vnd.sas.authorization.rule.job"
        },
        {
          "method": "GET",
          "rel": "shares",
          "href": "/authorization/shares/",
          "uri": "/authorization/shares/",
          "responseType": "application/vnd.sas.collection",
          "responseItemType": "application/vnd.sas.authorization.share"
        },
        {
          "method": "GET",
          "rel": "share",
          "href": "/authorization/shares/{shareId}",
          "uri": "/authorization/shares/{shareId}",
          "responseType": "application/vnd.sas.authorization.share"
        },
        {
          "method": "POST",
          "rel": "createShare",
          "href": "/authorization/shares",
          "uri": "/authorization/shares",
          "type": "application/vnd.sas.authorization.share",
          "responseType": "application/vnd.sas.authorization.share"
        },
        {
          "method": "PUT",
          "rel": "updateShare",
          "href": "/authorization/shares/{shareId}",
          "uri": "/authorization/shares/{shareId}",
          "type": "application/vnd.sas.authorization.share",
          "responseType": "application/vnd.sas.authorization.share"
        },
        {
          "method": "DELETE",
          "rel": "deleteShare",
          "href": "/authorization/shares/{shareId}",
          "uri": "/authorization/shares/{shareId}"
        },
        {
          "method": "PATCH",
          "rel": "patchShares",
          "href": "/authorization/shares",
          "uri": "/authorization/shares",
          "type": "application/json-patch+json",
          "responseType": "application/vnd.sas.collection",
          "responseItemType": "application/vnd.sas.authorization.share"
        },
        {
          "method": "GET",
          "rel": "shareConfiguration",
          "href": "/authorization/shares/configuration",
          "uri": "/authorization/shares/configuration",
          "responseType": "application/vnd.sas.properties+json"
        },
        {
          "method": "GET",
          "rel": "getCapabilities",
          "href": "/authorization/capabilities",
          "uri": "/authorization/capabilities",
          "type": "application/vnd.sas.authorization.capability",
          "responseType": "application/vnd.sas.collection",
          "responseItemType": "application/vnd.sas.authorization.capability"
        },
        {
          "method": "GET",
          "rel": "getCapabilities",
          "href": "/authorization/capabilities",
          "uri": "/authorization/capabilities",
          "type": "application/vnd.sas.authorization.capability.summary",
          "responseType": "application/vnd.sas.collection",
          "responseItemType": "application/vnd.sas.authorization.capability.summary"
        },
        {
          "method": "POST",
          "rel": "createCapability",
          "href": "/authorization/capabilities",
          "uri": "/authorization/capabilities",
          "responseType": "application/vnd.sas.authorization.capability"
        },
        {
          "method": "DELETE",
          "rel": "deleteGroupCapabilities",
          "href": "/authorization/capabilities",
          "uri": "/authorization/capabilities"
        },
        {
          "method": "GET",
          "rel": "getCapability",
          "href": "/authorization/capabilities/{capabilityName}",
          "uri": "/authorization/capabilities/{capabilityName}",
          "type": "application/vnd.sas.authorization.capability.summary",
          "responseType": "application/vnd.sas.authorization.capability.summary"
        },
        {
          "method": "PATCH",
          "rel": "patchCapability",
          "href": "/authorization/capabilities/{capabilityName}",
          "uri": "/authorization/capabilities/{capabilityName}",
          "type": "application/vnd.sas.authorization.capability",
          "responseType": "application/vnd.sas.authorization.capability"
        },
        {
          "method": "GET",
          "rel": "getGroupsForCapability",
          "href": "/authorization/capabilities/{capabilityName}/groups",
          "uri": "/authorization/capabilities/{capabilityName}/groups",
          "type": "application/vnd.sas.authorization.capability",
          "responseType": "application/vnd.sas.collection"
        },
        {
          "method": "POST",
          "rel": "addCapabilityToGroup",
          "href": "/authorization/capabilities/{capabilityName}/groups",
          "uri": "/authorization/capabilities/{capabilityName}/groups"
        },
        {
          "method": "DELETE",
          "rel": "deleteCapabilityFromGroup",
          "href": "/authorization/capabilities/{capabilityName}/groups/{groupId}",
          "uri": "/authorization/capabilities/{capabilityName}/groups/{groupId}"
        }
      ]
    }
    
    {
      "version": 1,
      "links": [
        {
          "method": "POST",
          "rel": "authorize",
          "href": "/authorization/decisions",
          "uri": "/authorization/decisions",
          "type": "application/vnd.sas.authorization.context",
          "responseType": "application/vnd.sas.authorization.decision"
        },
        {
          "method": "POST",
          "rel": "createDirectAuthorizationDecision",
          "href": "/authorization/decisions",
          "uri": "/authorization/decisions",
          "type": "application/vnd.sas.authorization.context",
          "responseType": "application/vnd.sas.authorization.direct.decision+json"
        },
        {
          "method": "POST",
          "rel": "createTextAuthorizationDecision",
          "href": "/authorization/decisions",
          "uri": "/authorization/decisions",
          "type": "application/vnd.sas.authorization.context",
          "responseType": "text/plain"
        },
        {
          "method": "GET",
          "rel": "rules",
          "href": "/authorization/rules",
          "uri": "/authorization/rules",
          "type": "application/vnd.sas.collection",
          "itemType": "application/vnd.sas.authorization.rule"
        },
        {
          "method": "POST",
          "rel": "createRule",
          "href": "/authorization/rules",
          "uri": "/authorization/rules",
          "type": "application/vnd.sas.authorization.rule",
          "responseType": "application/vnd.sas.authorization.rule"
        },
        {
          "method": "GET",
          "rel": "rule",
          "href": "/authorization/rules/{ruleId}",
          "uri": "/authorization/rules/{ruleId}",
          "type": "application/vnd.sas.authorization.rule"
        },
        {
          "method": "PUT",
          "rel": "createOrUpdateRule",
          "href": "/authorization/rules/{ruleId}",
          "uri": "/authorization/rules/{ruleId}",
          "type": "application/vnd.sas.authorization.rule",
          "responseType": "application/vnd.sas.authorization.rule"
        },
        {
          "method": "DELETE",
          "rel": "deleteRule",
          "href": "/authorization/rules/{ruleId}",
          "uri": "/authorization/rules/{ruleId}"
        },
        {
          "method": "PATCH",
          "rel": "patchRules",
          "href": "/authorization/rules",
          "uri": "/authorization/rules",
          "type": "application/json-patch+json",
          "responseType": "application/vnd.sas.collection",
          "responseItemType": "application/vnd.sas.authorization.rule"
        },
        {
          "method": "POST",
          "rel": "createDecisionExplanation",
          "href": "/authorization/decisions",
          "uri": "/authorization/decisions",
          "type": "application/vnd.sas.uriarray; version=1",
          "responseType": "application/vnd.sas.authorization.explanations;version=1"
        },
        {
          "method": "POST",
          "rel": "authorizeLinks",
          "href": "/authorization/decisions",
          "uri": "/authorization/decisions",
          "type": "application/vnd.sas.authorization.bulk.context",
          "responseType": "application/vnd.sas.authorization.authorized.links"
        },
        {
          "method": "POST",
          "rel": "createBulkDecision",
          "href": "/authorization/bulkDecision",
          "uri": "/authorization/bulkDecision",
          "type": "application/vnd.sas.authorization.context",
          "responseType": "application/vnd.sas.authorization.links"
        },
        {
          "method": "GET",
          "rel": "localizedTypes",
          "href": "/authorization/localizations/types",
          "uri": "/authorization/localizations/types",
          "responseType": "application/vnd.sas.collection"
        },
        {
          "method": "GET",
          "rel": "localizedPermissions",
          "href": "/authorization/localizations/permissions",
          "uri": "/authorization/localizations/permissions",
          "responseType": "application/vnd.sas.collection"
        },
        {
          "method": "GET",
          "rel": "localizedPrincipalTypes",
          "href": "/authorization/localizations/principalTypes",
          "uri": "/authorization/localizations/principalTypes",
          "responseType": "application/vnd.sas.collection"
        },
        {
          "method": "POST",
          "rel": "conditionValidation",
          "href": "/authorization/conditionValidation",
          "uri": "/authorization/conditionValidation",
          "responseType": "application/vnd.sas.validation"
        },
        {
          "method": "POST",
          "rel": "validateCondition",
          "href": "/authorization/commons/validations/conditions",
          "uri": "/authorization/commons/validations/conditions",
          "responseType": "application/vnd.sas.error"
        },
        {
          "method": "POST",
          "rel": "validate",
          "href": "/authorization/commons/validations/rules",
          "uri": "/authorization/commons/validations/rules",
          "responseType": "application/vnd.sas.error"
        },
        {
          "method": "PUT",
          "rel": "validateUpdate",
          "href": "/authorization/commons/validations/rules/{ruleId}",
          "uri": "/authorization/commons/validations/rules/{ruleId}",
          "responseType": "application/vnd.sas.error"
        },
        {
          "method": "DELETE",
          "rel": "validateDelete",
          "href": "/authorization/commons/validations/rules/{ruleId}",
          "uri": "/authorization/commons/validations/rules/{ruleId}",
          "responseType": "application/vnd.sas.error"
        },
        {
          "method": "POST",
          "rel": "createRuleJob",
          "href": "/authorization/rules/jobs",
          "uri": "/authorization/rules/jobs",
          "responseType": "application/vnd.sas.authorization.rule.job"
        },
        {
          "method": "GET",
          "rel": "ruleJobs",
          "href": "/authorization/rules/jobs/{jobId}",
          "uri": "/authorization/rules/jobs/{jobId}",
          "type": "application/vnd.sas.authorization.rule.job"
        },
        {
          "method": "GET",
          "rel": "ruleJobState",
          "href": "/authorization/rules/jobs/{jobId}/state",
          "uri": "/authorization/rules/jobs/{jobId}/state",
          "type": "application/vnd.sas.authorization.rule.job"
        },
        {
          "method": "GET",
          "rel": "shares",
          "href": "/authorization/shares/",
          "uri": "/authorization/shares/",
          "responseType": "application/vnd.sas.collection",
          "responseItemType": "application/vnd.sas.authorization.share"
        },
        {
          "method": "GET",
          "rel": "share",
          "href": "/authorization/shares/{shareId}",
          "uri": "/authorization/shares/{shareId}",
          "responseType": "application/vnd.sas.authorization.share"
        },
        {
          "method": "POST",
          "rel": "createShare",
          "href": "/authorization/shares",
          "uri": "/authorization/shares",
          "type": "application/vnd.sas.authorization.share",
          "responseType": "application/vnd.sas.authorization.share"
        },
        {
          "method": "PUT",
          "rel": "updateShare",
          "href": "/authorization/shares/{shareId}",
          "uri": "/authorization/shares/{shareId}",
          "type": "application/vnd.sas.authorization.share",
          "responseType": "application/vnd.sas.authorization.share"
        },
        {
          "method": "DELETE",
          "rel": "deleteShare",
          "href": "/authorization/shares/{shareId}",
          "uri": "/authorization/shares/{shareId}"
        },
        {
          "method": "PATCH",
          "rel": "patchShares",
          "href": "/authorization/shares",
          "uri": "/authorization/shares",
          "type": "application/json-patch+json",
          "responseType": "application/vnd.sas.collection",
          "responseItemType": "application/vnd.sas.authorization.share"
        },
        {
          "method": "GET",
          "rel": "shareConfiguration",
          "href": "/authorization/shares/configuration",
          "uri": "/authorization/shares/configuration",
          "responseType": "application/vnd.sas.properties+json"
        },
        {
          "method": "GET",
          "rel": "getCapabilities",
          "href": "/authorization/capabilities",
          "uri": "/authorization/capabilities",
          "type": "application/vnd.sas.authorization.capability",
          "responseType": "application/vnd.sas.collection",
          "responseItemType": "application/vnd.sas.authorization.capability"
        },
        {
          "method": "GET",
          "rel": "getCapabilities",
          "href": "/authorization/capabilities",
          "uri": "/authorization/capabilities",
          "type": "application/vnd.sas.authorization.capability.summary",
          "responseType": "application/vnd.sas.collection",
          "responseItemType": "application/vnd.sas.authorization.capability.summary"
        },
        {
          "method": "POST",
          "rel": "createCapability",
          "href": "/authorization/capabilities",
          "uri": "/authorization/capabilities",
          "responseType": "application/vnd.sas.authorization.capability"
        },
        {
          "method": "DELETE",
          "rel": "deleteGroupCapabilities",
          "href": "/authorization/capabilities",
          "uri": "/authorization/capabilities"
        },
        {
          "method": "GET",
          "rel": "getCapability",
          "href": "/authorization/capabilities/{capabilityName}",
          "uri": "/authorization/capabilities/{capabilityName}",
          "type": "application/vnd.sas.authorization.capability.summary",
          "responseType": "application/vnd.sas.authorization.capability.summary"
        },
        {
          "method": "PATCH",
          "rel": "patchCapability",
          "href": "/authorization/capabilities/{capabilityName}",
          "uri": "/authorization/capabilities/{capabilityName}",
          "type": "application/vnd.sas.authorization.capability",
          "responseType": "application/vnd.sas.authorization.capability"
        },
        {
          "method": "GET",
          "rel": "getGroupsForCapability",
          "href": "/authorization/capabilities/{capabilityName}/groups",
          "uri": "/authorization/capabilities/{capabilityName}/groups",
          "type": "application/vnd.sas.authorization.capability",
          "responseType": "application/vnd.sas.collection"
        },
        {
          "method": "POST",
          "rel": "addCapabilityToGroup",
          "href": "/authorization/capabilities/{capabilityName}/groups",
          "uri": "/authorization/capabilities/{capabilityName}/groups"
        },
        {
          "method": "DELETE",
          "rel": "deleteCapabilityFromGroup",
          "href": "/authorization/capabilities/{capabilityName}/groups/{groupId}",
          "uri": "/authorization/capabilities/{capabilityName}/groups/{groupId}"
        }
      ]
    }
    
    Status Meaning Description Schema
    200 OK The request succeeded. api
    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.

    Get a localized list of rule types

    Code samples

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

    GET /localizations/types

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

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

    Example responses

    For every rule with enumerated endpoints, there is a localization endpoint that will output a JSON object containing localized versions of each enumerated value

    {
      "version": 5,
      "values": [
        {
          "value": "user",
          "localizedValue": "user"
        },
        {
          "value": "group",
          "localizedValue": "group"
        },
        {
          "value": "authenticated-users",
          "localizedValue": "authenticated-users"
        },
        {
          "value": "everyone",
          "localizedValue": "everyone"
        }
      ]
    }
    
    {
      "version": 5,
      "values": [
        {
          "value": "user",
          "localizedValue": "user"
        },
        {
          "value": "group",
          "localizedValue": "group"
        },
        {
          "value": "authenticated-users",
          "localizedValue": "authenticated-users"
        },
        {
          "value": "everyone",
          "localizedValue": "everyone"
        }
      ]
    }
    
    Responses
    Status Meaning Description Schema
    200 OK The request succeeded. localizedValueCollection
    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.

    Get a localized list of principal types

    Code samples

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

    GET /localizations/principalTypes

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

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

    Example responses

    For every rule with enumerated endpoints, there is a localization endpoint that will output a JSON object containing localized versions of each enumerated value

    {
      "version": 5,
      "values": [
        {
          "value": "user",
          "localizedValue": "user"
        },
        {
          "value": "group",
          "localizedValue": "group"
        },
        {
          "value": "authenticated-users",
          "localizedValue": "authenticated-users"
        },
        {
          "value": "everyone",
          "localizedValue": "everyone"
        }
      ]
    }
    
    {
      "version": 5,
      "values": [
        {
          "value": "user",
          "localizedValue": "user"
        },
        {
          "value": "group",
          "localizedValue": "group"
        },
        {
          "value": "authenticated-users",
          "localizedValue": "authenticated-users"
        },
        {
          "value": "everyone",
          "localizedValue": "everyone"
        }
      ]
    }
    
    Responses
    Status Meaning Description Schema
    200 OK The request succeeded. localizedValueCollection
    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.

    Get a localized list of permission names

    Code samples

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

    GET /localizations/permissions

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

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

    Example responses

    For every rule with enumerated endpoints, there is a localization endpoint that will output a JSON object containing localized versions of each enumerated value

    {
      "version": 5,
      "values": [
        {
          "value": "user",
          "localizedValue": "user"
        },
        {
          "value": "group",
          "localizedValue": "group"
        },
        {
          "value": "authenticated-users",
          "localizedValue": "authenticated-users"
        },
        {
          "value": "everyone",
          "localizedValue": "everyone"
        }
      ]
    }
    
    {
      "version": 5,
      "values": [
        {
          "value": "user",
          "localizedValue": "user"
        },
        {
          "value": "group",
          "localizedValue": "group"
        },
        {
          "value": "authenticated-users",
          "localizedValue": "authenticated-users"
        },
        {
          "value": "everyone",
          "localizedValue": "everyone"
        }
      ]
    }
    
    Responses
    Status Meaning Description Schema
    200 OK The request succeeded. localizedValueCollection
    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.

    Schemas

    errorResponse

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

    Error

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

    baseCollection

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

    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)

    Properties
    Name Type Required Restrictions Description
    name string false none The name of the collection.
    start integer false none The zero-based index of the first item in the collection.
    limit integer false none The number of items that were requested for the collection.
    count integer(int64) false none If populated indicates the number of items in the collection.
    accept string false none A space-delimited list of media types from which an Accept header may be constructed.
    links [link] false none The links that apply to the collection.
    version integer false none The version number of the collection representation. This representation is version 2.

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

    Link

    Properties
    Name Type Required Restrictions Description
    method string false none The HTTP method to invoke this endpoint.
    rel string true none The relationship of this URL to the object.
    uri string false none The relative URI of the REST endpoint.
    href string false none The full URL of the REST endpoint.
    title string false none The title for the link.
    type string false none The media type consumed/produced.
    itemType string false none If this is a link to a container, itemType is the media type or link type for the items in the container.
    responseType string false none The media type or link type of the response body for a PUT, POST, or PATCH operation.
    responseItemType string false none The media type or link type of the items in the response body for a PUT, POST, or PATCH operation.

    api

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

    Representation of the API

    Properties
    Name Type Required Restrictions Description
    version integer true none The version number of the API representation. This is version 1.
    links [link] true none The API's top-level links.

    selection

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

    Selection

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

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

    \"uri\"
    the array contains resource URIs

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

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

    validation

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

    Validation Response

    Properties
    Name Type Required Restrictions Description
    version integer true none This media type's schema version number. This representation is version 1.
    valid boolean true none true if and only if the validation was successful.
    error errorResponse false none The representation of an error.
    links [link] false none An array of links to related resources and actions.

    shareProperties

    {
      "sas.authorization.share.enabled": true,
      "sas.authorization.share.reshare.enabled": true
    }
    
    

    Share Properties

    Properties
    Name Type Required Restrictions Description
    sas.authorization.share.enabled boolean false none Whether sharing is enabled at all in the system
    sas.authorization.share.reshare.enabled boolean false none Whether users are allowed to grant reshare permission on objects

    authorizationRule

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

    Authorization Rule

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

    identifiableAuthorizationRule

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

    Identifiable Authorization Rule

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

    allOf

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

    and

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

    savedAuthorizationRule

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

    Saved Authorization Rule

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

    allOf

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

    and

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

    savedAuthorizationRuleCollection

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

    Resource Collection of Authorization Rules

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

    allOf

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

    and

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

    principal

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

    Principal

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

    authorizationContext

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

    Authorization Context

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

    authorizationContextPerm

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

    Authorization Context Permission Required

    Properties
    Name Type Required Restrictions Description
    Authorization Context Permission Required authorizationContext false none An authorization context where the permission field is required

    bulkAuthorizationContext

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

    Bulk Authorization Context

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

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

    Permissions to Links

    Properties
    Name Type Required Restrictions Description
    add [link] false none An array of links that should be authorized against the add permission.
    create [link] false none An array of links that should be authorized against the create permission.
    delete [link] false none An array of links that should be authorized against the delete permission.
    read [link] false none An array of links that should be authorized against the read permission.
    remove [link] false none An array of links that should be authorized against the remove permission.
    secure [link] false none An array of links that should be authorized against the secure permission.
    update [link] false none An array of links that should be authorized against the update permission.

    authorizationContextRequest

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

    Authorization Context Request

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

    explanations

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

    Explanations

    Properties
    Name Type Required Restrictions Description
    version integer(int32) false none The version of the explanation representation. The current representation version is 1.
    explanations [explanation] false none [An explanation of access for one principal.]

    explanation

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

    Explanation

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

    individualExplanation

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

    Individual Explanation

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

    permissionExplanation

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

    Permission Explanation

    Properties

    allOf

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

    and

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

    factor

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

    Factor

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

    ruleJob

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

    Rule Job

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

    ruleAction

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

    Rule Action

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

    rulePatchOperation

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

    Rule Patch Operation

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

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

    Links

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

    localizedValueCollection

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

    Resource Collection of Localized Values

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

    allOf

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

    and

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

    localizedValue

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

    Localized Value

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

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

    Authorized Links

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

    hypothetical

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

    Hypothetical

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

    share

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

    Share

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

    savedShare

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

    Saved Share

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

    allOf

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

    and

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

    savedShareCollection

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

    Resource Collection of Shares

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

    allOf

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

    and

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

    sharePatchOperation

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

    Share Patch Operation

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

    Examples

    Github Examples

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

    Files

    Base URLs:

    Terms of service Email: SAS Developers Web: SAS Developers

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

    The Files API provides persistence of files, such as comment attachments and report images.

    Usage Notes

    Overview

    The Files API provides a generic platform for clients to persist and retrieve such files as documents, attachments, and reports. You can associate the file with the URI of another identifiable object (for example, a parentUri). You must assign a content type and name to every file. You can retrieve files individually by using the file identifier or as a list of files by using a parentUri. A content stream is associated with each file.

    After you create the file, you can update the metadata that is associated with the file or the actual content. You can delete a single file by using a specific ID. You can delete multiple files by specifying a parentUri.

    You can upload a file using a raw request or a multipart form request.

    Supported Features

    This API provides these functions, each has an associated default user value that can perform the function.

    Function Default User
    Store a file authenticated
    Retrieve file meta information authorized
    Retrieve file content authorized
    Update file meta information authorized
    Update file content authorized
    Delete a file authorized
    Copy a file any user with Read access to the file
    File Service Administration

    By default, the Files API blocks a file upload when any of these conditions exists.

    Change the Permissible File Size

    To modify the 100 MB upload limit, specify the applicable value in bytes in the files.maxFileSize Consul property. For example, to specify a 10 MB limit, specify 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 in the files.blockedTypes Consul property. Separate multiple values with a comma. For example, to block .zip, .exe, and plain text files, specify files.blockedTypes=application/zip,application/x-msdownload,text/plain.

    Prevent Content Scan for Secured Types

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

    Terminology

    file resource

    the meta representation of a file.

    stream

    the data stream for the actual content of a file.

    Error Codes

    Some errors are returned automatically by the framework being used; for example HTTP 406 Not Acceptable when the client specifies an unsupported Accept header and HTTP 401 Unauthorized when the client is not authenticated. Generally these are not documented. For errors thrown explicitly by this service, a standard SAS error (media type application/vnd.sas.error) is returned. The following table specifies the possible error codes and their meanings:

    HTTP status codes Error code Description
    400 124001 Invalid file resource version is requested.
    400 124002 Multiple files are not supported in multipart request.
    400 124003 Multipart request is not found.
    400 124004 File could not be read because of invalid stream.
    400 124005 Given file could not be read because of invalid stream.
    400 124006 File type is blocked.
    400 124007 Given file type is blocked.
    400 124008 The file cannot be uploaded because it is larger than limit.
    400 124009 Given file cannot be uploaded because it is larger than limit.
    400 124010 The file could not be found.
    400 124011 The file type is not specified.
    400 124012 The file type is not specified for given file.
    400 124013 The file could not be read.
    400 124014 The file could not be uploaded since it contains invalid URL.
    400 124015 The file could not be uploaded because the file contains a virus definition.
    400 124016 The value of limit parameter is not valid.
    400 124017 The file ID parameter in the path and the ID of the file does not match.
    400 124018 The file name cannot be empty.
    400 124019 The length of file name is not valid.
    400 124020 Multipart request is not valid.
    400 124021 Multipart request can not read.
    400 124022 The value of filter parameter is not valid.
    403 124023 File is quarantined.
    400 124024 The filename should not contain these character(s).

    Operations

    Root

    The operations for the Root resource.

    Code samples

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

    GET /

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

    Example responses

    Here is an example of using the GET request to retrieve the application/vnd.sas.api+json representation of the APIs top-level links.

    {
      "version": 1,
      "links": [
        {
          "method": "HEAD",
          "rel": "checkState",
          "href": "/files/files",
          "uri": "/files/files",
          "type": "application/json"
        },
        {
          "method": "POST",
          "rel": "create",
          "href": "/files/files",
          "uri": "/files/files",
          "type": "*/*",
          "responseType": "application/vnd.sas.file"
        },
        {
          "method": "GET",
          "rel": "files",
          "href": "/files/files",
          "uri": "/files/files",
          "type": "application/vnd.sas.collection"
        },
        {
          "method": "POST",
          "rel": "bulkFiles",
          "href": "/files/files",
          "uri": "/files/files",
          "type": "application/vnd.sas.selection",
          "responseType": "application/vnd.sas.collection"
        }
      ]
    }
    
    {
      "version": 1,
      "links": [
        {
          "method": "HEAD",
          "rel": "checkState",
          "href": "/files/files",
          "uri": "/files/files",
          "type": "application/json"
        },
        {
          "method": "POST",
          "rel": "create",
          "href": "/files/files",
          "uri": "/files/files",
          "type": "*/*",
          "responseType": "application/vnd.sas.file"
        },
        {
          "method": "GET",
          "rel": "files",
          "href": "/files/files",
          "uri": "/files/files",
          "type": "application/vnd.sas.collection"
        },
        {
          "method": "POST",
          "rel": "bulkFiles",
          "href": "/files/files",
          "uri": "/files/files",
          "type": "application/vnd.sas.selection",
          "responseType": "application/vnd.sas.collection"
        }
      ]
    }
    

    404 Response

    {
      "json": {
        "message": "not found",
        "httpStatusCode": 404,
        "version": 2
      }
    }
    
    Status Meaning Description Schema
    200 OK The request succeeded. api
    404 Not Found The service is not available. error2
    Response Headers
    Status Header Type Format Description
    200 Content-Type string No description

    Check the state of the service

    Code samples

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

    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
    Response Headers
    Status Header Type Format Description
    200 Content-Type string No description

    Files

    The CRUD (Create, Read, Update, Delete) operations for files.

    Get file resources

    Code samples

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

    GET /files

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

    Parameters
    Name In Type Required Description
    Accept-Item header string false The file resource media type value. If this is 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 criteria applies to the returned member collection.

    Example responses

    Here is example of GET request to retrve the application/vnd.sas.collection+json representation representation of collection endpoint.

    {
      "links": [
        {
          "method": "GET",
          "rel": "self",
          "href": "/files/files?sortBy=name&start=0&limit=2",
          "uri": "/files/files?sortBy=name&start=0&limit=2",
          "type": "application/vnd.sas.collection"
        },
        {
          "method": "GET",
          "rel": "next",
          "href": "/files/files?sortBy=name&start=2&limit=2",
          "uri": "/files/files?sortBy=name&start=2&limit=2",
          "type": "application/vnd.sas.collection"
        },
        {
          "method": "GET",
          "rel": "last",
          "href": "/files/files?sortBy=name&start=544&limit=2",
          "uri": "/files/files?sortBy=name&start=544&limit=2",
          "type": "application/vnd.sas.collection"
        }
      ],
      "name": "files",
      "accept": "application/vnd.sas.file",
      "start": 0,
      "count": 546,
      "items": [
        {
          "creationTimeStamp": "2022-03-31T20:00:03.609Z",
          "modifiedTimeStamp": "2022-03-31T20:00:03.826Z",
          "createdBy": "sas.audit",
          "modifiedBy": "sas.audit",
          "id": "cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
          "parentUri": "/jobExecution/jobs/b9fe292d-2a4e-434c-8154-5f490b4b9257",
          "properties": {
            "LastState": "running",
            "JobRequest": "",
            "Job": "b9fe292d-2a4e-434c-8154-5f490b4b9257",
            "Provider": "casl"
          },
          "contentDisposition": "text/plain",
          "contentType": "text/plain",
          "description": "Log File for Job b9fe292d-2a4e-434c-8154-5f490b4b9257",
          "documentType": "log",
          "encoding": "UTF-8",
          "links": [
            {
              "method": "GET",
              "rel": "self",
              "href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
              "uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
              "type": "application/vnd.sas.file"
            },
            {
              "method": "GET",
              "rel": "alternate",
              "href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
              "uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
              "type": "application/vnd.sas.summary"
            },
            {
              "method": "PATCH",
              "rel": "patch",
              "href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
              "uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
              "type": "application/vnd.sas.file",
              "responseType": "application/vnd.sas.file"
            },
            {
              "method": "PUT",
              "rel": "update",
              "href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
              "uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
              "type": "application/vnd.sas.file",
              "responseType": "application/vnd.sas.file"
            },
            {
              "method": "DELETE",
              "rel": "delete",
              "href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
              "uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7"
            },
            {
              "method": "GET",
              "rel": "content",
              "href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7/content",
              "uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7/content",
              "type": "text/plain"
            },
            {
              "method": "PUT",
              "rel": "updateContent",
              "href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7/content",
              "uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7/content",
              "type": "*/*",
              "responseType": "application/vnd.sas.file"
            },
            {
              "method": "POST",
              "rel": "copyFile",
              "href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7/copy",
              "uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7/copy",
              "responseType": "application/vnd.sas.file"
            },
            {
              "method": "POST",
              "rel": "create",
              "href": "/files/files",
              "uri": "/files/files",
              "type": "*/*",
              "responseType": "application/vnd.sas.file"
            }
          ],
          "name": "2022-03-31T20:00:03Z-results.log",
          "size": 742,
          "searchable": false,
          "fileStatus": "unlocked",
          "fileVersion": 0,
          "expirationTimeStamp": "2022-04-07T20:00:03.651Z",
          "virusDetected": false,
          "urlDetected": false,
          "quarantine": false,
          "version": 4
        },
        {
          "creationTimeStamp": "2022-03-31T20:01:12.657Z",
          "modifiedTimeStamp": "2022-03-31T20:01:12.941Z",
          "createdBy": "sas.audit",
          "modifiedBy": "sas.audit",
          "id": "bed8ac75-2c21-4355-ab8a-0e595049c246",
          "parentUri": "/jobExecution/jobs/2c08ebfd-bd82-4970-8cf0-cc9858f5dc6e",
          "properties": {
            "LastState": "running",
            "JobRequest": "",
            "Job": "2c08ebfd-bd82-4970-8cf0-cc9858f5dc6e",
            "Provider": "casl"
          },
          "contentDisposition": "text/plain",
          "contentType": "text/plain",
          "description": "Log File for Job 2c08ebfd-bd82-4970-8cf0-cc9858f5dc6e",
          "documentType": "log",
          "encoding": "UTF-8",
          "links": [
            {
              "method": "GET",
              "rel": "self",
              "href": "/files/files/bed8ac75-2c21-4355-ab8a-0e595049c246",
              "uri": "/files/files/bed8ac75-2c21-4355-ab8a-0e595049c246",
              "type": "application/vnd.sas.file"
            },
            {
              "method": "GET",
              "rel": "alternate",
              "href": "/files/files/bed8ac75-2c21-4355-ab8a-0e595049c246",
              "uri": "/files/files/bed8ac75-2c21-4355-ab8a-0e595049c246",
              "type": "application/vnd.sas.summary"
            },
            {
              "method": "PATCH",
              "rel": "patch",
              "href": "/files/files/bed8ac75-2c21-4355-ab8a-0e595049c246",
              "uri": "/files/files/bed8ac75-2c21-4355-ab8a-0e595049c246",
              "type": "application/vnd.sas.file",
              "responseType": "application/vnd.sas.file"
            },
            {
              "method": "PUT",
              "rel": "update",
              "href": "/files/files/bed8ac75-2c21-4355-ab8a-0e595049c246",
              "uri": "/files/files/bed8ac75-2c21-4355-ab8a-0e595049c246",
              "type": "application/vnd.sas.file",
              "responseType": "application/vnd.sas.file"
            },
            {
              "method": "DELETE",
              "rel": "delete",
              "href": "/files/files/bed8ac75-2c21-4355-ab8a-0e595049c246",
              "uri": "/files/files/bed8ac75-2c21-4355-ab8a-0e595049c246"
            },
            {
              "method": "GET",
              "rel": "content",
              "href": "/files/files/bed8ac75-2c21-4355-ab8a-0e595049c246/content",
              "uri": "/files/files/bed8ac75-2c21-4355-ab8a-0e595049c246/content",
              "type": "text/plain"
            },
            {
              "method": "PUT",
              "rel": "updateContent",
              "href": "/files/files/bed8ac75-2c21-4355-ab8a-0e595049c246/content",
              "uri": "/files/files/bed8ac75-2c21-4355-ab8a-0e595049c246/content",
              "type": "*/*",
              "responseType": "application/vnd.sas.file"
            },
            {
              "method": "POST",
              "rel": "copyFile",
              "href": "/files/files/bed8ac75-2c21-4355-ab8a-0e595049c246/copy",
              "uri": "/files/files/bed8ac75-2c21-4355-ab8a-0e595049c246/copy",
              "responseType": "application/vnd.sas.file"
            },
            {
              "method": "POST",
              "rel": "create",
              "href": "/files/files",
              "uri": "/files/files",
              "type": "*/*",
              "responseType": "application/vnd.sas.file"
            }
          ],
          "name": "2022-03-31T20:01:12Z-results.log",
          "size": 742,
          "searchable": false,
          "fileStatus": "unlocked",
          "fileVersion": 0,
          "expirationTimeStamp": "2022-04-07T20:01:12.678Z",
          "virusDetected": false,
          "urlDetected": false,
          "quarantine": false,
          "version": 4
        }
      ],
      "limit": 2,
      "version": 2
    }
    
    {
      "links": [
        {
          "method": "GET",
          "rel": "self",
          "href": "/files/files?sortBy=name&start=0&limit=2",
          "uri": "/files/files?sortBy=name&start=0&limit=2",
          "type": "application/vnd.sas.collection"
        },
        {
          "method": "GET",
          "rel": "next",
          "href": "/files/files?sortBy=name&start=2&limit=2",
          "uri": "/files/files?sortBy=name&start=2&limit=2",
          "type": "application/vnd.sas.collection"
        },
        {
          "method": "GET",
          "rel": "last",
          "href": "/files/files?sortBy=name&start=544&limit=2",
          "uri": "/files/files?sortBy=name&start=544&limit=2",
          "type": "application/vnd.sas.collection"
        }
      ],
      "name": "files",
      "accept": "application/vnd.sas.file",
      "start": 0,
      "count": 546,
      "items": [
        {
          "creationTimeStamp": "2022-03-31T20:00:03.609Z",
          "modifiedTimeStamp": "2022-03-31T20:00:03.826Z",
          "createdBy": "sas.audit",
          "modifiedBy": "sas.audit",
          "id": "cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
          "parentUri": "/jobExecution/jobs/b9fe292d-2a4e-434c-8154-5f490b4b9257",
          "properties": {
            "LastState": "running",
            "JobRequest": "",
            "Job": "b9fe292d-2a4e-434c-8154-5f490b4b9257",
            "Provider": "casl"
          },
          "contentDisposition": "text/plain",
          "contentType": "text/plain",
          "description": "Log File for Job b9fe292d-2a4e-434c-8154-5f490b4b9257",
          "documentType": "log",
          "encoding": "UTF-8",
          "links": [
            {
              "method": "GET",
              "rel": "self",
              "href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
              "uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
              "type": "application/vnd.sas.file"
            },
            {
              "method": "GET",
              "rel": "alternate",
              "href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
              "uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
              "type": "application/vnd.sas.summary"
            },
            {
              "method": "PATCH",
              "rel": "patch",
              "href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
              "uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
              "type": "application/vnd.sas.file",
              "responseType": "application/vnd.sas.file"
            },
            {
              "method": "PUT",
              "rel": "update",
              "href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
              "uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
              "type": "application/vnd.sas.file",
              "responseType": "application/vnd.sas.file"
            },
            {
              "method": "DELETE",
              "rel": "delete",
              "href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
              "uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7"
            },
            {
              "method": "GET",
              "rel": "content",
              "href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7/content",
              "uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7/content",
              "type": "text/plain"
            },
            {
              "method": "PUT",
              "rel": "updateContent",
              "href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7/content",
              "uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7/content",
              "type": "*/*",
              "responseType": "application/vnd.sas.file"
            },
            {
              "method": "POST",
              "rel": "copyFile",
              "href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7/copy",
              "uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7/copy",
              "responseType": "application/vnd.sas.file"
            },
            {
              "method": "POST",
              "rel": "create",
              "href": "/files/files",
              "uri": "/files/files",
              "type": "*/*",
              "responseType": "application/vnd.sas.file"
            }
          ],
          "name": "2022-03-31T20:00:03Z-results.log",
          "size": 742,
          "searchable": false,
          "fileStatus": "unlocked",
          "fileVersion": 0,
          "expirationTimeStamp": "2022-04-07T20:00:03.651Z",
          "virusDetected": false,
          "urlDetected": false,
          "quarantine": false,
          "version": 4
        },
        {
          "creationTimeStamp": "2022-03-31T20:01:12.657Z",
          "modifiedTimeStamp": "2022-03-31T20:01:12.941Z",
          "createdBy": "sas.audit",
          "modifiedBy": "sas.audit",
          "id": "bed8ac75-2c21-4355-ab8a-0e595049c246",
          "parentUri": "/jobExecution/jobs/2c08ebfd-bd82-4970-8cf0-cc9858f5dc6e",
          "properties": {
            "LastState": "running",
            "JobRequest": "",
            "Job": "2c08ebfd-bd82-4970-8cf0-cc9858f5dc6e",
            "Provider": "casl"
          },
          "contentDisposition": "text/plain",
          "contentType": "text/plain",
          "description": "Log File for Job 2c08ebfd-bd82-4970-8cf0-cc9858f5dc6e",
          "documentType": "log",
          "encoding": "UTF-8",
          "links": [
            {
              "method": "GET",
              "rel": "self",
              "href": "/files/files/bed8ac75-2c21-4355-ab8a-0e595049c246",
              "uri": "/files/files/bed8ac75-2c21-4355-ab8a-0e595049c246",
              "type": "application/vnd.sas.file"
            },
            {
              "method": "GET",
              "rel": "alternate",
              "href": "/files/files/bed8ac75-2c21-4355-ab8a-0e595049c246",
              "uri": "/files/files/bed8ac75-2c21-4355-ab8a-0e595049c246",
              "type": "application/vnd.sas.summary"
            },
            {
              "method": "PATCH",
              "rel": "patch",
              "href": "/files/files/bed8ac75-2c21-4355-ab8a-0e595049c246",
              "uri": "/files/files/bed8ac75-2c21-4355-ab8a-0e595049c246",
              "type": "application/vnd.sas.file",
              "responseType": "application/vnd.sas.file"
            },
            {
              "method": "PUT",
              "rel": "update",
              "href": "/files/files/bed8ac75-2c21-4355-ab8a-0e595049c246",
              "uri": "/files/files/bed8ac75-2c21-4355-ab8a-0e595049c246",
              "type": "application/vnd.sas.file",
              "responseType": "application/vnd.sas.file"
            },
            {
              "method": "DELETE",
              "rel": "delete",
              "href": "/files/files/bed8ac75-2c21-4355-ab8a-0e595049c246",
              "uri": "/files/files/bed8ac75-2c21-4355-ab8a-0e595049c246"
            },
            {
              "method": "GET",
              "rel": "content",
              "href": "/files/files/bed8ac75-2c21-4355-ab8a-0e595049c246/content",
              "uri": "/files/files/bed8ac75-2c21-4355-ab8a-0e595049c246/content",
              "type": "text/plain"
            },
            {
              "method": "PUT",
              "rel": "updateContent",
              "href": "/files/files/bed8ac75-2c21-4355-ab8a-0e595049c246/content",
              "uri": "/files/files/bed8ac75-2c21-4355-ab8a-0e595049c246/content",
              "type": "*/*",
              "responseType": "application/vnd.sas.file"
            },
            {
              "method": "POST",
              "rel": "copyFile",
              "href": "/files/files/bed8ac75-2c21-4355-ab8a-0e595049c246/copy",
              "uri": "/files/files/bed8ac75-2c21-4355-ab8a-0e595049c246/copy",
              "responseType": "application/vnd.sas.file"
            },
            {
              "method": "POST",
              "rel": "create",
              "href": "/files/files",
              "uri": "/files/files",
              "type": "*/*",
              "responseType": "application/vnd.sas.file"
            }
          ],
          "name": "2022-03-31T20:01:12Z-results.log",
          "size": 742,
          "searchable": false,
          "fileStatus": "unlocked",
          "fileVersion": 0,
          "expirationTimeStamp": "2022-04-07T20:01:12.678Z",
          "virusDetected": false,
          "urlDetected": false,
          "quarantine": false,
          "version": 4
        }
      ],
      "limit": 2,
      "version": 2
    }
    

    Here is response when an invalid limit is specified in the GET request to fetch collection using representation application/vnd.sas.collection+json

    {
      "errorCode": 12016,
      "message": "The limit is not valid.",
      "details": [
        "traceId: 967013a71ad1bc6b",
        "path: /files/files"
      ],
      "remediation": "The limit must be between 0 and 10,000.",
      "links": [],
      "version": 2,
      "httpStatusCode": 400
    }
    
    {
      "errorCode": 12016,
      "message": "The limit is not valid.",
      "details": [
        "traceId: 967013a71ad1bc6b",
        "path: /files/files"
      ],
      "remediation": "The limit must be between 0 and 10,000.",
      "links": [],
      "version": 2,
      "httpStatusCode": 400
    }
    
    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 not valid. The limit parameter cannot be less than 0 or greater than 10000. error2
    Response Headers
    Status Header Type Format Description
    200 Content-Type string No description

    Delete file resources

    Code samples

    # You can also use wget
    curl -X DELETE https://example.com/files/files?parentUri=string
      -H 'Authorization: Bearer <access-token-goes-here>' \
    
    
    
    fetch('https://example.com/files/files?parentUri=string',
    {
      method: 'DELETE'
    
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    import requests
    
    r = requests.delete('https://example.com/files/files', params={
      'parentUri': 'string'
    })
    
    print(r.json())
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("DELETE", "https://example.com/files/files", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    

    DELETE /files

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

    Parameters
    Name 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://example.com/files/files#rawUpload \
      -H 'Authorization: Bearer <access-token-goes-here>' \
      -H 'Content-Type: */*' \
      -H 'Accept: application/vnd.sas.file+json' \
      -H 'Content-Type: string' \
      -H 'Content-Disposition: string'
    
    
    const inputBody = 'File content to be uploaded';
    const headers = {
      'Content-Type':'*/*',
      'Accept':'application/vnd.sas.file+json',
      'Content-Type':'string',
      'Content-Disposition':'string'
    };
    
    fetch('https://example.com/files/files#rawUpload',
    {
      method: 'POST',
      body: inputBody,
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    import requests
    headers = {
      'Content-Type': '*/*',
      'Accept': 'application/vnd.sas.file+json',
      'Content-Type': 'string',
      'Content-Disposition': 'string'
    }
    
    r = requests.post('https://example.com/files/files#rawUpload', headers = headers)
    
    print(r.json())
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Content-Type": []string{"*/*"},
            "Accept": []string{"application/vnd.sas.file+json"},
            "Content-Type": []string{"string"},
            "Content-Disposition": []string{"string"},
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("POST", "https://example.com/files/files#rawUpload", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    

    POST /files#rawUpload

    Creates a new file resource by passing file content in the request body.

    Body parameter

    Parameters
    Name In Type Required Description
    Content-Type header string false The actual MIME type of the file.
    Content-Disposition header string false The content disposition. It 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 a file expires. If this is not specified, the file never expires.
    parentFolderUri query string false The URI of the folder in which the file should be made a member.
    typeDefName query string false The type definition name of the file. If the file is associated with a folder and the client does not provide the value of this parameter, the file-service tries to find the best possible value using type-registry service. If it fails to find a default value, it defaults to "file".
    body body file false The contents of the file to be passed in raw format in the request body.

    Example responses

    Here is the response for file resource version 3

    {
      "creationTimeStamp": "2022-03-31T20:00:03.609Z",
      "modifiedTimeStamp": "2022-03-31T20:00:03.826Z",
      "createdBy": "sas.audit",
      "modifiedBy": "sas.audit",
      "id": "cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
      "parentUri": "/jobExecution/jobs/b9fe292d-2a4e-434c-8154-5f490b4b9257",
      "properties": {
        "LastState": "running",
        "JobRequest": "",
        "Job": "b9fe292d-2a4e-434c-8154-5f490b4b9257",
        "Provider": "casl"
      },
      "contentDisposition": "text/plain",
      "contentType": "text/plain",
      "description": "Log File for Job b9fe292d-2a4e-434c-8154-5f490b4b9257",
      "documentType": "log",
      "encoding": "UTF-8",
      "links": [
        {
          "method": "GET",
          "rel": "self",
          "href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
          "uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
          "type": "application/vnd.sas.file"
        },
        {
          "method": "GET",
          "rel": "alternate",
          "href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
          "uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
          "type": "application/vnd.sas.summary"
        },
        {
          "method": "PATCH",
          "rel": "patch",
          "href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
          "uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
          "type": "application/vnd.sas.file",
          "responseType": "application/vnd.sas.file"
        },
        {
          "method": "PUT",
          "rel": "update",
          "href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
          "uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
          "type": "application/vnd.sas.file",
          "responseType": "application/vnd.sas.file"
        },
        {
          "method": "DELETE",
          "rel": "delete",
          "href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
          "uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7"
        },
        {
          "method": "GET",
          "rel": "content",
          "href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7/content",
          "uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7/content",
          "type": "text/plain"
        },
        {
          "method": "PUT",
          "rel": "updateContent",
          "href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7/content",
          "uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7/content",
          "type": "*/*",
          "responseType": "application/vnd.sas.file"
        },
        {
          "method": "POST",
          "rel": "copyFile",
          "href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7/copy",
          "uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7/copy",
          "responseType": "application/vnd.sas.file"
        },
        {
          "method": "POST",
          "rel": "create",
          "href": "/files/files",
          "uri": "/files/files",
          "type": "*/*",
          "responseType": "application/vnd.sas.file"
        }
      ],
      "name": "2022-03-31T20:00:03Z-results.log",
      "size": 742,
      "searchable": false,
      "fileVersion": 0,
      "expirationTimeStamp": "2022-04-07T20:00:03.651Z",
      "version": 3
    }
    

    Here is the response for file resource version1

    Here is the response for file resource version 2

    Here is the response for file resource version 3

    {
      "creationTimeStamp": "2022-03-31T20:00:03.609Z",
      "modifiedTimeStamp": "2022-03-31T20:00:03.826Z",
      "createdBy": "sas.audit",
      "modifiedBy": "sas.audit",
      "id": "cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
      "parentUri": "/jobExecution/jobs/b9fe292d-2a4e-434c-8154-5f490b4b9257",
      "properties": {
        "LastState": "running",
        "JobRequest": "",
        "Job": "b9fe292d-2a4e-434c-8154-5f490b4b9257",
        "Provider": "casl"
      },
      "contentDisposition": "text/plain",
      "contentType": "text/plain",
      "description": "Log File for Job b9fe292d-2a4e-434c-8154-5f490b4b9257",
      "documentType": "log",
      "encoding": "UTF-8",
      "links": [
        {
          "method": "GET",
          "rel": "self",
          "href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
          "uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
          "type": "application/vnd.sas.file"
        },
        {
          "method": "GET",
          "rel": "alternate",
          "href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
          "uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
          "type": "application/vnd.sas.summary"
        },
        {
          "method": "PATCH",
          "rel": "patch",
          "href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
          "uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
          "type": "application/vnd.sas.file",
          "responseType": "application/vnd.sas.file"
        },
        {
          "method": "PUT",
          "rel": "update",
          "href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
          "uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
          "type": "application/vnd.sas.file",
          "responseType": "application/vnd.sas.file"
        },
        {
          "method": "DELETE",
          "rel": "delete",
          "href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
          "uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7"
        },
        {
          "method": "GET",
          "rel": "content",
          "href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7/content",
          "uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7/content",
          "type": "text/plain"
        },
        {
          "method": "PUT",
          "rel": "updateContent",
          "href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7/content",
          "uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7/content",
          "type": "*/*",
          "responseType": "application/vnd.sas.file"
        },
        {
          "method": "POST",
          "rel": "copyFile",
          "href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7/copy",
          "uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7/copy",
          "responseType": "application/vnd.sas.file"
        },
        {
          "method": "POST",
          "rel": "create",
          "href": "/files/files",
          "uri": "/files/files",
          "type": "*/*",
          "responseType": "application/vnd.sas.file"
        }
      ],
      "name": "2022-03-31T20:00:03Z-results.log",
      "size": 742,
      "searchable": false,
      "fileVersion": 0,
      "expirationTimeStamp": "2022-04-07T20:00:03.651Z",
      "version": 3
    }
    

    Here is error response when partcular file-type is not supported while uploading of the file.

    {
      "errorCode": 124007,
      "message": "The file \"Attributes.csv\" has a file type of \"application/x-msdownload\", which is blocked.",
      "details": [
        "traceId: 62365735e5c58599",
        "path: /files/files"
      ],
      "links": [],
      "version": 2,
      "httpStatusCode": 400
    }
    
    {
      "errorCode": 124007,
      "message": "The file \"Attributes.csv\" has a file type of \"application/x-msdownload\", which is blocked.",
      "details": [
        "traceId: 62365735e5c58599",
        "path: /files/files"
      ],
      "links": [],
      "version": 2,
      "httpStatusCode": 400
    }
    

    Here is conflict error response when file name conflict occurs in the upload folder

    {
      "errorCode": 0,
      "message": "File with name \"Attributes.csv\" already exists in folder \"a70b784d-2b80-4b6a-8be9-c2f47f8ab636\".",
      "details": [
        "traceId: 3da2bd0e90707f57",
        "path: /files/files"
      ],
      "links": [],
      "version": 2,
      "httpStatusCode": 409
    }
    
    {
      "errorCode": 0,
      "message": "File with name \"Attributes.csv\" already exists in folder \"a70b784d-2b80-4b6a-8be9-c2f47f8ab636\".",
      "details": [
        "traceId: 3da2bd0e90707f57",
        "path: /files/files"
      ],
      "links": [],
      "version": 2,
      "httpStatusCode": 409
    }
    
    Responses
    Status Meaning Description Schema
    201 Created The file resource was created and returned in the response body. fileResource
    400 Bad Request The request was not valid. A validation error occurred, and the file cannot be created. Check the response for more information. Here are common reasons for this issue: The file is empty, the file is larger than the permitted size, or the file type is not supported. 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 because the file already exists in that 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.

    Create a new file resource

    Code samples

    # You can also use wget
    curl -X POST https://example.com/files/files#multipartUpload \
      -H 'Authorization: Bearer <access-token-goes-here>' \
      -H 'Content-Type: multipart/form-data' \
      -H 'Accept: application/vnd.sas.file+json' \
      -H 'Content-Type: string' \
      -H 'Content-Disposition: string'
    
    
    const inputBody = '{
      "filename": "test_file.txt",
      "file": "file content to upload."
    }';
    const headers = {
      'Content-Type':'multipart/form-data',
      'Accept':'application/vnd.sas.file+json',
      'Content-Type':'string',
      'Content-Disposition':'string'
    };
    
    fetch('https://example.com/files/files#multipartUpload',
    {
      method: 'POST',
      body: inputBody,
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    import requests
    headers = {
      'Content-Type': 'multipart/form-data',
      'Accept': 'application/vnd.sas.file+json',
      'Content-Type': 'string',
      'Content-Disposition': 'string'
    }
    
    r = requests.post('https://example.com/files/files#multipartUpload', headers = headers)
    
    print(r.json())
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Content-Type": []string{"multipart/form-data"},
            "Accept": []string{"application/vnd.sas.file+json"},
            "Content-Type": []string{"string"},
            "Content-Disposition": []string{"string"},
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("POST", "https://example.com/files/files#multipartUpload", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    

    POST /files#multipartUpload

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

    Body parameter

    filename: test_file.txt
    file: file content to upload.
    
    
    Parameters
    Name 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 a file expires. If it is not specified, the file never expires.
    parentFolderUri query string false The URI of the folder in which to add the file.
    typeDefName query string false The type definition name of the file. If the file is associated with folder and the client does not provide the value of this parameter, the file-service tries to find the best possible value using type-registry service. If it fails to find a default value, it defaults to "file".
    body body object false none
    » 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 content. 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

    Here is the response for file resource version 3

    {
      "creationTimeStamp": "2022-03-31T20:00:03.609Z",
      "modifiedTimeStamp": "2022-03-31T20:00:03.826Z",
      "createdBy": "sas.audit",
      "modifiedBy": "sas.audit",
      "id": "cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
      "parentUri": "/jobExecution/jobs/b9fe292d-2a4e-434c-8154-5f490b4b9257",
      "properties": {
        "LastState": "running",
        "JobRequest": "",
        "Job": "b9fe292d-2a4e-434c-8154-5f490b4b9257",
        "Provider": "casl"
      },
      "contentDisposition": "text/plain",
      "contentType": "text/plain",
      "description": "Log File for Job b9fe292d-2a4e-434c-8154-5f490b4b9257",
      "documentType": "log",
      "encoding": "UTF-8",
      "links": [
        {
          "method": "GET",
          "rel": "self",
          "href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
          "uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
          "type": "application/vnd.sas.file"
        },
        {
          "method": "GET",
          "rel": "alternate",
          "href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
          "uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
          "type": "application/vnd.sas.summary"
        },
        {
          "method": "PATCH",
          "rel": "patch",
          "href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
          "uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
          "type": "application/vnd.sas.file",
          "responseType": "application/vnd.sas.file"
        },
        {
          "method": "PUT",
          "rel": "update",
          "href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
          "uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
          "type": "application/vnd.sas.file",
          "responseType": "application/vnd.sas.file"
        },
        {
          "method": "DELETE",
          "rel": "delete",
          "href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
          "uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7"
        },
        {
          "method": "GET",
          "rel": "content",
          "href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7/content",
          "uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7/content",
          "type": "text/plain"
        },
        {
          "method": "PUT",
          "rel": "updateContent",
          "href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7/content",
          "uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7/content",
          "type": "*/*",
          "responseType": "application/vnd.sas.file"
        },
        {
          "method": "POST",
          "rel": "copyFile",
          "href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7/copy",
          "uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7/copy",
          "responseType": "application/vnd.sas.file"
        },
        {
          "method": "POST",
          "rel": "create",
          "href": "/files/files",
          "uri": "/files/files",
          "type": "*/*",
          "responseType": "application/vnd.sas.file"
        }
      ],
      "name": "2022-03-31T20:00:03Z-results.log",
      "size": 742,
      "searchable": false,
      "fileVersion": 0,
      "expirationTimeStamp": "2022-04-07T20:00:03.651Z",
      "version": 3
    }
    

    Here is the response for file resource version1

    Here is the response for file resource version 2

    Here is the response for file resource version 3

    {
      "creationTimeStamp": "2022-03-31T20:00:03.609Z",
      "modifiedTimeStamp": "2022-03-31T20:00:03.826Z",
      "createdBy": "sas.audit",
      "modifiedBy": "sas.audit",
      "id": "cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
      "parentUri": "/jobExecution/jobs/b9fe292d-2a4e-434c-8154-5f490b4b9257",
      "properties": {
        "LastState": "running",
        "JobRequest": "",
        "Job": "b9fe292d-2a4e-434c-8154-5f490b4b9257",
        "Provider": "casl"
      },
      "contentDisposition": "text/plain",
      "contentType": "text/plain",
      "description": "Log File for Job b9fe292d-2a4e-434c-8154-5f490b4b9257",
      "documentType": "log",
      "encoding": "UTF-8",
      "links": [
        {
          "method": "GET",
          "rel": "self",
          "href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
          "uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
          "type": "application/vnd.sas.file"
        },
        {
          "method": "GET",
          "rel": "alternate",
          "href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
          "uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
          "type": "application/vnd.sas.summary"
        },
        {
          "method": "PATCH",
          "rel": "patch",
          "href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
          "uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
          "type": "application/vnd.sas.file",
          "responseType": "application/vnd.sas.file"
        },
        {
          "method": "PUT",
          "rel": "update",
          "href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
          "uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
          "type": "application/vnd.sas.file",
          "responseType": "application/vnd.sas.file"
        },
        {
          "method": "DELETE",
          "rel": "delete",
          "href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
          "uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7"
        },
        {
          "method": "GET",
          "rel": "content",
          "href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7/content",
          "uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7/content",
          "type": "text/plain"
        },
        {
          "method": "PUT",
          "rel": "updateContent",
          "href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7/content",
          "uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7/content",
          "type": "*/*",
          "responseType": "application/vnd.sas.file"
        },
        {
          "method": "POST",
          "rel": "copyFile",
          "href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7/copy",
          "uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7/copy",
          "responseType": "application/vnd.sas.file"
        },
        {
          "method": "POST",
          "rel": "create",
          "href": "/files/files",
          "uri": "/files/files",
          "type": "*/*",
          "responseType": "application/vnd.sas.file"
        }
      ],
      "name": "2022-03-31T20:00:03Z-results.log",
      "size": 742,
      "searchable": false,
      "fileVersion": 0,
      "expirationTimeStamp": "2022-04-07T20:00:03.651Z",
      "version": 3
    }
    

    Here is error response when partcular file-type is not supported while uploading of the file.

    {
      "errorCode": 124007,
      "message": "The file \"Attributes.csv\" has a file type of \"application/x-msdownload\", which is blocked.",
      "details": [
        "traceId: 62365735e5c58599",
        "path: /files/files"
      ],
      "links": [],
      "version": 2,
      "httpStatusCode": 400
    }
    
    {
      "errorCode": 124007,
      "message": "The file \"Attributes.csv\" has a file type of \"application/x-msdownload\", which is blocked.",
      "details": [
        "traceId: 62365735e5c58599",
        "path: /files/files"
      ],
      "links": [],
      "version": 2,
      "httpStatusCode": 400
    }
    

    Here is conflict error response when file name conflict occurs in the upload folder

    {
      "errorCode": 0,
      "message": "File with name \"Attributes.csv\" already exists in folder \"a70b784d-2b80-4b6a-8be9-c2f47f8ab636\".",
      "details": [
        "traceId: 3da2bd0e90707f57",
        "path: /files/files"
      ],
      "links": [],
      "version": 2,
      "httpStatusCode": 409
    }
    
    {
      "errorCode": 0,
      "message": "File with name \"Attributes.csv\" already exists in folder \"a70b784d-2b80-4b6a-8be9-c2f47f8ab636\".",
      "details": [
        "traceId: 3da2bd0e90707f57",
        "path: /files/files"
      ],
      "links": [],
      "version": 2,
      "httpStatusCode": 409
    }
    
    Responses
    Status Meaning Description Schema
    201 Created The file was created and returned in the response body. fileResource
    400 Bad Request The request was not valid. A validation error occurred, and the file cannot be created. Check the response for more information. Here are common reasons for this issue: 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 because the file already exists in that 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://example.com/files/files#fetchFilesForMultipleParentUri \
      -H 'Authorization: Bearer <access-token-goes-here>' \
      -H 'Content-Type: application/vnd.sas.selection+json' \
      -H 'Accept: application/vnd.sas.collection+json' \
      -H 'Accept-Item: string'
    
    
    const inputBody = '{
      "version": 0,
      "template": "https://example.com",
      "type": "id",
      "resources": [
        "string"
      ],
      "links": [
        {
          "method": "string",
          "rel": "string",
          "uri": "string",
          "href": "string",
          "title": "string",
          "type": "string",
          "itemType": "string",
          "responseType": "string",
          "responseItemType": "string"
        }
      ]
    }';
    const headers = {
      'Content-Type':'application/vnd.sas.selection+json',
      'Accept':'application/vnd.sas.collection+json',
      'Accept-Item':'string'
    };
    
    fetch('https://example.com/files/files#fetchFilesForMultipleParentUri',
    {
      method: 'POST',
      body: inputBody,
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    import requests
    headers = {
      'Content-Type': 'application/vnd.sas.selection+json',
      'Accept': 'application/vnd.sas.collection+json',
      'Accept-Item': 'string'
    }
    
    r = requests.post('https://example.com/files/files#fetchFilesForMultipleParentUri', headers = headers)
    
    print(r.json())
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Content-Type": []string{"application/vnd.sas.selection+json"},
            "Accept": []string{"application/vnd.sas.collection+json"},
            "Accept-Item": []string{"string"},
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("POST", "https://example.com/files/files#fetchFilesForMultipleParentUri", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    

    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": "https://example.com",
      "type": "id",
      "resources": [
        "string"
      ],
      "links": [
        {
          "method": "string",
          "rel": "string",
          "uri": "string",
          "href": "string",
          "title": "string",
          "type": "string",
          "itemType": "string",
          "responseType": "string",
          "responseItemType": "string"
        }
      ]
    }
    
    Parameters
    Name In Type Required Description
    Accept-Item header string false The file resource media type value. If this is not specified, the API returns the latest version.
    body body selection true Multiple parentUri values that are specified as an array of string values. The file resources that are associated with each parentUri are retrieved.

    Example responses

    Here is example of GET request to retrve the application/vnd.sas.collection+json representation representation of collection endpoint.

    {
      "links": [
        {
          "method": "GET",
          "rel": "self",
          "href": "/files/files?sortBy=name&start=0&limit=2",
          "uri": "/files/files?sortBy=name&start=0&limit=2",
          "type": "application/vnd.sas.collection"
        },
        {
          "method": "GET",
          "rel": "next",
          "href": "/files/files?sortBy=name&start=2&limit=2",
          "uri": "/files/files?sortBy=name&start=2&limit=2",
          "type": "application/vnd.sas.collection"
        },
        {
          "method": "GET",
          "rel": "last",
          "href": "/files/files?sortBy=name&start=544&limit=2",
          "uri": "/files/files?sortBy=name&start=544&limit=2",
          "type": "application/vnd.sas.collection"
        }
      ],
      "name": "files",
      "accept": "application/vnd.sas.file",
      "start": 0,
      "count": 546,
      "items": [
        {
          "creationTimeStamp": "2022-03-31T20:00:03.609Z",
          "modifiedTimeStamp": "2022-03-31T20:00:03.826Z",
          "createdBy": "sas.audit",
          "modifiedBy": "sas.audit",
          "id": "cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
          "parentUri": "/jobExecution/jobs/b9fe292d-2a4e-434c-8154-5f490b4b9257",
          "properties": {
            "LastState": "running",
            "JobRequest": "",
            "Job": "b9fe292d-2a4e-434c-8154-5f490b4b9257",
            "Provider": "casl"
          },
          "contentDisposition": "text/plain",
          "contentType": "text/plain",
          "description": "Log File for Job b9fe292d-2a4e-434c-8154-5f490b4b9257",
          "documentType": "log",
          "encoding": "UTF-8",
          "links": [
            {
              "method": "GET",
              "rel": "self",
              "href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
              "uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
              "type": "application/vnd.sas.file"
            },
            {
              "method": "GET",
              "rel": "alternate",
              "href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
              "uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
              "type": "application/vnd.sas.summary"
            },
            {
              "method": "PATCH",
              "rel": "patch",
              "href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
              "uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
              "type": "application/vnd.sas.file",
              "responseType": "application/vnd.sas.file"
            },
            {
              "method": "PUT",
              "rel": "update",
              "href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
              "uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
              "type": "application/vnd.sas.file",
              "responseType": "application/vnd.sas.file"
            },
            {
              "method": "DELETE",
              "rel": "delete",
              "href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
              "uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7"
            },
            {
              "method": "GET",
              "rel": "content",
              "href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7/content",
              "uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7/content",
              "type": "text/plain"
            },
            {
              "method": "PUT",
              "rel": "updateContent",
              "href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7/content",
              "uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7/content",
              "type": "*/*",
              "responseType": "application/vnd.sas.file"
            },
            {
              "method": "POST",
              "rel": "copyFile",
              "href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7/copy",
              "uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7/copy",
              "responseType": "application/vnd.sas.file"
            },
            {
              "method": "POST",
              "rel": "create",
              "href": "/files/files",
              "uri": "/files/files",
              "type": "*/*",
              "responseType": "application/vnd.sas.file"
            }
          ],
          "name": "2022-03-31T20:00:03Z-results.log",
          "size": 742,
          "searchable": false,
          "fileStatus": "unlocked",
          "fileVersion": 0,
          "expirationTimeStamp": "2022-04-07T20:00:03.651Z",
          "virusDetected": false,
          "urlDetected": false,
          "quarantine": false,
          "version": 4
        },
        {
          "creationTimeStamp": "2022-03-31T20:01:12.657Z",
          "modifiedTimeStamp": "2022-03-31T20:01:12.941Z",
          "createdBy": "sas.audit",
          "modifiedBy": "sas.audit",
          "id": "bed8ac75-2c21-4355-ab8a-0e595049c246",
          "parentUri": "/jobExecution/jobs/2c08ebfd-bd82-4970-8cf0-cc9858f5dc6e",
          "properties": {
            "LastState": "running",
            "JobRequest": "",
            "Job": "2c08ebfd-bd82-4970-8cf0-cc9858f5dc6e",
            "Provider": "casl"
          },
          "contentDisposition": "text/plain",
          "contentType": "text/plain",
          "description": "Log File for Job 2c08ebfd-bd82-4970-8cf0-cc9858f5dc6e",
          "documentType": "log",
          "encoding": "UTF-8",
          "links": [
            {
              "method": "GET",
              "rel": "self",
              "href": "/files/files/bed8ac75-2c21-4355-ab8a-0e595049c246",
              "uri": "/files/files/bed8ac75-2c21-4355-ab8a-0e595049c246",
              "type": "application/vnd.sas.file"
            },
            {
              "method": "GET",
              "rel": "alternate",
              "href": "/files/files/bed8ac75-2c21-4355-ab8a-0e595049c246",
              "uri": "/files/files/bed8ac75-2c21-4355-ab8a-0e595049c246",
              "type": "application/vnd.sas.summary"
            },
            {
              "method": "PATCH",
              "rel": "patch",
              "href": "/files/files/bed8ac75-2c21-4355-ab8a-0e595049c246",
              "uri": "/files/files/bed8ac75-2c21-4355-ab8a-0e595049c246",
              "type": "application/vnd.sas.file",
              "responseType": "application/vnd.sas.file"
            },
            {
              "method": "PUT",
              "rel": "update",
              "href": "/files/files/bed8ac75-2c21-4355-ab8a-0e595049c246",
              "uri": "/files/files/bed8ac75-2c21-4355-ab8a-0e595049c246",
              "type": "application/vnd.sas.file",
              "responseType": "application/vnd.sas.file"
            },
            {
              "method": "DELETE",
              "rel": "delete",
              "href": "/files/files/bed8ac75-2c21-4355-ab8a-0e595049c246",
              "uri": "/files/files/bed8ac75-2c21-4355-ab8a-0e595049c246"
            },
            {
              "method": "GET",
              "rel": "content",
              "href": "/files/files/bed8ac75-2c21-4355-ab8a-0e595049c246/content",
              "uri": "/files/files/bed8ac75-2c21-4355-ab8a-0e595049c246/content",
              "type": "text/plain"
            },
            {
              "method": "PUT",
              "rel": "updateContent",
              "href": "/files/files/bed8ac75-2c21-4355-ab8a-0e595049c246/content",
              "uri": "/files/files/bed8ac75-2c21-4355-ab8a-0e595049c246/content",
              "type": "*/*",
              "responseType": "application/vnd.sas.file"
            },
            {
              "method": "POST",
              "rel": "copyFile",
              "href": "/files/files/bed8ac75-2c21-4355-ab8a-0e595049c246/copy",
              "uri": "/files/files/bed8ac75-2c21-4355-ab8a-0e595049c246/copy",
              "responseType": "application/vnd.sas.file"
            },
            {
              "method": "POST",
              "rel": "create",
              "href": "/files/files",
              "uri": "/files/files",
              "type": "*/*",
              "responseType": "application/vnd.sas.file"
            }
          ],
          "name": "2022-03-31T20:01:12Z-results.log",
          "size": 742,
          "searchable": false,
          "fileStatus": "unlocked",
          "fileVersion": 0,
          "expirationTimeStamp": "2022-04-07T20:01:12.678Z",
          "virusDetected": false,
          "urlDetected": false,
          "quarantine": false,
          "version": 4
        }
      ],
      "limit": 2,
      "version": 2
    }
    
    {
      "links": [
        {
          "method": "GET",
          "rel": "self",
          "href": "/files/files?sortBy=name&start=0&limit=2",
          "uri": "/files/files?sortBy=name&start=0&limit=2",
          "type": "application/vnd.sas.collection"
        },
        {
          "method": "GET",
          "rel": "next",
          "href": "/files/files?sortBy=name&start=2&limit=2",
          "uri": "/files/files?sortBy=name&start=2&limit=2",
          "type": "application/vnd.sas.collection"
        },
        {
          "method": "GET",
          "rel": "last",
          "href": "/files/files?sortBy=name&start=544&limit=2",
          "uri": "/files/files?sortBy=name&start=544&limit=2",
          "type": "application/vnd.sas.collection"
        }
      ],
      "name": "files",
      "accept": "application/vnd.sas.file",
      "start": 0,
      "count": 546,
      "items": [
        {
          "creationTimeStamp": "2022-03-31T20:00:03.609Z",
          "modifiedTimeStamp": "2022-03-31T20:00:03.826Z",
          "createdBy": "sas.audit",
          "modifiedBy": "sas.audit",
          "id": "cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
          "parentUri": "/jobExecution/jobs/b9fe292d-2a4e-434c-8154-5f490b4b9257",
          "properties": {
            "LastState": "running",
            "JobRequest": "",
            "Job": "b9fe292d-2a4e-434c-8154-5f490b4b9257",
            "Provider": "casl"
          },
          "contentDisposition": "text/plain",
          "contentType": "text/plain",
          "description": "Log File for Job b9fe292d-2a4e-434c-8154-5f490b4b9257",
          "documentType": "log",
          "encoding": "UTF-8",
          "links": [
            {
              "method": "GET",
              "rel": "self",
              "href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
              "uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
              "type": "application/vnd.sas.file"
            },
            {
              "method": "GET",
              "rel": "alternate",
              "href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
              "uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
              "type": "application/vnd.sas.summary"
            },
            {
              "method": "PATCH",
              "rel": "patch",
              "href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
              "uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
              "type": "application/vnd.sas.file",
              "responseType": "application/vnd.sas.file"
            },
            {
              "method": "PUT",
              "rel": "update",
              "href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
              "uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
              "type": "application/vnd.sas.file",
              "responseType": "application/vnd.sas.file"
            },
            {
              "method": "DELETE",
              "rel": "delete",
              "href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
              "uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7"
            },
            {
              "method": "GET",
              "rel": "content",
              "href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7/content",
              "uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7/content",
              "type": "text/plain"
            },
            {
              "method": "PUT",
              "rel": "updateContent",
              "href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7/content",
              "uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7/content",
              "type": "*/*",
              "responseType": "application/vnd.sas.file"
            },
            {
              "method": "POST",
              "rel": "copyFile",
              "href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7/copy",
              "uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7/copy",
              "responseType": "application/vnd.sas.file"
            },
            {
              "method": "POST",
              "rel": "create",
              "href": "/files/files",
              "uri": "/files/files",
              "type": "*/*",
              "responseType": "application/vnd.sas.file"
            }
          ],
          "name": "2022-03-31T20:00:03Z-results.log",
          "size": 742,
          "searchable": false,
          "fileStatus": "unlocked",
          "fileVersion": 0,
          "expirationTimeStamp": "2022-04-07T20:00:03.651Z",
          "virusDetected": false,
          "urlDetected": false,
          "quarantine": false,
          "version": 4
        },
        {
          "creationTimeStamp": "2022-03-31T20:01:12.657Z",
          "modifiedTimeStamp": "2022-03-31T20:01:12.941Z",
          "createdBy": "sas.audit",
          "modifiedBy": "sas.audit",
          "id": "bed8ac75-2c21-4355-ab8a-0e595049c246",
          "parentUri": "/jobExecution/jobs/2c08ebfd-bd82-4970-8cf0-cc9858f5dc6e",
          "properties": {
            "LastState": "running",
            "JobRequest": "",
            "Job": "2c08ebfd-bd82-4970-8cf0-cc9858f5dc6e",
            "Provider": "casl"
          },
          "contentDisposition": "text/plain",
          "contentType": "text/plain",
          "description": "Log File for Job 2c08ebfd-bd82-4970-8cf0-cc9858f5dc6e",
          "documentType": "log",
          "encoding": "UTF-8",
          "links": [
            {
              "method": "GET",
              "rel": "self",
              "href": "/files/files/bed8ac75-2c21-4355-ab8a-0e595049c246",
              "uri": "/files/files/bed8ac75-2c21-4355-ab8a-0e595049c246",
              "type": "application/vnd.sas.file"
            },
            {
              "method": "GET",
              "rel": "alternate",
              "href": "/files/files/bed8ac75-2c21-4355-ab8a-0e595049c246",
              "uri": "/files/files/bed8ac75-2c21-4355-ab8a-0e595049c246",
              "type": "application/vnd.sas.summary"
            },
            {
              "method": "PATCH",
              "rel": "patch",
              "href": "/files/files/bed8ac75-2c21-4355-ab8a-0e595049c246",
              "uri": "/files/files/bed8ac75-2c21-4355-ab8a-0e595049c246",
              "type": "application/vnd.sas.file",
              "responseType": "application/vnd.sas.file"
            },
            {
              "method": "PUT",
              "rel": "update",
              "href": "/files/files/bed8ac75-2c21-4355-ab8a-0e595049c246",
              "uri": "/files/files/bed8ac75-2c21-4355-ab8a-0e595049c246",
              "type": "application/vnd.sas.file",
              "responseType": "application/vnd.sas.file"
            },
            {
              "method": "DELETE",
              "rel": "delete",
              "href": "/files/files/bed8ac75-2c21-4355-ab8a-0e595049c246",
              "uri": "/files/files/bed8ac75-2c21-4355-ab8a-0e595049c246"
            },
            {
              "method": "GET",
              "rel": "content",
              "href": "/files/files/bed8ac75-2c21-4355-ab8a-0e595049c246/content",
              "uri": "/files/files/bed8ac75-2c21-4355-ab8a-0e595049c246/content",
              "type": "text/plain"
            },
            {
              "method": "PUT",
              "rel": "updateContent",
              "href": "/files/files/bed8ac75-2c21-4355-ab8a-0e595049c246/content",
              "uri": "/files/files/bed8ac75-2c21-4355-ab8a-0e595049c246/content",
              "type": "*/*",
              "responseType": "application/vnd.sas.file"
            },
            {
              "method": "POST",
              "rel": "copyFile",
              "href": "/files/files/bed8ac75-2c21-4355-ab8a-0e595049c246/copy",
              "uri": "/files/files/bed8ac75-2c21-4355-ab8a-0e595049c246/copy",
              "responseType": "application/vnd.sas.file"
            },
            {
              "method": "POST",
              "rel": "create",
              "href": "/files/files",
              "uri": "/files/files",
              "type": "*/*",
              "responseType": "application/vnd.sas.file"
            }
          ],
          "name": "2022-03-31T20:01:12Z-results.log",
          "size": 742,
          "searchable": false,
          "fileStatus": "unlocked",
          "fileVersion": 0,
          "expirationTimeStamp": "2022-04-07T20:01:12.678Z",
          "virusDetected": false,
          "urlDetected": false,
          "quarantine": false,
          "version": 4
        }
      ],
      "limit": 2,
      "version": 2
    }
    

    Here is response when an invalid limit is specified in the GET request to fetch collection using representation application/vnd.sas.collection+json

    {
      "errorCode": 12016,
      "message": "The limit is not valid.",
      "details": [
        "traceId: 967013a71ad1bc6b",
        "path: /files/files"
      ],
      "remediation": "The limit must be between 0 and 10,000.",
      "links": [],
      "version": 2,
      "httpStatusCode": 400
    }
    
    {
      "errorCode": 12016,
      "message": "The limit is not valid.",
      "details": [
        "traceId: 967013a71ad1bc6b",
        "path: /files/files"
      ],
      "remediation": "The limit must be between 0 and 10,000.",
      "links": [],
      "version": 2,
      "httpStatusCode": 400
    }
    
    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 not valid. A validation error occurred, and the file cannot be created. Check the response for more information. Here are common reasons for this issue: 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://example.com/files/files/{fileId} \
      -H 'Authorization: Bearer <access-token-goes-here>' \
      -H 'Accept: application/vnd.sas.error+json'
    
    
    
    const headers = {
      'Accept':'application/vnd.sas.error+json'
    };
    
    fetch('https://example.com/files/files/{fileId}',
    {
      method: 'HEAD',
    
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    import requests
    headers = {
      'Accept': 'application/vnd.sas.error+json'
    }
    
    r = requests.head('https://example.com/files/files/{fileId}', headers = headers)
    
    print(r.json())
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Accept": []string{"application/vnd.sas.error+json"},
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("HEAD", "https://example.com/files/files/{fileId}", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    

    HEAD /files/{fileId}

    Determines whether a file resource exists for the specified fileId.

    Parameters
    Name In Type Required Description
    fileId path string true The identifier of the file resource.

    Example responses

    error response when specifed file is not present in the system.

    {
      "errorCode": 0,
      "message": "The file could not be found.",
      "details": [
        "traceId: f3b531793fdb7e81",
        "path: /files/files/123"
      ],
      "links": [],
      "version": 2,
      "httpStatusCode": 404
    }
    
    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. 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.

    Get a file resource

    Code samples

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

    GET /files/{fileId}

    Retrieves a file resource by specifying a fileId.

    Parameters
    Name In Type Required Description
    fileId path string true The identifier of the file resource.

    Example responses

    Here is the response for file resource version 3

    {
      "creationTimeStamp": "2022-03-31T20:00:03.609Z",
      "modifiedTimeStamp": "2022-03-31T20:00:03.826Z",
      "createdBy": "sas.audit",
      "modifiedBy": "sas.audit",
      "id": "cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
      "parentUri": "/jobExecution/jobs/b9fe292d-2a4e-434c-8154-5f490b4b9257",
      "properties": {
        "LastState": "running",
        "JobRequest": "",
        "Job": "b9fe292d-2a4e-434c-8154-5f490b4b9257",
        "Provider": "casl"
      },
      "contentDisposition": "text/plain",
      "contentType": "text/plain",
      "description": "Log File for Job b9fe292d-2a4e-434c-8154-5f490b4b9257",
      "documentType": "log",
      "encoding": "UTF-8",
      "links": [
        {
          "method": "GET",
          "rel": "self",
          "href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
          "uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
          "type": "application/vnd.sas.file"
        },
        {
          "method": "GET",
          "rel": "alternate",
          "href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
          "uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
          "type": "application/vnd.sas.summary"
        },
        {
          "method": "PATCH",
          "rel": "patch",
          "href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
          "uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
          "type": "application/vnd.sas.file",
          "responseType": "application/vnd.sas.file"
        },
        {
          "method": "PUT",
          "rel": "update",
          "href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
          "uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
          "type": "application/vnd.sas.file",
          "responseType": "application/vnd.sas.file"
        },
        {
          "method": "DELETE",
          "rel": "delete",
          "href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
          "uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7"
        },
        {
          "method": "GET",
          "rel": "content",
          "href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7/content",
          "uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7/content",
          "type": "text/plain"
        },
        {
          "method": "PUT",
          "rel": "updateContent",
          "href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7/content",
          "uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7/content",
          "type": "*/*",
          "responseType": "application/vnd.sas.file"
        },
        {
          "method": "POST",
          "rel": "copyFile",
          "href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7/copy",
          "uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7/copy",
          "responseType": "application/vnd.sas.file"
        },
        {
          "method": "POST",
          "rel": "create",
          "href": "/files/files",
          "uri": "/files/files",
          "type": "*/*",
          "responseType": "application/vnd.sas.file"
        }
      ],
      "name": "2022-03-31T20:00:03Z-results.log",
      "size": 742,
      "searchable": false,
      "fileVersion": 0,
      "expirationTimeStamp": "2022-04-07T20:00:03.651Z",
      "version": 3
    }
    

    Here is the response for file resource version1

    Here is the response for file resource version 2

    Here is the response for file resource version 3

    {
      "creationTimeStamp": "2022-03-31T20:00:03.609Z",
      "modifiedTimeStamp": "2022-03-31T20:00:03.826Z",
      "createdBy": "sas.audit",
      "modifiedBy": "sas.audit",
      "id": "cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
      "parentUri": "/jobExecution/jobs/b9fe292d-2a4e-434c-8154-5f490b4b9257",
      "properties": {
        "LastState": "running",
        "JobRequest": "",
        "Job": "b9fe292d-2a4e-434c-8154-5f490b4b9257",
        "Provider": "casl"
      },
      "contentDisposition": "text/plain",
      "contentType": "text/plain",
      "description": "Log File for Job b9fe292d-2a4e-434c-8154-5f490b4b9257",
      "documentType": "log",
      "encoding": "UTF-8",
      "links": [
        {
          "method": "GET",
          "rel": "self",
          "href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
          "uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
          "type": "application/vnd.sas.file"
        },
        {
          "method": "GET",
          "rel": "alternate",
          "href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
          "uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
          "type": "application/vnd.sas.summary"
        },
        {
          "method": "PATCH",
          "rel": "patch",
          "href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
          "uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
          "type": "application/vnd.sas.file",
          "responseType": "application/vnd.sas.file"
        },
        {
          "method": "PUT",
          "rel": "update",
          "href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
          "uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
          "type": "application/vnd.sas.file",
          "responseType": "application/vnd.sas.file"
        },
        {
          "method": "DELETE",
          "rel": "delete",
          "href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
          "uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7"
        },
        {
          "method": "GET",
          "rel": "content",
          "href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7/content",
          "uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7/content",
          "type": "text/plain"
        },
        {
          "method": "PUT",
          "rel": "updateContent",
          "href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7/content",
          "uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7/content",
          "type": "*/*",
          "responseType": "application/vnd.sas.file"
        },
        {
          "method": "POST",
          "rel": "copyFile",
          "href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7/copy",
          "uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7/copy",
          "responseType": "application/vnd.sas.file"
        },
        {
          "method": "POST",
          "rel": "create",
          "href": "/files/files",
          "uri": "/files/files",
          "type": "*/*",
          "responseType": "application/vnd.sas.file"
        }
      ],
      "name": "2022-03-31T20:00:03Z-results.log",
      "size": 742,
      "searchable": false,
      "fileVersion": 0,
      "expirationTimeStamp": "2022-04-07T20:00:03.651Z",
      "version": 3
    }
    

    error response when specifed file is not present in the system.

    {
      "errorCode": 0,
      "message": "The file could not be found.",
      "details": [
        "traceId: f3b531793fdb7e81",
        "path: /files/files/123"
      ],
      "links": [],
      "version": 2,
      "httpStatusCode": 404
    }
    
    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. 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.
    404 Content-Type string No description

    Update a file resource

    Code samples

    # You can also use wget
    curl -X PATCH https://example.com/files/files/{fileId} \
      -H 'Authorization: Bearer <access-token-goes-here>' \
      -H 'Content-Type: application/vnd.sas.file+json' \
      -H 'Accept: application/vnd.sas.file+json' \
      -H 'If-Match: string' \
      -H 'If-Unmodified-Since: string'
    
    
    const inputBody = '{
      "creationTimeStamp": "2022-03-31T20:00:03.609Z",
      "modifiedTimeStamp": "2022-03-31T20:00:03.826Z",
      "createdBy": "sas.audit",
      "modifiedBy": "sas.audit",
      "id": "cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
      "parentUri": "/jobExecution/jobs/b9fe292d-2a4e-434c-8154-5f490b4b9257",
      "properties": {
        "LastState": "running",
        "JobRequest": "",
        "Job": "b9fe292d-2a4e-434c-8154-5f490b4b9257",
        "Provider": "casl"
      },
      "contentDisposition": "text/plain",
      "contentType": "text/plain",
      "description": "Log File for Job b9fe292d-2a4e-434c-8154-5f490b4b9257",
      "documentType": "log",
      "encoding": "UTF-8",
      "links": [
        {
          "method": "GET",
          "rel": "self",
          "href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
          "uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
          "type": "application/vnd.sas.file"
        },
        {
          "method": "GET",
          "rel": "alternate",
          "href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
          "uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
          "type": "application/vnd.sas.summary"
        },
        {
          "method": "PATCH",
          "rel": "patch",
          "href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
          "uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
          "type": "application/vnd.sas.file",
          "responseType": "application/vnd.sas.file"
        },
        {
          "method": "PUT",
          "rel": "update",
          "href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
          "uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
          "type": "application/vnd.sas.file",
          "responseType": "application/vnd.sas.file"
        },
        {
          "method": "DELETE",
          "rel": "delete",
          "href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
          "uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7"
        },
        {
          "method": "GET",
          "rel": "content",
          "href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7/content",
          "uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7/content",
          "type": "text/plain"
        },
        {
          "method": "PUT",
          "rel": "updateContent",
          "href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7/content",
          "uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7/content",
          "type": "*/*",
          "responseType": "application/vnd.sas.file"
        },
        {
          "method": "POST",
          "rel": "copyFile",
          "href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7/copy",
          "uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7/copy",
          "responseType": "application/vnd.sas.file"
        },
        {
          "method": "POST",
          "rel": "create",
          "href": "/files/files",
          "uri": "/files/files",
          "type": "*/*",
          "responseType": "application/vnd.sas.file"
        }
      ],
      "name": "2022-03-31T20:00:03Z-results.log",
      "size": 742,
      "searchable": false,
      "fileVersion": 0,
      "expirationTimeStamp": "2022-04-07T20:00:03.651Z",
      "version": 3
    }';
    const headers = {
      'Content-Type':'application/vnd.sas.file+json',
      'Accept':'application/vnd.sas.file+json',
      'If-Match':'string',
      'If-Unmodified-Since':'string'
    };
    
    fetch('https://example.com/files/files/{fileId}',
    {
      method: 'PATCH',
      body: inputBody,
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    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://example.com/files/files/{fileId}', headers = headers)
    
    print(r.json())
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Content-Type": []string{"application/vnd.sas.file+json"},
            "Accept": []string{"application/vnd.sas.file+json"},
            "If-Match": []string{"string"},
            "If-Unmodified-Since": []string{"string"},
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("PATCH", "https://example.com/files/files/{fileId}", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    

    PATCH /files/{fileId}

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

    Body parameter

    Here is the response for file resource version 3

    {
      "creationTimeStamp": "2022-03-31T20:00:03.609Z",
      "modifiedTimeStamp": "2022-03-31T20:00:03.826Z",
      "createdBy": "sas.audit",
      "modifiedBy": "sas.audit",
      "id": "cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
      "parentUri": "/jobExecution/jobs/b9fe292d-2a4e-434c-8154-5f490b4b9257",
      "properties": {
        "LastState": "running",
        "JobRequest": "",
        "Job": "b9fe292d-2a4e-434c-8154-5f490b4b9257",
        "Provider": "casl"
      },
      "contentDisposition": "text/plain",
      "contentType": "text/plain",
      "description": "Log File for Job b9fe292d-2a4e-434c-8154-5f490b4b9257",
      "documentType": "log",
      "encoding": "UTF-8",
      "links": [
        {
          "method": "GET",
          "rel": "self",
          "href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
          "uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
          "type": "application/vnd.sas.file"
        },
        {
          "method": "GET",
          "rel": "alternate",
          "href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
          "uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
          "type": "application/vnd.sas.summary"
        },
        {
          "method": "PATCH",
          "rel": "patch",
          "href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
          "uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
          "type": "application/vnd.sas.file",
          "responseType": "application/vnd.sas.file"
        },
        {
          "method": "PUT",
          "rel": "update",
          "href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
          "uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
          "type": "application/vnd.sas.file",
          "responseType": "application/vnd.sas.file"
        },
        {
          "method": "DELETE",
          "rel": "delete",
          "href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
          "uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7"
        },
        {
          "method": "GET",
          "rel": "content",
          "href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7/content",
          "uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7/content",
          "type": "text/plain"
        },
        {
          "method": "PUT",
          "rel": "updateContent",
          "href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7/content",
          "uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7/content",
          "type": "*/*",
          "responseType": "application/vnd.sas.file"
        },
        {
          "method": "POST",
          "rel": "copyFile",
          "href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7/copy",
          "uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7/copy",
          "responseType": "application/vnd.sas.file"
        },
        {
          "method": "POST",
          "rel": "create",
          "href": "/files/files",
          "uri": "/files/files",
          "type": "*/*",
          "responseType": "application/vnd.sas.file"
        }
      ],
      "name": "2022-03-31T20:00:03Z-results.log",
      "size": 742,
      "searchable": false,
      "fileVersion": 0,
      "expirationTimeStamp": "2022-04-07T20:00:03.651Z",
      "version": 3
    }
    
    Parameters
    Name In Type Required Description
    If-Match header string false The entity tag that was obtained from the most recent ETag response header.
    If-Unmodified-Since header string false The timestamp that was obtained from the most recent Last-Modified response header. This is ignored when If-Match is specified.
    fileId path string true The identifier of the file resource to update.
    body body fileToPatch true The file resource to update.

    Example responses

    Here is the response for file resource version 3

    {
      "creationTimeStamp": "2022-03-31T20:00:03.609Z",
      "modifiedTimeStamp": "2022-03-31T20:00:03.826Z",
      "createdBy": "sas.audit",
      "modifiedBy": "sas.audit",
      "id": "cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
      "parentUri": "/jobExecution/jobs/b9fe292d-2a4e-434c-8154-5f490b4b9257",
      "properties": {
        "LastState": "running",
        "JobRequest": "",
        "Job": "b9fe292d-2a4e-434c-8154-5f490b4b9257",
        "Provider": "casl"
      },
      "contentDisposition": "text/plain",
      "contentType": "text/plain",
      "description": "Log File for Job b9fe292d-2a4e-434c-8154-5f490b4b9257",
      "documentType": "log",
      "encoding": "UTF-8",
      "links": [
        {
          "method": "GET",
          "rel": "self",
          "href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
          "uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
          "type": "application/vnd.sas.file"
        },
        {
          "method": "GET",
          "rel": "alternate",
          "href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
          "uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
          "type": "application/vnd.sas.summary"
        },
        {
          "method": "PATCH",
          "rel": "patch",
          "href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
          "uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
          "type": "application/vnd.sas.file",
          "responseType": "application/vnd.sas.file"
        },
        {
          "method": "PUT",
          "rel": "update",
          "href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
          "uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
          "type": "application/vnd.sas.file",
          "responseType": "application/vnd.sas.file"
        },
        {
          "method": "DELETE",
          "rel": "delete",
          "href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
          "uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7"
        },
        {
          "method": "GET",
          "rel": "content",
          "href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7/content",
          "uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7/content",
          "type": "text/plain"
        },
        {
          "method": "PUT",
          "rel": "updateContent",
          "href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7/content",
          "uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7/content",
          "type": "*/*",
          "responseType": "application/vnd.sas.file"
        },
        {
          "method": "POST",
          "rel": "copyFile",
          "href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7/copy",
          "uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7/copy",
          "responseType": "application/vnd.sas.file"
        },
        {
          "method": "POST",
          "rel": "create",
          "href": "/files/files",
          "uri": "/files/files",
          "type": "*/*",
          "responseType": "application/vnd.sas.file"
        }
      ],
      "name": "2022-03-31T20:00:03Z-results.log",
      "size": 742,
      "searchable": false,
      "fileVersion": 0,
      "expirationTimeStamp": "2022-04-07T20:00:03.651Z",
      "version": 3
    }
    

    Here is the response for file resource version1

    Here is the response for file resource version 2

    Here is the response for file resource version 3

    {
      "creationTimeStamp": "2022-03-31T20:00:03.609Z",
      "modifiedTimeStamp": "2022-03-31T20:00:03.826Z",
      "createdBy": "sas.audit",
      "modifiedBy": "sas.audit",
      "id": "cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
      "parentUri": "/jobExecution/jobs/b9fe292d-2a4e-434c-8154-5f490b4b9257",
      "properties": {
        "LastState": "running",
        "JobRequest": "",
        "Job": "b9fe292d-2a4e-434c-8154-5f490b4b9257",
        "Provider": "casl"
      },
      "contentDisposition": "text/plain",
      "contentType": "text/plain",
      "description": "Log File for Job b9fe292d-2a4e-434c-8154-5f490b4b9257",
      "documentType": "log",
      "encoding": "UTF-8",
      "links": [
        {
          "method": "GET",
          "rel": "self",
          "href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
          "uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
          "type": "application/vnd.sas.file"
        },
        {
          "method": "GET",
          "rel": "alternate",
          "href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
          "uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
          "type": "application/vnd.sas.summary"
        },
        {
          "method": "PATCH",
          "rel": "patch",
          "href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
          "uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
          "type": "application/vnd.sas.file",
          "responseType": "application/vnd.sas.file"
        },
        {
          "method": "PUT",
          "rel": "update",
          "href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
          "uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
          "type": "application/vnd.sas.file",
          "responseType": "application/vnd.sas.file"
        },
        {
          "method": "DELETE",
          "rel": "delete",
          "href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
          "uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7"
        },
        {
          "method": "GET",
          "rel": "content",
          "href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7/content",
          "uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7/content",
          "type": "text/plain"
        },
        {
          "method": "PUT",
          "rel": "updateContent",
          "href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7/content",
          "uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7/content",
          "type": "*/*",
          "responseType": "application/vnd.sas.file"
        },
        {
          "method": "POST",
          "rel": "copyFile",
          "href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7/copy",
          "uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7/copy",
          "responseType": "application/vnd.sas.file"
        },
        {
          "method": "POST",
          "rel": "create",
          "href": "/files/files",
          "uri": "/files/files",
          "type": "*/*",
          "responseType": "application/vnd.sas.file"
        }
      ],
      "name": "2022-03-31T20:00:03Z-results.log",
      "size": 742,
      "searchable": false,
      "fileVersion": 0,
      "expirationTimeStamp": "2022-04-07T20:00:03.651Z",
      "version": 3
    }
    

    error reponse when file name is not given while updating

    {
      "errorCode": 124018,
      "message": "You must specify a filename.",
      "details": [
        "traceId: 3f7de1e7093407c4",
        "path: /files/files/335f6597-96f8-4851-a76a-9672af8c6c62"
      ],
      "links": [],
      "version": 2,
      "httpStatusCode": 400
    }
    
    {
      "errorCode": 124018,
      "message": "You must specify a filename.",
      "details": [
        "traceId: 3f7de1e7093407c4",
        "path: /files/files/335f6597-96f8-4851-a76a-9672af8c6c62"
      ],
      "links": [],
      "version": 2,
      "httpStatusCode": 400
    }
    

    error response when specifed file is not present in the system.

    {
      "errorCode": 0,
      "message": "The file could not be found.",
      "details": [
        "traceId: f3b531793fdb7e81",
        "path: /files/files/123"
      ],
      "links": [],
      "version": 2,
      "httpStatusCode": 404
    }
    

    error response indicating that file is already modifed by someone else

    {
      "errorCode": 0,
      "message": "The file has been updated since you last retrieved it.",
      "details": [
        "traceId: 6bad5bb8a57678ee",
        "path: /files/files/335f6597-96f8-4851-a76a-9672af8c6c62"
      ],
      "links": [],
      "version": 2,
      "httpStatusCode": 412
    }
    
    {
      "errorCode": 0,
      "message": "The file has been updated since you last retrieved it.",
      "details": [
        "traceId: 6bad5bb8a57678ee",
        "path: /files/files/335f6597-96f8-4851-a76a-9672af8c6c62"
      ],
      "links": [],
      "version": 2,
      "httpStatusCode": 412
    }
    

    error response when If-match or If-Unmodified-since is nto specified.

    {
      "errorCode": 42801,
      "message": "You must include at least one of the following headers: \"if-unmodified-since\", \"if-match\".",
      "details": [
        "traceId: 1bb27cfcc5711dda",
        "path: /files/files/335f6597-96f8-4851-a76a-9672af8c6c62"
      ],
      "links": [],
      "version": 2,
      "httpStatusCode": 428
    }
    
    {
      "errorCode": 42801,
      "message": "You must include at least one of the following headers: \"if-unmodified-since\", \"if-match\".",
      "details": [
        "traceId: 1bb27cfcc5711dda",
        "path: /files/files/335f6597-96f8-4851-a76a-9672af8c6c62"
      ],
      "links": [],
      "version": 2,
      "httpStatusCode": 428
    }
    
    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 not valid. A validation error occurred. Check the string that was 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. error2
    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 trying the request again. error2
    428 Precondition Required The request headers did not include a If-Match or If-Unmodified-Since precondition. Specify the appropriate values for the If-Unmodified-Since and If-Match request headers before trying the request again. 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 a file resource

    Code samples

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

    DELETE /files/{fileId}

    Deletes the file resource.

    Parameters
    Name In Type Required Description
    fileId path string true The identifier of the file resource to delete.

    Example responses

    error response when specifed file is not present in the system.

    {
      "errorCode": 0,
      "message": "The file could not be found.",
      "details": [
        "traceId: f3b531793fdb7e81",
        "path: /files/files/123"
      ],
      "links": [],
      "version": 2,
      "httpStatusCode": 404
    }
    
    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. error2

    Get file resource content

    Code samples

    # You can also use wget
    curl -X GET https://example.com/files/files/{fileId}/content \
      -H 'Authorization: Bearer <access-token-goes-here>' \
      -H 'If-Range: string' \
      -H 'Range: string'
    
    
    
    const headers = {
      'If-Range':'string',
      'Range':'string'
    };
    
    fetch('https://example.com/files/files/{fileId}/content',
    {
      method: 'GET',
    
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    import requests
    headers = {
      'If-Range': 'string',
      'Range': 'string'
    }
    
    r = requests.get('https://example.com/files/files/{fileId}/content', headers = headers)
    
    print(r.json())
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "If-Range": []string{"string"},
            "Range": []string{"string"},
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("GET", "https://example.com/files/files/{fileId}/content", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    

    GET /files/{fileId}/content

    Retrieves the content of the file resource.

    Parameters
    Name In Type Required Description
    fileId path string true The identifier of the file resource for which to fetch content.
    changeContentDisposition query boolean false Specifies whether to use the persisted content-disposition value. If this is specified to true and the word "attachment" appears in the content-disposition, 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 entire file is returned. Otherwise, only 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 was found for the specified identifier. None
    416 Range Not Satisfiable An invalid or non-overlapping range was specified in the Range request header. None
    Response Headers
    Status Header Type Format Description
    200 Content-Type string No description
    206 Content-Type string No description

    Update file resource content

    Code samples

    # You can also use wget
    curl -X PUT https://example.com/files/files/{fileId}/content \
      -H 'Authorization: Bearer <access-token-goes-here>' \
      -H 'Content-Type: multipart/form-data' \
      -H 'Accept: application/vnd.sas.file+json' \
      -H 'If-Match: string' \
      -H 'If-Unmodified-Since: string' \
      -H 'Content-Type: string' \
      -H 'Content-Disposition: string'
    
    
    const inputBody = '{
      "filename": "test_file.txt",
      "file": "File content to upload"
    }';
    const 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'
    };
    
    fetch('https://example.com/files/files/{fileId}/content',
    {
      method: 'PUT',
      body: inputBody,
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    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://example.com/files/files/{fileId}/content', headers = headers)
    
    print(r.json())
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Content-Type": []string{"multipart/form-data"},
            "Accept": []string{"application/vnd.sas.file+json"},
            "If-Match": []string{"string"},
            "If-Unmodified-Since": []string{"string"},
            "Content-Type": []string{"string"},
            "Content-Disposition": []string{"string"},
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("PUT", "https://example.com/files/files/{fileId}/content", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    

    PUT /files/{fileId}/content

    Updates the content of the file resource.

    Body parameter

    filename: test_file.txt
    file: File content to upload
    
    
    Parameters
    Name In Type Required Description
    fileId path string true The identifier of the file resource for which to fetch content.
    If-Match header string false The entity tag that was obtained from the most recent ETag response header.
    If-Unmodified-Since header string false The timestamp that was 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 this as "multipart/form-data" if you are 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 none
    » file body string(binary) true The file data. If you are using a raw data upload request, the request body should contain only the file data (the actual file content). If you are using a multipart request, the request body should be in multipart or form-data format, where the file data is listed as file in the form data. Only one file is permitted in a multipart request.

    Example responses

    Here is the response for file resource version 3

    {
      "creationTimeStamp": "2022-03-31T20:00:03.609Z",
      "modifiedTimeStamp": "2022-03-31T20:00:03.826Z",
      "createdBy": "sas.audit",
      "modifiedBy": "sas.audit",
      "id": "cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
      "parentUri": "/jobExecution/jobs/b9fe292d-2a4e-434c-8154-5f490b4b9257",
      "properties": {
        "LastState": "running",
        "JobRequest": "",
        "Job": "b9fe292d-2a4e-434c-8154-5f490b4b9257",
        "Provider": "casl"
      },
      "contentDisposition": "text/plain",
      "contentType": "text/plain",
      "description": "Log File for Job b9fe292d-2a4e-434c-8154-5f490b4b9257",
      "documentType": "log",
      "encoding": "UTF-8",
      "links": [
        {
          "method": "GET",
          "rel": "self",
          "href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
          "uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
          "type": "application/vnd.sas.file"
        },
        {
          "method": "GET",
          "rel": "alternate",
          "href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
          "uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
          "type": "application/vnd.sas.summary"
        },
        {
          "method": "PATCH",
          "rel": "patch",
          "href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
          "uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
          "type": "application/vnd.sas.file",
          "responseType": "application/vnd.sas.file"
        },
        {
          "method": "PUT",
          "rel": "update",
          "href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
          "uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
          "type": "application/vnd.sas.file",
          "responseType": "application/vnd.sas.file"
        },
        {
          "method": "DELETE",
          "rel": "delete",
          "href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
          "uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7"
        },
        {
          "method": "GET",
          "rel": "content",
          "href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7/content",
          "uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7/content",
          "type": "text/plain"
        },
        {
          "method": "PUT",
          "rel": "updateContent",
          "href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7/content",
          "uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7/content",
          "type": "*/*",
          "responseType": "application/vnd.sas.file"
        },
        {
          "method": "POST",
          "rel": "copyFile",
          "href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7/copy",
          "uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7/copy",
          "responseType": "application/vnd.sas.file"
        },
        {
          "method": "POST",
          "rel": "create",
          "href": "/files/files",
          "uri": "/files/files",
          "type": "*/*",
          "responseType": "application/vnd.sas.file"
        }
      ],
      "name": "2022-03-31T20:00:03Z-results.log",
      "size": 742,
      "searchable": false,
      "fileVersion": 0,
      "expirationTimeStamp": "2022-04-07T20:00:03.651Z",
      "version": 3
    }
    
    {
      "creationTimeStamp": "2022-03-31T20:00:03.609Z",
      "modifiedTimeStamp": "2022-03-31T20:00:03.826Z",
      "createdBy": "sas.audit",
      "modifiedBy": "sas.audit",
      "id": "cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
      "parentUri": "/jobExecution/jobs/b9fe292d-2a4e-434c-8154-5f490b4b9257",
      "properties": {
        "LastState": "running",
        "JobRequest": "",
        "Job": "b9fe292d-2a4e-434c-8154-5f490b4b9257",
        "Provider": "casl"
      },
      "contentDisposition": "text/plain",
      "contentType": "text/plain",
      "description": "Log File for Job b9fe292d-2a4e-434c-8154-5f490b4b9257",
      "documentType": "log",
      "encoding": "UTF-8",
      "links": [
        {
          "method": "GET",
          "rel": "self",
          "href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
          "uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
          "type": "application/vnd.sas.file"
        },
        {
          "method": "GET",
          "rel": "alternate",
          "href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
          "uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
          "type": "application/vnd.sas.summary"
        },
        {
          "method": "PATCH",
          "rel": "patch",
          "href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
          "uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
          "type": "application/vnd.sas.file",
          "responseType": "application/vnd.sas.file"
        },
        {
          "method": "PUT",
          "rel": "update",
          "href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
          "uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
          "type": "application/vnd.sas.file",
          "responseType": "application/vnd.sas.file"
        },
        {
          "method": "DELETE",
          "rel": "delete",
          "href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
          "uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7"
        },
        {
          "method": "GET",
          "rel": "content",
          "href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7/content",
          "uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7/content",
          "type": "text/plain"
        },
        {
          "method": "PUT",
          "rel": "updateContent",
          "href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7/content",
          "uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7/content",
          "type": "*/*",
          "responseType": "application/vnd.sas.file"
        },
        {
          "method": "POST",
          "rel": "copyFile",
          "href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7/copy",
          "uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7/copy",
          "responseType": "application/vnd.sas.file"
        },
        {
          "method": "POST",
          "rel": "create",
          "href": "/files/files",
          "uri": "/files/files",
          "type": "*/*",
          "responseType": "application/vnd.sas.file"
        }
      ],
      "name": "2022-03-31T20:00:03Z-results.log",
      "size": 742,
      "searchable": false,
      "fileVersion": 0,
      "expirationTimeStamp": "2022-04-07T20:00:03.651Z",
      "version": 3
    }
    

    error reponse when file name is not given while updating

    {
      "errorCode": 124018,
      "message": "You must specify a filename.",
      "details": [
        "traceId: 3f7de1e7093407c4",
        "path: /files/files/335f6597-96f8-4851-a76a-9672af8c6c62"
      ],
      "links": [],
      "version": 2,
      "httpStatusCode": 400
    }
    

    error response when specifed file is not present in the system.

    {
      "errorCode": 0,
      "message": "The file could not be found.",
      "details": [
        "traceId: f3b531793fdb7e81",
        "path: /files/files/123"
      ],
      "links": [],
      "version": 2,
      "httpStatusCode": 404
    }
    

    error response indicating that file is already modifed by someone else

    {
      "errorCode": 0,
      "message": "The file has been updated since you last retrieved it.",
      "details": [
        "traceId: 6bad5bb8a57678ee",
        "path: /files/files/335f6597-96f8-4851-a76a-9672af8c6c62"
      ],
      "links": [],
      "version": 2,
      "httpStatusCode": 412
    }
    

    error response when If-match or If-Unmodified-since is nto specified.

    {
      "errorCode": 42801,
      "message": "You must include at least one of the following headers: \"if-unmodified-since\", \"if-match\".",
      "details": [
        "traceId: 1bb27cfcc5711dda",
        "path: /files/files/335f6597-96f8-4851-a76a-9672af8c6c62"
      ],
      "links": [],
      "version": 2,
      "httpStatusCode": 428
    }
    
    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 not valid. A validation error occurred, and the file cannot be updated. Check the response for more information. Here are common reasons for this issue: 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. error2
    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 trying the request again. error2
    428 Precondition Required The request headers did not include an If-Match or If-Unmodified-Since precondition. Specify the appropriate values for the If-Unmodified-Since and If-Match request headers before trying the request again. 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://example.com/files/files/{fileId}/copy \
      -H 'Authorization: Bearer <access-token-goes-here>' \
      -H 'Accept: application/vnd.sas.file+json' \
      -H 'Content-Disposition: string'
    
    
    
    const headers = {
      'Accept':'application/vnd.sas.file+json',
      'Content-Disposition':'string'
    };
    
    fetch('https://example.com/files/files/{fileId}/copy',
    {
      method: 'POST',
    
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    import requests
    headers = {
      'Accept': 'application/vnd.sas.file+json',
      'Content-Disposition': 'string'
    }
    
    r = requests.post('https://example.com/files/files/{fileId}/copy', headers = headers)
    
    print(r.json())
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Accept": []string{"application/vnd.sas.file+json"},
            "Content-Disposition": []string{"string"},
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("POST", "https://example.com/files/files/{fileId}/copy", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    

    POST /files/{fileId}/copy

    Copies the file if the user has Read access to the specified file.

    Parameters
    Name 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 a 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

    Here is the response for file resource version 3

    {
      "creationTimeStamp": "2022-03-31T20:00:03.609Z",
      "modifiedTimeStamp": "2022-03-31T20:00:03.826Z",
      "createdBy": "sas.audit",
      "modifiedBy": "sas.audit",
      "id": "cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
      "parentUri": "/jobExecution/jobs/b9fe292d-2a4e-434c-8154-5f490b4b9257",
      "properties": {
        "LastState": "running",
        "JobRequest": "",
        "Job": "b9fe292d-2a4e-434c-8154-5f490b4b9257",
        "Provider": "casl"
      },
      "contentDisposition": "text/plain",
      "contentType": "text/plain",
      "description": "Log File for Job b9fe292d-2a4e-434c-8154-5f490b4b9257",
      "documentType": "log",
      "encoding": "UTF-8",
      "links": [
        {
          "method": "GET",
          "rel": "self",
          "href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
          "uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
          "type": "application/vnd.sas.file"
        },
        {
          "method": "GET",
          "rel": "alternate",
          "href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
          "uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
          "type": "application/vnd.sas.summary"
        },
        {
          "method": "PATCH",
          "rel": "patch",
          "href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
          "uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
          "type": "application/vnd.sas.file",
          "responseType": "application/vnd.sas.file"
        },
        {
          "method": "PUT",
          "rel": "update",
          "href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
          "uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
          "type": "application/vnd.sas.file",
          "responseType": "application/vnd.sas.file"
        },
        {
          "method": "DELETE",
          "rel": "delete",
          "href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
          "uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7"
        },
        {
          "method": "GET",
          "rel": "content",
          "href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7/content",
          "uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7/content",
          "type": "text/plain"
        },
        {
          "method": "PUT",
          "rel": "updateContent",
          "href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7/content",
          "uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7/content",
          "type": "*/*",
          "responseType": "application/vnd.sas.file"
        },
        {
          "method": "POST",
          "rel": "copyFile",
          "href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7/copy",
          "uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7/copy",
          "responseType": "application/vnd.sas.file"
        },
        {
          "method": "POST",
          "rel": "create",
          "href": "/files/files",
          "uri": "/files/files",
          "type": "*/*",
          "responseType": "application/vnd.sas.file"
        }
      ],
      "name": "2022-03-31T20:00:03Z-results.log",
      "size": 742,
      "searchable": false,
      "fileVersion": 0,
      "expirationTimeStamp": "2022-04-07T20:00:03.651Z",
      "version": 3
    }
    

    Here is the response for file resource version1

    Here is the response for file resource version 2

    Here is the response for file resource version 3

    {
      "creationTimeStamp": "2022-03-31T20:00:03.609Z",
      "modifiedTimeStamp": "2022-03-31T20:00:03.826Z",
      "createdBy": "sas.audit",
      "modifiedBy": "sas.audit",
      "id": "cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
      "parentUri": "/jobExecution/jobs/b9fe292d-2a4e-434c-8154-5f490b4b9257",
      "properties": {
        "LastState": "running",
        "JobRequest": "",
        "Job": "b9fe292d-2a4e-434c-8154-5f490b4b9257",
        "Provider": "casl"
      },
      "contentDisposition": "text/plain",
      "contentType": "text/plain",
      "description": "Log File for Job b9fe292d-2a4e-434c-8154-5f490b4b9257",
      "documentType": "log",
      "encoding": "UTF-8",
      "links": [
        {
          "method": "GET",
          "rel": "self",
          "href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
          "uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
          "type": "application/vnd.sas.file"
        },
        {
          "method": "GET",
          "rel": "alternate",
          "href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
          "uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
          "type": "application/vnd.sas.summary"
        },
        {
          "method": "PATCH",
          "rel": "patch",
          "href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
          "uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
          "type": "application/vnd.sas.file",
          "responseType": "application/vnd.sas.file"
        },
        {
          "method": "PUT",
          "rel": "update",
          "href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
          "uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
          "type": "application/vnd.sas.file",
          "responseType": "application/vnd.sas.file"
        },
        {
          "method": "DELETE",
          "rel": "delete",
          "href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7",
          "uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7"
        },
        {
          "method": "GET",
          "rel": "content",
          "href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7/content",
          "uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7/content",
          "type": "text/plain"
        },
        {
          "method": "PUT",
          "rel": "updateContent",
          "href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7/content",
          "uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7/content",
          "type": "*/*",
          "responseType": "application/vnd.sas.file"
        },
        {
          "method": "POST",
          "rel": "copyFile",
          "href": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7/copy",
          "uri": "/files/files/cddc7f5d-9b30-4bf1-bb2f-6d5e40728cb7/copy",
          "responseType": "application/vnd.sas.file"
        },
        {
          "method": "POST",
          "rel": "create",
          "href": "/files/files",
          "uri": "/files/files",
          "type": "*/*",
          "responseType": "application/vnd.sas.file"
        }
      ],
      "name": "2022-03-31T20:00:03Z-results.log",
      "size": 742,
      "searchable": false,
      "fileVersion": 0,
      "expirationTimeStamp": "2022-04-07T20:00:03.651Z",
      "version": 3
    }
    

    error response when specifed file is not present in the system.

    {
      "errorCode": 0,
      "message": "The file could not be found.",
      "details": [
        "traceId: f3b531793fdb7e81",
        "path: /files/files/123"
      ],
      "links": [],
      "version": 2,
      "httpStatusCode": 404
    }
    
    {
      "errorCode": 0,
      "message": "The file could not be found.",
      "details": [
        "traceId: f3b531793fdb7e81",
        "path: /files/files/123"
      ],
      "links": [],
      "version": 2,
      "httpStatusCode": 404
    }
    

    Here is conflict error response when file name conflict occurs in the upload folder

    {
      "errorCode": 0,
      "message": "File with name \"Attributes.csv\" already exists in folder \"a70b784d-2b80-4b6a-8be9-c2f47f8ab636\".",
      "details": [
        "traceId: 3da2bd0e90707f57",
        "path: /files/files"
      ],
      "links": [],
      "version": 2,
      "httpStatusCode": 409
    }
    
    {
      "errorCode": 0,
      "message": "File with name \"Attributes.csv\" already exists in folder \"a70b784d-2b80-4b6a-8be9-c2f47f8ab636\".",
      "details": [
        "traceId: 3da2bd0e90707f57",
        "path: /files/files"
      ],
      "links": [],
      "version": 2,
      "httpStatusCode": 409
    }
    
    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 because the file already exists in that 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.

    Index

    The operations to obtain a generic indexable representation of files.

    Get indexable representations for parentUris

    Code samples

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

    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": "https://example.com",
      "type": "id",
      "resources": [
        "string"
      ],
      "links": [
        {
          "method": "string",
          "rel": "string",
          "uri": "string",
          "href": "string",
          "title": "string",
          "type": "string",
          "itemType": "string",
          "responseType": "string",
          "responseItemType": "string"
        }
      ]
    }
    
    Parameters
    Name In Type Required Description
    Accept-Item header string true The value of the file resource media type. You must specify this as "application/vnd.sas.search.indexable.data".
    body body selection true Multiple parentUri values that are specified as an array of string values. The file resources that are associated with each parentUri are retrieved.

    Example responses

    Here is the collection of indexable reprsentation response for files.

    {
      "links": [
        {
          "method": "GET",
          "rel": "self",
          "href": "/files/files?start=0&limit=10",
          "uri": "/files/files?start=0&limit=10",
          "type": "application/vnd.sas.collection"
        }
      ],
      "name": "files",
      "accept": "application/vnd.sas.search.indexable.data",
      "start": 0,
      "count": 3,
      "items": [
        {
          "version": 1,
          "properties-": [
            {
              "name": "title",
              "value": "Attributes.csv"
            },
            {
              "name": "createdBy",
              "value": "SysUser"
            },
            {
              "name": "creationTimeStamp",
              "value": "2022-04-13T17:53:51.710Z"
            },
            {
              "name": "modifiedBy",
              "value": "SysUser"
            },
            {
              "name": "modifiedTimeStamp",
              "value": "2022-04-13T17:53:51.710Z"
            },
            {
              "name": "attachmentContent",
              "value": "You should see extracted content file over here"
            },
            {
              "name": "textStore",
              "value": "text/plain"
            }
          ],
          "resourceUri": "/files/files/bccd30ff-8603-4770-bfa3-b771f6713ffb",
          "sasType": "file"
        },
        {
          "version": 1,
          "properties-": [
            {
              "name": "title",
              "value": "Attributes.csv"
            },
            {
              "name": "createdBy",
              "value": "SysUser"
            },
            {
              "name": "creationTimeStamp",
              "value": "2022-04-13T17:53:55.567Z"
            },
            {
              "name": "modifiedBy",
              "value": "SysUser"
            },
            {
              "name": "modifiedTimeStamp",
              "value": "2022-04-13T17:53:55.567Z"
            },
            {
              "name": "attachmentContent",
              "value": "You should see extracted content file over here"
            },
            {
              "name": "textStore",
              "value": "text/plain"
            }
          ],
          "resourceUri": "/files/files/acd5718a-c0ec-46b1-a0c0-de4a42db584a",
          "sasType": "file"
        },
        {
          "version": 1,
          "properties-": [
            {
              "name": "title",
              "value": "Attributes.csv"
            },
            {
              "name": "createdBy",
              "value": "SysUser"
            },
            {
              "name": "creationTimeStamp",
              "value": "2022-04-13T17:53:57.219Z"
            },
            {
              "name": "modifiedBy",
              "value": "SysUser"
            },
            {
              "name": "modifiedTimeStamp",
              "value": "2022-04-13T17:53:57.219Z"
            },
            {
              "name": "attachmentContent",
              "value": "You should see extracted content file over here"
            },
            {
              "name": "textStore",
              "value": "text/plain"
            }
          ],
          "resourceUri": "/files/files/335f6597-96f8-4851-a76a-9672af8c6c62",
          "sasType": "file"
        }
      ],
      "limit": 10,
      "version": 2
    }
    
    {
      "links": [
        {
          "method": "GET",
          "rel": "self",
          "href": "/files/files?start=0&limit=10",
          "uri": "/files/files?start=0&limit=10",
          "type": "application/vnd.sas.collection"
        }
      ],
      "name": "files",
      "accept": "application/vnd.sas.search.indexable.data",
      "start": 0,
      "count": 3,
      "items": [
        {
          "version": 1,
          "properties-": [
            {
              "name": "title",
              "value": "Attributes.csv"
            },
            {
              "name": "createdBy",
              "value": "SysUser"
            },
            {
              "name": "creationTimeStamp",
              "value": "2022-04-13T17:53:51.710Z"
            },
            {
              "name": "modifiedBy",
              "value": "SysUser"
            },
            {
              "name": "modifiedTimeStamp",
              "value": "2022-04-13T17:53:51.710Z"
            },
            {
              "name": "attachmentContent",
              "value": "You should see extracted content file over here"
            },
            {
              "name": "textStore",
              "value": "text/plain"
            }
          ],
          "resourceUri": "/files/files/bccd30ff-8603-4770-bfa3-b771f6713ffb",
          "sasType": "file"
        },
        {
          "version": 1,
          "properties-": [
            {
              "name": "title",
              "value": "Attributes.csv"
            },
            {
              "name": "createdBy",
              "value": "SysUser"
            },
            {
              "name": "creationTimeStamp",
              "value": "2022-04-13T17:53:55.567Z"
            },
            {
              "name": "modifiedBy",
              "value": "SysUser"
            },
            {
              "name": "modifiedTimeStamp",
              "value": "2022-04-13T17:53:55.567Z"
            },
            {
              "name": "attachmentContent",
              "value": "You should see extracted content file over here"
            },
            {
              "name": "textStore",
              "value": "text/plain"
            }
          ],
          "resourceUri": "/files/files/acd5718a-c0ec-46b1-a0c0-de4a42db584a",
          "sasType": "file"
        },
        {
          "version": 1,
          "properties-": [
            {
              "name": "title",
              "value": "Attributes.csv"
            },
            {
              "name": "createdBy",
              "value": "SysUser"
            },
            {
              "name": "creationTimeStamp",
              "value": "2022-04-13T17:53:57.219Z"
            },
            {
              "name": "modifiedBy",
              "value": "SysUser"
            },
            {
              "name": "modifiedTimeStamp",
              "value": "2022-04-13T17:53:57.219Z"
            },
            {
              "name": "attachmentContent",
              "value": "You should see extracted content file over here"
            },
            {
              "name": "textStore",
              "value": "text/plain"
            }
          ],
          "resourceUri": "/files/files/335f6597-96f8-4851-a76a-9672af8c6c62",
          "sasType": "file"
        }
      ],
      "limit": 10,
      "version": 2
    }
    

    Here is response when an invalid limit is specified in the GET request to fetch collection using representation application/vnd.sas.collection+json

    {
      "errorCode": 12016,
      "message": "The limit is not valid.",
      "details": [
        "traceId: 967013a71ad1bc6b",
        "path: /files/files"
      ],
      "remediation": "The limit must be between 0 and 10,000.",
      "links": [],
      "version": 2,
      "httpStatusCode": 400
    }
    
    {
      "errorCode": 12016,
      "message": "The limit is not valid.",
      "details": [
        "traceId: 967013a71ad1bc6b",
        "path: /files/files"
      ],
      "remediation": "The limit must be between 0 and 10,000.",
      "links": [],
      "version": 2,
      "httpStatusCode": 400
    }
    
    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 not valid. A validation error occurred, and the file cannot be created. Check the response for more information. Here are common reasons for this issue: 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://example.com/files/files#getIndexableRepresentationCollection \
      -H 'Authorization: Bearer <access-token-goes-here>' \
      -H 'Accept: application/vnd.sas.collection+json' \
      -H 'Accept-Item: string'
    
    
    
    const headers = {
      'Accept':'application/vnd.sas.collection+json',
      'Accept-Item':'string'
    };
    
    fetch('https://example.com/files/files#getIndexableRepresentationCollection',
    {
      method: 'GET',
    
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    import requests
    headers = {
      'Accept': 'application/vnd.sas.collection+json',
      'Accept-Item': 'string'
    }
    
    r = requests.get('https://example.com/files/files#getIndexableRepresentationCollection', headers = headers)
    
    print(r.json())
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Accept": []string{"application/vnd.sas.collection+json"},
            "Accept-Item": []string{"string"},
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("GET", "https://example.com/files/files#getIndexableRepresentationCollection", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    

    GET /files#getIndexableRepresentationCollection

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

    Parameters
    Name In Type Required Description
    Accept-Item header string true The value of the file resource media type. You must specify this 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 criteria to apply to the returned member collection.

    Example responses

    Here is the collection of indexable reprsentation response for files.

    {
      "links": [
        {
          "method": "GET",
          "rel": "self",
          "href": "/files/files?start=0&limit=10",
          "uri": "/files/files?start=0&limit=10",
          "type": "application/vnd.sas.collection"
        }
      ],
      "name": "files",
      "accept": "application/vnd.sas.search.indexable.data",
      "start": 0,
      "count": 3,
      "items": [
        {
          "version": 1,
          "properties-": [
            {
              "name": "title",
              "value": "Attributes.csv"
            },
            {
              "name": "createdBy",
              "value": "SysUser"
            },
            {
              "name": "creationTimeStamp",
              "value": "2022-04-13T17:53:51.710Z"
            },
            {
              "name": "modifiedBy",
              "value": "SysUser"
            },
            {
              "name": "modifiedTimeStamp",
              "value": "2022-04-13T17:53:51.710Z"
            },
            {
              "name": "attachmentContent",
              "value": "You should see extracted content file over here"
            },
            {
              "name": "textStore",
              "value": "text/plain"
            }
          ],
          "resourceUri": "/files/files/bccd30ff-8603-4770-bfa3-b771f6713ffb",
          "sasType": "file"
        },
        {
          "version": 1,
          "properties-": [
            {
              "name": "title",
              "value": "Attributes.csv"
            },
            {
              "name": "createdBy",
              "value": "SysUser"
            },
            {
              "name": "creationTimeStamp",
              "value": "2022-04-13T17:53:55.567Z"
            },
            {
              "name": "modifiedBy",
              "value": "SysUser"
            },
            {
              "name": "modifiedTimeStamp",
              "value": "2022-04-13T17:53:55.567Z"
            },
            {
              "name": "attachmentContent",
              "value": "You should see extracted content file over here"
            },
            {
              "name": "textStore",
              "value": "text/plain"
            }
          ],
          "resourceUri": "/files/files/acd5718a-c0ec-46b1-a0c0-de4a42db584a",
          "sasType": "file"
        },
        {
          "version": 1,
          "properties-": [
            {
              "name": "title",
              "value": "Attributes.csv"
            },
            {
              "name": "createdBy",
              "value": "SysUser"
            },
            {
              "name": "creationTimeStamp",
              "value": "2022-04-13T17:53:57.219Z"
            },
            {
              "name": "modifiedBy",
              "value": "SysUser"
            },
            {
              "name": "modifiedTimeStamp",
              "value": "2022-04-13T17:53:57.219Z"
            },
            {
              "name": "attachmentContent",
              "value": "You should see extracted content file over here"
            },
            {
              "name": "textStore",
              "value": "text/plain"
            }
          ],
          "resourceUri": "/files/files/335f6597-96f8-4851-a76a-9672af8c6c62",
          "sasType": "file"
        }
      ],
      "limit": 10,
      "version": 2
    }
    
    {
      "links": [
        {
          "method": "GET",
          "rel": "self",
          "href": "/files/files?start=0&limit=10",
          "uri": "/files/files?start=0&limit=10",
          "type": "application/vnd.sas.collection"
        }
      ],
      "name": "files",
      "accept": "application/vnd.sas.search.indexable.data",
      "start": 0,
      "count": 3,
      "items": [
        {
          "version": 1,
          "properties-": [
            {
              "name": "title",
              "value": "Attributes.csv"
            },
            {
              "name": "createdBy",
              "value": "SysUser"
            },
            {
              "name": "creationTimeStamp",
              "value": "2022-04-13T17:53:51.710Z"
            },
            {
              "name": "modifiedBy",
              "value": "SysUser"
            },
            {
              "name": "modifiedTimeStamp",
              "value": "2022-04-13T17:53:51.710Z"
            },
            {
              "name": "attachmentContent",
              "value": "You should see extracted content file over here"
            },
            {
              "name": "textStore",
              "value": "text/plain"
            }
          ],
          "resourceUri": "/files/files/bccd30ff-8603-4770-bfa3-b771f6713ffb",
          "sasType": "file"
        },
        {
          "version": 1,
          "properties-": [
            {
              "name": "title",
              "value": "Attributes.csv"
            },
            {
              "name": "createdBy",
              "value": "SysUser"
            },
            {
              "name": "creationTimeStamp",
              "value": "2022-04-13T17:53:55.567Z"
            },
            {
              "name": "modifiedBy",
              "value": "SysUser"
            },
            {
              "name": "modifiedTimeStamp",
              "value": "2022-04-13T17:53:55.567Z"
            },
            {
              "name": "attachmentContent",
              "value": "You should see extracted content file over here"
            },
            {
              "name": "textStore",
              "value": "text/plain"
            }
          ],
          "resourceUri": "/files/files/acd5718a-c0ec-46b1-a0c0-de4a42db584a",
          "sasType": "file"
        },
        {
          "version": 1,
          "properties-": [
            {
              "name": "title",
              "value": "Attributes.csv"
            },
            {
              "name": "createdBy",
              "value": "SysUser"
            },
            {
              "name": "creationTimeStamp",
              "value": "2022-04-13T17:53:57.219Z"
            },
            {
              "name": "modifiedBy",
              "value": "SysUser"
            },
            {
              "name": "modifiedTimeStamp",
              "value": "2022-04-13T17:53:57.219Z"
            },
            {
              "name": "attachmentContent",
              "value": "You should see extracted content file over here"
            },
            {
              "name": "textStore",
              "value": "text/plain"
            }
          ],
          "resourceUri": "/files/files/335f6597-96f8-4851-a76a-9672af8c6c62",
          "sasType": "file"
        }
      ],
      "limit": 10,
      "version": 2
    }
    

    Here is response when an invalid limit is specified in the GET request to fetch collection using representation application/vnd.sas.collection+json

    {
      "errorCode": 12016,
      "message": "The limit is not valid.",
      "details": [
        "traceId: 967013a71ad1bc6b",
        "path: /files/files"
      ],
      "remediation": "The limit must be between 0 and 10,000.",
      "links": [],
      "version": 2,
      "httpStatusCode": 400
    }
    
    {
      "errorCode": 12016,
      "message": "The limit is not valid.",
      "details": [
        "traceId: 967013a71ad1bc6b",
        "path: /files/files"
      ],
      "remediation": "The limit must be between 0 and 10,000.",
      "links": [],
      "version": 2,
      "httpStatusCode": 400
    }
    
    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 not valid. The limit parameter cannot be less than 0 or greater than 10000. error2
    Response Headers
    Status Header Type Format Description
    200 Content-Type string No description

    Get a generic indexable representation

    Code samples

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

    GET /files/{fileId}#getIndexableRepresentation

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

    Parameters
    Name In Type Required Description
    fileId path string true The identifier of the file resource.

    Example responses

    Here is the response for indexable representation of file.

    {
      "version": 1,
      "properties": [
        {
          "name": "title",
          "value": "Attributes.csv"
        },
        {
          "name": "createdBy",
          "value": "SysUser"
        },
        {
          "name": "creationTimeStamp",
          "value": "2022-04-13T17:53:57.219Z"
        },
        {
          "name": "modifiedBy",
          "value": "SysUser"
        },
        {
          "name": "modifiedTimeStamp",
          "value": "2022-04-13T17:53:57.219Z"
        },
        {
          "name": "attachmentContent",
          "value": "Here you should see the extracted content of your file"
        },
        {
          "name": "textStore",
          "value": "text/plain"
        }
      ],
      "resourceUri": "/files/files/335f6597-96f8-4851-a76a-9672af8c6c62",
      "sasType": "file"
    }
    
    {
      "version": 1,
      "properties": [
        {
          "name": "title",
          "value": "Attributes.csv"
        },
        {
          "name": "createdBy",
          "value": "SysUser"
        },
        {
          "name": "creationTimeStamp",
          "value": "2022-04-13T17:53:57.219Z"
        },
        {
          "name": "modifiedBy",
          "value": "SysUser"
        },
        {
          "name": "modifiedTimeStamp",
          "value": "2022-04-13T17:53:57.219Z"
        },
        {
          "name": "attachmentContent",
          "value": "Here you should see the extracted content of your file"
        },
        {
          "name": "textStore",
          "value": "text/plain"
        }
      ],
      "resourceUri": "/files/files/335f6597-96f8-4851-a76a-9672af8c6c62",
      "sasType": "file"
    }
    

    error response when specifed file is not present in the system.

    {
      "errorCode": 0,
      "message": "The file could not be found.",
      "details": [
        "traceId: f3b531793fdb7e81",
        "path: /files/files/123"
      ],
      "links": [],
      "version": 2,
      "httpStatusCode": 404
    }
    
    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 the identifier. error2
    Response Headers
    Status Header Type Format Description
    200 Content-Type string No description

    Summary

    The operations to obtain a generic summary representation of files.

    Get summary representations

    Code samples

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

    GET /files#getSummaryRepresentationCollection

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

    Parameters
    Name In Type Required Description
    Accept-Item header string true The value of the file resource media type. You must specify this 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 criteria to apply to the returned member collection.

    Example responses

    Here is the summary collection response of file

    {
      "links": [
        {
          "method": "GET",
          "rel": "self",
          "href": "/files/files?sortBy=name&start=0&limit=3",
          "uri": "/files/files?sortBy=name&start=0&limit=3",
          "type": "application/vnd.sas.collection"
        },
        {
          "method": "GET",
          "rel": "next",
          "href": "/files/files?sortBy=name&start=3&limit=3",
          "uri": "/files/files?sortBy=name&start=3&limit=3",
          "type": "application/vnd.sas.collection"
        },
        {
          "method": "GET",
          "rel": "last",
          "href": "/files/files?sortBy=name&start=3&limit=3",
          "uri": "/files/files?sortBy=name&start=3&limit=3",
          "type": "application/vnd.sas.collection"
        }
      ],
      "name": "files",
      "accept": "application/vnd.sas.summary",
      "start": 0,
      "count": 6,
      "items": [
        {
          "creationTimeStamp": "2022-04-13T17:53:51.710Z",
          "modifiedTimeStamp": "2022-04-13T17:53:51.710Z",
          "createdBy": "SysUser",
          "modifiedBy": "SysUser",
          "id": "bccd30ff-8603-4770-bfa3-b771f6713ffb",
          "type": "file",
          "name": "Attributes.csv",
          "links": [
            {
              "method": "GET",
              "rel": "self",
              "href": "/files/files/bccd30ff-8603-4770-bfa3-b771f6713ffb",
              "uri": "/files/files/bccd30ff-8603-4770-bfa3-b771f6713ffb",
              "type": "application/vnd.sas.file"
            },
            {
              "method": "GET",
              "rel": "alternate",
              "href": "/files/files/bccd30ff-8603-4770-bfa3-b771f6713ffb",
              "uri": "/files/files/bccd30ff-8603-4770-bfa3-b771f6713ffb",
              "type": "application/vnd.sas.summary"
            }
          ],
          "version": 2
        },
        {
          "creationTimeStamp": "2022-04-13T17:53:55.567Z",
          "modifiedTimeStamp": "2022-04-13T17:53:55.567Z",
          "createdBy": "SysUser",
          "modifiedBy": "SysUser",
          "id": "acd5718a-c0ec-46b1-a0c0-de4a42db584a",
          "type": "file",
          "name": "Attributes.csv",
          "links": [
            {
              "method": "GET",
              "rel": "self",
              "href": "/files/files/acd5718a-c0ec-46b1-a0c0-de4a42db584a",
              "uri": "/files/files/acd5718a-c0ec-46b1-a0c0-de4a42db584a",
              "type": "application/vnd.sas.file"
            },
            {
              "method": "GET",
              "rel": "alternate",
              "href": "/files/files/acd5718a-c0ec-46b1-a0c0-de4a42db584a",
              "uri": "/files/files/acd5718a-c0ec-46b1-a0c0-de4a42db584a",
              "type": "application/vnd.sas.summary"
            }
          ],
          "version": 2
        },
        {
          "creationTimeStamp": "2022-04-13T17:53:57.219Z",
          "modifiedTimeStamp": "2022-04-13T17:53:57.219Z",
          "createdBy": "SysUser",
          "modifiedBy": "SysUser",
          "id": "335f6597-96f8-4851-a76a-9672af8c6c62",
          "type": "file",
          "name": "Attributes.csv",
          "links": [
            {
              "method": "GET",
              "rel": "self",
              "href": "/files/files/335f6597-96f8-4851-a76a-9672af8c6c62",
              "uri": "/files/files/335f6597-96f8-4851-a76a-9672af8c6c62",
              "type": "application/vnd.sas.file"
            },
            {
              "method": "GET",
              "rel": "alternate",
              "href": "/files/files/335f6597-96f8-4851-a76a-9672af8c6c62",
              "uri": "/files/files/335f6597-96f8-4851-a76a-9672af8c6c62",
              "type": "application/vnd.sas.summary"
            }
          ],
          "version": 2
        }
      ],
      "limit": 3,
      "version": 2
    }
    
    {
      "links": [
        {
          "method": "GET",
          "rel": "self",
          "href": "/files/files?sortBy=name&start=0&limit=3",
          "uri": "/files/files?sortBy=name&start=0&limit=3",
          "type": "application/vnd.sas.collection"
        },
        {
          "method": "GET",
          "rel": "next",
          "href": "/files/files?sortBy=name&start=3&limit=3",
          "uri": "/files/files?sortBy=name&start=3&limit=3",
          "type": "application/vnd.sas.collection"
        },
        {
          "method": "GET",
          "rel": "last",
          "href": "/files/files?sortBy=name&start=3&limit=3",
          "uri": "/files/files?sortBy=name&start=3&limit=3",
          "type": "application/vnd.sas.collection"
        }
      ],
      "name": "files",
      "accept": "application/vnd.sas.summary",
      "start": 0,
      "count": 6,
      "items": [
        {
          "creationTimeStamp": "2022-04-13T17:53:51.710Z",
          "modifiedTimeStamp": "2022-04-13T17:53:51.710Z",
          "createdBy": "SysUser",
          "modifiedBy": "SysUser",
          "id": "bccd30ff-8603-4770-bfa3-b771f6713ffb",
          "type": "file",
          "name": "Attributes.csv",
          "links": [
            {
              "method": "GET",
              "rel": "self",
              "href": "/files/files/bccd30ff-8603-4770-bfa3-b771f6713ffb",
              "uri": "/files/files/bccd30ff-8603-4770-bfa3-b771f6713ffb",
              "type": "application/vnd.sas.file"
            },
            {
              "method": "GET",
              "rel": "alternate",
              "href": "/files/files/bccd30ff-8603-4770-bfa3-b771f6713ffb",
              "uri": "/files/files/bccd30ff-8603-4770-bfa3-b771f6713ffb",
              "type": "application/vnd.sas.summary"
            }
          ],
          "version": 2
        },
        {
          "creationTimeStamp": "2022-04-13T17:53:55.567Z",
          "modifiedTimeStamp": "2022-04-13T17:53:55.567Z",
          "createdBy": "SysUser",
          "modifiedBy": "SysUser",
          "id": "acd5718a-c0ec-46b1-a0c0-de4a42db584a",
          "type": "file",
          "name": "Attributes.csv",
          "links": [
            {
              "method": "GET",
              "rel": "self",
              "href": "/files/files/acd5718a-c0ec-46b1-a0c0-de4a42db584a",
              "uri": "/files/files/acd5718a-c0ec-46b1-a0c0-de4a42db584a",
              "type": "application/vnd.sas.file"
            },
            {
              "method": "GET",
              "rel": "alternate",
              "href": "/files/files/acd5718a-c0ec-46b1-a0c0-de4a42db584a",
              "uri": "/files/files/acd5718a-c0ec-46b1-a0c0-de4a42db584a",
              "type": "application/vnd.sas.summary"
            }
          ],
          "version": 2
        },
        {
          "creationTimeStamp": "2022-04-13T17:53:57.219Z",
          "modifiedTimeStamp": "2022-04-13T17:53:57.219Z",
          "createdBy": "SysUser",
          "modifiedBy": "SysUser",
          "id": "335f6597-96f8-4851-a76a-9672af8c6c62",
          "type": "file",
          "name": "Attributes.csv",
          "links": [
            {
              "method": "GET",
              "rel": "self",
              "href": "/files/files/335f6597-96f8-4851-a76a-9672af8c6c62",
              "uri": "/files/files/335f6597-96f8-4851-a76a-9672af8c6c62",
              "type": "application/vnd.sas.file"
            },
            {
              "method": "GET",
              "rel": "alternate",
              "href": "/files/files/335f6597-96f8-4851-a76a-9672af8c6c62",
              "uri": "/files/files/335f6597-96f8-4851-a76a-9672af8c6c62",
              "type": "application/vnd.sas.summary"
            }
          ],
          "version": 2
        }
      ],
      "limit": 3,
      "version": 2
    }
    

    Here is response when an invalid limit is specified in the GET request to fetch collection using representation application/vnd.sas.collection+json

    {
      "errorCode": 12016,
      "message": "The limit is not valid.",
      "details": [
        "traceId: 967013a71ad1bc6b",
        "path: /files/files"
      ],
      "remediation": "The limit must be between 0 and 10,000.",
      "links": [],
      "version": 2,
      "httpStatusCode": 400
    }
    
    {
      "errorCode": 12016,
      "message": "The limit is not valid.",
      "details": [
        "traceId: 967013a71ad1bc6b",
        "path: /files/files"
      ],
      "remediation": "The limit must be between 0 and 10,000.",
      "links": [],
      "version": 2,
      "httpStatusCode": 400
    }
    
    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 not valid. The limit parameter cannot be less than 0 or greater than 10000. error2
    Response Headers
    Status Header Type Format Description
    200 Content-Type string No description

    Get a generic summary representation

    Code samples

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

    GET /files/{fileId}#getSummaryRepresentation

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

    Parameters
    Name In Type Required Description
    fileId path string true The identifier of the file resource.

    Example responses

    Here is the response for file summary representation

    {
      "creationTimeStamp": "2022-04-13T17:53:57.219Z",
      "modifiedTimeStamp": "2022-04-13T17:53:57.219Z",
      "createdBy": "SysUser",
      "modifiedBy": "SysUser",
      "id": "335f6597-96f8-4851-a76a-9672af8c6c62",
      "type": "file",
      "name": "Attributes.csv",
      "links": [
        {
          "method": "GET",
          "rel": "self",
          "href": "/files/files/335f6597-96f8-4851-a76a-9672af8c6c62",
          "uri": "/files/files/335f6597-96f8-4851-a76a-9672af8c6c62",
          "type": "application/vnd.sas.file"
        },
        {
          "method": "GET",
          "rel": "alternate",
          "href": "/files/files/335f6597-96f8-4851-a76a-9672af8c6c62",
          "uri": "/files/files/335f6597-96f8-4851-a76a-9672af8c6c62",
          "type": "application/vnd.sas.summary"
        }
      ],
      "version": 2
    }
    
    {
      "creationTimeStamp": "2022-04-13T17:53:57.219Z",
      "modifiedTimeStamp": "2022-04-13T17:53:57.219Z",
      "createdBy": "SysUser",
      "modifiedBy": "SysUser",
      "id": "335f6597-96f8-4851-a76a-9672af8c6c62",
      "type": "file",
      "name": "Attributes.csv",
      "links": [
        {
          "method": "GET",
          "rel": "self",
          "href": "/files/files/335f6597-96f8-4851-a76a-9672af8c6c62",
          "uri": "/files/files/335f6597-96f8-4851-a76a-9672af8c6c62",
          "type": "application/vnd.sas.file"
        },
        {
          "method": "GET",
          "rel": "alternate",
          "href": "/files/files/335f6597-96f8-4851-a76a-9672af8c6c62",
          "uri": "/files/files/335f6597-96f8-4851-a76a-9672af8c6c62",
          "type": "application/vnd.sas.summary"
        }
      ],
      "version": 2
    }
    

    error response when specifed file is not present in the system.

    {
      "errorCode": 0,
      "message": "The file could not be found.",
      "details": [
        "traceId: f3b531793fdb7e81",
        "path: /files/files/123"
      ],
      "links": [],
      "version": 2,
      "httpStatusCode": 404
    }
    
    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. error2
    Response Headers
    Status Header Type Format Description
    200 Content-Type string No description

    Schemas

    file

    "string"
    
    

    File

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

    fileToPatch

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

    File to Patch

    Properties
    Name Type Required Restrictions Description
    parentUri string false none The URI of the object that is associated with or linked to a file resource.
    properties object false none The properties that are specific to this file. Each property uses a "key" : "value" format. Use a comma to separate properties.
    » additionalProperties string false none none
    contentDisposition string false none The value for the Content-Disposition header. This is specified in response when downloading the file.
    description string false none The description of the file resource.
    documentType string false none The type of the file resource.
    name string true none The name of the file resource.

    fileResourceCollection

    {
      "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": "2019-08-24T14:15:22Z",
          "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": "2019-08-24T14:15:22Z",
          "name": "string",
          "size": 0,
          "typeDefName": "string"
        }
      ]
    }
    
    

    File Resource Collection

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

    allOf

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

    and

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

    fileResource

    {
      "parentUri": "string",
      "properties": {
        "property1": "string",
        "property2": "string"
      },
      "contentDisposition": "string",
      "contentType": "string",
      "createdBy": "string",
      "creationTimeStamp": "2019-08-24T14:15:22Z",
      "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": "2019-08-24T14:15:22Z",
      "name": "string",
      "size": 0,
      "typeDefName": "string"
    }
    
    

    File Resource

    Properties
    Name Type Required Restrictions Description
    parentUri string false none The URI of the object that is associated with or linked to a file resource.
    properties object false none Properties that are specific to this file. Each property uses a "key" : "value" format. Use a comma to separate properties.
    » additionalProperties string false none none
    contentDisposition string false none Value for the Content-Disposition header. It is specified in response when downloading the file.
    contentType string false none The type of the content.
    createdBy string false none The name of the author.
    creationTimeStamp string(date-time) false none The timestamp that indicates when the file resource was created.
    description string false none The description of the file resource.
    documentType string false none The type of the file resource.
    encoding string false none The encoding of the file resource.
    id string false none The identifier of the file resource.
    links [link] false none Links that apply to this file resource. The links are "self", "content", "patch", "update", and "delete".
    modifiedBy string false none The name of the user who modified this file resource.
    modifiedTimeStamp string(date-time) false none The timestamp when the file resource was modified.
    name string false none The name of the file resource.
    size integer false none The byte size of the file resource content.
    typeDefName string false none The type definition name of the file. If the file is associated with a folder and the client does not provide the value of this parameter, the file-service tries to find the best possible value using the type-registry service. If it fails to find a default value, it defaults to "file".

    fileResourceIndexCollection

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

    File Resource Indexable Collection

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

    allOf

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

    and

    Name Type Required Restrictions Description
    anonymous object false none none
    » items [fileResourceIndex] false none The array of file indexable representations.

    fileResourceIndex

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

    File Resource Indexable Data

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

    indexableDataElement

    {
      "name": "string",
      "value": "string"
    }
    
    

    Indexable Data Element

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

    fileResourceSummaryCollection

    {
      "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": "2019-08-24T14:15:22Z",
          "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": "2019-08-24T14:15:22Z",
          "name": "string",
          "expirationTimeStamp": "string",
          "typeDefName": "string",
          "version": 0
        }
      ]
    }
    
    

    File Resource Summary Collection

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

    allOf

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

    and

    Name Type Required Restrictions Description
    anonymous object false none none
    » items [fileResourceSummary] false none The array of file resource summary representations.

    fileResourceSummary

    {
      "createdBy": "string",
      "creationTimeStamp": "2019-08-24T14:15:22Z",
      "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": "2019-08-24T14:15:22Z",
      "name": "string",
      "expirationTimeStamp": "string",
      "typeDefName": "string",
      "version": 0
    }
    
    

    File Resource Summary

    Properties
    Name Type Required Restrictions Description
    createdBy string false none The name of the author.
    creationTimeStamp string(date-time) false none The timestamp that indicates when the file resource was created.
    description string false none The description of the file resource.
    id string false none The identifier of the file resource.
    links [link] false none The alternate link to fetch the complete representation of the file resource--for example, vnd.sas.file.
    modifiedBy string false none The name of the user who modified the file resource.
    modifiedTimeStamp string(date-time) false none The timestamp that indicates when the file resource was modified.
    name string false none The name of the file.
    expirationTimeStamp string false none The timestamp that indicates when the file expires.
    typeDefName string false none The type definition name of the fileIf the file is associated with a folder and the client does not provide the value of this parameter, the file-service tries to find the best possible value using type-registry service. If it fails to find a default value, it defaults to "file".
    version integer false none The version of the media type.

    selection

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

    Selection

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

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

    "uri"
    the array contains resource URIs

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

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

    error2

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

    Error

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

    baseCollection2

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

    Base Collection

    Properties
    Name Type Required Restrictions Description
    name string false none The name of the collection.
    start integer(int64) false none The zero-based index of the first item in the collection.
    limit integer false none The number of items that were requested for the collection.
    count integer(int64) false none If populated indicates the number of items in the collection.
    accept string false none A space-delimited list of media types from which an Accept header may be constructed.
    links [link] false none The links that apply to the collection.
    version integer false none The version number of the collection representation. This representation is version 2.

    api

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

    API

    Properties
    Name Type Required Restrictions Description
    version integer true none The version number of the API representation. This is version 1.
    links [link] true none The API's top-level links.

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

    Link

    Properties
    Name Type Required Restrictions Description
    method string false none The HTTP method for the link.
    rel string true none The relationship of the link to the resource.
    uri string false none The relative URI for the link.
    href string false none The URL for the link.
    title string false none The title for the link.
    type string false none The media type or link type for the link.
    itemType string false none If this is a link to a container, itemType is the media type or link type for the items in the container.
    responseType string false none The media type or link type of the response body for a PUT, POST, or PATCH operation.
    responseItemType string false none The media type or link type of the items in the response body for a PUT, POST, or PATCH operation.

    Examples

    Github Examples

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

    Media Type Samples

    application/vnd.sas.file

    Provides metadata about the file resource. Here is the schema: file Resource

    application/vnd.sas.file+json

    Here 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.

    application/vnd.sas.selection

    Identifies a set of resources. See application/vnd.sas.selection.

    Resource Relationships

    Here are the File resources and its related attributes.

    Type Attribute Description
    String id The identifier for the file. This is specified internally and cannot be changed.
    contentType The content type of the source file. This is specified and managed internally.
    createdBy The owner of the file. This is specified internally and cannot be changed.
    encoding The character encoding of the content. This is specified and managed internally.
    modifiedBy The user who last modified the file. This is specified 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. The end user manages this.
    contentDisposition The content disposition to use while downloading the file. The end user manages this.
    description A brief description of the files. The end user manages this.
    documentType The document type of the file. The end user manages this.
    expirationTimeStamp The date and time at which the file expires or is deleted. The end user manages this.
    Date creationTimeStamp The date of file creation. This is specified internally and cannot be changed.
    modifiedTimeStamp The date on which the file was last modified. This is specified and managed internally.
    List <Link> links A collection of links that represent the supported operations for the current resource. These links are supported:
  • self: GET - A link to retrieve the file metadata.
  • patch: PATCH - A link to update the file metadata.
  • 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 specified and managed internally.
    Map <String, String> properties A mapping of key/value pairs that you can use to provide more information about the file. The end user manages this.
    Root

    Path: /

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

    The GET / response includes these 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 the 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 the file metadata.

    These are the links from the file resource.

    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.

    These are the links from the collection.

    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.
    first GET Returns the first page of the collection. This link is omitted if the current view is on the first page.

    Folders

    Base URLs:

    Terms of service Email: SAS Developers Web: SAS Developers

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

    The 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.

    Terminology:



    folder


    A virtual container for other folders, or any resource that can be represented with a URI.


    member


    A resource contained in a folder. A member can itself be a folder, creating a hierarchical structure for folders and subfolders. Members have two types: child and reference. A child member inherits authorizations from its container, and a given resource can be a child only in a single folder. Reference members do not inherit authorizations, and a resource can have many references in many different folders.

    Usage Notes

    Overview

    The Folders API is used to create a virtual folder hierarchy for organizing and presenting resources. There is no physical backing structure, such as a file system, DAV, or JCR. The Folders API persists only the URI of resources that are managed by other persistence services. In general, the persistence services and the Folders API do not know about each other. The persistence services that own the resources that are members of the folders know nothing directly about the Folders API, and the Folders API knows nothing of the persistence services. This design maintains the loose coupling that is a fundamental concept of the microservices architecture.

    There are two exceptions where a persistence service and the Folders service know about each other:

    Folder Types to Specify for the Type Field

    There are three types of folders you can use in the type field:

    Folder Types that Are Returned when Creating a Folder

    These three special folder types are returned and cannot be specified when creating a folder.

    All GET operations have a corresponding HEAD with identical signature and semantics except the resource body is not returned.

    Rules for Folders and Folder Members

    Folders are not managed on a per-user basis. In other words, in general, folders are intended to be shared by some group of users. The exception is the user folder and the special folders that are stored under the user folder (myFolder, appDataFolder, myHistory, and myFavorites). Those folders are intended solely for the use of the user for which they were created. Authorizations are created to enforce that level of access.

    There are two types of folder members: child and reference. A given resource URI can exist as a child in only one folder. An attempt to create a child member with the same URI in a second folder results in a 412 response (precondition failed). If it is already in the same parent folder, a 409 response (conflict) is returned. A resource URI can exist as a reference member in as many folders as desired. When an attempt is made to delete a folder, only child members are considered when testing whether the folder is empty. Likewise, only child members are considered when retrieving ancestors.

    Error Codes

    HTTP Status Code Error Code Description
    400 1000 The member could not be created.
    400 1009 The identifier in the query did not match the identifier in the request body.
    400 1013 The string in the If-Match header did not match the calculated ETag for the folder.
    400 1014 The date in the If-Unmodified-Since is before the date in the folder.
    400 1177 An invalid folder object was provided on a create or update operation.
    400 11502 No path items were provided in the path request.
    400 11503 No content type was provided in the path request.
    400 11508 The @item resource wildcard requires exactly one parameter (either path or childUri).
    400 11509 The resource wildcard returned multiple results.
    400 11510 The resource wildcard path must start with a slash.
    400 11511 The resource wildcard path must have at least one element other than '/'.
    400 11518 A childUri must be specified when requesting ancestors.
    400 11523 A history-specific operation was attempted on a non-history folder.
    400 11526 An invalid name was provided for a folder. member.
    400 11527 An invalid URI was provided for a folder. member.
    400 11528 An invalid member type was provided for a folder member.
    400 11529 An attempt was made to add a child member to a folder that is allowed to contain only reference members.
    400 11530 The abortOnMetadataFailure option was specified, and the GET of the resource failed.
    400 11531 Members cannot be created in the RecycleBin (trash) folder.
    400 11532 Only a folder can exist at the root of the hierarchy.
    400 11533 The member provided is invalid for the type of parent folder.
    400 11535 The parentFolderUri that was provided was invalid for a folder.
    400 11540 An attempt was made to move or rename a folder that is marked to disallow that action.
    400 11541 A folder cannot be its own parent.
    400 11542 The user in the security context is not a valid identity.
    400 11543 An invalid delegate was specified.
    400 11544 The /Users folder could not be created.
    400 11545 The user does not have permission to delete a folder and all of its children.
    400 11550 The specified folder name is too long.
    400 11551 The specified folder name has a leading or trailing space.
    400 11552 There is already a member with the same name and type in the parent or root folder.
    403 11513 Add permission is required to add a member to a folder.
    403 11514 Remove permission is required to remove a member from a folder.
    404 11500 The specified folder could not be found.
    404 11501 The specified folder member could not be found.
    404 11504 There is no member at the path provided.
    404 11512 The resource wildcard returned no results.
    404 11519 The requested URI was not found as a child in any folder.
    409 11534 The URI in a new child member already exists as a child in another folder.
    412 11515 A folder must be empty in order to delete it, unless recursive is specified.

    Operations

    Root

    Contains the operations for the root resource.

    Code samples

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

    GET /

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

    Example responses

    Here is an example of using the GET request to retrieve the application/vnd.sas.api+json representation of the APIs top-level links.

    {
      "version": 1,
      "links": [
        {
          "method": "GET",
          "rel": "folders",
          "href": "/folders/folders",
          "uri": "/folders/folders",
          "type": "application/vnd.sas.collection"
        },
        {
          "method": "POST",
          "rel": "createFolder",
          "href": "/folders/folders",
          "uri": "/folders/folders",
          "type": "application/vnd.sas.content.folder"
        },
        {
          "method": "GET",
          "rel": "rootFolders",
          "href": "/folders/rootFolders",
          "uri": "/folders/rootFolders",
          "type": "application/vnd.sas.collection"
        },
        {
          "method": "GET",
          "rel": "folderTypes",
          "href": "/folders/folderTypes",
          "uri": "/folders/folderTypes",
          "type": "application/vnd.sas.collection"
        },
        {
          "method": "GET",
          "rel": "delegateInfo",
          "href": "/folders/delegateInfo",
          "uri": "/folders/delegateInfo",
          "type": "application/vnd.sas.collection"
        },
        {
          "method": "GET",
          "rel": "delegateFolders",
          "href": "/folders/delegateFolders",
          "uri": "/folders/delegateFolders",
          "type": "application/vnd.sas.collection"
        },
        {
          "method": "PUT",
          "rel": "validateRootFolderName",
          "href": "/folders/commons/validations/folders/@root/members/@new/name?value={newname}&type=folder",
          "uri": "/folders/commons/validations/folders/@root/members/@new/name?value={newname}&type=folder",
          "type": "application/vnd.sas.validation"
        },
        {
          "method": "GET",
          "rel": "ancestors",
          "href": "/folders/ancestors?childUri={resourceUri}",
          "uri": "/folders/ancestors?childUri={resourceUri}",
          "type": "application/vnd.sas.content.folder.ancestor"
        },
        {
          "method": "GET",
          "rel": "myFolder",
          "href": "/folders/folders/@myFolder",
          "uri": "/folders/folders/@myFolder",
          "type": "application/vnd.sas.content.folder",
          "title": "My Folder for current user"
        },
        {
          "method": "GET",
          "rel": "myHistory",
          "href": "/folders/folders/@myHistory",
          "uri": "/folders/folders/@myHistory",
          "type": "application/vnd.sas.content.folder",
          "title": "My History folder for current user"
        },
        {
          "method": "GET",
          "rel": "myFavorites",
          "href": "/folders/folders/@myFavorites",
          "uri": "/folders/folders/@myFavorites",
          "type": "application/vnd.sas.content.folder",
          "title": "My Favorites folder for current user"
        },
        {
          "method": "GET",
          "rel": "appData",
          "href": "/folders/folders/@appDataFolder",
          "uri": "/folders/folders/@appDataFolder",
          "type": "application/vnd.sas.content.folder",
          "title": "Application data folder for current user"
        },
        {
          "method": "GET",
          "rel": "recycleBin",
          "href": "/folders/folders/@myRecycleBin",
          "uri": "/folders/folders/@myRecycleBin",
          "type": "application/vnd.sas.content.folder",
          "title": "Recycle Bin folder for current user"
        },
        {
          "method": "GET",
          "rel": "public",
          "href": "/folders/folders/@public",
          "uri": "/folders/folders/@public",
          "type": "application/vnd.sas.content.folder",
          "title": "Public folder"
        },
        {
          "method": "GET",
          "rel": "products",
          "href": "/folders/folders/@products",
          "uri": "/folders/folders/@products",
          "type": "application/vnd.sas.content.folder",
          "title": "Products folder"
        },
        {
          "method": "PUT",
          "rel": "validateName",
          "href": "/folders/commons/validations/folders/@new/name?value={newname}&parentFolderUri={parentFolderUri}",
          "uri": "/folders/commons/validations/folders/@new/name?value={newname}&parentFolderUri={parentFolderUri}",
          "type": "application/vnd.sas.content.folder",
          "title": "Validate new folder name"
        },
        {
          "method": "POST",
          "rel": "createSubfolder",
          "href": "/folders/folders?parentFolderUri=/folders/folders/{parentId}",
          "uri": "/folders/folders?parentFolderUri=/folders/folders/{parentId}",
          "type": "application/vnd.sas.content.folder"
        }
      ]
    }
    
    {
      "version": 1,
      "links": [
        {
          "method": "GET",
          "rel": "folders",
          "href": "/folders/folders",
          "uri": "/folders/folders",
          "type": "application/vnd.sas.collection"
        },
        {
          "method": "POST",
          "rel": "createFolder",
          "href": "/folders/folders",
          "uri": "/folders/folders",
          "type": "application/vnd.sas.content.folder"
        },
        {
          "method": "GET",
          "rel": "rootFolders",
          "href": "/folders/rootFolders",
          "uri": "/folders/rootFolders",
          "type": "application/vnd.sas.collection"
        },
        {
          "method": "GET",
          "rel": "folderTypes",
          "href": "/folders/folderTypes",
          "uri": "/folders/folderTypes",
          "type": "application/vnd.sas.collection"
        },
        {
          "method": "GET",
          "rel": "delegateInfo",
          "href": "/folders/delegateInfo",
          "uri": "/folders/delegateInfo",
          "type": "application/vnd.sas.collection"
        },
        {
          "method": "GET",
          "rel": "delegateFolders",
          "href": "/folders/delegateFolders",
          "uri": "/folders/delegateFolders",
          "type": "application/vnd.sas.collection"
        },
        {
          "method": "PUT",
          "rel": "validateRootFolderName",
          "href": "/folders/commons/validations/folders/@root/members/@new/name?value={newname}&type=folder",
          "uri": "/folders/commons/validations/folders/@root/members/@new/name?value={newname}&type=folder",
          "type": "application/vnd.sas.validation"
        },
        {
          "method": "GET",
          "rel": "ancestors",
          "href": "/folders/ancestors?childUri={resourceUri}",
          "uri": "/folders/ancestors?childUri={resourceUri}",
          "type": "application/vnd.sas.content.folder.ancestor"
        },
        {
          "method": "GET",
          "rel": "myFolder",
          "href": "/folders/folders/@myFolder",
          "uri": "/folders/folders/@myFolder",
          "type": "application/vnd.sas.content.folder",
          "title": "My Folder for current user"
        },
        {
          "method": "GET",
          "rel": "myHistory",
          "href": "/folders/folders/@myHistory",
          "uri": "/folders/folders/@myHistory",
          "type": "application/vnd.sas.content.folder",
          "title": "My History folder for current user"
        },
        {
          "method": "GET",
          "rel": "myFavorites",
          "href": "/folders/folders/@myFavorites",
          "uri": "/folders/folders/@myFavorites",
          "type": "application/vnd.sas.content.folder",
          "title": "My Favorites folder for current user"
        },
        {
          "method": "GET",
          "rel": "appData",
          "href": "/folders/folders/@appDataFolder",
          "uri": "/folders/folders/@appDataFolder",
          "type": "application/vnd.sas.content.folder",
          "title": "Application data folder for current user"
        },
        {
          "method": "GET",
          "rel": "recycleBin",
          "href": "/folders/folders/@myRecycleBin",
          "uri": "/folders/folders/@myRecycleBin",
          "type": "application/vnd.sas.content.folder",
          "title": "Recycle Bin folder for current user"
        },
        {
          "method": "GET",
          "rel": "public",
          "href": "/folders/folders/@public",
          "uri": "/folders/folders/@public",
          "type": "application/vnd.sas.content.folder",
          "title": "Public folder"
        },
        {
          "method": "GET",
          "rel": "products",
          "href": "/folders/folders/@products",
          "uri": "/folders/folders/@products",
          "type": "application/vnd.sas.content.folder",
          "title": "Products folder"
        },
        {
          "method": "PUT",
          "rel": "validateName",
          "href": "/folders/commons/validations/folders/@new/name?value={newname}&parentFolderUri={parentFolderUri}",
          "uri": "/folders/commons/validations/folders/@new/name?value={newname}&parentFolderUri={parentFolderUri}",
          "type": "application/vnd.sas.content.folder",
          "title": "Validate new folder name"
        },
        {
          "method": "POST",
          "rel": "createSubfolder",
          "href": "/folders/folders?parentFolderUri=/folders/folders/{parentId}",
          "uri": "/folders/folders?parentFolderUri=/folders/folders/{parentId}",
          "type": "application/vnd.sas.content.folder"
        }
      ]
    }
    
    Status Meaning Description Schema
    200 OK The request succeeded. folderCollection

    Folder

    Contains the operations for the folder resource.

    Get a list of root folders

    Code samples

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

    GET /rootFolders

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

    Parameters
    Name In Type Required Description
    start query integer false 0-based offset of first folder to return. The default value is 0.
    limit query integer false Maximum number of folders to return. The default value is 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

    An example of a resource collection containing folders.

    {
      "links": [
        {
          "method": "GET",
          "rel": "collection",
          "href": "/folders/folders",
          "uri": "/folders/folders",
          "type": "application/vnd.sas.collection"
        },
        {
          "method": "GET",
          "rel": "self",
          "href": "/folders/folders?start=0&limit=20",
          "uri": "/folders/folders?start=0&limit=20",
          "type": "application/vnd.sas.collection"
        },
        {
          "method": "POST",
          "rel": "createFolder",
          "href": "/folders/folders",
          "uri": "/folders/folders",
          "type": "application/vnd.sas.content.folder",
          "responseType": "application/vnd.sas.content.folder"
        }
      ],
      "name": "folders",
      "accept": "application/vnd.sas.content.folder",
      "start": 0,
      "items": [
        {
          "creationTimeStamp": "2020-10-27T16:26:54.618197Z",
          "createdBy": "bob",
          "modifiedTimeStamp": "2020-10-27T16:26:54.618198Z",
          "modifiedBy": "bob",
          "version": 1,
          "id": "b156020a-83f1-41c2-9d63-fe49780526dc",
          "name": "Samples",
          "parentFolderUri": "/folders/folders/804ea126-e12b-42ee-b9c4-40cb79db222b",
          "type": "folder",
          "memberCount": 7,
          "links": [
            {
              "method": "GET",
              "rel": "self",
              "href": "/folders/folders/b156020a-83f1-41c2-9d63-fe49780526dc",
              "uri": "/folders/folders/b156020a-83f1-41c2-9d63-fe49780526dc",
              "type": "application/vnd.sas.content.folder"
            },
            {
              "method": "PUT",
              "rel": "update",
              "href": "/folders/folders/b156020a-83f1-41c2-9d63-fe49780526dc",
              "uri": "/folders/folders/b156020a-83f1-41c2-9d63-fe49780526dc",
              "type": "application/vnd.sas.content.folder",
              "responseType": "application/vnd.sas.content.folder"
            },
            {
              "method": "DELETE",
              "rel": "delete",
              "href": "/folders/folders/b156020a-83f1-41c2-9d63-fe49780526dc",
              "uri": "/folders/folders/b156020a-83f1-41c2-9d63-fe49780526dc"
            },
            {
              "method": "DELETE",
              "rel": "deleteRecursively",
              "href": "/folders/folders/b156020a-83f1-41c2-9d63-fe49780526dc?recursive=true",
              "uri": "/folders/folders/b156020a-83f1-41c2-9d63-fe49780526dc?recursive=true"
            },
            {
              "method": "GET",
              "rel": "members",
              "href": "/folders/folders/b156020a-83f1-41c2-9d63-fe49780526dc/members",
              "uri": "/folders/folders/b156020a-83f1-41c2-9d63-fe49780526dc/members",
              "type": "application/vnd.sas.collection",
              "itemType": "application/vnd.sas.content.folder"
            },
            {
              "method": "POST",
              "rel": "addMember",
              "href": "/folders/folders/b156020a-83f1-41c2-9d63-fe49780526dc/members",
              "uri": "/folders/folders/b156020a-83f1-41c2-9d63-fe49780526dc/members",
              "type": "application/vnd.sas.content.folder.member",
              "responseType": "application/vnd.sas.content.folder.member"
            },
            {
              "method": "GET",
              "rel": "up",
              "href": "/folders/folders/804ea126-e12b-42ee-b9c4-40cb79db222b",
              "uri": "/folders/folders/804ea126-e12b-42ee-b9c4-40cb79db222b",
              "type": "application/vnd.sas.content.folder"
            },
            {
              "method": "GET",
              "rel": "ancestors",
              "href": "/folders/ancestors?childUri=/folders/folders/b156020a-83f1-41c2-9d63-fe49780526dc",
              "uri": "/folders/ancestors?childUri=/folders/folders/b156020a-83f1-41c2-9d63-fe49780526dc",
              "type": "application/vnd.sas.content.folder.ancestor"
            },
            {
              "method": "POST",
              "rel": "createChild",
              "href": "/folders/folders?parentFolderUri=/folders/folders/b156020a-83f1-41c2-9d63-fe49780526dc",
              "uri": "/folders/folders?parentFolderUri=/folders/folders/b156020a-83f1-41c2-9d63-fe49780526dc",
              "type": "application/vnd.sas.content.folder"
            },
            {
              "method": "PUT",
              "rel": "validateRename",
              "href": "/folders/commons/validations/folders/804ea126-e12b-42ee-b9c4-40cb79db222b/members/0ab9120e-2cbc-4de8-8b6e-e8d81b60d982/name?value={newname}&type=folder",
              "uri": "/folders/commons/validations/folders/804ea126-e12b-42ee-b9c4-40cb79db222b/members/0ab9120e-2cbc-4de8-8b6e-e8d81b60d982/name?value={newname}&type=folder",
              "type": "application/vnd.sas.validation"
            },
            {
              "method": "PUT",
              "rel": "validateNewMemberName",
              "href": "/folders/commons/validations/folders/b156020a-83f1-41c2-9d63-fe49780526dc/members/@new/name?value={newname}&type={newtype}",
              "uri": "/folders/commons/validations/folders/b156020a-83f1-41c2-9d63-fe49780526dc/members/@new/name?value={newname}&type={newtype}",
              "type": "application/vnd.sas.validation"
            },
            {
              "method": "GET",
              "rel": "transferExport",
              "href": "/folders/folders/b156020a-83f1-41c2-9d63-fe49780526dc",
              "uri": "/folders/folders/b156020a-83f1-41c2-9d63-fe49780526dc",
              "responseType": "application/vnd.sas.transfer.object"
            },
            {
              "method": "PUT",
              "rel": "transferImportUpdate",
              "href": "/folders/folders/b156020a-83f1-41c2-9d63-fe49780526dc",
              "uri": "/folders/folders/b156020a-83f1-41c2-9d63-fe49780526dc",
              "type": "application/vnd.sas.transfer.object",
              "responseType": "application/vnd.sas.summary"
            },
            {
              "method": "POST",
              "rel": "transferImport",
              "href": "/folders/folders",
              "uri": "/folders/folders",
              "type": "application/vnd.sas.transfer.object",
              "responseType": "application/vnd.sas.summary"
            }
          ]
        },
        {
          "<item 2>": null
        },
        {
          "<item 3>": null
        },
        {
          "etc. to item 20": null
        }
      ],
      "limit": 20,
      "version": 2
    }
    
    {
      "links": [
        {
          "method": "GET",
          "rel": "collection",
          "href": "/folders/folders",
          "uri": "/folders/folders",
          "type": "application/vnd.sas.collection"
        },
        {
          "method": "GET",
          "rel": "self",
          "href": "/folders/folders?start=0&limit=20",
          "uri": "/folders/folders?start=0&limit=20",
          "type": "application/vnd.sas.collection"
        },
        {
          "method": "POST",
          "rel": "createFolder",
          "href": "/folders/folders",
          "uri": "/folders/folders",
          "type": "application/vnd.sas.content.folder",
          "responseType": "application/vnd.sas.content.folder"
        }
      ],
      "name": "folders",
      "accept": "application/vnd.sas.content.folder",
      "start": 0,
      "items": [
        {
          "creationTimeStamp": "2020-10-27T16:26:54.618197Z",
          "createdBy": "bob",
          "modifiedTimeStamp": "2020-10-27T16:26:54.618198Z",
          "modifiedBy": "bob",
          "version": 1,
          "id": "b156020a-83f1-41c2-9d63-fe49780526dc",
          "name": "Samples",
          "parentFolderUri": "/folders/folders/804ea126-e12b-42ee-b9c4-40cb79db222b",
          "type": "folder",
          "memberCount": 7,
          "links": [
            {
              "method": "GET",
              "rel": "self",
              "href": "/folders/folders/b156020a-83f1-41c2-9d63-fe49780526dc",
              "uri": "/folders/folders/b156020a-83f1-41c2-9d63-fe49780526dc",
              "type": "application/vnd.sas.content.folder"
            },
            {
              "method": "PUT",
              "rel": "update",
              "href": "/folders/folders/b156020a-83f1-41c2-9d63-fe49780526dc",
              "uri": "/folders/folders/b156020a-83f1-41c2-9d63-fe49780526dc",
              "type": "application/vnd.sas.content.folder",
              "responseType": "application/vnd.sas.content.folder"
            },
            {
              "method": "DELETE",
              "rel": "delete",
              "href": "/folders/folders/b156020a-83f1-41c2-9d63-fe49780526dc",
              "uri": "/folders/folders/b156020a-83f1-41c2-9d63-fe49780526dc"
            },
            {
              "method": "DELETE",
              "rel": "deleteRecursively",
              "href": "/folders/folders/b156020a-83f1-41c2-9d63-fe49780526dc?recursive=true",
              "uri": "/folders/folders/b156020a-83f1-41c2-9d63-fe49780526dc?recursive=true"
            },
            {
              "method": "GET",
              "rel": "members",
              "href": "/folders/folders/b156020a-83f1-41c2-9d63-fe49780526dc/members",
              "uri": "/folders/folders/b156020a-83f1-41c2-9d63-fe49780526dc/members",
              "type": "application/vnd.sas.collection",
              "itemType": "application/vnd.sas.content.folder"
            },
            {
              "method": "POST",
              "rel": "addMember",
              "href": "/folders/folders/b156020a-83f1-41c2-9d63-fe49780526dc/members",
              "uri": "/folders/folders/b156020a-83f1-41c2-9d63-fe49780526dc/members",
              "type": "application/vnd.sas.content.folder.member",
              "responseType": "application/vnd.sas.content.folder.member"
            },
            {
              "method": "GET",
              "rel": "up",
              "href": "/folders/folders/804ea126-e12b-42ee-b9c4-40cb79db222b",
              "uri": "/folders/folders/804ea126-e12b-42ee-b9c4-40cb79db222b",
              "type": "application/vnd.sas.content.folder"
            },
            {
              "method": "GET",
              "rel": "ancestors",
              "href": "/folders/ancestors?childUri=/folders/folders/b156020a-83f1-41c2-9d63-fe49780526dc",
              "uri": "/folders/ancestors?childUri=/folders/folders/b156020a-83f1-41c2-9d63-fe49780526dc",
              "type": "application/vnd.sas.content.folder.ancestor"
            },
            {
              "method": "POST",
              "rel": "createChild",
              "href": "/folders/folders?parentFolderUri=/folders/folders/b156020a-83f1-41c2-9d63-fe49780526dc",
              "uri": "/folders/folders?parentFolderUri=/folders/folders/b156020a-83f1-41c2-9d63-fe49780526dc",
              "type": "application/vnd.sas.content.folder"
            },
            {
              "method": "PUT",
              "rel": "validateRename",
              "href": "/folders/commons/validations/folders/804ea126-e12b-42ee-b9c4-40cb79db222b/members/0ab9120e-2cbc-4de8-8b6e-e8d81b60d982/name?value={newname}&type=folder",
              "uri": "/folders/commons/validations/folders/804ea126-e12b-42ee-b9c4-40cb79db222b/members/0ab9120e-2cbc-4de8-8b6e-e8d81b60d982/name?value={newname}&type=folder",
              "type": "application/vnd.sas.validation"
            },
            {
              "method": "PUT",
              "rel": "validateNewMemberName",
              "href": "/folders/commons/validations/folders/b156020a-83f1-41c2-9d63-fe49780526dc/members/@new/name?value={newname}&type={newtype}",
              "uri": "/folders/commons/validations/folders/b156020a-83f1-41c2-9d63-fe49780526dc/members/@new/name?value={newname}&type={newtype}",
              "type": "application/vnd.sas.validation"
            },
            {
              "method": "GET",
              "rel": "transferExport",
              "href": "/folders/folders/b156020a-83f1-41c2-9d63-fe49780526dc",
              "uri": "/folders/folders/b156020a-83f1-41c2-9d63-fe49780526dc",
              "responseType": "application/vnd.sas.transfer.object"
            },
            {
              "method": "PUT",
              "rel": "transferImportUpdate",
              "href": "/folders/folders/b156020a-83f1-41c2-9d63-fe49780526dc",
              "uri": "/folders/folders/b156020a-83f1-41c2-9d63-fe49780526dc",
              "type": "application/vnd.sas.transfer.object",
              "responseType": "application/vnd.sas.summary"
            },
            {
              "method": "POST",
              "rel": "transferImport",
              "href": "/folders/folders",
              "uri": "/folders/folders",
              "type": "application/vnd.sas.transfer.object",
              "responseType": "application/vnd.sas.summary"
            }
          ]
        },
        {
          "<item 2>": null
        },
        {
          "<item 3>": null
        },
        {
          "etc. to item 20": null
        }
      ],
      "limit": 20,
      "version": 2
    }
    
    {
      "links": [
        {
          "method": "GET",
          "rel": "collection",
          "href": "/folders/folders",
          "uri": "/folders/folders",
          "type": "application/vnd.sas.collection"
        },
        {
          "method": "GET",
          "rel": "self",
          "href": "/folders/folders?start=0&limit=20",
          "uri": "/folders/folders?start=0&limit=20",
          "type": "application/vnd.sas.collection"
        },
        {
          "method": "POST",
          "rel": "createFolder",
          "href": "/folders/folders",
          "uri": "/folders/folders",
          "type": "application/vnd.sas.content.folder",
          "responseType": "application/vnd.sas.content.folder"
        }
      ],
      "name": "folders",
      "accept": "application/vnd.sas.content.folder",
      "start": 0,
      "items": [
        {
          "creationTimeStamp": "2020-10-27T16:26:54.618197Z",
          "createdBy": "bob",
          "modifiedTimeStamp": "2020-10-27T16:26:54.618198Z",
          "modifiedBy": "bob",
          "version": 1,
          "id": "b156020a-83f1-41c2-9d63-fe49780526dc",
          "name": "Samples",
          "parentFolderUri": "/folders/folders/804ea126-e12b-42ee-b9c4-40cb79db222b",
          "type": "folder",
          "memberCount": 7,
          "links": [
            {
              "method": "GET",
              "rel": "self",
              "href": "/folders/folders/b156020a-83f1-41c2-9d63-fe49780526dc",
              "uri": "/folders/folders/b156020a-83f1-41c2-9d63-fe49780526dc",
              "type": "application/vnd.sas.content.folder"
            },
            {
              "method": "PUT",
              "rel": "update",
              "href": "/folders/folders/b156020a-83f1-41c2-9d63-fe49780526dc",
              "uri": "/folders/folders/b156020a-83f1-41c2-9d63-fe49780526dc",
              "type": "application/vnd.sas.content.folder",
              "responseType": "application/vnd.sas.content.folder"
            },
            {
              "method": "DELETE",
              "rel": "delete",
              "href": "/folders/folders/b156020a-83f1-41c2-9d63-fe49780526dc",
              "uri": "/folders/folders/b156020a-83f1-41c2-9d63-fe49780526dc"
            },
            {
              "method": "DELETE",
              "rel": "deleteRecursively",
              "href": "/folders/folders/b156020a-83f1-41c2-9d63-fe49780526dc?recursive=true",
              "uri": "/folders/folders/b156020a-83f1-41c2-9d63-fe49780526dc?recursive=true"
            },
            {
              "method": "GET",
              "rel": "members",
              "href": "/folders/folders/b156020a-83f1-41c2-9d63-fe49780526dc/members",
              "uri": "/folders/folders/b156020a-83f1-41c2-9d63-fe49780526dc/members",
              "type": "application/vnd.sas.collection",
              "itemType": "application/vnd.sas.content.folder"
            },
            {
              "method": "POST",
              "rel": "addMember",
              "href": "/folders/folders/b156020a-83f1-41c2-9d63-fe49780526dc/members",
              "uri": "/folders/folders/b156020a-83f1-41c2-9d63-fe49780526dc/members",
              "type": "application/vnd.sas.content.folder.member",
              "responseType": "application/vnd.sas.content.folder.member"
            },
            {
              "method": "GET",
              "rel": "up",
              "href": "/folders/folders/804ea126-e12b-42ee-b9c4-40cb79db222b",
              "uri": "/folders/folders/804ea126-e12b-42ee-b9c4-40cb79db222b",
              "type": "application/vnd.sas.content.folder"
            },
            {
              "method": "GET",
              "rel": "ancestors",
              "href": "/folders/ancestors?childUri=/folders/folders/b156020a-83f1-41c2-9d63-fe49780526dc",
              "uri": "/folders/ancestors?childUri=/folders/folders/b156020a-83f1-41c2-9d63-fe49780526dc",
              "type": "application/vnd.sas.content.folder.ancestor"
            },
            {
              "method": "POST",
              "rel": "createChild",
              "href": "/folders/folders?parentFolderUri=/folders/folders/b156020a-83f1-41c2-9d63-fe49780526dc",
              "uri": "/folders/folders?parentFolderUri=/folders/folders/b156020a-83f1-41c2-9d63-fe49780526dc",
              "type": "application/vnd.sas.content.folder"
            },
            {
              "method": "PUT",
              "rel": "validateRename",
              "href": "/folders/commons/validations/folders/804ea126-e12b-42ee-b9c4-40cb79db222b/members/0ab9120e-2cbc-4de8-8b6e-e8d81b60d982/name?value={newname}&type=folder",
              "uri": "/folders/commons/validations/folders/804ea126-e12b-42ee-b9c4-40cb79db222b/members/0ab9120e-2cbc-4de8-8b6e-e8d81b60d982/name?value={newname}&type=folder",
              "type": "application/vnd.sas.validation"
            },
            {
              "method": "PUT",
              "rel": "validateNewMemberName",
              "href": "/folders/commons/validations/folders/b156020a-83f1-41c2-9d63-fe49780526dc/members/@new/name?value={newname}&type={newtype}",
              "uri": "/folders/commons/validations/folders/b156020a-83f1-41c2-9d63-fe49780526dc/members/@new/name?value={newname}&type={newtype}",
              "type": "application/vnd.sas.validation"
            },
            {
              "method": "GET",
              "rel": "transferExport",
              "href": "/folders/folders/b156020a-83f1-41c2-9d63-fe49780526dc",
              "uri": "/folders/folders/b156020a-83f1-41c2-9d63-fe49780526dc",
              "responseType": "application/vnd.sas.transfer.object"
            },
            {
              "method": "PUT",
              "rel": "transferImportUpdate",
              "href": "/folders/folders/b156020a-83f1-41c2-9d63-fe49780526dc",
              "uri": "/folders/folders/b156020a-83f1-41c2-9d63-fe49780526dc",
              "type": "application/vnd.sas.transfer.object",
              "responseType": "application/vnd.sas.summary"
            },
            {
              "method": "POST",
              "rel": "transferImport",
              "href": "/folders/folders",
              "uri": "/folders/folders",
              "type": "application/vnd.sas.transfer.object",
              "responseType": "application/vnd.sas.summary"
            }
          ]
        },
        {
          "<item 2>": null
        },
        {
          "<item 3>": null
        },
        {
          "etc. to item 20": null
        }
      ],
      "limit": 20,
      "version": 2
    }
    

    Example of an error response from the service

    {
      "version": 2,
      "httpStatusCode": 400,
      "errorCode": 1020,
      "message": "Field blah is invalid for the target type.",
      "details": [
        "path: /folders/rootFolders",
        "correlator: 103aed3e-d183-459e-8c8f-f0c57013995f"
      ]
    }
    
    {
      "version": 2,
      "httpStatusCode": 400,
      "errorCode": 1020,
      "message": "Field blah is invalid for the target type.",
      "details": [
        "path: /folders/rootFolders",
        "correlator: 103aed3e-d183-459e-8c8f-f0c57013995f"
      ]
    }
    
    {
      "version": 2,
      "httpStatusCode": 400,
      "errorCode": 1020,
      "message": "Field blah is invalid for the target type.",
      "details": [
        "path: /folders/rootFolders",
        "correlator: 103aed3e-d183-459e-8c8f-f0c57013995f"
      ]
    }
    
    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://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'
    
    
    
    const headers = {
      'Accept':'application/vnd.sas.collection+json',
      'Accept-Language':'string',
      'Accept-Item':'string'
    };
    
    fetch('https://example.com/folders/folders',
    {
      method: 'GET',
    
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    import requests
    headers = {
      'Accept': 'application/vnd.sas.collection+json',
      'Accept-Language': 'string',
      'Accept-Item': 'string'
    }
    
    r = requests.get('https://example.com/folders/folders', headers = headers)
    
    print(r.json())
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Accept": []string{"application/vnd.sas.collection+json"},
            "Accept-Language": []string{"string"},
            "Accept-Item": []string{"string"},
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("GET", "https://example.com/folders/folders", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    

    GET /folders

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

    Parameters
    Name In Type Required Description
    start query integer false 0-based offset of first folder to return. The default value is 0.
    limit query integer false Maximum number of folders to return. The default value is 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

    An example of a resource collection containing folders.

    {
      "links": [
        {
          "method": "GET",
          "rel": "collection",
          "href": "/folders/folders",
          "uri": "/folders/folders",
          "type": "application/vnd.sas.collection"
        },
        {
          "method": "GET",
          "rel": "self",
          "href": "/folders/folders?start=0&limit=20",
          "uri": "/folders/folders?start=0&limit=20",
          "type": "application/vnd.sas.collection"
        },
        {
          "method": "POST",
          "rel": "createFolder",
          "href": "/folders/folders",
          "uri": "/folders/folders",
          "type": "application/vnd.sas.content.folder",
          "responseType": "application/vnd.sas.content.folder"
        }
      ],
      "name": "folders",
      "accept": "application/vnd.sas.content.folder",
      "start": 0,
      "items": [
        {
          "creationTimeStamp": "2020-10-27T16:26:54.618197Z",
          "createdBy": "bob",
          "modifiedTimeStamp": "2020-10-27T16:26:54.618198Z",
          "modifiedBy": "bob",
          "version": 1,
          "id": "b156020a-83f1-41c2-9d63-fe49780526dc",
          "name": "Samples",
          "parentFolderUri": "/folders/folders/804ea126-e12b-42ee-b9c4-40cb79db222b",
          "type": "folder",
          "memberCount": 7,
          "links": [
            {
              "method": "GET",
              "rel": "self",
              "href": "/folders/folders/b156020a-83f1-41c2-9d63-fe49780526dc",
              "uri": "/folders/folders/b156020a-83f1-41c2-9d63-fe49780526dc",
              "type": "application/vnd.sas.content.folder"
            },
            {
              "method": "PUT",
              "rel": "update",
              "href": "/folders/folders/b156020a-83f1-41c2-9d63-fe49780526dc",
              "uri": "/folders/folders/b156020a-83f1-41c2-9d63-fe49780526dc",
              "type": "application/vnd.sas.content.folder",
              "responseType": "application/vnd.sas.content.folder"
            },
            {
              "method": "DELETE",
              "rel": "delete",
              "href": "/folders/folders/b156020a-83f1-41c2-9d63-fe49780526dc",
              "uri": "/folders/folders/b156020a-83f1-41c2-9d63-fe49780526dc"
            },
            {
              "method": "DELETE",
              "rel": "deleteRecursively",
              "href": "/folders/folders/b156020a-83f1-41c2-9d63-fe49780526dc?recursive=true",
              "uri": "/folders/folders/b156020a-83f1-41c2-9d63-fe49780526dc?recursive=true"
            },
            {
              "method": "GET",
              "rel": "members",
              "href": "/folders/folders/b156020a-83f1-41c2-9d63-fe49780526dc/members",
              "uri": "/folders/folders/b156020a-83f1-41c2-9d63-fe49780526dc/members",
              "type": "application/vnd.sas.collection",
              "itemType": "application/vnd.sas.content.folder"
            },
            {
              "method": "POST",
              "rel": "addMember",
              "href": "/folders/folders/b156020a-83f1-41c2-9d63-fe49780526dc/members",
              "uri": "/folders/folders/b156020a-83f1-41c2-9d63-fe49780526dc/members",
              "type": "application/vnd.sas.content.folder.member",
              "responseType": "application/vnd.sas.content.folder.member"
            },
            {
              "method": "GET",
              "rel": "up",
              "href": "/folders/folders/804ea126-e12b-42ee-b9c4-40cb79db222b",
              "uri": "/folders/folders/804ea126-e12b-42ee-b9c4-40cb79db222b",
              "type": "application/vnd.sas.content.folder"
            },
            {
              "method": "GET",
              "rel": "ancestors",
              "href": "/folders/ancestors?childUri=/folders/folders/b156020a-83f1-41c2-9d63-fe49780526dc",
              "uri": "/folders/ancestors?childUri=/folders/folders/b156020a-83f1-41c2-9d63-fe49780526dc",
              "type": "application/vnd.sas.content.folder.ancestor"
            },
            {
              "method": "POST",
              "rel": "createChild",
              "href": "/folders/folders?parentFolderUri=/folders/folders/b156020a-83f1-41c2-9d63-fe49780526dc",
              "uri": "/folders/folders?parentFolderUri=/folders/folders/b156020a-83f1-41c2-9d63-fe49780526dc",
              "type": "application/vnd.sas.content.folder"
            },
            {
              "method": "PUT",
              "rel": "validateRename",
              "href": "/folders/commons/validations/folders/804ea126-e12b-42ee-b9c4-40cb79db222b/members/0ab9120e-2cbc-4de8-8b6e-e8d81b60d982/name?value={newname}&type=folder",
              "uri": "/folders/commons/validations/folders/804ea126-e12b-42ee-b9c4-40cb79db222b/members/0ab9120e-2cbc-4de8-8b6e-e8d81b60d982/name?value={newname}&type=folder",
              "type": "application/vnd.sas.validation"
            },
            {
              "method": "PUT",
              "rel": "validateNewMemberName",
              "href": "/folders/commons/validations/folders/b156020a-83f1-41c2-9d63-fe49780526dc/members/@new/name?value={newname}&type={newtype}",
              "uri": "/folders/commons/validations/folders/b156020a-83f1-41c2-9d63-fe49780526dc/members/@new/name?value={newname}&type={newtype}",
              "type": "application/vnd.sas.validation"
            },
            {
              "method": "GET",
              "rel": "transferExport",
              "href": "/folders/folders/b156020a-83f1-41c2-9d63-fe49780526dc",
              "uri": "/folders/folders/b156020a-83f1-41c2-9d63-fe49780526dc",
              "responseType": "application/vnd.sas.transfer.object"
            },
            {
              "method": "PUT",
              "rel": "transferImportUpdate",
              "href": "/folders/folders/b156020a-83f1-41c2-9d63-fe49780526dc",
              "uri": "/folders/folders/b156020a-83f1-41c2-9d63-fe49780526dc",
              "type": "application/vnd.sas.transfer.object",
              "responseType": "application/vnd.sas.summary"
            },
            {
              "method": "POST",
              "rel": "transferImport",
              "href": "/folders/folders",
              "uri": "/folders/folders",
              "type": "application/vnd.sas.transfer.object",
              "responseType": "application/vnd.sas.summary"
            }
          ]
        },
        {
          "<item 2>": null
        },
        {
          "<item 3>": null
        },
        {
          "etc. to item 20": null
        }
      ],
      "limit": 20,
      "version": 2
    }
    
    {
      "links": [
        {
          "method": "GET",
          "rel": "collection",
          "href": "/folders/folders",
          "uri": "/folders/folders",
          "type": "application/vnd.sas.collection"
        },
        {
          "method": "GET",
          "rel": "self",
          "href": "/folders/folders?start=0&limit=20",
          "uri": "/folders/folders?start=0&limit=20",
          "type": "application/vnd.sas.collection"
        },
        {
          "method": "POST",
          "rel": "createFolder",
          "href": "/folders/folders",
          "uri": "/folders/folders",
          "type": "application/vnd.sas.content.folder",
          "responseType": "application/vnd.sas.content.folder"
        }
      ],
      "name": "folders",
      "accept": "application/vnd.sas.content.folder",
      "start": 0,
      "items": [
        {
          "creationTimeStamp": "2020-10-27T16:26:54.618197Z",
          "createdBy": "bob",
          "modifiedTimeStamp": "2020-10-27T16:26:54.618198Z",
          "modifiedBy": "bob",
          "version": 1,
          "id": "b156020a-83f1-41c2-9d63-fe49780526dc",
          "name": "Samples",
          "parentFolderUri": "/folders/folders/804ea126-e12b-42ee-b9c4-40cb79db222b",
          "type": "folder",
          "memberCount": 7,
          "links": [
            {
              "method": "GET",
              "rel": "self",
              "href": "/folders/folders/b156020a-83f1-41c2-9d63-fe49780526dc",
              "uri": "/folders/folders/b156020a-83f1-41c2-9d63-fe49780526dc",
              "type": "application/vnd.sas.content.folder"
            },
            {
              "method": "PUT",
              "rel": "update",
              "href": "/folders/folders/b156020a-83f1-41c2-9d63-fe49780526dc",
              "uri": "/folders/folders/b156020a-83f1-41c2-9d63-fe49780526dc",
              "type": "application/vnd.sas.content.folder",
              "responseType": "application/vnd.sas.content.folder"
            },
            {
              "method": "DELETE",
              "rel": "delete",
              "href": "/folders/folders/b156020a-83f1-41c2-9d63-fe49780526dc",
              "uri": "/folders/folders/b156020a-83f1-41c2-9d63-fe49780526dc"
            },
            {
              "method": "DELETE",
              "rel": "deleteRecursively",
              "href": "/folders/folders/b156020a-83f1-41c2-9d63-fe49780526dc?recursive=true",
              "uri": "/folders/folders/b156020a-83f1-41c2-9d63-fe49780526dc?recursive=true"
            },
            {
              "method": "GET",
              "rel": "members",
              "href": "/folders/folders/b156020a-83f1-41c2-9d63-fe49780526dc/members",
              "uri": "/folders/folders/b156020a-83f1-41c2-9d63-fe49780526dc/members",
              "type": "application/vnd.sas.collection",
              "itemType": "application/vnd.sas.content.folder"
            },
            {
              "method": "POST",
              "rel": "addMember",
              "href": "/folders/folders/b156020a-83f1-41c2-9d63-fe49780526dc/members",
              "uri": "/folders/folders/b156020a-83f1-41c2-9d63-fe49780526dc/members",
              "type": "application/vnd.sas.content.folder.member",
              "responseType": "application/vnd.sas.content.folder.member"
            },
            {
              "method": "GET",
              "rel": "up",
              "href": "/folders/folders/804ea126-e12b-42ee-b9c4-40cb79db222b",
              "uri": "/folders/folders/804ea126-e12b-42ee-b9c4-40cb79db222b",
              "type": "application/vnd.sas.content.folder"
            },
            {
              "method": "GET",
              "rel": "ancestors",
              "href": "/folders/ancestors?childUri=/folders/folders/b156020a-83f1-41c2-9d63-fe49780526dc",
              "uri": "/folders/ancestors?childUri=/folders/folders/b156020a-83f1-41c2-9d63-fe49780526dc",
              "type": "application/vnd.sas.content.folder.ancestor"
            },
            {
              "method": "POST",
              "rel": "createChild",
              "href": "/folders/folders?parentFolderUri=/folders/folders/b156020a-83f1-41c2-9d63-fe49780526dc",
              "uri": "/folders/folders?parentFolderUri=/folders/folders/b156020a-83f1-41c2-9d63-fe49780526dc",
              "type": "application/vnd.sas.content.folder"
            },
            {
              "method": "PUT",
              "rel": "validateRename",
              "href": "/folders/commons/validations/folders/804ea126-e12b-42ee-b9c4-40cb79db222b/members/0ab9120e-2cbc-4de8-8b6e-e8d81b60d982/name?value={newname}&type=folder",
              "uri": "/folders/commons/validations/folders/804ea126-e12b-42ee-b9c4-40cb79db222b/members/0ab9120e-2cbc-4de8-8b6e-e8d81b60d982/name?value={newname}&type=folder",
              "type": "application/vnd.sas.validation"
            },
            {
              "method": "PUT",
              "rel": "validateNewMemberName",
              "href": "/folders/commons/validations/folders/b156020a-83f1-41c2-9d63-fe49780526dc/members/@new/name?value={newname}&type={newtype}",
              "uri": "/folders/commons/validations/folders/b156020a-83f1-41c2-9d63-fe49780526dc/members/@new/name?value={newname}&type={newtype}",
              "type": "application/vnd.sas.validation"
            },
            {
              "method": "GET",
              "rel": "transferExport",
              "href": "/folders/folders/b156020a-83f1-41c2-9d63-fe49780526dc",
              "uri": "/folders/folders/b156020a-83f1-41c2-9d63-fe49780526dc",
              "responseType": "application/vnd.sas.transfer.object"
            },
            {
              "method": "PUT",
              "rel": "transferImportUpdate",
              "href": "/folders/folders/b156020a-83f1-41c2-9d63-fe49780526dc",
              "uri": "/folders/folders/b156020a-83f1-41c2-9d63-fe49780526dc",
              "type": "application/vnd.sas.transfer.object",
              "responseType": "application/vnd.sas.summary"
            },
            {
              "method": "POST",
              "rel": "transferImport",
              "href": "/folders/folders",
              "uri": "/folders/folders",
              "type": "application/vnd.sas.transfer.object",
              "responseType": "application/vnd.sas.summary"
            }
          ]
        },
        {
          "<item 2>": null
        },
        {
          "<item 3>": null
        },
        {
          "etc. to item 20": null
        }
      ],
      "limit": 20,
      "version": 2
    }
    

    Example of an error response from the service

    {
      "version": 2,
      "httpStatusCode": 400,
      "errorCode": 1020,
      "message": "Field blah is invalid for the target type.",
      "details": [
        "path: /folders/rootFolders",
        "correlator: 103aed3e-d183-459e-8c8f-f0c57013995f"
      ]
    }
    
    {
      "version": 2,
      "httpStatusCode": 400,
      "errorCode": 1020,
      "message": "Field blah is invalid for the target type.",
      "details": [
        "path: /folders/rootFolders",
        "correlator: 103aed3e-d183-459e-8c8f-f0c57013995f"
      ]
    }
    
    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://example.com/folders/folders?parentFolderUri=string \
      -H 'Authorization: Bearer <access-token-goes-here>' \
      -H 'Content-Type: application/vnd.sas.content.folder+json' \
      -H 'Accept: application/vnd.sas.content.folder+json'
    
    
    const inputBody = '{
      "name": "A new folder"
    }';
    const headers = {
      'Content-Type':'application/vnd.sas.content.folder+json',
      'Accept':'application/vnd.sas.content.folder+json'
    };
    
    fetch('https://example.com/folders/folders?parentFolderUri=string',
    {
      method: 'POST',
      body: inputBody,
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    import requests
    headers = {
      'Content-Type': 'application/vnd.sas.content.folder+json',
      'Accept': 'application/vnd.sas.content.folder+json'
    }
    
    r = requests.post('https://example.com/folders/folders', params={
      'parentFolderUri': 'string'
    }, headers = headers)
    
    print(r.json())
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Content-Type": []string{"application/vnd.sas.content.folder+json"},
            "Accept": []string{"application/vnd.sas.content.folder+json"},
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("POST", "https://example.com/folders/folders", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    

    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

    Sample body when creating new folder.

    {
      "name": "A new folder"
    }
    
    Parameters
    Name 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 false Folder

    Example responses

    Here is an example of using a POST request to create a new folder in the parentFolder @myFolder

    {
      "creationTimeStamp": "2019-08-08T12:55:20.420Z",
      "modifiedTimeStamp": "2019-08-08T12:55:20.420Z",
      "createdBy": "testuser",
      "modifiedBy": "testuser",
      "id": "f3277e88-01f2-4f2f-9ce2-cb575e849238",
      "name": "Test Folder 1",
      "parentFolderUri": "/folders/folders/c0e8ccf9-ac43-4303-a1ce-40d7ffbd7450",
      "type": "folder",
      "memberCount": 0,
      "links": [
        {
          "method": "GET",
          "rel": "self",
          "href": "/folders/folders/f3277e88-01f2-4f2f-9ce2-cb575e849238",
          "uri": "/folders/folders/f3277e88-01f2-4f2f-9ce2-cb575e849238",
          "type": "application/vnd.sas.content.folder"
        },
        {
          "method": "GET",
          "rel": "up",
          "href": "/folders/folders/c0e8ccf9-ac43-4303-a1ce-40d7ffbd7450",
          "uri": "/folders/folders/c0e8ccf9-ac43-4303-a1ce-40d7ffbd7450",
          "type": "application/vnd.sas.content.folder"
        },
        {
          "method": "PUT",
          "rel": "validateRename",
          "href": "/folders/commons/validations/folders/c0e8ccf9-ac43-4303-a1ce-40d7ffbd7450/members/35def691-e932-4bf2-a38a-9f38e906eb5e/name?value={newname}&type=folder",
          "uri": "/folders/commons/validations/folders/c0e8ccf9-ac43-4303-a1ce-40d7ffbd7450/members/35def691-e932-4bf2-a38a-9f38e906eb5e/name?value={newname}&type=folder"
        },
        {
          "method": "PUT",
          "rel": "validateNewMemberName",
          "href": "/folders/commons/validations/folders/f3277e88-01f2-4f2f-9ce2-cb575e849238/members/@new/name?value={newname}&type={newtype}",
          "uri": "/folders/commons/validations/folders/f3277e88-01f2-4f2f-9ce2-cb575e849238/members/@new/name?value={newname}&type={newtype}"
        },
        {
          "method": "GET",
          "rel": "ancestors",
          "href": "/folders/ancestors?childUri=/folders/folders/f3277e88-01f2-4f2f-9ce2-cb575e849238",
          "uri": "/folders/ancestors?childUri=/folders/folders/f3277e88-01f2-4f2f-9ce2-cb575e849238",
          "type": "application/vnd.sas.content.folder.ancestor"
        },
        {
          "method": "PUT",
          "rel": "update",
          "href": "/folders/folders/f3277e88-01f2-4f2f-9ce2-cb575e849238",
          "uri": "/folders/folders/f3277e88-01f2-4f2f-9ce2-cb575e849238",
          "type": "application/vnd.sas.content.folder",
          "responseType": "application/vnd.sas.content.folder"
        },
        {
          "method": "DELETE",
          "rel": "delete",
          "href": "/folders/folders/f3277e88-01f2-4f2f-9ce2-cb575e849238",
          "uri": "/folders/folders/f3277e88-01f2-4f2f-9ce2-cb575e849238"
        },
        {
          "method": "DELETE",
          "rel": "deleteRecursively",
          "href": "/folders/folders/f3277e88-01f2-4f2f-9ce2-cb575e849238?recursive=true",
          "uri": "/folders/folders/f3277e88-01f2-4f2f-9ce2-cb575e849238?recursive=true"
        },
        {
          "method": "GET",
          "rel": "members",
          "href": "/folders/folders/f3277e88-01f2-4f2f-9ce2-cb575e849238/members",
          "uri": "/folders/folders/f3277e88-01f2-4f2f-9ce2-cb575e849238/members",
          "type": "application/vnd.sas.collection",
          "itemType": "application/vnd.sas.content.folder.member"
        },
        {
          "method": "POST",
          "rel": "addMember",
          "href": "/folders/folders/f3277e88-01f2-4f2f-9ce2-cb575e849238/members",
          "uri": "/folders/folders/f3277e88-01f2-4f2f-9ce2-cb575e849238/members",
          "type": "application/vnd.sas.content.folder.member"
        },
        {
          "method": "POST",
          "rel": "createChild",
          "href": "/folders/folders?parentFolderUri=/folders/folders/f3277e88-01f2-4f2f-9ce2-cb575e849238",
          "uri": "/folders/folders?parentFolderUri=/folders/folders/f3277e88-01f2-4f2f-9ce2-cb575e849238",
          "type": "application/vnd.sas.content.folder"
        },
        {
          "method": "GET",
          "rel": "transferExport",
          "href": "/folders/folders/f3277e88-01f2-4f2f-9ce2-cb575e849238",
          "uri": "/folders/folders/f3277e88-01f2-4f2f-9ce2-cb575e849238",
          "responseType": "application/vnd.sas.transfer.object"
        },
        {
          "method": "PUT",
          "rel": "transferImportUpdate",
          "href": "/folders/folders/f3277e88-01f2-4f2f-9ce2-cb575e849238",
          "uri": "/folders/folders/f3277e88-01f2-4f2f-9ce2-cb575e849238",
          "type": "application/vnd.sas.transfer.object",
          "responseType": "application/vnd.sas.summary"
        },
        {
          "method": "POST",
          "rel": "transferImport",
          "href": "/folders/folders",
          "uri": "/folders/folders",
          "type": "application/vnd.sas.transfer.object",
          "responseType": "application/vnd.sas.summary"
        }
      ],
      "version": 1
    }
    
    {
      "creationTimeStamp": "2019-08-08T12:55:20.420Z",
      "modifiedTimeStamp": "2019-08-08T12:55:20.420Z",
      "createdBy": "testuser",
      "modifiedBy": "testuser",
      "id": "f3277e88-01f2-4f2f-9ce2-cb575e849238",
      "name": "Test Folder 1",
      "parentFolderUri": "/folders/folders/c0e8ccf9-ac43-4303-a1ce-40d7ffbd7450",
      "type": "folder",
      "memberCount": 0,
      "links": [
        {
          "method": "GET",
          "rel": "self",
          "href": "/folders/folders/f3277e88-01f2-4f2f-9ce2-cb575e849238",
          "uri": "/folders/folders/f3277e88-01f2-4f2f-9ce2-cb575e849238",
          "type": "application/vnd.sas.content.folder"
        },
        {
          "method": "GET",
          "rel": "up",
          "href": "/folders/folders/c0e8ccf9-ac43-4303-a1ce-40d7ffbd7450",
          "uri": "/folders/folders/c0e8ccf9-ac43-4303-a1ce-40d7ffbd7450",
          "type": "application/vnd.sas.content.folder"
        },
        {
          "method": "PUT",
          "rel": "validateRename",
          "href": "/folders/commons/validations/folders/c0e8ccf9-ac43-4303-a1ce-40d7ffbd7450/members/35def691-e932-4bf2-a38a-9f38e906eb5e/name?value={newname}&type=folder",
          "uri": "/folders/commons/validations/folders/c0e8ccf9-ac43-4303-a1ce-40d7ffbd7450/members/35def691-e932-4bf2-a38a-9f38e906eb5e/name?value={newname}&type=folder"
        },
        {
          "method": "PUT",
          "rel": "validateNewMemberName",
          "href": "/folders/commons/validations/folders/f3277e88-01f2-4f2f-9ce2-cb575e849238/members/@new/name?value={newname}&type={newtype}",
          "uri": "/folders/commons/validations/folders/f3277e88-01f2-4f2f-9ce2-cb575e849238/members/@new/name?value={newname}&type={newtype}"
        },
        {
          "method": "GET",
          "rel": "ancestors",
          "href": "/folders/ancestors?childUri=/folders/folders/f3277e88-01f2-4f2f-9ce2-cb575e849238",
          "uri": "/folders/ancestors?childUri=/folders/folders/f3277e88-01f2-4f2f-9ce2-cb575e849238",
          "type": "application/vnd.sas.content.folder.ancestor"
        },
        {
          "method": "PUT",
          "rel": "update",
          "href": "/folders/folders/f3277e88-01f2-4f2f-9ce2-cb575e849238",
          "uri": "/folders/folders/f3277e88-01f2-4f2f-9ce2-cb575e849238",
          "type": "application/vnd.sas.content.folder",
          "responseType": "application/vnd.sas.content.folder"
        },
        {
          "method": "DELETE",
          "rel": "delete",
          "href": "/folders/folders/f3277e88-01f2-4f2f-9ce2-cb575e849238",
          "uri": "/folders/folders/f3277e88-01f2-4f2f-9ce2-cb575e849238"
        },
        {
          "method": "DELETE",
          "rel": "deleteRecursively",
          "href": "/folders/folders/f3277e88-01f2-4f2f-9ce2-cb575e849238?recursive=true",
          "uri": "/folders/folders/f3277e88-01f2-4f2f-9ce2-cb575e849238?recursive=true"
        },
        {
          "method": "GET",
          "rel": "members",
          "href": "/folders/folders/f3277e88-01f2-4f2f-9ce2-cb575e849238/members",
          "uri": "/folders/folders/f3277e88-01f2-4f2f-9ce2-cb575e849238/members",
          "type": "application/vnd.sas.collection",
          "itemType": "application/vnd.sas.content.folder.member"
        },
        {
          "method": "POST",
          "rel": "addMember",
          "href": "/folders/folders/f3277e88-01f2-4f2f-9ce2-cb575e849238/members",
          "uri": "/folders/folders/f3277e88-01f2-4f2f-9ce2-cb575e849238/members",
          "type": "application/vnd.sas.content.folder.member"
        },
        {
          "method": "POST",
          "rel": "createChild",
          "href": "/folders/folders?parentFolderUri=/folders/folders/f3277e88-01f2-4f2f-9ce2-cb575e849238",
          "uri": "/folders/folders?parentFolderUri=/folders/folders/f3277e88-01f2-4f2f-9ce2-cb575e849238",
          "type": "application/vnd.sas.content.folder"
        },
        {
          "method": "GET",
          "rel": "transferExport",
          "href": "/folders/folders/f3277e88-01f2-4f2f-9ce2-cb575e849238",
          "uri": "/folders/folders/f3277e88-01f2-4f2f-9ce2-cb575e849238",
          "responseType": "application/vnd.sas.transfer.object"
        },
        {
          "method": "PUT",
          "rel": "transferImportUpdate",
          "href": "/folders/folders/f3277e88-01f2-4f2f-9ce2-cb575e849238",
          "uri": "/folders/folders/f3277e88-01f2-4f2f-9ce2-cb575e849238",
          "type": "application/vnd.sas.transfer.object",
          "responseType": "application/vnd.sas.summary"
        },
        {
          "method": "POST",
          "rel": "transferImport",
          "href": "/folders/folders",
          "uri": "/folders/folders",
          "type": "application/vnd.sas.transfer.object",
          "responseType": "application/vnd.sas.summary"
        }
      ],
      "version": 1
    }
    

    Example of an error response from the service

    {
      "version": 2,
      "httpStatusCode": 400,
      "errorCode": 1020,
      "message": "Field blah is invalid for the target type.",
      "details": [
        "path: /folders/rootFolders",
        "correlator: 103aed3e-d183-459e-8c8f-f0c57013995f"
      ]
    }
    
    {
      "version": 2,
      "httpStatusCode": 400,
      "errorCode": 1020,
      "message": "Field blah is invalid for the target type.",
      "details": [
        "path: /folders/rootFolders",
        "correlator: 103aed3e-d183-459e-8c8f-f0c57013995f"
      ]
    }
    
    {
      "version": 2,
      "httpStatusCode": 400,
      "errorCode": 1020,
      "message": "Field blah is invalid for the target type.",
      "details": [
        "path: /folders/rootFolders",
        "correlator: 103aed3e-d183-459e-8c8f-f0c57013995f"
      ]
    }
    
    {
      "version": 2,
      "httpStatusCode": 400,
      "errorCode": 1020,
      "message": "Field blah is invalid for the target type.",
      "details": [
        "path: /folders/rootFolders",
        "correlator: 103aed3e-d183-459e-8c8f-f0c57013995f"
      ]
    }
    
    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://example.com/folders/folders/@item \
      -H 'Authorization: Bearer <access-token-goes-here>' \
      -H 'Accept: application/vnd.sas.content.folder+json'
    
    
    
    const headers = {
      'Accept':'application/vnd.sas.content.folder+json'
    };
    
    fetch('https://example.com/folders/folders/@item',
    {
      method: 'GET',
    
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    import requests
    headers = {
      'Accept': 'application/vnd.sas.content.folder+json'
    }
    
    r = requests.get('https://example.com/folders/folders/@item', headers = headers)
    
    print(r.json())
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Accept": []string{"application/vnd.sas.content.folder+json"},
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("GET", "https://example.com/folders/folders/@item", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    

    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
    Name 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

    Here is an example of using a GET request for a folder.

    {
      "creationTimeStamp": "2019-08-08T12:53:51.309Z",
      "modifiedTimeStamp": "2019-08-08T12:53:51.309Z",
      "createdBy": "testuser",
      "modifiedBy": "testuser",
      "id": "6e6aa6e9-7c6a-4491-84fd-84051031a44d",
      "name": "My Folder",
      "parentFolderUri": "/folders/folders/f210f767-7f3a-4109-849b-f1b7d1c5d11a",
      "description": "My Folder for testuser",
      "type": "myFolder",
      "memberCount": 0,
      "properties": {
        "allowMove": "false"
      },
      "links": [
        {
          "method": "GET",
          "rel": "self",
          "href": "/folders/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d",
          "uri": "/folders/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d",
          "type": "application/vnd.sas.content.folder"
        },
        {
          "method": "GET",
          "rel": "up",
          "href": "/folders/folders/f210f767-7f3a-4109-849b-f1b7d1c5d11a",
          "uri": "/folders/folders/f210f767-7f3a-4109-849b-f1b7d1c5d11a",
          "type": "application/vnd.sas.content.folder"
        },
        {
          "method": "PUT",
          "rel": "validateNewMemberName",
          "href": "/folders/commons/validations/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d/members/@new/name?value={newname}&type={newtype}",
          "uri": "/folders/commons/validations/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d/members/@new/name?value={newname}&type={newtype}"
        },
        {
          "method": "GET",
          "rel": "ancestors",
          "href": "/folders/ancestors?childUri=/folders/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d",
          "uri": "/folders/ancestors?childUri=/folders/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d",
          "type": "application/vnd.sas.content.folder.ancestor"
        },
        {
          "method": "DELETE",
          "rel": "delete",
          "href": "/folders/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d",
          "uri": "/folders/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d"
        },
        {
          "method": "DELETE",
          "rel": "deleteRecursively",
          "href": "/folders/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d?recursive=true",
          "uri": "/folders/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d?recursive=true"
        },
        {
          "method": "GET",
          "rel": "members",
          "href": "/folders/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d/members",
          "uri": "/folders/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d/members",
          "type": "application/vnd.sas.collection",
          "itemType": "application/vnd.sas.content.folder.member"
        },
        {
          "method": "POST",
          "rel": "addMember",
          "href": "/folders/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d/members",
          "uri": "/folders/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d/members",
          "type": "application/vnd.sas.content.folder.member"
        },
        {
          "method": "POST",
          "rel": "createChild",
          "href": "/folders/folders?parentFolderUri=/folders/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d",
          "uri": "/folders/folders?parentFolderUri=/folders/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d",
          "type": "application/vnd.sas.content.folder"
        },
        {
          "method": "GET",
          "rel": "transferExport",
          "href": "/folders/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d",
          "uri": "/folders/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d",
          "responseType": "application/vnd.sas.transfer.object"
        },
        {
          "method": "PUT",
          "rel": "transferImportUpdate",
          "href": "/folders/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d",
          "uri": "/folders/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d",
          "type": "application/vnd.sas.transfer.object",
          "responseType": "application/vnd.sas.summary"
        }
      ],
      "version": 1
    }
    
    {
      "creationTimeStamp": "2019-08-08T12:53:51.309Z",
      "modifiedTimeStamp": "2019-08-08T12:53:51.309Z",
      "createdBy": "testuser",
      "modifiedBy": "testuser",
      "id": "6e6aa6e9-7c6a-4491-84fd-84051031a44d",
      "name": "My Folder",
      "parentFolderUri": "/folders/folders/f210f767-7f3a-4109-849b-f1b7d1c5d11a",
      "description": "My Folder for testuser",
      "type": "myFolder",
      "memberCount": 0,
      "properties": {
        "allowMove": "false"
      },
      "links": [
        {
          "method": "GET",
          "rel": "self",
          "href": "/folders/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d",
          "uri": "/folders/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d",
          "type": "application/vnd.sas.content.folder"
        },
        {
          "method": "GET",
          "rel": "up",
          "href": "/folders/folders/f210f767-7f3a-4109-849b-f1b7d1c5d11a",
          "uri": "/folders/folders/f210f767-7f3a-4109-849b-f1b7d1c5d11a",
          "type": "application/vnd.sas.content.folder"
        },
        {
          "method": "PUT",
          "rel": "validateNewMemberName",
          "href": "/folders/commons/validations/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d/members/@new/name?value={newname}&type={newtype}",
          "uri": "/folders/commons/validations/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d/members/@new/name?value={newname}&type={newtype}"
        },
        {
          "method": "GET",
          "rel": "ancestors",
          "href": "/folders/ancestors?childUri=/folders/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d",
          "uri": "/folders/ancestors?childUri=/folders/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d",
          "type": "application/vnd.sas.content.folder.ancestor"
        },
        {
          "method": "DELETE",
          "rel": "delete",
          "href": "/folders/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d",
          "uri": "/folders/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d"
        },
        {
          "method": "DELETE",
          "rel": "deleteRecursively",
          "href": "/folders/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d?recursive=true",
          "uri": "/folders/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d?recursive=true"
        },
        {
          "method": "GET",
          "rel": "members",
          "href": "/folders/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d/members",
          "uri": "/folders/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d/members",
          "type": "application/vnd.sas.collection",
          "itemType": "application/vnd.sas.content.folder.member"
        },
        {
          "method": "POST",
          "rel": "addMember",
          "href": "/folders/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d/members",
          "uri": "/folders/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d/members",
          "type": "application/vnd.sas.content.folder.member"
        },
        {
          "method": "POST",
          "rel": "createChild",
          "href": "/folders/folders?parentFolderUri=/folders/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d",
          "uri": "/folders/folders?parentFolderUri=/folders/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d",
          "type": "application/vnd.sas.content.folder"
        },
        {
          "method": "GET",
          "rel": "transferExport",
          "href": "/folders/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d",
          "uri": "/folders/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d",
          "responseType": "application/vnd.sas.transfer.object"
        },
        {
          "method": "PUT",
          "rel": "transferImportUpdate",
          "href": "/folders/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d",
          "uri": "/folders/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d",
          "type": "application/vnd.sas.transfer.object",
          "responseType": "application/vnd.sas.summary"
        }
      ],
      "version": 1
    }
    

    Example of an error response from the service

    {
      "version": 2,
      "httpStatusCode": 400,
      "errorCode": 1020,
      "message": "Field blah is invalid for the target type.",
      "details": [
        "path: /folders/rootFolders",
        "correlator: 103aed3e-d183-459e-8c8f-f0c57013995f"
      ]
    }
    
    {
      "version": 2,
      "httpStatusCode": 400,
      "errorCode": 1020,
      "message": "Field blah is invalid for the target type.",
      "details": [
        "path: /folders/rootFolders",
        "correlator: 103aed3e-d183-459e-8c8f-f0c57013995f"
      ]
    }
    
    {
      "version": 2,
      "httpStatusCode": 400,
      "errorCode": 1020,
      "message": "Field blah is invalid for the target type.",
      "details": [
        "path: /folders/rootFolders",
        "correlator: 103aed3e-d183-459e-8c8f-f0c57013995f"
      ]
    }
    
    {
      "version": 2,
      "httpStatusCode": 400,
      "errorCode": 1020,
      "message": "Field blah is invalid for the target type.",
      "details": [
        "path: /folders/rootFolders",
        "correlator: 103aed3e-d183-459e-8c8f-f0c57013995f"
      ]
    }
    
    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 not formatted correctly. errorResponse
    404 Not Found No folder exists at the requested path. No folder that matches the criteria exists. 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 HEAD https://example.com/folders/folders/{folderId} \
      -H 'Authorization: Bearer <access-token-goes-here>' \
      -H 'Accept-Language: string'
    
    
    
    const headers = {
      'Accept-Language':'string'
    };
    
    fetch('https://example.com/folders/folders/{folderId}',
    {
      method: 'HEAD',
    
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    import requests
    headers = {
      'Accept-Language': 'string'
    }
    
    r = requests.head('https://example.com/folders/folders/{folderId}', headers = headers)
    
    print(r.json())
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Accept-Language": []string{"string"},
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("HEAD", "https://example.com/folders/folders/{folderId}", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    

    HEAD /folders/{folderId}

    Returns the specified folder.

    Parameters
    Name 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.
    Responses
    Status Meaning Description Schema
    200 OK The request succeeded. The folder was returned. None
    400 Bad Request The request was invalid. An invalid delegate string was specified. None
    404 Not Found No folder exists at the requested path. None
    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://example.com/folders/folders/{folderId} \
      -H 'Authorization: Bearer <access-token-goes-here>' \
      -H 'Accept: application/vnd.sas.error+json'
    
    
    
    const headers = {
      'Accept':'application/vnd.sas.error+json'
    };
    
    fetch('https://example.com/folders/folders/{folderId}',
    {
      method: 'DELETE',
    
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    import requests
    headers = {
      'Accept': 'application/vnd.sas.error+json'
    }
    
    r = requests.delete('https://example.com/folders/folders/{folderId}', headers = headers)
    
    print(r.json())
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Accept": []string{"application/vnd.sas.error+json"},
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("DELETE", "https://example.com/folders/folders/{folderId}", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    

    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
    Name 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

    Example of an error response from the service

    {
      "version": 2,
      "httpStatusCode": 400,
      "errorCode": 1020,
      "message": "Field blah is invalid for the target type.",
      "details": [
        "path: /folders/rootFolders",
        "correlator: 103aed3e-d183-459e-8c8f-f0c57013995f"
      ]
    }
    
    {
      "version": 2,
      "httpStatusCode": 400,
      "errorCode": 1020,
      "message": "Field blah is invalid for the target type.",
      "details": [
        "path: /folders/rootFolders",
        "correlator: 103aed3e-d183-459e-8c8f-f0c57013995f"
      ]
    }
    
    {
      "version": 2,
      "httpStatusCode": 400,
      "errorCode": 1020,
      "message": "Field blah is invalid for the target type.",
      "details": [
        "path: /folders/rootFolders",
        "correlator: 103aed3e-d183-459e-8c8f-f0c57013995f"
      ]
    }
    
    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=true was not specified. 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 folder has children, and recursive=true was not specified, or the folder contains non-folder children. errorResponse

    Update a folder

    Code samples

    # You can also use wget
    curl -X PUT https://example.com/folders/folders/{folderId} \
      -H 'Authorization: Bearer <access-token-goes-here>' \
      -H 'Content-Type: application/vnd.sas.content.folder+json' \
      -H 'Accept: application/vnd.sas.content.folder+json' \
      -H 'If-Match: string' \
      -H 'If-Unmodified-Since: string'
    
    
    const inputBody = '{
      "name": "A new folder"
    }';
    const headers = {
      'Content-Type':'application/vnd.sas.content.folder+json',
      'Accept':'application/vnd.sas.content.folder+json',
      'If-Match':'string',
      'If-Unmodified-Since':'string'
    };
    
    fetch('https://example.com/folders/folders/{folderId}',
    {
      method: 'PUT',
      body: inputBody,
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    import requests
    headers = {
      'Content-Type': 'application/vnd.sas.content.folder+json',
      'Accept': 'application/vnd.sas.content.folder+json',
      'If-Match': 'string',
      'If-Unmodified-Since': 'string'
    }
    
    r = requests.put('https://example.com/folders/folders/{folderId}', headers = headers)
    
    print(r.json())
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Content-Type": []string{"application/vnd.sas.content.folder+json"},
            "Accept": []string{"application/vnd.sas.content.folder+json"},
            "If-Match": []string{"string"},
            "If-Unmodified-Since": []string{"string"},
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("PUT", "https://example.com/folders/folders/{folderId}", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    

    PUT /folders/{folderId}

    Replaces an existing folder.

    Body parameter

    Sample body when creating new folder.

    {
      "name": "A new folder"
    }
    
    Parameters
    Name 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 false Folder

    Example responses

    Here is an example of using a GET request for a folder.

    {
      "creationTimeStamp": "2019-08-08T12:53:51.309Z",
      "modifiedTimeStamp": "2019-08-08T12:53:51.309Z",
      "createdBy": "testuser",
      "modifiedBy": "testuser",
      "id": "6e6aa6e9-7c6a-4491-84fd-84051031a44d",
      "name": "My Folder",
      "parentFolderUri": "/folders/folders/f210f767-7f3a-4109-849b-f1b7d1c5d11a",
      "description": "My Folder for testuser",
      "type": "myFolder",
      "memberCount": 0,
      "properties": {
        "allowMove": "false"
      },
      "links": [
        {
          "method": "GET",
          "rel": "self",
          "href": "/folders/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d",
          "uri": "/folders/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d",
          "type": "application/vnd.sas.content.folder"
        },
        {
          "method": "GET",
          "rel": "up",
          "href": "/folders/folders/f210f767-7f3a-4109-849b-f1b7d1c5d11a",
          "uri": "/folders/folders/f210f767-7f3a-4109-849b-f1b7d1c5d11a",
          "type": "application/vnd.sas.content.folder"
        },
        {
          "method": "PUT",
          "rel": "validateNewMemberName",
          "href": "/folders/commons/validations/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d/members/@new/name?value={newname}&type={newtype}",
          "uri": "/folders/commons/validations/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d/members/@new/name?value={newname}&type={newtype}"
        },
        {
          "method": "GET",
          "rel": "ancestors",
          "href": "/folders/ancestors?childUri=/folders/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d",
          "uri": "/folders/ancestors?childUri=/folders/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d",
          "type": "application/vnd.sas.content.folder.ancestor"
        },
        {
          "method": "DELETE",
          "rel": "delete",
          "href": "/folders/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d",
          "uri": "/folders/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d"
        },
        {
          "method": "DELETE",
          "rel": "deleteRecursively",
          "href": "/folders/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d?recursive=true",
          "uri": "/folders/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d?recursive=true"
        },
        {
          "method": "GET",
          "rel": "members",
          "href": "/folders/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d/members",
          "uri": "/folders/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d/members",
          "type": "application/vnd.sas.collection",
          "itemType": "application/vnd.sas.content.folder.member"
        },
        {
          "method": "POST",
          "rel": "addMember",
          "href": "/folders/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d/members",
          "uri": "/folders/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d/members",
          "type": "application/vnd.sas.content.folder.member"
        },
        {
          "method": "POST",
          "rel": "createChild",
          "href": "/folders/folders?parentFolderUri=/folders/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d",
          "uri": "/folders/folders?parentFolderUri=/folders/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d",
          "type": "application/vnd.sas.content.folder"
        },
        {
          "method": "GET",
          "rel": "transferExport",
          "href": "/folders/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d",
          "uri": "/folders/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d",
          "responseType": "application/vnd.sas.transfer.object"
        },
        {
          "method": "PUT",
          "rel": "transferImportUpdate",
          "href": "/folders/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d",
          "uri": "/folders/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d",
          "type": "application/vnd.sas.transfer.object",
          "responseType": "application/vnd.sas.summary"
        }
      ],
      "version": 1
    }
    
    {
      "creationTimeStamp": "2019-08-08T12:53:51.309Z",
      "modifiedTimeStamp": "2019-08-08T12:53:51.309Z",
      "createdBy": "testuser",
      "modifiedBy": "testuser",
      "id": "6e6aa6e9-7c6a-4491-84fd-84051031a44d",
      "name": "My Folder",
      "parentFolderUri": "/folders/folders/f210f767-7f3a-4109-849b-f1b7d1c5d11a",
      "description": "My Folder for testuser",
      "type": "myFolder",
      "memberCount": 0,
      "properties": {
        "allowMove": "false"
      },
      "links": [
        {
          "method": "GET",
          "rel": "self",
          "href": "/folders/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d",
          "uri": "/folders/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d",
          "type": "application/vnd.sas.content.folder"
        },
        {
          "method": "GET",
          "rel": "up",
          "href": "/folders/folders/f210f767-7f3a-4109-849b-f1b7d1c5d11a",
          "uri": "/folders/folders/f210f767-7f3a-4109-849b-f1b7d1c5d11a",
          "type": "application/vnd.sas.content.folder"
        },
        {
          "method": "PUT",
          "rel": "validateNewMemberName",
          "href": "/folders/commons/validations/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d/members/@new/name?value={newname}&type={newtype}",
          "uri": "/folders/commons/validations/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d/members/@new/name?value={newname}&type={newtype}"
        },
        {
          "method": "GET",
          "rel": "ancestors",
          "href": "/folders/ancestors?childUri=/folders/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d",
          "uri": "/folders/ancestors?childUri=/folders/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d",
          "type": "application/vnd.sas.content.folder.ancestor"
        },
        {
          "method": "DELETE",
          "rel": "delete",
          "href": "/folders/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d",
          "uri": "/folders/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d"
        },
        {
          "method": "DELETE",
          "rel": "deleteRecursively",
          "href": "/folders/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d?recursive=true",
          "uri": "/folders/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d?recursive=true"
        },
        {
          "method": "GET",
          "rel": "members",
          "href": "/folders/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d/members",
          "uri": "/folders/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d/members",
          "type": "application/vnd.sas.collection",
          "itemType": "application/vnd.sas.content.folder.member"
        },
        {
          "method": "POST",
          "rel": "addMember",
          "href": "/folders/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d/members",
          "uri": "/folders/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d/members",
          "type": "application/vnd.sas.content.folder.member"
        },
        {
          "method": "POST",
          "rel": "createChild",
          "href": "/folders/folders?parentFolderUri=/folders/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d",
          "uri": "/folders/folders?parentFolderUri=/folders/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d",
          "type": "application/vnd.sas.content.folder"
        },
        {
          "method": "GET",
          "rel": "transferExport",
          "href": "/folders/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d",
          "uri": "/folders/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d",
          "responseType": "application/vnd.sas.transfer.object"
        },
        {
          "method": "PUT",
          "rel": "transferImportUpdate",
          "href": "/folders/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d",
          "uri": "/folders/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d",
          "type": "application/vnd.sas.transfer.object",
          "responseType": "application/vnd.sas.summary"
        }
      ],
      "version": 1
    }
    

    Example of an error response from the service

    {
      "version": 2,
      "httpStatusCode": 400,
      "errorCode": 1020,
      "message": "Field blah is invalid for the target type.",
      "details": [
        "path: /folders/rootFolders",
        "correlator: 103aed3e-d183-459e-8c8f-f0c57013995f"
      ]
    }
    
    {
      "version": 2,
      "httpStatusCode": 400,
      "errorCode": 1020,
      "message": "Field blah is invalid for the target type.",
      "details": [
        "path: /folders/rootFolders",
        "correlator: 103aed3e-d183-459e-8c8f-f0c57013995f"
      ]
    }
    
    {
      "version": 2,
      "httpStatusCode": 400,
      "errorCode": 1020,
      "message": "Field blah is invalid for the target type.",
      "details": [
        "path: /folders/rootFolders",
        "correlator: 103aed3e-d183-459e-8c8f-f0c57013995f"
      ]
    }
    
    {
      "version": 2,
      "httpStatusCode": 400,
      "errorCode": 1020,
      "message": "Field blah is invalid for the target type.",
      "details": [
        "path: /folders/rootFolders",
        "correlator: 103aed3e-d183-459e-8c8f-f0c57013995f"
      ]
    }
    
    {
      "version": 2,
      "httpStatusCode": 400,
      "errorCode": 1020,
      "message": "Field blah is invalid for the target type.",
      "details": [
        "path: /folders/rootFolders",
        "correlator: 103aed3e-d183-459e-8c8f-f0c57013995f"
      ]
    }
    
    {
      "version": 2,
      "httpStatusCode": 400,
      "errorCode": 1020,
      "message": "Field blah is invalid for the target type.",
      "details": [
        "path: /folders/rootFolders",
        "correlator: 103aed3e-d183-459e-8c8f-f0c57013995f"
      ]
    }
    
    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://example.com/folders/folders/{folderId} \
      -H 'Authorization: Bearer <access-token-goes-here>' \
      -H 'Content-Type: application/vnd.sas.content.folder+json' \
      -H 'Accept: application/vnd.sas.content.folder+json' \
      -H 'If-Match: string' \
      -H 'If-Unmodified-Since: string'
    
    
    const inputBody = '{
      "name": "A new folder"
    }';
    const headers = {
      'Content-Type':'application/vnd.sas.content.folder+json',
      'Accept':'application/vnd.sas.content.folder+json',
      'If-Match':'string',
      'If-Unmodified-Since':'string'
    };
    
    fetch('https://example.com/folders/folders/{folderId}',
    {
      method: 'PATCH',
      body: inputBody,
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    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://example.com/folders/folders/{folderId}', headers = headers)
    
    print(r.json())
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Content-Type": []string{"application/vnd.sas.content.folder+json"},
            "Accept": []string{"application/vnd.sas.content.folder+json"},
            "If-Match": []string{"string"},
            "If-Unmodified-Since": []string{"string"},
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("PATCH", "https://example.com/folders/folders/{folderId}", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    

    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

    Sample body when creating new folder.

    {
      "name": "A new folder"
    }
    
    Parameters
    Name 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 false Folder

    Example responses

    Here is an example of using a GET request for a folder.

    {
      "creationTimeStamp": "2019-08-08T12:53:51.309Z",
      "modifiedTimeStamp": "2019-08-08T12:53:51.309Z",
      "createdBy": "testuser",
      "modifiedBy": "testuser",
      "id": "6e6aa6e9-7c6a-4491-84fd-84051031a44d",
      "name": "My Folder",
      "parentFolderUri": "/folders/folders/f210f767-7f3a-4109-849b-f1b7d1c5d11a",
      "description": "My Folder for testuser",
      "type": "myFolder",
      "memberCount": 0,
      "properties": {
        "allowMove": "false"
      },
      "links": [
        {
          "method": "GET",
          "rel": "self",
          "href": "/folders/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d",
          "uri": "/folders/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d",
          "type": "application/vnd.sas.content.folder"
        },
        {
          "method": "GET",
          "rel": "up",
          "href": "/folders/folders/f210f767-7f3a-4109-849b-f1b7d1c5d11a",
          "uri": "/folders/folders/f210f767-7f3a-4109-849b-f1b7d1c5d11a",
          "type": "application/vnd.sas.content.folder"
        },
        {
          "method": "PUT",
          "rel": "validateNewMemberName",
          "href": "/folders/commons/validations/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d/members/@new/name?value={newname}&type={newtype}",
          "uri": "/folders/commons/validations/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d/members/@new/name?value={newname}&type={newtype}"
        },
        {
          "method": "GET",
          "rel": "ancestors",
          "href": "/folders/ancestors?childUri=/folders/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d",
          "uri": "/folders/ancestors?childUri=/folders/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d",
          "type": "application/vnd.sas.content.folder.ancestor"
        },
        {
          "method": "DELETE",
          "rel": "delete",
          "href": "/folders/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d",
          "uri": "/folders/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d"
        },
        {
          "method": "DELETE",
          "rel": "deleteRecursively",
          "href": "/folders/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d?recursive=true",
          "uri": "/folders/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d?recursive=true"
        },
        {
          "method": "GET",
          "rel": "members",
          "href": "/folders/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d/members",
          "uri": "/folders/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d/members",
          "type": "application/vnd.sas.collection",
          "itemType": "application/vnd.sas.content.folder.member"
        },
        {
          "method": "POST",
          "rel": "addMember",
          "href": "/folders/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d/members",
          "uri": "/folders/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d/members",
          "type": "application/vnd.sas.content.folder.member"
        },
        {
          "method": "POST",
          "rel": "createChild",
          "href": "/folders/folders?parentFolderUri=/folders/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d",
          "uri": "/folders/folders?parentFolderUri=/folders/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d",
          "type": "application/vnd.sas.content.folder"
        },
        {
          "method": "GET",
          "rel": "transferExport",
          "href": "/folders/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d",
          "uri": "/folders/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d",
          "responseType": "application/vnd.sas.transfer.object"
        },
        {
          "method": "PUT",
          "rel": "transferImportUpdate",
          "href": "/folders/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d",
          "uri": "/folders/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d",
          "type": "application/vnd.sas.transfer.object",
          "responseType": "application/vnd.sas.summary"
        }
      ],
      "version": 1
    }
    
    {
      "creationTimeStamp": "2019-08-08T12:53:51.309Z",
      "modifiedTimeStamp": "2019-08-08T12:53:51.309Z",
      "createdBy": "testuser",
      "modifiedBy": "testuser",
      "id": "6e6aa6e9-7c6a-4491-84fd-84051031a44d",
      "name": "My Folder",
      "parentFolderUri": "/folders/folders/f210f767-7f3a-4109-849b-f1b7d1c5d11a",
      "description": "My Folder for testuser",
      "type": "myFolder",
      "memberCount": 0,
      "properties": {
        "allowMove": "false"
      },
      "links": [
        {
          "method": "GET",
          "rel": "self",
          "href": "/folders/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d",
          "uri": "/folders/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d",
          "type": "application/vnd.sas.content.folder"
        },
        {
          "method": "GET",
          "rel": "up",
          "href": "/folders/folders/f210f767-7f3a-4109-849b-f1b7d1c5d11a",
          "uri": "/folders/folders/f210f767-7f3a-4109-849b-f1b7d1c5d11a",
          "type": "application/vnd.sas.content.folder"
        },
        {
          "method": "PUT",
          "rel": "validateNewMemberName",
          "href": "/folders/commons/validations/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d/members/@new/name?value={newname}&type={newtype}",
          "uri": "/folders/commons/validations/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d/members/@new/name?value={newname}&type={newtype}"
        },
        {
          "method": "GET",
          "rel": "ancestors",
          "href": "/folders/ancestors?childUri=/folders/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d",
          "uri": "/folders/ancestors?childUri=/folders/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d",
          "type": "application/vnd.sas.content.folder.ancestor"
        },
        {
          "method": "DELETE",
          "rel": "delete",
          "href": "/folders/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d",
          "uri": "/folders/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d"
        },
        {
          "method": "DELETE",
          "rel": "deleteRecursively",
          "href": "/folders/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d?recursive=true",
          "uri": "/folders/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d?recursive=true"
        },
        {
          "method": "GET",
          "rel": "members",
          "href": "/folders/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d/members",
          "uri": "/folders/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d/members",
          "type": "application/vnd.sas.collection",
          "itemType": "application/vnd.sas.content.folder.member"
        },
        {
          "method": "POST",
          "rel": "addMember",
          "href": "/folders/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d/members",
          "uri": "/folders/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d/members",
          "type": "application/vnd.sas.content.folder.member"
        },
        {
          "method": "POST",
          "rel": "createChild",
          "href": "/folders/folders?parentFolderUri=/folders/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d",
          "uri": "/folders/folders?parentFolderUri=/folders/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d",
          "type": "application/vnd.sas.content.folder"
        },
        {
          "method": "GET",
          "rel": "transferExport",
          "href": "/folders/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d",
          "uri": "/folders/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d",
          "responseType": "application/vnd.sas.transfer.object"
        },
        {
          "method": "PUT",
          "rel": "transferImportUpdate",
          "href": "/folders/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d",
          "uri": "/folders/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d",
          "type": "application/vnd.sas.transfer.object",
          "responseType": "application/vnd.sas.summary"
        }
      ],
      "version": 1
    }
    

    Example of an error response from the service

    {
      "version": 2,
      "httpStatusCode": 400,
      "errorCode": 1020,
      "message": "Field blah is invalid for the target type.",
      "details": [
        "path: /folders/rootFolders",
        "correlator: 103aed3e-d183-459e-8c8f-f0c57013995f"
      ]
    }
    
    {
      "version": 2,
      "httpStatusCode": 400,
      "errorCode": 1020,
      "message": "Field blah is invalid for the target type.",
      "details": [
        "path: /folders/rootFolders",
        "correlator: 103aed3e-d183-459e-8c8f-f0c57013995f"
      ]
    }
    
    {
      "version": 2,
      "httpStatusCode": 400,
      "errorCode": 1020,
      "message": "Field blah is invalid for the target type.",
      "details": [
        "path: /folders/rootFolders",
        "correlator: 103aed3e-d183-459e-8c8f-f0c57013995f"
      ]
    }
    
    {
      "version": 2,
      "httpStatusCode": 400,
      "errorCode": 1020,
      "message": "Field blah is invalid for the target type.",
      "details": [
        "path: /folders/rootFolders",
        "correlator: 103aed3e-d183-459e-8c8f-f0c57013995f"
      ]
    }
    
    {
      "version": 2,
      "httpStatusCode": 400,
      "errorCode": 1020,
      "message": "Field blah is invalid for the target type.",
      "details": [
        "path: /folders/rootFolders",
        "correlator: 103aed3e-d183-459e-8c8f-f0c57013995f"
      ]
    }
    
    {
      "version": 2,
      "httpStatusCode": 400,
      "errorCode": 1020,
      "message": "Field blah is invalid for the target type.",
      "details": [
        "path: /folders/rootFolders",
        "correlator: 103aed3e-d183-459e-8c8f-f0c57013995f"
      ]
    }
    
    {
      "version": 2,
      "httpStatusCode": 400,
      "errorCode": 1020,
      "message": "Field blah is invalid for the target type.",
      "details": [
        "path: /folders/rootFolders",
        "correlator: 103aed3e-d183-459e-8c8f-f0c57013995f"
      ]
    }
    
    {
      "version": 2,
      "httpStatusCode": 400,
      "errorCode": 1020,
      "message": "Field blah is invalid for the target type.",
      "details": [
        "path: /folders/rootFolders",
        "correlator: 103aed3e-d183-459e-8c8f-f0c57013995f"
      ]
    }
    
    {
      "version": 2,
      "httpStatusCode": 400,
      "errorCode": 1020,
      "message": "Field blah is invalid for the target type.",
      "details": [
        "path: /folders/rootFolders",
        "correlator: 103aed3e-d183-459e-8c8f-f0c57013995f"
      ]
    }
    
    {
      "version": 2,
      "httpStatusCode": 400,
      "errorCode": 1020,
      "message": "Field blah is invalid for the target type.",
      "details": [
        "path: /folders/rootFolders",
        "correlator: 103aed3e-d183-459e-8c8f-f0c57013995f"
      ]
    }
    
    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://example.com/folders/delegateFolders \
      -H 'Authorization: Bearer <access-token-goes-here>' \
      -H 'Accept: application/json'
    
    
    
    const headers = {
      'Accept':'application/json'
    };
    
    fetch('https://example.com/folders/delegateFolders',
    {
      method: 'GET',
    
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    import requests
    headers = {
      'Accept': 'application/json'
    }
    
    r = requests.get('https://example.com/folders/delegateFolders', headers = headers)
    
    print(r.json())
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Accept": []string{"application/json"},
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("GET", "https://example.com/folders/delegateFolders", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    

    GET /delegateFolders

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

    Parameters
    Name 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

    An example of a resource collection containing folders.

    {
      "links": [
        {
          "method": "GET",
          "rel": "collection",
          "href": "/folders/folders",
          "uri": "/folders/folders",
          "type": "application/vnd.sas.collection"
        },
        {
          "method": "GET",
          "rel": "self",
          "href": "/folders/folders?start=0&limit=20",
          "uri": "/folders/folders?start=0&limit=20",
          "type": "application/vnd.sas.collection"
        },
        {
          "method": "POST",
          "rel": "createFolder",
          "href": "/folders/folders",
          "uri": "/folders/folders",
          "type": "application/vnd.sas.content.folder",
          "responseType": "application/vnd.sas.content.folder"
        }
      ],
      "name": "folders",
      "accept": "application/vnd.sas.content.folder",
      "start": 0,
      "items": [
        {
          "creationTimeStamp": "2020-10-27T16:26:54.618197Z",
          "createdBy": "bob",
          "modifiedTimeStamp": "2020-10-27T16:26:54.618198Z",
          "modifiedBy": "bob",
          "version": 1,
          "id": "b156020a-83f1-41c2-9d63-fe49780526dc",
          "name": "Samples",
          "parentFolderUri": "/folders/folders/804ea126-e12b-42ee-b9c4-40cb79db222b",
          "type": "folder",
          "memberCount": 7,
          "links": [
            {
              "method": "GET",
              "rel": "self",
              "href": "/folders/folders/b156020a-83f1-41c2-9d63-fe49780526dc",
              "uri": "/folders/folders/b156020a-83f1-41c2-9d63-fe49780526dc",
              "type": "application/vnd.sas.content.folder"
            },
            {
              "method": "PUT",
              "rel": "update",
              "href": "/folders/folders/b156020a-83f1-41c2-9d63-fe49780526dc",
              "uri": "/folders/folders/b156020a-83f1-41c2-9d63-fe49780526dc",
              "type": "application/vnd.sas.content.folder",
              "responseType": "application/vnd.sas.content.folder"
            },
            {
              "method": "DELETE",
              "rel": "delete",
              "href": "/folders/folders/b156020a-83f1-41c2-9d63-fe49780526dc",
              "uri": "/folders/folders/b156020a-83f1-41c2-9d63-fe49780526dc"
            },
            {
              "method": "DELETE",
              "rel": "deleteRecursively",
              "href": "/folders/folders/b156020a-83f1-41c2-9d63-fe49780526dc?recursive=true",
              "uri": "/folders/folders/b156020a-83f1-41c2-9d63-fe49780526dc?recursive=true"
            },
            {
              "method": "GET",
              "rel": "members",
              "href": "/folders/folders/b156020a-83f1-41c2-9d63-fe49780526dc/members",
              "uri": "/folders/folders/b156020a-83f1-41c2-9d63-fe49780526dc/members",
              "type": "application/vnd.sas.collection",
              "itemType": "application/vnd.sas.content.folder"
            },
            {
              "method": "POST",
              "rel": "addMember",
              "href": "/folders/folders/b156020a-83f1-41c2-9d63-fe49780526dc/members",
              "uri": "/folders/folders/b156020a-83f1-41c2-9d63-fe49780526dc/members",
              "type": "application/vnd.sas.content.folder.member",
              "responseType": "application/vnd.sas.content.folder.member"
            },
            {
              "method": "GET",
              "rel": "up",
              "href": "/folders/folders/804ea126-e12b-42ee-b9c4-40cb79db222b",
              "uri": "/folders/folders/804ea126-e12b-42ee-b9c4-40cb79db222b",
              "type": "application/vnd.sas.content.folder"
            },
            {
              "method": "GET",
              "rel": "ancestors",
              "href": "/folders/ancestors?childUri=/folders/folders/b156020a-83f1-41c2-9d63-fe49780526dc",
              "uri": "/folders/ancestors?childUri=/folders/folders/b156020a-83f1-41c2-9d63-fe49780526dc",
              "type": "application/vnd.sas.content.folder.ancestor"
            },
            {
              "method": "POST",
              "rel": "createChild",
              "href": "/folders/folders?parentFolderUri=/folders/folders/b156020a-83f1-41c2-9d63-fe49780526dc",
              "uri": "/folders/folders?parentFolderUri=/folders/folders/b156020a-83f1-41c2-9d63-fe49780526dc",
              "type": "application/vnd.sas.content.folder"
            },
            {
              "method": "PUT",
              "rel": "validateRename",
              "href": "/folders/commons/validations/folders/804ea126-e12b-42ee-b9c4-40cb79db222b/members/0ab9120e-2cbc-4de8-8b6e-e8d81b60d982/name?value={newname}&type=folder",
              "uri": "/folders/commons/validations/folders/804ea126-e12b-42ee-b9c4-40cb79db222b/members/0ab9120e-2cbc-4de8-8b6e-e8d81b60d982/name?value={newname}&type=folder",
              "type": "application/vnd.sas.validation"
            },
            {
              "method": "PUT",
              "rel": "validateNewMemberName",
              "href": "/folders/commons/validations/folders/b156020a-83f1-41c2-9d63-fe49780526dc/members/@new/name?value={newname}&type={newtype}",
              "uri": "/folders/commons/validations/folders/b156020a-83f1-41c2-9d63-fe49780526dc/members/@new/name?value={newname}&type={newtype}",
              "type": "application/vnd.sas.validation"
            },
            {
              "method": "GET",
              "rel": "transferExport",
              "href": "/folders/folders/b156020a-83f1-41c2-9d63-fe49780526dc",
              "uri": "/folders/folders/b156020a-83f1-41c2-9d63-fe49780526dc",
              "responseType": "application/vnd.sas.transfer.object"
            },
            {
              "method": "PUT",
              "rel": "transferImportUpdate",
              "href": "/folders/folders/b156020a-83f1-41c2-9d63-fe49780526dc",
              "uri": "/folders/folders/b156020a-83f1-41c2-9d63-fe49780526dc",
              "type": "application/vnd.sas.transfer.object",
              "responseType": "application/vnd.sas.summary"
            },
            {
              "method": "POST",
              "rel": "transferImport",
              "href": "/folders/folders",
              "uri": "/folders/folders",
              "type": "application/vnd.sas.transfer.object",
              "responseType": "application/vnd.sas.summary"
            }
          ]
        },
        {
          "<item 2>": null
        },
        {
          "<item 3>": null
        },
        {
          "etc. to item 20": null
        }
      ],
      "limit": 20,
      "version": 2
    }
    
    {
      "links": [
        {
          "method": "GET",
          "rel": "collection",
          "href": "/folders/folders",
          "uri": "/folders/folders",
          "type": "application/vnd.sas.collection"
        },
        {
          "method": "GET",
          "rel": "self",
          "href": "/folders/folders?start=0&limit=20",
          "uri": "/folders/folders?start=0&limit=20",
          "type": "application/vnd.sas.collection"
        },
        {
          "method": "POST",
          "rel": "createFolder",
          "href": "/folders/folders",
          "uri": "/folders/folders",
          "type": "application/vnd.sas.content.folder",
          "responseType": "application/vnd.sas.content.folder"
        }
      ],
      "name": "folders",
      "accept": "application/vnd.sas.content.folder",
      "start": 0,
      "items": [
        {
          "creationTimeStamp": "2020-10-27T16:26:54.618197Z",
          "createdBy": "bob",
          "modifiedTimeStamp": "2020-10-27T16:26:54.618198Z",
          "modifiedBy": "bob",
          "version": 1,
          "id": "b156020a-83f1-41c2-9d63-fe49780526dc",
          "name": "Samples",
          "parentFolderUri": "/folders/folders/804ea126-e12b-42ee-b9c4-40cb79db222b",
          "type": "folder",
          "memberCount": 7,
          "links": [
            {
              "method": "GET",
              "rel": "self",
              "href": "/folders/folders/b156020a-83f1-41c2-9d63-fe49780526dc",
              "uri": "/folders/folders/b156020a-83f1-41c2-9d63-fe49780526dc",
              "type": "application/vnd.sas.content.folder"
            },
            {
              "method": "PUT",
              "rel": "update",
              "href": "/folders/folders/b156020a-83f1-41c2-9d63-fe49780526dc",
              "uri": "/folders/folders/b156020a-83f1-41c2-9d63-fe49780526dc",
              "type": "application/vnd.sas.content.folder",
              "responseType": "application/vnd.sas.content.folder"
            },
            {
              "method": "DELETE",
              "rel": "delete",
              "href": "/folders/folders/b156020a-83f1-41c2-9d63-fe49780526dc",
              "uri": "/folders/folders/b156020a-83f1-41c2-9d63-fe49780526dc"
            },
            {
              "method": "DELETE",
              "rel": "deleteRecursively",
              "href": "/folders/folders/b156020a-83f1-41c2-9d63-fe49780526dc?recursive=true",
              "uri": "/folders/folders/b156020a-83f1-41c2-9d63-fe49780526dc?recursive=true"
            },
            {
              "method": "GET",
              "rel": "members",
              "href": "/folders/folders/b156020a-83f1-41c2-9d63-fe49780526dc/members",
              "uri": "/folders/folders/b156020a-83f1-41c2-9d63-fe49780526dc/members",
              "type": "application/vnd.sas.collection",
              "itemType": "application/vnd.sas.content.folder"
            },
            {
              "method": "POST",
              "rel": "addMember",
              "href": "/folders/folders/b156020a-83f1-41c2-9d63-fe49780526dc/members",
              "uri": "/folders/folders/b156020a-83f1-41c2-9d63-fe49780526dc/members",
              "type": "application/vnd.sas.content.folder.member",
              "responseType": "application/vnd.sas.content.folder.member"
            },
            {
              "method": "GET",
              "rel": "up",
              "href": "/folders/folders/804ea126-e12b-42ee-b9c4-40cb79db222b",
              "uri": "/folders/folders/804ea126-e12b-42ee-b9c4-40cb79db222b",
              "type": "application/vnd.sas.content.folder"
            },
            {
              "method": "GET",
              "rel": "ancestors",
              "href": "/folders/ancestors?childUri=/folders/folders/b156020a-83f1-41c2-9d63-fe49780526dc",
              "uri": "/folders/ancestors?childUri=/folders/folders/b156020a-83f1-41c2-9d63-fe49780526dc",
              "type": "application/vnd.sas.content.folder.ancestor"
            },
            {
              "method": "POST",
              "rel": "createChild",
              "href": "/folders/folders?parentFolderUri=/folders/folders/b156020a-83f1-41c2-9d63-fe49780526dc",
              "uri": "/folders/folders?parentFolderUri=/folders/folders/b156020a-83f1-41c2-9d63-fe49780526dc",
              "type": "application/vnd.sas.content.folder"
            },
            {
              "method": "PUT",
              "rel": "validateRename",
              "href": "/folders/commons/validations/folders/804ea126-e12b-42ee-b9c4-40cb79db222b/members/0ab9120e-2cbc-4de8-8b6e-e8d81b60d982/name?value={newname}&type=folder",
              "uri": "/folders/commons/validations/folders/804ea126-e12b-42ee-b9c4-40cb79db222b/members/0ab9120e-2cbc-4de8-8b6e-e8d81b60d982/name?value={newname}&type=folder",
              "type": "application/vnd.sas.validation"
            },
            {
              "method": "PUT",
              "rel": "validateNewMemberName",
              "href": "/folders/commons/validations/folders/b156020a-83f1-41c2-9d63-fe49780526dc/members/@new/name?value={newname}&type={newtype}",
              "uri": "/folders/commons/validations/folders/b156020a-83f1-41c2-9d63-fe49780526dc/members/@new/name?value={newname}&type={newtype}",
              "type": "application/vnd.sas.validation"
            },
            {
              "method": "GET",
              "rel": "transferExport",
              "href": "/folders/folders/b156020a-83f1-41c2-9d63-fe49780526dc",
              "uri": "/folders/folders/b156020a-83f1-41c2-9d63-fe49780526dc",
              "responseType": "application/vnd.sas.transfer.object"
            },
            {
              "method": "PUT",
              "rel": "transferImportUpdate",
              "href": "/folders/folders/b156020a-83f1-41c2-9d63-fe49780526dc",
              "uri": "/folders/folders/b156020a-83f1-41c2-9d63-fe49780526dc",
              "type": "application/vnd.sas.transfer.object",
              "responseType": "application/vnd.sas.summary"
            },
            {
              "method": "POST",
              "rel": "transferImport",
              "href": "/folders/folders",
              "uri": "/folders/folders",
              "type": "application/vnd.sas.transfer.object",
              "responseType": "application/vnd.sas.summary"
            }
          ]
        },
        {
          "<item 2>": null
        },
        {
          "<item 3>": null
        },
        {
          "etc. to item 20": null
        }
      ],
      "limit": 20,
      "version": 2
    }
    
    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://example.com/folders/paths \
      -H 'Authorization: Bearer <access-token-goes-here>' \
      -H 'Content-Type: application/vnd.sas.content.folder.path+json' \
      -H 'Accept: application/vnd.sas.summary+json'
    
    
    const inputBody = '{
      "items": [
        "string"
      ],
      "contentType": "string",
      "typeDefName": "string",
      "version": 0
    }';
    const headers = {
      'Content-Type':'application/vnd.sas.content.folder.path+json',
      'Accept':'application/vnd.sas.summary+json'
    };
    
    fetch('https://example.com/folders/paths',
    {
      method: 'POST',
      body: inputBody,
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    import requests
    headers = {
      'Content-Type': 'application/vnd.sas.content.folder.path+json',
      'Accept': 'application/vnd.sas.summary+json'
    }
    
    r = requests.post('https://example.com/folders/paths', headers = headers)
    
    print(r.json())
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Content-Type": []string{"application/vnd.sas.content.folder.path+json"},
            "Accept": []string{"application/vnd.sas.summary+json"},
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("POST", "https://example.com/folders/paths", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    

    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",
      "typeDefName": "string",
      "version": 0
    }
    
    Parameters
    Name In Type Required Description
    body body path true The set of parent names, the object name, and the object content type.

    Example responses

    A briefer version of the folder representation

    {
      "creationTimeStamp": "2022-06-17T16:37:34.817185Z",
      "createdBy": "sas.themes",
      "modifiedTimeStamp": "2022-06-17T16:37:34.817186Z",
      "modifiedBy": "sas.themes",
      "version": 2,
      "id": "6d252540-07d7-49ef-b508-b3b7d9a505f1",
      "name": "SAS Theme Designer",
      "description": "SAS Theme Designer folder",
      "type": "folder",
      "links": [
        {
          "method": "GET",
          "rel": "self",
          "href": "/folders/folders/6d252540-07d7-49ef-b508-b3b7d9a505f1",
          "uri": "/folders/folders/6d252540-07d7-49ef-b508-b3b7d9a505f1",
          "type": "application/vnd.sas.content.folder"
        },
        {
          "method": "GET",
          "rel": "alternate",
          "href": "/folders/folders/6d252540-07d7-49ef-b508-b3b7d9a505f1",
          "uri": "/folders/folders/6d252540-07d7-49ef-b508-b3b7d9a505f1",
          "type": "application/vnd.sas.summary"
        }
      ]
    }
    
    {
      "creationTimeStamp": "2022-06-17T16:37:34.817185Z",
      "createdBy": "sas.themes",
      "modifiedTimeStamp": "2022-06-17T16:37:34.817186Z",
      "modifiedBy": "sas.themes",
      "version": 2,
      "id": "6d252540-07d7-49ef-b508-b3b7d9a505f1",
      "name": "SAS Theme Designer",
      "description": "SAS Theme Designer folder",
      "type": "folder",
      "links": [
        {
          "method": "GET",
          "rel": "self",
          "href": "/folders/folders/6d252540-07d7-49ef-b508-b3b7d9a505f1",
          "uri": "/folders/folders/6d252540-07d7-49ef-b508-b3b7d9a505f1",
          "type": "application/vnd.sas.content.folder"
        },
        {
          "method": "GET",
          "rel": "alternate",
          "href": "/folders/folders/6d252540-07d7-49ef-b508-b3b7d9a505f1",
          "uri": "/folders/folders/6d252540-07d7-49ef-b508-b3b7d9a505f1",
          "type": "application/vnd.sas.summary"
        }
      ]
    }
    

    Example of an error response from the service

    {
      "version": 2,
      "httpStatusCode": 400,
      "errorCode": 1020,
      "message": "Field blah is invalid for the target type.",
      "details": [
        "path: /folders/rootFolders",
        "correlator: 103aed3e-d183-459e-8c8f-f0c57013995f"
      ]
    }
    
    {
      "version": 2,
      "httpStatusCode": 400,
      "errorCode": 1020,
      "message": "Field blah is invalid for the target type.",
      "details": [
        "path: /folders/rootFolders",
        "correlator: 103aed3e-d183-459e-8c8f-f0c57013995f"
      ]
    }
    
    {
      "version": 2,
      "httpStatusCode": 400,
      "errorCode": 1020,
      "message": "Field blah is invalid for the target type.",
      "details": [
        "path: /folders/rootFolders",
        "correlator: 103aed3e-d183-459e-8c8f-f0c57013995f"
      ]
    }
    
    {
      "version": 2,
      "httpStatusCode": 400,
      "errorCode": 1020,
      "message": "Field blah is invalid for the target type.",
      "details": [
        "path: /folders/rootFolders",
        "correlator: 103aed3e-d183-459e-8c8f-f0c57013995f"
      ]
    }
    
    Responses
    Status Meaning Description Schema
    200 OK The object was found and returned as a summary object. summary
    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

    Member

    Contains the operations for the folder member resource.

    Get a list of folder members

    Code samples

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

    HEAD /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
    Name 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. The default value is 0.
    limit query integer(int64) false Maximum number of members to return. The default value is 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 default value of this parameter is 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 default value of this parameter is 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.
    Responses
    Status Meaning Description Schema
    200 OK The request succeeded. A list of folder members was returned. None
    400 Bad Request The request was invalid. An invalid filter or combination of request parameters was provided. None
    404 Not Found No folder exists at the requested path. None
    Response Headers
    Status Header Type Format Description
    200 Content-Type string The content type of the response (application/vnd.sas.collection+json)

    Add a member to a folder

    Code samples

    # You can also use wget
    curl -X POST https://example.com/folders/folders/{folderId}/members \
      -H 'Authorization: Bearer <access-token-goes-here>' \
      -H 'Content-Type: application/vnd.sas.content.folder.member+json' \
      -H 'Accept: application/vnd.sas.content.folder.member+json'
    
    
    const inputBody = '{
      "name": "Test Report",
      "uri": "/reports/reports/1234567890",
      "type": "CHILD",
      "contentType": "report"
    }';
    const headers = {
      'Content-Type':'application/vnd.sas.content.folder.member+json',
      'Accept':'application/vnd.sas.content.folder.member+json'
    };
    
    fetch('https://example.com/folders/folders/{folderId}/members',
    {
      method: 'POST',
      body: inputBody,
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    import requests
    headers = {
      'Content-Type': 'application/vnd.sas.content.folder.member+json',
      'Accept': 'application/vnd.sas.content.folder.member+json'
    }
    
    r = requests.post('https://example.com/folders/folders/{folderId}/members', headers = headers)
    
    print(r.json())
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Content-Type": []string{"application/vnd.sas.content.folder.member+json"},
            "Accept": []string{"application/vnd.sas.content.folder.member+json"},
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("POST", "https://example.com/folders/folders/{folderId}/members", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    

    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

    Sample body when creating a folder member.

    {
      "name": "Test Report",
      "uri": "/reports/reports/1234567890",
      "type": "CHILD",
      "contentType": "report"
    }
    
    Parameters
    Name 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. The default value is false.
    body body memberIn false Member

    Example responses

    Here is an example of using the POST method to create a member in My Folder.

    {
      "id": "2ec3501d-4201-4e7d-8de6-0e2c4a7a022f",
      "uri": "/reports/reports/1234567890",
      "added": "2019-08-08T12:59:08.775Z",
      "type": "child",
      "name": "Test Report",
      "parentFolderUri": "/folders/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d",
      "contentType": "report",
      "links": [
        {
          "method": "GET",
          "rel": "self",
          "href": "/folders/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d/members/2ec3501d-4201-4e7d-8de6-0e2c4a7a022f",
          "uri": "/folders/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d/members/2ec3501d-4201-4e7d-8de6-0e2c4a7a022f",
          "type": "application/vnd.sas.content.folder.member"
        },
        {
          "method": "GET",
          "rel": "up",
          "href": "/folders/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d",
          "uri": "/folders/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d",
          "type": "application/vnd.sas.content.folder"
        },
        {
          "method": "GET",
          "rel": "getResource",
          "href": "/reports/reports/1234567890",
          "uri": "/reports/reports/1234567890",
          "type": "application/vnd.sas.summary"
        },
        {
          "method": "PUT",
          "rel": "putResource",
          "href": "/reports/reports/1234567890",
          "uri": "/reports/reports/1234567890"
        },
        {
          "method": "DELETE",
          "rel": "deleteResource",
          "href": "/reports/reports/1234567890",
          "uri": "/reports/reports/1234567890"
        },
        {
          "method": "GET",
          "rel": "ancestors",
          "href": "/folders/ancestors?childUri=/reports/reports/1234567890",
          "uri": "/folders/ancestors?childUri=/reports/reports/1234567890",
          "type": "application/vnd.sas.content.folder.ancestor"
        },
        {
          "method": "PUT",
          "rel": "update",
          "href": "/folders/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d/members/2ec3501d-4201-4e7d-8de6-0e2c4a7a022f",
          "uri": "/folders/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d/members/2ec3501d-4201-4e7d-8de6-0e2c4a7a022f",
          "type": "application/vnd.sas.content.folder.member"
        },
        {
          "method": "DELETE",
          "rel": "delete",
          "href": "/folders/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d/members/2ec3501d-4201-4e7d-8de6-0e2c4a7a022f",
          "uri": "/folders/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d/members/2ec3501d-4201-4e7d-8de6-0e2c4a7a022f"
        },
        {
          "method": "PUT",
          "rel": "validateRename",
          "href": "/folders/commons/validations/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d/members/2ec3501d-4201-4e7d-8de6-0e2c4a7a022f/name?value={newname}&type={newtype}",
          "uri": "/folders/commons/validations/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d/members/2ec3501d-4201-4e7d-8de6-0e2c4a7a022f/name?value={newname}&type={newtype}",
          "type": "application/vnd.sas.validation"
        },
        {
          "method": "GET",
          "rel": "transferExport",
          "href": "/folders/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d/members/2ec3501d-4201-4e7d-8de6-0e2c4a7a022f",
          "uri": "/folders/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d/members/2ec3501d-4201-4e7d-8de6-0e2c4a7a022f",
          "responseType": "application/vnd.sas.transfer.object"
        },
        {
          "method": "PUT",
          "rel": "transferImportUpdate",
          "href": "/folders/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d/members/2ec3501d-4201-4e7d-8de6-0e2c4a7a022f",
          "uri": "/folders/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d/members/2ec3501d-4201-4e7d-8de6-0e2c4a7a022f",
          "type": "application/vnd.sas.transfer.object",
          "responseType": "application/vnd.sas.summary"
        },
        {
          "method": "POST",
          "rel": "transferImport",
          "href": "/folders/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d/members",
          "uri": "/folders/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d/members",
          "type": "application/vnd.sas.transfer.object",
          "responseType": "application/vnd.sas.summary"
        }
      ],
      "version": 1
    }
    
    {
      "id": "2ec3501d-4201-4e7d-8de6-0e2c4a7a022f",
      "uri": "/reports/reports/1234567890",
      "added": "2019-08-08T12:59:08.775Z",
      "type": "child",
      "name": "Test Report",
      "parentFolderUri": "/folders/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d",
      "contentType": "report",
      "links": [
        {
          "method": "GET",
          "rel": "self",
          "href": "/folders/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d/members/2ec3501d-4201-4e7d-8de6-0e2c4a7a022f",
          "uri": "/folders/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d/members/2ec3501d-4201-4e7d-8de6-0e2c4a7a022f",
          "type": "application/vnd.sas.content.folder.member"
        },
        {
          "method": "GET",
          "rel": "up",
          "href": "/folders/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d",
          "uri": "/folders/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d",
          "type": "application/vnd.sas.content.folder"
        },
        {
          "method": "GET",
          "rel": "getResource",
          "href": "/reports/reports/1234567890",
          "uri": "/reports/reports/1234567890",
          "type": "application/vnd.sas.summary"
        },
        {
          "method": "PUT",
          "rel": "putResource",
          "href": "/reports/reports/1234567890",
          "uri": "/reports/reports/1234567890"
        },
        {
          "method": "DELETE",
          "rel": "deleteResource",
          "href": "/reports/reports/1234567890",
          "uri": "/reports/reports/1234567890"
        },
        {
          "method": "GET",
          "rel": "ancestors",
          "href": "/folders/ancestors?childUri=/reports/reports/1234567890",
          "uri": "/folders/ancestors?childUri=/reports/reports/1234567890",
          "type": "application/vnd.sas.content.folder.ancestor"
        },
        {
          "method": "PUT",
          "rel": "update",
          "href": "/folders/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d/members/2ec3501d-4201-4e7d-8de6-0e2c4a7a022f",
          "uri": "/folders/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d/members/2ec3501d-4201-4e7d-8de6-0e2c4a7a022f",
          "type": "application/vnd.sas.content.folder.member"
        },
        {
          "method": "DELETE",
          "rel": "delete",
          "href": "/folders/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d/members/2ec3501d-4201-4e7d-8de6-0e2c4a7a022f",
          "uri": "/folders/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d/members/2ec3501d-4201-4e7d-8de6-0e2c4a7a022f"
        },
        {
          "method": "PUT",
          "rel": "validateRename",
          "href": "/folders/commons/validations/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d/members/2ec3501d-4201-4e7d-8de6-0e2c4a7a022f/name?value={newname}&type={newtype}",
          "uri": "/folders/commons/validations/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d/members/2ec3501d-4201-4e7d-8de6-0e2c4a7a022f/name?value={newname}&type={newtype}",
          "type": "application/vnd.sas.validation"
        },
        {
          "method": "GET",
          "rel": "transferExport",
          "href": "/folders/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d/members/2ec3501d-4201-4e7d-8de6-0e2c4a7a022f",
          "uri": "/folders/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d/members/2ec3501d-4201-4e7d-8de6-0e2c4a7a022f",
          "responseType": "application/vnd.sas.transfer.object"
        },
        {
          "method": "PUT",
          "rel": "transferImportUpdate",
          "href": "/folders/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d/members/2ec3501d-4201-4e7d-8de6-0e2c4a7a022f",
          "uri": "/folders/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d/members/2ec3501d-4201-4e7d-8de6-0e2c4a7a022f",
          "type": "application/vnd.sas.transfer.object",
          "responseType": "application/vnd.sas.summary"
        },
        {
          "method": "POST",
          "rel": "transferImport",
          "href": "/folders/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d/members",
          "uri": "/folders/folders/6e6aa6e9-7c6a-4491-84fd-84051031a44d/members",
          "type": "application/vnd.sas.transfer.object",
          "responseType": "application/vnd.sas.summary"
        }
      ],
      "version": 1
    }
    

    Sample body with a single folder member

    {
      "creationTimeStamp": "2022-06-20T18:19:13.92Z",
      "createdBy": "bob",
      "modifiedTimeStamp": "2022-06-20T18:19:13.92Z",
      "modifiedBy": "bob",
      "version": 2,
      "id": "a73fd398-8969-415a-b0e2-3b423cf95849",
      "name": "Folders_Spike.png",
      "added": "2022-06-20T18:19:13.947099Z",
      "parentFolderUri": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172",
      "uri": "/files/files/016cf2b0-ef36-4344-9896-0439a027d8ab",
      "type": "child",
      "contentType": "file",
      "typeDefName": "file_png",
      "links": [
        {
          "method": "GET",
          "rel": "self",
          "href": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172/members/a73fd398-8969-415a-b0e2-3b423cf95849",
          "uri": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172/members/a73fd398-8969-415a-b0e2-3b423cf95849",
          "type": "application/vnd.sas.content.folder.member"
        },
        {
          "method": "GET",
          "rel": "up",
          "href": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172",
          "uri": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172",
          "type": "application/vnd.sas.content.folder"
        },
        {
          "method": "GET",
          "rel": "getResource",
          "href": "/files/files/016cf2b0-ef36-4344-9896-0439a027d8ab",
          "uri": "/files/files/016cf2b0-ef36-4344-9896-0439a027d8ab",
          "type": "application/vnd.sas.summary"
        },
        {
          "method": "PUT",
          "rel": "putResource",
          "href": "/files/files/016cf2b0-ef36-4344-9896-0439a027d8ab",
          "uri": "/files/files/016cf2b0-ef36-4344-9896-0439a027d8ab"
        },
        {
          "method": "DELETE",
          "rel": "deleteResource",
          "href": "/files/files/016cf2b0-ef36-4344-9896-0439a027d8ab",
          "uri": "/files/files/016cf2b0-ef36-4344-9896-0439a027d8ab"
        },
        {
          "method": "GET",
          "rel": "ancestors",
          "href": "/folders/ancestors?childUri=/files/files/016cf2b0-ef36-4344-9896-0439a027d8ab",
          "uri": "/folders/ancestors?childUri=/files/files/016cf2b0-ef36-4344-9896-0439a027d8ab",
          "type": "application/vnd.sas.content.folder.ancestor"
        },
        {
          "method": "PUT",
          "rel": "update",
          "href": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172/members/a73fd398-8969-415a-b0e2-3b423cf95849",
          "uri": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172/members/a73fd398-8969-415a-b0e2-3b423cf95849",
          "type": "application/vnd.sas.content.folder.member"
        },
        {
          "method": "DELETE",
          "rel": "delete",
          "href": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172/members/a73fd398-8969-415a-b0e2-3b423cf95849",
          "uri": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172/members/a73fd398-8969-415a-b0e2-3b423cf95849"
        },
        {
          "method": "PUT",
          "rel": "validateRename",
          "href": "/folders/commons/validations/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172/members/a73fd398-8969-415a-b0e2-3b423cf95849/name?value={newname}&type={newtype}",
          "uri": "/folders/commons/validations/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172/members/a73fd398-8969-415a-b0e2-3b423cf95849/name?value={newname}&type={newtype}",
          "type": "application/vnd.sas.validation"
        },
        {
          "method": "GET",
          "rel": "transferExport",
          "href": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172/members/a73fd398-8969-415a-b0e2-3b423cf95849",
          "uri": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172/members/a73fd398-8969-415a-b0e2-3b423cf95849",
          "type": "application/vnd.sas.transfer.object"
        },
        {
          "method": "PUT",
          "rel": "transferImportUpdate",
          "href": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172/members/a73fd398-8969-415a-b0e2-3b423cf95849",
          "uri": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172/members/a73fd398-8969-415a-b0e2-3b423cf95849",
          "type": "application/vnd.sas.transfer.object",
          "responseType": "application/vnd.sas.summary"
        },
        {
          "method": "POST",
          "rel": "transferImport",
          "href": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172/members",
          "uri": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172/members",
          "type": "application/vnd.sas.transfer.object",
          "responseType": "application/vnd.sas.summary"
        }
      ]
    }
    
    {
      "creationTimeStamp": "2022-06-20T18:19:13.92Z",
      "createdBy": "bob",
      "modifiedTimeStamp": "2022-06-20T18:19:13.92Z",
      "modifiedBy": "bob",
      "version": 2,
      "id": "a73fd398-8969-415a-b0e2-3b423cf95849",
      "name": "Folders_Spike.png",
      "added": "2022-06-20T18:19:13.947099Z",
      "parentFolderUri": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172",
      "uri": "/files/files/016cf2b0-ef36-4344-9896-0439a027d8ab",
      "type": "child",
      "contentType": "file",
      "typeDefName": "file_png",
      "links": [
        {
          "method": "GET",
          "rel": "self",
          "href": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172/members/a73fd398-8969-415a-b0e2-3b423cf95849",
          "uri": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172/members/a73fd398-8969-415a-b0e2-3b423cf95849",
          "type": "application/vnd.sas.content.folder.member"
        },
        {
          "method": "GET",
          "rel": "up",
          "href": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172",
          "uri": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172",
          "type": "application/vnd.sas.content.folder"
        },
        {
          "method": "GET",
          "rel": "getResource",
          "href": "/files/files/016cf2b0-ef36-4344-9896-0439a027d8ab",
          "uri": "/files/files/016cf2b0-ef36-4344-9896-0439a027d8ab",
          "type": "application/vnd.sas.summary"
        },
        {
          "method": "PUT",
          "rel": "putResource",
          "href": "/files/files/016cf2b0-ef36-4344-9896-0439a027d8ab",
          "uri": "/files/files/016cf2b0-ef36-4344-9896-0439a027d8ab"
        },
        {
          "method": "DELETE",
          "rel": "deleteResource",
          "href": "/files/files/016cf2b0-ef36-4344-9896-0439a027d8ab",
          "uri": "/files/files/016cf2b0-ef36-4344-9896-0439a027d8ab"
        },
        {
          "method": "GET",
          "rel": "ancestors",
          "href": "/folders/ancestors?childUri=/files/files/016cf2b0-ef36-4344-9896-0439a027d8ab",
          "uri": "/folders/ancestors?childUri=/files/files/016cf2b0-ef36-4344-9896-0439a027d8ab",
          "type": "application/vnd.sas.content.folder.ancestor"
        },
        {
          "method": "PUT",
          "rel": "update",
          "href": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172/members/a73fd398-8969-415a-b0e2-3b423cf95849",
          "uri": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172/members/a73fd398-8969-415a-b0e2-3b423cf95849",
          "type": "application/vnd.sas.content.folder.member"
        },
        {
          "method": "DELETE",
          "rel": "delete",
          "href": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172/members/a73fd398-8969-415a-b0e2-3b423cf95849",
          "uri": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172/members/a73fd398-8969-415a-b0e2-3b423cf95849"
        },
        {
          "method": "PUT",
          "rel": "validateRename",
          "href": "/folders/commons/validations/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172/members/a73fd398-8969-415a-b0e2-3b423cf95849/name?value={newname}&type={newtype}",
          "uri": "/folders/commons/validations/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172/members/a73fd398-8969-415a-b0e2-3b423cf95849/name?value={newname}&type={newtype}",
          "type": "application/vnd.sas.validation"
        },
        {
          "method": "GET",
          "rel": "transferExport",
          "href": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172/members/a73fd398-8969-415a-b0e2-3b423cf95849",
          "uri": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172/members/a73fd398-8969-415a-b0e2-3b423cf95849",
          "type": "application/vnd.sas.transfer.object"
        },
        {
          "method": "PUT",
          "rel": "transferImportUpdate",
          "href": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172/members/a73fd398-8969-415a-b0e2-3b423cf95849",
          "uri": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172/members/a73fd398-8969-415a-b0e2-3b423cf95849",
          "type": "application/vnd.sas.transfer.object",
          "responseType": "application/vnd.sas.summary"
        },
        {
          "method": "POST",
          "rel": "transferImport",
          "href": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172/members",
          "uri": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172/members",
          "type": "application/vnd.sas.transfer.object",
          "responseType": "application/vnd.sas.summary"
        }
      ]
    }
    

    Example of an error response from the service

    {
      "version": 2,
      "httpStatusCode": 400,
      "errorCode": 1020,
      "message": "Field blah is invalid for the target type.",
      "details": [
        "path: /folders/rootFolders",
        "correlator: 103aed3e-d183-459e-8c8f-f0c57013995f"
      ]
    }
    
    {
      "version": 2,
      "httpStatusCode": 400,
      "errorCode": 1020,
      "message": "Field blah is invalid for the target type.",
      "details": [
        "path: /folders/rootFolders",
        "correlator: 103aed3e-d183-459e-8c8f-f0c57013995f"
      ]
    }
    
    {
      "version": 2,
      "httpStatusCode": 400,
      "errorCode": 1020,
      "message": "Field blah is invalid for the target type.",
      "details": [
        "path: /folders/rootFolders",
        "correlator: 103aed3e-d183-459e-8c8f-f0c57013995f"
      ]
    }
    
    {
      "version": 2,
      "httpStatusCode": 400,
      "errorCode": 1020,
      "message": "Field blah is invalid for the target type.",
      "details": [
        "path: /folders/rootFolders",
        "correlator: 103aed3e-d183-459e-8c8f-f0c57013995f"
      ]
    }
    
    {
      "version": 2,
      "httpStatusCode": 400,
      "errorCode": 1020,
      "message": "Field blah is invalid for the target type.",
      "details": [
        "path: /folders/rootFolders",
        "correlator: 103aed3e-d183-459e-8c8f-f0c57013995f"
      ]
    }
    
    {
      "version": 2,
      "httpStatusCode": 400,
      "errorCode": 1020,
      "message": "Field blah is invalid for the target type.",
      "details": [
        "path: /folders/rootFolders",
        "correlator: 103aed3e-d183-459e-8c8f-f0c57013995f"
      ]
    }
    
    {
      "version": 2,
      "httpStatusCode": 400,
      "errorCode": 1020,
      "message": "Field blah is invalid for the target type.",
      "details": [
        "path: /folders/rootFolders",
        "correlator: 103aed3e-d183-459e-8c8f-f0c57013995f"
      ]
    }
    
    {
      "version": 2,
      "httpStatusCode": 400,
      "errorCode": 1020,
      "message": "Field blah is invalid for the target type.",
      "details": [
        "path: /folders/rootFolders",
        "correlator: 103aed3e-d183-459e-8c8f-f0c57013995f"
      ]
    }
    
    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 HEAD https://example.com/folders/folders/{folderId}/members/{memberId}
      -H 'Authorization: Bearer <access-token-goes-here>' \
    
    
    
    fetch('https://example.com/folders/folders/{folderId}/members/{memberId}',
    {
      method: 'HEAD'
    
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    import requests
    
    r = requests.head('https://example.com/folders/folders/{folderId}/members/{memberId}')
    
    print(r.json())
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("HEAD", "https://example.com/folders/folders/{folderId}/members/{memberId}", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    

    HEAD /folders/{folderId}/members/{memberId}

    Returns the specified member.

    Parameters
    Name 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.
    Responses
    Status Meaning Description Schema
    200 OK The request succeeded. The folder member was returned. None
    404 Not Found No member exists at the requested path. None
    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://example.com/folders/folders/{folderId}/members/{memberId} \
      -H 'Authorization: Bearer <access-token-goes-here>' \
      -H 'Accept: application/vnd.sas.error+json'
    
    
    
    const headers = {
      'Accept':'application/vnd.sas.error+json'
    };
    
    fetch('https://example.com/folders/folders/{folderId}/members/{memberId}',
    {
      method: 'DELETE',
    
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    import requests
    headers = {
      'Accept': 'application/vnd.sas.error+json'
    }
    
    r = requests.delete('https://example.com/folders/folders/{folderId}/members/{memberId}', headers = headers)
    
    print(r.json())
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Accept": []string{"application/vnd.sas.error+json"},
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("DELETE", "https://example.com/folders/folders/{folderId}/members/{memberId}", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    

    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
    Name 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

    Example of an error response from the service

    {
      "version": 2,
      "httpStatusCode": 400,
      "errorCode": 1020,
      "message": "Field blah is invalid for the target type.",
      "details": [
        "path: /folders/rootFolders",
        "correlator: 103aed3e-d183-459e-8c8f-f0c57013995f"
      ]
    }
    
    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://example.com/folders/folders/{folderId}/members/{memberId} \
      -H 'Authorization: Bearer <access-token-goes-here>' \
      -H 'Content-Type: application/vnd.sas.content.folder.member+json' \
      -H 'Accept: application/vnd.sas.content.folder.member+json' \
      -H 'If-Match: string' \
      -H 'If-Unmodified-Since: string'
    
    
    const inputBody = '{
      "name": "Test Report",
      "uri": "/reports/reports/1234567890",
      "type": "CHILD",
      "contentType": "report"
    }';
    const 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'
    };
    
    fetch('https://example.com/folders/folders/{folderId}/members/{memberId}',
    {
      method: 'PUT',
      body: inputBody,
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    import requests
    headers = {
      'Content-Type': 'application/vnd.sas.content.folder.member+json',
      'Accept': 'application/vnd.sas.content.folder.member+json',
      'If-Match': 'string',
      'If-Unmodified-Since': 'string'
    }
    
    r = requests.put('https://example.com/folders/folders/{folderId}/members/{memberId}', headers = headers)
    
    print(r.json())
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Content-Type": []string{"application/vnd.sas.content.folder.member+json"},
            "Accept": []string{"application/vnd.sas.content.folder.member+json"},
            "If-Match": []string{"string"},
            "If-Unmodified-Since": []string{"string"},
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("PUT", "https://example.com/folders/folders/{folderId}/members/{memberId}", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    

    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

    Sample body when creating a folder member.

    {
      "name": "Test Report",
      "uri": "/reports/reports/1234567890",
      "type": "CHILD",
      "contentType": "report"
    }
    
    Parameters
    Name 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 false Member

    Example responses

    Sample body with a single folder member

    {
      "creationTimeStamp": "2022-06-20T18:19:13.92Z",
      "createdBy": "bob",
      "modifiedTimeStamp": "2022-06-20T18:19:13.92Z",
      "modifiedBy": "bob",
      "version": 2,
      "id": "a73fd398-8969-415a-b0e2-3b423cf95849",
      "name": "Folders_Spike.png",
      "added": "2022-06-20T18:19:13.947099Z",
      "parentFolderUri": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172",
      "uri": "/files/files/016cf2b0-ef36-4344-9896-0439a027d8ab",
      "type": "child",
      "contentType": "file",
      "typeDefName": "file_png",
      "links": [
        {
          "method": "GET",
          "rel": "self",
          "href": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172/members/a73fd398-8969-415a-b0e2-3b423cf95849",
          "uri": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172/members/a73fd398-8969-415a-b0e2-3b423cf95849",
          "type": "application/vnd.sas.content.folder.member"
        },
        {
          "method": "GET",
          "rel": "up",
          "href": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172",
          "uri": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172",
          "type": "application/vnd.sas.content.folder"
        },
        {
          "method": "GET",
          "rel": "getResource",
          "href": "/files/files/016cf2b0-ef36-4344-9896-0439a027d8ab",
          "uri": "/files/files/016cf2b0-ef36-4344-9896-0439a027d8ab",
          "type": "application/vnd.sas.summary"
        },
        {
          "method": "PUT",
          "rel": "putResource",
          "href": "/files/files/016cf2b0-ef36-4344-9896-0439a027d8ab",
          "uri": "/files/files/016cf2b0-ef36-4344-9896-0439a027d8ab"
        },
        {
          "method": "DELETE",
          "rel": "deleteResource",
          "href": "/files/files/016cf2b0-ef36-4344-9896-0439a027d8ab",
          "uri": "/files/files/016cf2b0-ef36-4344-9896-0439a027d8ab"
        },
        {
          "method": "GET",
          "rel": "ancestors",
          "href": "/folders/ancestors?childUri=/files/files/016cf2b0-ef36-4344-9896-0439a027d8ab",
          "uri": "/folders/ancestors?childUri=/files/files/016cf2b0-ef36-4344-9896-0439a027d8ab",
          "type": "application/vnd.sas.content.folder.ancestor"
        },
        {
          "method": "PUT",
          "rel": "update",
          "href": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172/members/a73fd398-8969-415a-b0e2-3b423cf95849",
          "uri": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172/members/a73fd398-8969-415a-b0e2-3b423cf95849",
          "type": "application/vnd.sas.content.folder.member"
        },
        {
          "method": "DELETE",
          "rel": "delete",
          "href": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172/members/a73fd398-8969-415a-b0e2-3b423cf95849",
          "uri": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172/members/a73fd398-8969-415a-b0e2-3b423cf95849"
        },
        {
          "method": "PUT",
          "rel": "validateRename",
          "href": "/folders/commons/validations/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172/members/a73fd398-8969-415a-b0e2-3b423cf95849/name?value={newname}&type={newtype}",
          "uri": "/folders/commons/validations/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172/members/a73fd398-8969-415a-b0e2-3b423cf95849/name?value={newname}&type={newtype}",
          "type": "application/vnd.sas.validation"
        },
        {
          "method": "GET",
          "rel": "transferExport",
          "href": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172/members/a73fd398-8969-415a-b0e2-3b423cf95849",
          "uri": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172/members/a73fd398-8969-415a-b0e2-3b423cf95849",
          "type": "application/vnd.sas.transfer.object"
        },
        {
          "method": "PUT",
          "rel": "transferImportUpdate",
          "href": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172/members/a73fd398-8969-415a-b0e2-3b423cf95849",
          "uri": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172/members/a73fd398-8969-415a-b0e2-3b423cf95849",
          "type": "application/vnd.sas.transfer.object",
          "responseType": "application/vnd.sas.summary"
        },
        {
          "method": "POST",
          "rel": "transferImport",
          "href": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172/members",
          "uri": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172/members",
          "type": "application/vnd.sas.transfer.object",
          "responseType": "application/vnd.sas.summary"
        }
      ]
    }
    
    {
      "creationTimeStamp": "2022-06-20T18:19:13.92Z",
      "createdBy": "bob",
      "modifiedTimeStamp": "2022-06-20T18:19:13.92Z",
      "modifiedBy": "bob",
      "version": 2,
      "id": "a73fd398-8969-415a-b0e2-3b423cf95849",
      "name": "Folders_Spike.png",
      "added": "2022-06-20T18:19:13.947099Z",
      "parentFolderUri": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172",
      "uri": "/files/files/016cf2b0-ef36-4344-9896-0439a027d8ab",
      "type": "child",
      "contentType": "file",
      "typeDefName": "file_png",
      "links": [
        {
          "method": "GET",
          "rel": "self",
          "href": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172/members/a73fd398-8969-415a-b0e2-3b423cf95849",
          "uri": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172/members/a73fd398-8969-415a-b0e2-3b423cf95849",
          "type": "application/vnd.sas.content.folder.member"
        },
        {
          "method": "GET",
          "rel": "up",
          "href": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172",
          "uri": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172",
          "type": "application/vnd.sas.content.folder"
        },
        {
          "method": "GET",
          "rel": "getResource",
          "href": "/files/files/016cf2b0-ef36-4344-9896-0439a027d8ab",
          "uri": "/files/files/016cf2b0-ef36-4344-9896-0439a027d8ab",
          "type": "application/vnd.sas.summary"
        },
        {
          "method": "PUT",
          "rel": "putResource",
          "href": "/files/files/016cf2b0-ef36-4344-9896-0439a027d8ab",
          "uri": "/files/files/016cf2b0-ef36-4344-9896-0439a027d8ab"
        },
        {
          "method": "DELETE",
          "rel": "deleteResource",
          "href": "/files/files/016cf2b0-ef36-4344-9896-0439a027d8ab",
          "uri": "/files/files/016cf2b0-ef36-4344-9896-0439a027d8ab"
        },
        {
          "method": "GET",
          "rel": "ancestors",
          "href": "/folders/ancestors?childUri=/files/files/016cf2b0-ef36-4344-9896-0439a027d8ab",
          "uri": "/folders/ancestors?childUri=/files/files/016cf2b0-ef36-4344-9896-0439a027d8ab",
          "type": "application/vnd.sas.content.folder.ancestor"
        },
        {
          "method": "PUT",
          "rel": "update",
          "href": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172/members/a73fd398-8969-415a-b0e2-3b423cf95849",
          "uri": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172/members/a73fd398-8969-415a-b0e2-3b423cf95849",
          "type": "application/vnd.sas.content.folder.member"
        },
        {
          "method": "DELETE",
          "rel": "delete",
          "href": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172/members/a73fd398-8969-415a-b0e2-3b423cf95849",
          "uri": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172/members/a73fd398-8969-415a-b0e2-3b423cf95849"
        },
        {
          "method": "PUT",
          "rel": "validateRename",
          "href": "/folders/commons/validations/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172/members/a73fd398-8969-415a-b0e2-3b423cf95849/name?value={newname}&type={newtype}",
          "uri": "/folders/commons/validations/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172/members/a73fd398-8969-415a-b0e2-3b423cf95849/name?value={newname}&type={newtype}",
          "type": "application/vnd.sas.validation"
        },
        {
          "method": "GET",
          "rel": "transferExport",
          "href": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172/members/a73fd398-8969-415a-b0e2-3b423cf95849",
          "uri": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172/members/a73fd398-8969-415a-b0e2-3b423cf95849",
          "type": "application/vnd.sas.transfer.object"
        },
        {
          "method": "PUT",
          "rel": "transferImportUpdate",
          "href": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172/members/a73fd398-8969-415a-b0e2-3b423cf95849",
          "uri": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172/members/a73fd398-8969-415a-b0e2-3b423cf95849",
          "type": "application/vnd.sas.transfer.object",
          "responseType": "application/vnd.sas.summary"
        },
        {
          "method": "POST",
          "rel": "transferImport",
          "href": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172/members",
          "uri": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172/members",
          "type": "application/vnd.sas.transfer.object",
          "responseType": "application/vnd.sas.summary"
        }
      ]
    }
    

    Example of an error response from the service

    {
      "version": 2,
      "httpStatusCode": 400,
      "errorCode": 1020,
      "message": "Field blah is invalid for the target type.",
      "details": [
        "path: /folders/rootFolders",
        "correlator: 103aed3e-d183-459e-8c8f-f0c57013995f"
      ]
    }
    
    {
      "version": 2,
      "httpStatusCode": 400,
      "errorCode": 1020,
      "message": "Field blah is invalid for the target type.",
      "details": [
        "path: /folders/rootFolders",
        "correlator: 103aed3e-d183-459e-8c8f-f0c57013995f"
      ]
    }
    
    {
      "version": 2,
      "httpStatusCode": 400,
      "errorCode": 1020,
      "message": "Field blah is invalid for the target type.",
      "details": [
        "path: /folders/rootFolders",
        "correlator: 103aed3e-d183-459e-8c8f-f0c57013995f"
      ]
    }
    
    {
      "version": 2,
      "httpStatusCode": 400,
      "errorCode": 1020,
      "message": "Field blah is invalid for the target type.",
      "details": [
        "path: /folders/rootFolders",
        "correlator: 103aed3e-d183-459e-8c8f-f0c57013995f"
      ]
    }
    
    {
      "version": 2,
      "httpStatusCode": 400,
      "errorCode": 1020,
      "message": "Field blah is invalid for the target type.",
      "details": [
        "path: /folders/rootFolders",
        "correlator: 103aed3e-d183-459e-8c8f-f0c57013995f"
      ]
    }
    
    {
      "version": 2,
      "httpStatusCode": 400,
      "errorCode": 1020,
      "message": "Field blah is invalid for the target type.",
      "details": [
        "path: /folders/rootFolders",
        "correlator: 103aed3e-d183-459e-8c8f-f0c57013995f"
      ]
    }
    
    Responses
    Status Meaning Description Schema
    200 OK The request succeeded. 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://example.com/folders/folders/{folderId}/members/{memberId} \
      -H 'Authorization: Bearer <access-token-goes-here>' \
      -H 'Content-Type: application/vnd.sas.content.folder.member+json' \
      -H 'Accept: application/vnd.sas.content.folder.member+json' \
      -H 'If-Match: string' \
      -H 'If-Unmodified-Since: string'
    
    
    const inputBody = '{
      "name": "Test Report",
      "uri": "/reports/reports/1234567890",
      "type": "CHILD",
      "contentType": "report"
    }';
    const 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'
    };
    
    fetch('https://example.com/folders/folders/{folderId}/members/{memberId}',
    {
      method: 'PATCH',
      body: inputBody,
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    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://example.com/folders/folders/{folderId}/members/{memberId}', headers = headers)
    
    print(r.json())
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Content-Type": []string{"application/vnd.sas.content.folder.member+json"},
            "Accept": []string{"application/vnd.sas.content.folder.member+json"},
            "If-Match": []string{"string"},
            "If-Unmodified-Since": []string{"string"},
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("PATCH", "https://example.com/folders/folders/{folderId}/members/{memberId}", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    

    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

    Sample body when creating a folder member.

    {
      "name": "Test Report",
      "uri": "/reports/reports/1234567890",
      "type": "CHILD",
      "contentType": "report"
    }
    
    Parameters
    Name 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 false Member

    Example responses

    Sample body with a single folder member

    {
      "creationTimeStamp": "2022-06-20T18:19:13.92Z",
      "createdBy": "bob",
      "modifiedTimeStamp": "2022-06-20T18:19:13.92Z",
      "modifiedBy": "bob",
      "version": 2,
      "id": "a73fd398-8969-415a-b0e2-3b423cf95849",
      "name": "Folders_Spike.png",
      "added": "2022-06-20T18:19:13.947099Z",
      "parentFolderUri": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172",
      "uri": "/files/files/016cf2b0-ef36-4344-9896-0439a027d8ab",
      "type": "child",
      "contentType": "file",
      "typeDefName": "file_png",
      "links": [
        {
          "method": "GET",
          "rel": "self",
          "href": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172/members/a73fd398-8969-415a-b0e2-3b423cf95849",
          "uri": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172/members/a73fd398-8969-415a-b0e2-3b423cf95849",
          "type": "application/vnd.sas.content.folder.member"
        },
        {
          "method": "GET",
          "rel": "up",
          "href": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172",
          "uri": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172",
          "type": "application/vnd.sas.content.folder"
        },
        {
          "method": "GET",
          "rel": "getResource",
          "href": "/files/files/016cf2b0-ef36-4344-9896-0439a027d8ab",
          "uri": "/files/files/016cf2b0-ef36-4344-9896-0439a027d8ab",
          "type": "application/vnd.sas.summary"
        },
        {
          "method": "PUT",
          "rel": "putResource",
          "href": "/files/files/016cf2b0-ef36-4344-9896-0439a027d8ab",
          "uri": "/files/files/016cf2b0-ef36-4344-9896-0439a027d8ab"
        },
        {
          "method": "DELETE",
          "rel": "deleteResource",
          "href": "/files/files/016cf2b0-ef36-4344-9896-0439a027d8ab",
          "uri": "/files/files/016cf2b0-ef36-4344-9896-0439a027d8ab"
        },
        {
          "method": "GET",
          "rel": "ancestors",
          "href": "/folders/ancestors?childUri=/files/files/016cf2b0-ef36-4344-9896-0439a027d8ab",
          "uri": "/folders/ancestors?childUri=/files/files/016cf2b0-ef36-4344-9896-0439a027d8ab",
          "type": "application/vnd.sas.content.folder.ancestor"
        },
        {
          "method": "PUT",
          "rel": "update",
          "href": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172/members/a73fd398-8969-415a-b0e2-3b423cf95849",
          "uri": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172/members/a73fd398-8969-415a-b0e2-3b423cf95849",
          "type": "application/vnd.sas.content.folder.member"
        },
        {
          "method": "DELETE",
          "rel": "delete",
          "href": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172/members/a73fd398-8969-415a-b0e2-3b423cf95849",
          "uri": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172/members/a73fd398-8969-415a-b0e2-3b423cf95849"
        },
        {
          "method": "PUT",
          "rel": "validateRename",
          "href": "/folders/commons/validations/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172/members/a73fd398-8969-415a-b0e2-3b423cf95849/name?value={newname}&type={newtype}",
          "uri": "/folders/commons/validations/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172/members/a73fd398-8969-415a-b0e2-3b423cf95849/name?value={newname}&type={newtype}",
          "type": "application/vnd.sas.validation"
        },
        {
          "method": "GET",
          "rel": "transferExport",
          "href": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172/members/a73fd398-8969-415a-b0e2-3b423cf95849",
          "uri": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172/members/a73fd398-8969-415a-b0e2-3b423cf95849",
          "type": "application/vnd.sas.transfer.object"
        },
        {
          "method": "PUT",
          "rel": "transferImportUpdate",
          "href": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172/members/a73fd398-8969-415a-b0e2-3b423cf95849",
          "uri": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172/members/a73fd398-8969-415a-b0e2-3b423cf95849",
          "type": "application/vnd.sas.transfer.object",
          "responseType": "application/vnd.sas.summary"
        },
        {
          "method": "POST",
          "rel": "transferImport",
          "href": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172/members",
          "uri": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172/members",
          "type": "application/vnd.sas.transfer.object",
          "responseType": "application/vnd.sas.summary"
        }
      ]
    }
    
    {
      "creationTimeStamp": "2022-06-20T18:19:13.92Z",
      "createdBy": "bob",
      "modifiedTimeStamp": "2022-06-20T18:19:13.92Z",
      "modifiedBy": "bob",
      "version": 2,
      "id": "a73fd398-8969-415a-b0e2-3b423cf95849",
      "name": "Folders_Spike.png",
      "added": "2022-06-20T18:19:13.947099Z",
      "parentFolderUri": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172",
      "uri": "/files/files/016cf2b0-ef36-4344-9896-0439a027d8ab",
      "type": "child",
      "contentType": "file",
      "typeDefName": "file_png",
      "links": [
        {
          "method": "GET",
          "rel": "self",
          "href": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172/members/a73fd398-8969-415a-b0e2-3b423cf95849",
          "uri": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172/members/a73fd398-8969-415a-b0e2-3b423cf95849",
          "type": "application/vnd.sas.content.folder.member"
        },
        {
          "method": "GET",
          "rel": "up",
          "href": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172",
          "uri": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172",
          "type": "application/vnd.sas.content.folder"
        },
        {
          "method": "GET",
          "rel": "getResource",
          "href": "/files/files/016cf2b0-ef36-4344-9896-0439a027d8ab",
          "uri": "/files/files/016cf2b0-ef36-4344-9896-0439a027d8ab",
          "type": "application/vnd.sas.summary"
        },
        {
          "method": "PUT",
          "rel": "putResource",
          "href": "/files/files/016cf2b0-ef36-4344-9896-0439a027d8ab",
          "uri": "/files/files/016cf2b0-ef36-4344-9896-0439a027d8ab"
        },
        {
          "method": "DELETE",
          "rel": "deleteResource",
          "href": "/files/files/016cf2b0-ef36-4344-9896-0439a027d8ab",
          "uri": "/files/files/016cf2b0-ef36-4344-9896-0439a027d8ab"
        },
        {
          "method": "GET",
          "rel": "ancestors",
          "href": "/folders/ancestors?childUri=/files/files/016cf2b0-ef36-4344-9896-0439a027d8ab",
          "uri": "/folders/ancestors?childUri=/files/files/016cf2b0-ef36-4344-9896-0439a027d8ab",
          "type": "application/vnd.sas.content.folder.ancestor"
        },
        {
          "method": "PUT",
          "rel": "update",
          "href": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172/members/a73fd398-8969-415a-b0e2-3b423cf95849",
          "uri": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172/members/a73fd398-8969-415a-b0e2-3b423cf95849",
          "type": "application/vnd.sas.content.folder.member"
        },
        {
          "method": "DELETE",
          "rel": "delete",
          "href": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172/members/a73fd398-8969-415a-b0e2-3b423cf95849",
          "uri": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172/members/a73fd398-8969-415a-b0e2-3b423cf95849"
        },
        {
          "method": "PUT",
          "rel": "validateRename",
          "href": "/folders/commons/validations/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172/members/a73fd398-8969-415a-b0e2-3b423cf95849/name?value={newname}&type={newtype}",
          "uri": "/folders/commons/validations/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172/members/a73fd398-8969-415a-b0e2-3b423cf95849/name?value={newname}&type={newtype}",
          "type": "application/vnd.sas.validation"
        },
        {
          "method": "GET",
          "rel": "transferExport",
          "href": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172/members/a73fd398-8969-415a-b0e2-3b423cf95849",
          "uri": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172/members/a73fd398-8969-415a-b0e2-3b423cf95849",
          "type": "application/vnd.sas.transfer.object"
        },
        {
          "method": "PUT",
          "rel": "transferImportUpdate",
          "href": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172/members/a73fd398-8969-415a-b0e2-3b423cf95849",
          "uri": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172/members/a73fd398-8969-415a-b0e2-3b423cf95849",
          "type": "application/vnd.sas.transfer.object",
          "responseType": "application/vnd.sas.summary"
        },
        {
          "method": "POST",
          "rel": "transferImport",
          "href": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172/members",
          "uri": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172/members",
          "type": "application/vnd.sas.transfer.object",
          "responseType": "application/vnd.sas.summary"
        }
      ]
    }
    

    Example of an error response from the service

    {
      "version": 2,
      "httpStatusCode": 400,
      "errorCode": 1020,
      "message": "Field blah is invalid for the target type.",
      "details": [
        "path: /folders/rootFolders",
        "correlator: 103aed3e-d183-459e-8c8f-f0c57013995f"
      ]
    }
    
    {
      "version": 2,
      "httpStatusCode": 400,
      "errorCode": 1020,
      "message": "Field blah is invalid for the target type.",
      "details": [
        "path: /folders/rootFolders",
        "correlator: 103aed3e-d183-459e-8c8f-f0c57013995f"
      ]
    }
    
    {
      "version": 2,
      "httpStatusCode": 400,
      "errorCode": 1020,
      "message": "Field blah is invalid for the target type.",
      "details": [
        "path: /folders/rootFolders",
        "correlator: 103aed3e-d183-459e-8c8f-f0c57013995f"
      ]
    }
    
    {
      "version": 2,
      "httpStatusCode": 400,
      "errorCode": 1020,
      "message": "Field blah is invalid for the target type.",
      "details": [
        "path: /folders/rootFolders",
        "correlator: 103aed3e-d183-459e-8c8f-f0c57013995f"
      ]
    }
    
    {
      "version": 2,
      "httpStatusCode": 400,
      "errorCode": 1020,
      "message": "Field blah is invalid for the target type.",
      "details": [
        "path: /folders/rootFolders",
        "correlator: 103aed3e-d183-459e-8c8f-f0c57013995f"
      ]
    }
    
    {
      "version": 2,
      "httpStatusCode": 400,
      "errorCode": 1020,
      "message": "Field blah is invalid for the target type.",
      "details": [
        "path: /folders/rootFolders",
        "correlator: 103aed3e-d183-459e-8c8f-f0c57013995f"
      ]
    }
    
    {
      "version": 2,
      "httpStatusCode": 400,
      "errorCode": 1020,
      "message": "Field blah is invalid for the target type.",
      "details": [
        "path: /folders/rootFolders",
        "correlator: 103aed3e-d183-459e-8c8f-f0c57013995f"
      ]
    }
    
    {
      "version": 2,
      "httpStatusCode": 400,
      "errorCode": 1020,
      "message": "Field blah is invalid for the target type.",
      "details": [
        "path: /folders/rootFolders",
        "correlator: 103aed3e-d183-459e-8c8f-f0c57013995f"
      ]
    }
    
    {
      "version": 2,
      "httpStatusCode": 400,
      "errorCode": 1020,
      "message": "Field blah is invalid for the target type.",
      "details": [
        "path: /folders/rootFolders",
        "correlator: 103aed3e-d183-459e-8c8f-f0c57013995f"
      ]
    }
    
    Responses
    Status Meaning Description Schema
    200 OK The request succeeded. 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://example.com/folders/folders/{folderId}/histories \
      -H 'Authorization: Bearer <access-token-goes-here>' \
      -H 'Content-Type: application/vnd.sas.content.folder.member+json' \
      -H 'Accept: application/vnd.sas.content.folder.member+json'
    
    
    const inputBody = '{
      "name": "Test Report",
      "uri": "/reports/reports/1234567890",
      "type": "CHILD",
      "contentType": "report"
    }';
    const headers = {
      'Content-Type':'application/vnd.sas.content.folder.member+json',
      'Accept':'application/vnd.sas.content.folder.member+json'
    };
    
    fetch('https://example.com/folders/folders/{folderId}/histories',
    {
      method: 'POST',
      body: inputBody,
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    import requests
    headers = {
      'Content-Type': 'application/vnd.sas.content.folder.member+json',
      'Accept': 'application/vnd.sas.content.folder.member+json'
    }
    
    r = requests.post('https://example.com/folders/folders/{folderId}/histories', headers = headers)
    
    print(r.json())
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Content-Type": []string{"application/vnd.sas.content.folder.member+json"},
            "Accept": []string{"application/vnd.sas.content.folder.member+json"},
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("POST", "https://example.com/folders/folders/{folderId}/histories", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    

    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

    Sample body when creating a folder member.

    {
      "name": "Test Report",
      "uri": "/reports/reports/1234567890",
      "type": "CHILD",
      "contentType": "report"
    }
    
    Parameters
    Name 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. The default value is false.
    body body memberIn false Member

    Example responses

    Sample body with a single folder member

    {
      "creationTimeStamp": "2022-06-20T18:19:13.92Z",
      "createdBy": "bob",
      "modifiedTimeStamp": "2022-06-20T18:19:13.92Z",
      "modifiedBy": "bob",
      "version": 2,
      "id": "a73fd398-8969-415a-b0e2-3b423cf95849",
      "name": "Folders_Spike.png",
      "added": "2022-06-20T18:19:13.947099Z",
      "parentFolderUri": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172",
      "uri": "/files/files/016cf2b0-ef36-4344-9896-0439a027d8ab",
      "type": "child",
      "contentType": "file",
      "typeDefName": "file_png",
      "links": [
        {
          "method": "GET",
          "rel": "self",
          "href": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172/members/a73fd398-8969-415a-b0e2-3b423cf95849",
          "uri": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172/members/a73fd398-8969-415a-b0e2-3b423cf95849",
          "type": "application/vnd.sas.content.folder.member"
        },
        {
          "method": "GET",
          "rel": "up",
          "href": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172",
          "uri": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172",
          "type": "application/vnd.sas.content.folder"
        },
        {
          "method": "GET",
          "rel": "getResource",
          "href": "/files/files/016cf2b0-ef36-4344-9896-0439a027d8ab",
          "uri": "/files/files/016cf2b0-ef36-4344-9896-0439a027d8ab",
          "type": "application/vnd.sas.summary"
        },
        {
          "method": "PUT",
          "rel": "putResource",
          "href": "/files/files/016cf2b0-ef36-4344-9896-0439a027d8ab",
          "uri": "/files/files/016cf2b0-ef36-4344-9896-0439a027d8ab"
        },
        {
          "method": "DELETE",
          "rel": "deleteResource",
          "href": "/files/files/016cf2b0-ef36-4344-9896-0439a027d8ab",
          "uri": "/files/files/016cf2b0-ef36-4344-9896-0439a027d8ab"
        },
        {
          "method": "GET",
          "rel": "ancestors",
          "href": "/folders/ancestors?childUri=/files/files/016cf2b0-ef36-4344-9896-0439a027d8ab",
          "uri": "/folders/ancestors?childUri=/files/files/016cf2b0-ef36-4344-9896-0439a027d8ab",
          "type": "application/vnd.sas.content.folder.ancestor"
        },
        {
          "method": "PUT",
          "rel": "update",
          "href": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172/members/a73fd398-8969-415a-b0e2-3b423cf95849",
          "uri": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172/members/a73fd398-8969-415a-b0e2-3b423cf95849",
          "type": "application/vnd.sas.content.folder.member"
        },
        {
          "method": "DELETE",
          "rel": "delete",
          "href": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172/members/a73fd398-8969-415a-b0e2-3b423cf95849",
          "uri": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172/members/a73fd398-8969-415a-b0e2-3b423cf95849"
        },
        {
          "method": "PUT",
          "rel": "validateRename",
          "href": "/folders/commons/validations/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172/members/a73fd398-8969-415a-b0e2-3b423cf95849/name?value={newname}&type={newtype}",
          "uri": "/folders/commons/validations/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172/members/a73fd398-8969-415a-b0e2-3b423cf95849/name?value={newname}&type={newtype}",
          "type": "application/vnd.sas.validation"
        },
        {
          "method": "GET",
          "rel": "transferExport",
          "href": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172/members/a73fd398-8969-415a-b0e2-3b423cf95849",
          "uri": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172/members/a73fd398-8969-415a-b0e2-3b423cf95849",
          "type": "application/vnd.sas.transfer.object"
        },
        {
          "method": "PUT",
          "rel": "transferImportUpdate",
          "href": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172/members/a73fd398-8969-415a-b0e2-3b423cf95849",
          "uri": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172/members/a73fd398-8969-415a-b0e2-3b423cf95849",
          "type": "application/vnd.sas.transfer.object",
          "responseType": "application/vnd.sas.summary"
        },
        {
          "method": "POST",
          "rel": "transferImport",
          "href": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172/members",
          "uri": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172/members",
          "type": "application/vnd.sas.transfer.object",
          "responseType": "application/vnd.sas.summary"
        }
      ]
    }
    

    Summary representation of a folder member

    {
      "creationTimeStamp": "2022-06-20T18:19:13.92Z",
      "createdBy": "bob",
      "modifiedTimeStamp": "2022-06-20T18:19:13.92Z",
      "modifiedBy": "bob",
      "version": 2,
      "id": "a73fd398-8969-415a-b0e2-3b423cf95849",
      "name": "Folders_Spike.png",
      "type": "member",
      "typeDefName": "file_png",
      "links": [
        {
          "method": "GET",
          "rel": "self",
          "href": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172/members/a73fd398-8969-415a-b0e2-3b423cf95849",
          "uri": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172/members/a73fd398-8969-415a-b0e2-3b423cf95849",
          "type": "application/vnd.sas.content.folder.member"
        },
        {
          "method": "GET",
          "rel": "alternate",
          "href": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172/members/a73fd398-8969-415a-b0e2-3b423cf95849",
          "uri": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172/members/a73fd398-8969-415a-b0e2-3b423cf95849",
          "type": "application/vnd.sas.summary"
        }
      ]
    }
    

    Sample body with a single folder member

    {
      "creationTimeStamp": "2022-06-20T18:19:13.92Z",
      "createdBy": "bob",
      "modifiedTimeStamp": "2022-06-20T18:19:13.92Z",
      "modifiedBy": "bob",
      "version": 2,
      "id": "a73fd398-8969-415a-b0e2-3b423cf95849",
      "name": "Folders_Spike.png",
      "added": "2022-06-20T18:19:13.947099Z",
      "parentFolderUri": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172",
      "uri": "/files/files/016cf2b0-ef36-4344-9896-0439a027d8ab",
      "type": "child",
      "contentType": "file",
      "typeDefName": "file_png",
      "links": [
        {
          "method": "GET",
          "rel": "self",
          "href": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172/members/a73fd398-8969-415a-b0e2-3b423cf95849",
          "uri": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172/members/a73fd398-8969-415a-b0e2-3b423cf95849",
          "type": "application/vnd.sas.content.folder.member"
        },
        {
          "method": "GET",
          "rel": "up",
          "href": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172",
          "uri": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172",
          "type": "application/vnd.sas.content.folder"
        },
        {
          "method": "GET",
          "rel": "getResource",
          "href": "/files/files/016cf2b0-ef36-4344-9896-0439a027d8ab",
          "uri": "/files/files/016cf2b0-ef36-4344-9896-0439a027d8ab",
          "type": "application/vnd.sas.summary"
        },
        {
          "method": "PUT",
          "rel": "putResource",
          "href": "/files/files/016cf2b0-ef36-4344-9896-0439a027d8ab",
          "uri": "/files/files/016cf2b0-ef36-4344-9896-0439a027d8ab"
        },
        {
          "method": "DELETE",
          "rel": "deleteResource",
          "href": "/files/files/016cf2b0-ef36-4344-9896-0439a027d8ab",
          "uri": "/files/files/016cf2b0-ef36-4344-9896-0439a027d8ab"
        },
        {
          "method": "GET",
          "rel": "ancestors",
          "href": "/folders/ancestors?childUri=/files/files/016cf2b0-ef36-4344-9896-0439a027d8ab",
          "uri": "/folders/ancestors?childUri=/files/files/016cf2b0-ef36-4344-9896-0439a027d8ab",
          "type": "application/vnd.sas.content.folder.ancestor"
        },
        {
          "method": "PUT",
          "rel": "update",
          "href": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172/members/a73fd398-8969-415a-b0e2-3b423cf95849",
          "uri": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172/members/a73fd398-8969-415a-b0e2-3b423cf95849",
          "type": "application/vnd.sas.content.folder.member"
        },
        {
          "method": "DELETE",
          "rel": "delete",
          "href": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172/members/a73fd398-8969-415a-b0e2-3b423cf95849",
          "uri": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172/members/a73fd398-8969-415a-b0e2-3b423cf95849"
        },
        {
          "method": "PUT",
          "rel": "validateRename",
          "href": "/folders/commons/validations/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172/members/a73fd398-8969-415a-b0e2-3b423cf95849/name?value={newname}&type={newtype}",
          "uri": "/folders/commons/validations/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172/members/a73fd398-8969-415a-b0e2-3b423cf95849/name?value={newname}&type={newtype}",
          "type": "application/vnd.sas.validation"
        },
        {
          "method": "GET",
          "rel": "transferExport",
          "href": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172/members/a73fd398-8969-415a-b0e2-3b423cf95849",
          "uri": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172/members/a73fd398-8969-415a-b0e2-3b423cf95849",
          "type": "application/vnd.sas.transfer.object"
        },
        {
          "method": "PUT",
          "rel": "transferImportUpdate",
          "href": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172/members/a73fd398-8969-415a-b0e2-3b423cf95849",
          "uri": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172/members/a73fd398-8969-415a-b0e2-3b423cf95849",
          "type": "application/vnd.sas.transfer.object",
          "responseType": "application/vnd.sas.summary"
        },
        {
          "method": "POST",
          "rel": "transferImport",
          "href": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172/members",
          "uri": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172/members",
          "type": "application/vnd.sas.transfer.object",
          "responseType": "application/vnd.sas.summary"
        }
      ]
    }
    
    {
      "creationTimeStamp": "2022-06-20T18:19:13.92Z",
      "createdBy": "bob",
      "modifiedTimeStamp": "2022-06-20T18:19:13.92Z",
      "modifiedBy": "bob",
      "version": 2,
      "id": "a73fd398-8969-415a-b0e2-3b423cf95849",
      "name": "Folders_Spike.png",
      "added": "2022-06-20T18:19:13.947099Z",
      "parentFolderUri": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172",
      "uri": "/files/files/016cf2b0-ef36-4344-9896-0439a027d8ab",
      "type": "child",
      "contentType": "file",
      "typeDefName": "file_png",
      "links": [
        {
          "method": "GET",
          "rel": "self",
          "href": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172/members/a73fd398-8969-415a-b0e2-3b423cf95849",
          "uri": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172/members/a73fd398-8969-415a-b0e2-3b423cf95849",
          "type": "application/vnd.sas.content.folder.member"
        },
        {
          "method": "GET",
          "rel": "up",
          "href": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172",
          "uri": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172",
          "type": "application/vnd.sas.content.folder"
        },
        {
          "method": "GET",
          "rel": "getResource",
          "href": "/files/files/016cf2b0-ef36-4344-9896-0439a027d8ab",
          "uri": "/files/files/016cf2b0-ef36-4344-9896-0439a027d8ab",
          "type": "application/vnd.sas.summary"
        },
        {
          "method": "PUT",
          "rel": "putResource",
          "href": "/files/files/016cf2b0-ef36-4344-9896-0439a027d8ab",
          "uri": "/files/files/016cf2b0-ef36-4344-9896-0439a027d8ab"
        },
        {
          "method": "DELETE",
          "rel": "deleteResource",
          "href": "/files/files/016cf2b0-ef36-4344-9896-0439a027d8ab",
          "uri": "/files/files/016cf2b0-ef36-4344-9896-0439a027d8ab"
        },
        {
          "method": "GET",
          "rel": "ancestors",
          "href": "/folders/ancestors?childUri=/files/files/016cf2b0-ef36-4344-9896-0439a027d8ab",
          "uri": "/folders/ancestors?childUri=/files/files/016cf2b0-ef36-4344-9896-0439a027d8ab",
          "type": "application/vnd.sas.content.folder.ancestor"
        },
        {
          "method": "PUT",
          "rel": "update",
          "href": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172/members/a73fd398-8969-415a-b0e2-3b423cf95849",
          "uri": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172/members/a73fd398-8969-415a-b0e2-3b423cf95849",
          "type": "application/vnd.sas.content.folder.member"
        },
        {
          "method": "DELETE",
          "rel": "delete",
          "href": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172/members/a73fd398-8969-415a-b0e2-3b423cf95849",
          "uri": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172/members/a73fd398-8969-415a-b0e2-3b423cf95849"
        },
        {
          "method": "PUT",
          "rel": "validateRename",
          "href": "/folders/commons/validations/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172/members/a73fd398-8969-415a-b0e2-3b423cf95849/name?value={newname}&type={newtype}",
          "uri": "/folders/commons/validations/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172/members/a73fd398-8969-415a-b0e2-3b423cf95849/name?value={newname}&type={newtype}",
          "type": "application/vnd.sas.validation"
        },
        {
          "method": "GET",
          "rel": "transferExport",
          "href": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172/members/a73fd398-8969-415a-b0e2-3b423cf95849",
          "uri": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172/members/a73fd398-8969-415a-b0e2-3b423cf95849",
          "type": "application/vnd.sas.transfer.object"
        },
        {
          "method": "PUT",
          "rel": "transferImportUpdate",
          "href": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172/members/a73fd398-8969-415a-b0e2-3b423cf95849",
          "uri": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172/members/a73fd398-8969-415a-b0e2-3b423cf95849",
          "type": "application/vnd.sas.transfer.object",
          "responseType": "application/vnd.sas.summary"
        },
        {
          "method": "POST",
          "rel": "transferImport",
          "href": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172/members",
          "uri": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172/members",
          "type": "application/vnd.sas.transfer.object",
          "responseType": "application/vnd.sas.summary"
        }
      ]
    }
    

    Summary representation of a folder member

    {
      "creationTimeStamp": "2022-06-20T18:19:13.92Z",
      "createdBy": "bob",
      "modifiedTimeStamp": "2022-06-20T18:19:13.92Z",
      "modifiedBy": "bob",
      "version": 2,
      "id": "a73fd398-8969-415a-b0e2-3b423cf95849",
      "name": "Folders_Spike.png",
      "type": "member",
      "typeDefName": "file_png",
      "links": [
        {
          "method": "GET",
          "rel": "self",
          "href": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172/members/a73fd398-8969-415a-b0e2-3b423cf95849",
          "uri": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172/members/a73fd398-8969-415a-b0e2-3b423cf95849",
          "type": "application/vnd.sas.content.folder.member"
        },
        {
          "method": "GET",
          "rel": "alternate",
          "href": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172/members/a73fd398-8969-415a-b0e2-3b423cf95849",
          "uri": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172/members/a73fd398-8969-415a-b0e2-3b423cf95849",
          "type": "application/vnd.sas.summary"
        }
      ]
    }
    

    Sample body with a single folder member

    {
      "creationTimeStamp": "2022-06-20T18:19:13.92Z",
      "createdBy": "bob",
      "modifiedTimeStamp": "2022-06-20T18:19:13.92Z",
      "modifiedBy": "bob",
      "version": 2,
      "id": "a73fd398-8969-415a-b0e2-3b423cf95849",
      "name": "Folders_Spike.png",
      "added": "2022-06-20T18:19:13.947099Z",
      "parentFolderUri": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172",
      "uri": "/files/files/016cf2b0-ef36-4344-9896-0439a027d8ab",
      "type": "child",
      "contentType": "file",
      "typeDefName": "file_png",
      "links": [
        {
          "method": "GET",
          "rel": "self",
          "href": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172/members/a73fd398-8969-415a-b0e2-3b423cf95849",
          "uri": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172/members/a73fd398-8969-415a-b0e2-3b423cf95849",
          "type": "application/vnd.sas.content.folder.member"
        },
        {
          "method": "GET",
          "rel": "up",
          "href": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172",
          "uri": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172",
          "type": "application/vnd.sas.content.folder"
        },
        {
          "method": "GET",
          "rel": "getResource",
          "href": "/files/files/016cf2b0-ef36-4344-9896-0439a027d8ab",
          "uri": "/files/files/016cf2b0-ef36-4344-9896-0439a027d8ab",
          "type": "application/vnd.sas.summary"
        },
        {
          "method": "PUT",
          "rel": "putResource",
          "href": "/files/files/016cf2b0-ef36-4344-9896-0439a027d8ab",
          "uri": "/files/files/016cf2b0-ef36-4344-9896-0439a027d8ab"
        },
        {
          "method": "DELETE",
          "rel": "deleteResource",
          "href": "/files/files/016cf2b0-ef36-4344-9896-0439a027d8ab",
          "uri": "/files/files/016cf2b0-ef36-4344-9896-0439a027d8ab"
        },
        {
          "method": "GET",
          "rel": "ancestors",
          "href": "/folders/ancestors?childUri=/files/files/016cf2b0-ef36-4344-9896-0439a027d8ab",
          "uri": "/folders/ancestors?childUri=/files/files/016cf2b0-ef36-4344-9896-0439a027d8ab",
          "type": "application/vnd.sas.content.folder.ancestor"
        },
        {
          "method": "PUT",
          "rel": "update",
          "href": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172/members/a73fd398-8969-415a-b0e2-3b423cf95849",
          "uri": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172/members/a73fd398-8969-415a-b0e2-3b423cf95849",
          "type": "application/vnd.sas.content.folder.member"
        },
        {
          "method": "DELETE",
          "rel": "delete",
          "href": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172/members/a73fd398-8969-415a-b0e2-3b423cf95849",
          "uri": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172/members/a73fd398-8969-415a-b0e2-3b423cf95849"
        },
        {
          "method": "PUT",
          "rel": "validateRename",
          "href": "/folders/commons/validations/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172/members/a73fd398-8969-415a-b0e2-3b423cf95849/name?value={newname}&type={newtype}",
          "uri": "/folders/commons/validations/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172/members/a73fd398-8969-415a-b0e2-3b423cf95849/name?value={newname}&type={newtype}",
          "type": "application/vnd.sas.validation"
        },
        {
          "method": "GET",
          "rel": "transferExport",
          "href": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172/members/a73fd398-8969-415a-b0e2-3b423cf95849",
          "uri": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172/members/a73fd398-8969-415a-b0e2-3b423cf95849",
          "type": "application/vnd.sas.transfer.object"
        },
        {
          "method": "PUT",
          "rel": "transferImportUpdate",
          "href": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172/members/a73fd398-8969-415a-b0e2-3b423cf95849",
          "uri": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172/members/a73fd398-8969-415a-b0e2-3b423cf95849",
          "type": "application/vnd.sas.transfer.object",
          "responseType": "application/vnd.sas.summary"
        },
        {
          "method": "POST",
          "rel": "transferImport",
          "href": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172/members",
          "uri": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172/members",
          "type": "application/vnd.sas.transfer.object",
          "responseType": "application/vnd.sas.summary"
        }
      ]
    }
    

    Example of an error response from the service

    {
      "version": 2,
      "httpStatusCode": 400,
      "errorCode": 1020,
      "message": "Field blah is invalid for the target type.",
      "details": [
        "path: /folders/rootFolders",
        "correlator: 103aed3e-d183-459e-8c8f-f0c57013995f"
      ]
    }
    
    {
      "version": 2,
      "httpStatusCode": 400,
      "errorCode": 1020,
      "message": "Field blah is invalid for the target type.",
      "details": [
        "path: /folders/rootFolders",
        "correlator: 103aed3e-d183-459e-8c8f-f0c57013995f"
      ]
    }
    
    {
      "version": 2,
      "httpStatusCode": 400,
      "errorCode": 1020,
      "message": "Field blah is invalid for the target type.",
      "details": [
        "path: /folders/rootFolders",
        "correlator: 103aed3e-d183-459e-8c8f-f0c57013995f"
      ]
    }
    
    {
      "version": 2,
      "httpStatusCode": 400,
      "errorCode": 1020,
      "message": "Field blah is invalid for the target type.",
      "details": [
        "path: /folders/rootFolders",
        "correlator: 103aed3e-d183-459e-8c8f-f0c57013995f"
      ]
    }
    
    {
      "version": 2,
      "httpStatusCode": 400,
      "errorCode": 1020,
      "message": "Field blah is invalid for the target type.",
      "details": [
        "path: /folders/rootFolders",
        "correlator: 103aed3e-d183-459e-8c8f-f0c57013995f"
      ]
    }
    
    {
      "version": 2,
      "httpStatusCode": 400,
      "errorCode": 1020,
      "message": "Field blah is invalid for the target type.",
      "details": [
        "path: /folders/rootFolders",
        "correlator: 103aed3e-d183-459e-8c8f-f0c57013995f"
      ]
    }
    
    {
      "version": 2,
      "httpStatusCode": 400,
      "errorCode": 1020,
      "message": "Field blah is invalid for the target type.",
      "details": [
        "path: /folders/rootFolders",
        "correlator: 103aed3e-d183-459e-8c8f-f0c57013995f"
      ]
    }
    
    {
      "version": 2,
      "httpStatusCode": 400,
      "errorCode": 1020,
      "message": "Field blah is invalid for the target type.",
      "details": [
        "path: /folders/rootFolders",
        "correlator: 103aed3e-d183-459e-8c8f-f0c57013995f"
      ]
    }
    
    {
      "version": 2,
      "httpStatusCode": 400,
      "errorCode": 1020,
      "message": "Field blah is invalid for the target type.",
      "details": [
        "path: /folders/rootFolders",
        "correlator: 103aed3e-d183-459e-8c8f-f0c57013995f"
      ]
    }
    
    Responses
    Status Meaning Description Schema
    200 OK The member was updated. member
    201 Created A member was created. member
    400 Bad Request The request was invalid. A folder type other than a history folder was referenced, or the body does not contain valid JSON. errorResponse
    404 Not Found No folder exists at the requested path. 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 of the created or updated object.
    200 Last-Modified string The RFC 1123 timestamp representing the last time this member was updated.
    200 Etag string A tag that identifies this revision of this object.
    201 Location string The URI of the created or updated object.
    201 Last-Modified string The ISO8601 timestamp that represents the last time this member was updated.
    201 Etag string A tag that identifies this revision of this object.

    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://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'
    
    
    
    const headers = {
      'Accept':'application/vnd.sas.validation+json'
    };
    
    fetch('https://example.com/folders/commons/validations/folders/{folderId}/members/{memberId}/name?value=string&type=string',
    {
      method: 'PUT',
    
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    import requests
    headers = {
      'Accept': 'application/vnd.sas.validation+json'
    }
    
    r = requests.put('https://example.com/folders/commons/validations/folders/{folderId}/members/{memberId}/name', params={
      'value': 'string',  'type': 'string'
    }, headers = headers)
    
    print(r.json())
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Accept": []string{"application/vnd.sas.validation+json"},
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("PUT", "https://example.com/folders/commons/validations/folders/{folderId}/members/{memberId}/name", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    

    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
    Name 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.
    typeDefName query string false The Type definition name to test against. This must match exactly with the desired value. A null value will be compared with null values in the repository.

    Example responses

    Sample validation response with a good status

    {
      "valid": true,
      "version": 1
    }
    

    Example of an error response from the service

    {
      "version": 2,
      "httpStatusCode": 400,
      "errorCode": 1020,
      "message": "Field blah is invalid for the target type.",
      "details": [
        "path: /folders/rootFolders",
        "correlator: 103aed3e-d183-459e-8c8f-f0c57013995f"
      ]
    }
    
    {
      "version": 2,
      "httpStatusCode": 400,
      "errorCode": 1020,
      "message": "Field blah is invalid for the target type.",
      "details": [
        "path: /folders/rootFolders",
        "correlator: 103aed3e-d183-459e-8c8f-f0c57013995f"
      ]
    }
    
    Responses
    Status Meaning Description Schema
    200 OK The request was successfully processed. The body contains the result, whether the name/type is acceptable. validation
    204 No Content The name is acceptable. The Accept header was application/json, so no further data is returned. None
    400 Bad Request The request was invalid. errorResponse
    409 Conflict The supplied name would create a conflict errorResponse

    Metainfo

    Contains the operations that retrieve information about folders (such as ancestors, types, and so on).

    Get ancestors for a list of resource URIs

    Code samples

    # You can also use wget
    curl -X POST https://example.com/folders/ancestors \
      -H 'Authorization: Bearer <access-token-goes-here>' \
      -H 'Content-Type: application/json' \
      -H 'Accept: application/vnd.sas.collection+json'
    
    
    const inputBody = '[
      "/files/files/1230193209132",
      "/reports/reports/aldjkslkjflskfjskf",
      "/files/files/016cf2b0-ef36-4344-9896-0439a027d8ab"
    ]';
    const headers = {
      'Content-Type':'application/json',
      'Accept':'application/vnd.sas.collection+json'
    };
    
    fetch('https://example.com/folders/ancestors',
    {
      method: 'POST',
      body: inputBody,
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    import requests
    headers = {
      'Content-Type': 'application/json',
      'Accept': 'application/vnd.sas.collection+json'
    }
    
    r = requests.post('https://example.com/folders/ancestors', headers = headers)
    
    print(r.json())
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Content-Type": []string{"application/json"},
            "Accept": []string{"application/vnd.sas.collection+json"},
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("POST", "https://example.com/folders/ancestors", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    

    POST /ancestors

    Get the ancestors of a set of URIs. Each URI is represented in the result as an Ancestor object.

    Body parameter

    The body of a POST request for multiple ancestors

    [
      "/files/files/1230193209132",
      "/reports/reports/aldjkslkjflskfjskf",
      "/files/files/016cf2b0-ef36-4344-9896-0439a027d8ab"
    ]
    
    Parameters
    Name In Type Required Description
    allowPartialPath query boolean false Allow a partial path from the item if the user doesn't have access to all the folders in the path.
    body body array[string] true The list of URIs for which to retrieve ancestry.

    Example responses

    A sample of a response to a bulk ancestors request

    {
      "version": 2,
      "accept": "application/vnd.sas.content.folder.ancestor",
      "count": 3,
      "start": 0,
      "limit": 10,
      "name": "folders",
      "items": [
        {
          "childUri": "/files/files/1230193209132",
          "ancestors": [],
          "version": 1
        },
        {
          "childUri": "/reports/reports/aldjkslkjflskfjskf",
          "ancestors": [],
          "version": 1
        },
        {
          "childUri": "/files/files/016cf2b0-ef36-4344-9896-0439a027d8ab",
          "ancestors": [
            {
              "creationTimeStamp": "2022-06-17T18:33:22.711019Z",
              "createdBy": "bob",
              "modifiedTimeStamp": "2022-06-17T18:33:22.71102Z",
              "modifiedBy": "bob",
              "version": 1,
              "id": "f4300a6d-407e-46fc-9c8a-e8142bd5d172",
              "name": "My Folder",
              "parentFolderUri": "/folders/folders/c18ba574-76d3-4104-b9b3-9332b6106453",
              "description": "My Folder for bob",
              "type": "myFolder",
              "memberCount": 3,
              "properties": {
                "allowMove": "false"
              },
              "links": [
                {
                  "method": "GET",
                  "rel": "self",
                  "href": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172",
                  "uri": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172",
                  "type": "application/vnd.sas.content.folder"
                },
                {
                  "method": "DELETE",
                  "rel": "delete",
                  "href": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172",
                  "uri": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172"
                },
                {
                  "method": "DELETE",
                  "rel": "deleteRecursively",
                  "href": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172?recursive=true",
                  "uri": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172?recursive=true"
                },
                {
                  "method": "GET",
                  "rel": "members",
                  "href": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172/members",
                  "uri": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172/members",
                  "type": "application/vnd.sas.collection",
                  "itemType": "application/vnd.sas.content.folder"
                },
                {
                  "method": "POST",
                  "rel": "addMember",
                  "href": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172/members",
                  "uri": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172/members",
                  "type": "application/vnd.sas.content.folder.member",
                  "responseType": "application/vnd.sas.content.folder.member"
                },
                {
                  "method": "GET",
                  "rel": "up",
                  "href": "/folders/folders/c18ba574-76d3-4104-b9b3-9332b6106453",
                  "uri": "/folders/folders/c18ba574-76d3-4104-b9b3-9332b6106453",
                  "type": "application/vnd.sas.content.folder"
                },
                {
                  "method": "GET",
                  "rel": "ancestors",
                  "href": "/folders/ancestors?childUri=/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172",
                  "uri": "/folders/ancestors?childUri=/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172",
                  "type": "application/vnd.sas.content.folder.ancestor"
                },
                {
                  "method": "POST",
                  "rel": "createChild",
                  "href": "/folders/folders?parentFolderUri=/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172",
                  "uri": "/folders/folders?parentFolderUri=/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172",
                  "type": "application/vnd.sas.content.folder"
                },
                {
                  "method": "PUT",
                  "rel": "validateNewMemberName",
                  "href": "/folders/commons/validations/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172/members/@new/name?value={newname}&type={newtype}",
                  "uri": "/folders/commons/validations/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172/members/@new/name?value={newname}&type={newtype}",
                  "type": "application/vnd.sas.validation"
                },
                {
                  "method": "GET",
                  "rel": "transferExport",
                  "href": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172",
                  "uri": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172",
                  "responseType": "application/vnd.sas.transfer.object"
                },
                {
                  "method": "PUT",
                  "rel": "transferImportUpdate",
                  "href": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172",
                  "uri": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172",
                  "type": "application/vnd.sas.transfer.object",
                  "responseType": "application/vnd.sas.summary"
                },
                {
                  "method": "POST",
                  "rel": "transferImport",
                  "href": "/folders/folders",
                  "uri": "/folders/folders",
                  "type": "application/vnd.sas.transfer.object",
                  "responseType": "application/vnd.sas.summary"
                }
              ]
            },
            {
              "creationTimeStamp": "2022-06-17T18:33:22.626045Z",
              "createdBy": "bob",
              "modifiedTimeStamp": "2022-06-17T18:33:22.626048Z",
              "modifiedBy": "bob",
              "version": 1,
              "id": "c18ba574-76d3-4104-b9b3-9332b6106453",
              "name": "bob",
              "parentFolderUri": "/folders/folders/329d3711-3c38-4391-8920-c35478e2456b",
              "description": "The user folder for bob",
              "type": "userFolder",
              "memberCount": 5,
              "properties": {
                "allowMove": "false",
                "hidden": "true"
              },
              "links": [
                {
                  "method": "GET",
                  "rel": "self",
                  "href": "/folders/folders/c18ba574-76d3-4104-b9b3-9332b6106453",
                  "uri": "/folders/folders/c18ba574-76d3-4104-b9b3-9332b6106453",
                  "type": "application/vnd.sas.content.folder"
                },
                {
                  "method": "DELETE",
                  "rel": "delete",
                  "href": "/folders/folders/c18ba574-76d3-4104-b9b3-9332b6106453",
                  "uri": "/folders/folders/c18ba574-76d3-4104-b9b3-9332b6106453"
                },
                {
                  "method": "DELETE",
                  "rel": "deleteRecursively",
                  "href": "/folders/folders/c18ba574-76d3-4104-b9b3-9332b6106453?recursive=true",
                  "uri": "/folders/folders/c18ba574-76d3-4104-b9b3-9332b6106453?recursive=true"
                },
                {
                  "method": "GET",
                  "rel": "members",
                  "href": "/folders/folders/c18ba574-76d3-4104-b9b3-9332b6106453/members",
                  "uri": "/folders/folders/c18ba574-76d3-4104-b9b3-9332b6106453/members",
                  "type": "application/vnd.sas.collection",
                  "itemType": "application/vnd.sas.content.folder"
                },
                {
                  "method": "POST",
                  "rel": "addMember",
                  "href": "/folders/folders/c18ba574-76d3-4104-b9b3-9332b6106453/members",
                  "uri": "/folders/folders/c18ba574-76d3-4104-b9b3-9332b6106453/members",
                  "type": "application/vnd.sas.content.folder.member",
                  "responseType": "application/vnd.sas.content.folder.member"
                },
                {
                  "method": "GET",
                  "rel": "up",
                  "href": "/folders/folders/329d3711-3c38-4391-8920-c35478e2456b",
                  "uri": "/folders/folders/329d3711-3c38-4391-8920-c35478e2456b",
                  "type": "application/vnd.sas.content.folder"
                },
                {
                  "method": "GET",
                  "rel": "ancestors",
                  "href": "/folders/ancestors?childUri=/folders/folders/c18ba574-76d3-4104-b9b3-9332b6106453",
                  "uri": "/folders/ancestors?childUri=/folders/folders/c18ba574-76d3-4104-b9b3-9332b6106453",
                  "type": "application/vnd.sas.content.folder.ancestor"
                },
                {
                  "method": "POST",
                  "rel": "createChild",
                  "href": "/folders/folders?parentFolderUri=/folders/folders/c18ba574-76d3-4104-b9b3-9332b6106453",
                  "uri": "/folders/folders?parentFolderUri=/folders/folders/c18ba574-76d3-4104-b9b3-9332b6106453",
                  "type": "application/vnd.sas.content.folder"
                },
                {
                  "method": "PUT",
                  "rel": "validateNewMemberName",
                  "href": "/folders/commons/validations/folders/c18ba574-76d3-4104-b9b3-9332b6106453/members/@new/name?value={newname}&type={newtype}",
                  "uri": "/folders/commons/validations/folders/c18ba574-76d3-4104-b9b3-9332b6106453/members/@new/name?value={newname}&type={newtype}",
                  "type": "application/vnd.sas.validation"
                },
                {
                  "method": "GET",
                  "rel": "transferExport",
                  "href": "/folders/folders/c18ba574-76d3-4104-b9b3-9332b6106453",
                  "uri": "/folders/folders/c18ba574-76d3-4104-b9b3-9332b6106453",
                  "responseType": "application/vnd.sas.transfer.object"
                },
                {
                  "method": "PUT",
                  "rel": "transferImportUpdate",
                  "href": "/folders/folders/c18ba574-76d3-4104-b9b3-9332b6106453",
                  "uri": "/folders/folders/c18ba574-76d3-4104-b9b3-9332b6106453",
                  "type": "application/vnd.sas.transfer.object",
                  "responseType": "application/vnd.sas.summary"
                },
                {
                  "method": "POST",
                  "rel": "transferImport",
                  "href": "/folders/folders",
                  "uri": "/folders/folders",
                  "type": "application/vnd.sas.transfer.object",
                  "responseType": "application/vnd.sas.summary"
                }
              ]
            },
            {
              "creationTimeStamp": "2022-06-17T16:33:36.212131Z",
              "createdBy": "anonymous",
              "modifiedTimeStamp": "2022-06-17T16:33:36.212133Z",
              "modifiedBy": "anonymous",
              "version": 1,
              "id": "329d3711-3c38-4391-8920-c35478e2456b",
              "name": "Users",
              "description": "Base Folder for all user folders.",
              "type": "userRoot",
              "memberCount": 6,
              "properties": {
                "allowMove": "false",
                "uuid": "e911697e-fe53-497c-a27c-909c757ba04a"
              },
              "links": [
                {
                  "method": "GET",
                  "rel": "self",
                  "href": "/folders/folders/329d3711-3c38-4391-8920-c35478e2456b",
                  "uri": "/folders/folders/329d3711-3c38-4391-8920-c35478e2456b",
                  "type": "application/vnd.sas.content.folder"
                },
                {
                  "method": "DELETE",
                  "rel": "delete",
                  "href": "/folders/folders/329d3711-3c38-4391-8920-c35478e2456b",
                  "uri": "/folders/folders/329d3711-3c38-4391-8920-c35478e2456b"
                },
                {
                  "method": "DELETE",
                  "rel": "deleteRecursively",
                  "href": "/folders/folders/329d3711-3c38-4391-8920-c35478e2456b?recursive=true",
                  "uri": "/folders/folders/329d3711-3c38-4391-8920-c35478e2456b?recursive=true"
                },
                {
                  "method": "GET",
                  "rel": "members",
                  "href": "/folders/folders/329d3711-3c38-4391-8920-c35478e2456b/members",
                  "uri": "/folders/folders/329d3711-3c38-4391-8920-c35478e2456b/members",
                  "type": "application/vnd.sas.collection",
                  "itemType": "application/vnd.sas.content.folder"
                },
                {
                  "method": "POST",
                  "rel": "addMember",
                  "href": "/folders/folders/329d3711-3c38-4391-8920-c35478e2456b/members",
                  "uri": "/folders/folders/329d3711-3c38-4391-8920-c35478e2456b/members",
                  "type": "application/vnd.sas.content.folder.member",
                  "responseType": "application/vnd.sas.content.folder.member"
                },
                {
                  "method": "GET",
                  "rel": "ancestors",
                  "href": "/folders/ancestors?childUri=/folders/folders/329d3711-3c38-4391-8920-c35478e2456b",
                  "uri": "/folders/ancestors?childUri=/folders/folders/329d3711-3c38-4391-8920-c35478e2456b",
                  "type": "application/vnd.sas.content.folder.ancestor"
                },
                {
                  "method": "POST",
                  "rel": "createChild",
                  "href": "/folders/folders?parentFolderUri=/folders/folders/329d3711-3c38-4391-8920-c35478e2456b",
                  "uri": "/folders/folders?parentFolderUri=/folders/folders/329d3711-3c38-4391-8920-c35478e2456b",
                  "type": "application/vnd.sas.content.folder"
                },
                {
                  "method": "PUT",
                  "rel": "validateNewMemberName",
                  "href": "/folders/commons/validations/folders/329d3711-3c38-4391-8920-c35478e2456b/members/@new/name?value={newname}&type={newtype}",
                  "uri": "/folders/commons/validations/folders/329d3711-3c38-4391-8920-c35478e2456b/members/@new/name?value={newname}&type={newtype}",
                  "type": "application/vnd.sas.validation"
                },
                {
                  "method": "GET",
                  "rel": "transferExport",
                  "href": "/folders/folders/329d3711-3c38-4391-8920-c35478e2456b",
                  "uri": "/folders/folders/329d3711-3c38-4391-8920-c35478e2456b",
                  "responseType": "application/vnd.sas.transfer.object"
                },
                {
                  "method": "PUT",
                  "rel": "transferImportUpdate",
                  "href": "/folders/folders/329d3711-3c38-4391-8920-c35478e2456b",
                  "uri": "/folders/folders/329d3711-3c38-4391-8920-c35478e2456b",
                  "type": "application/vnd.sas.transfer.object",
                  "responseType": "application/vnd.sas.summary"
                },
                {
                  "method": "POST",
                  "rel": "transferImport",
                  "href": "/folders/folders",
                  "uri": "/folders/folders",
                  "type": "application/vnd.sas.transfer.object",
                  "responseType": "application/vnd.sas.summary"
                }
              ]
            }
          ],
          "version": 1
        }
      ],
      "links": [
        {
          "method": "GET",
          "rel": "self",
          "href": "/folders/folders?start=0&limit=10",
          "uri": "/folders/folders?start=0&limit=10",
          "type": "application/vnd.sas.collection",
          "itemType": "application/vnd.sas.content.folder.ancestor"
        },
        {
          "method": "POST",
          "rel": "create",
          "href": "/folders/folders",
          "uri": "/folders/folders",
          "type": "application/vnd.sas.content.folder.ancestor",
          "responseType": "application/vnd.sas.content.folder.ancestor"
        }
      ]
    }
    
    {
      "version": 2,
      "accept": "application/vnd.sas.content.folder.ancestor",
      "count": 3,
      "start": 0,
      "limit": 10,
      "name": "folders",
      "items": [
        {
          "childUri": "/files/files/1230193209132",
          "ancestors": [],
          "version": 1
        },
        {
          "childUri": "/reports/reports/aldjkslkjflskfjskf",
          "ancestors": [],
          "version": 1
        },
        {
          "childUri": "/files/files/016cf2b0-ef36-4344-9896-0439a027d8ab",
          "ancestors": [
            {
              "creationTimeStamp": "2022-06-17T18:33:22.711019Z",
              "createdBy": "bob",
              "modifiedTimeStamp": "2022-06-17T18:33:22.71102Z",
              "modifiedBy": "bob",
              "version": 1,
              "id": "f4300a6d-407e-46fc-9c8a-e8142bd5d172",
              "name": "My Folder",
              "parentFolderUri": "/folders/folders/c18ba574-76d3-4104-b9b3-9332b6106453",
              "description": "My Folder for bob",
              "type": "myFolder",
              "memberCount": 3,
              "properties": {
                "allowMove": "false"
              },
              "links": [
                {
                  "method": "GET",
                  "rel": "self",
                  "href": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172",
                  "uri": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172",
                  "type": "application/vnd.sas.content.folder"
                },
                {
                  "method": "DELETE",
                  "rel": "delete",
                  "href": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172",
                  "uri": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172"
                },
                {
                  "method": "DELETE",
                  "rel": "deleteRecursively",
                  "href": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172?recursive=true",
                  "uri": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172?recursive=true"
                },
                {
                  "method": "GET",
                  "rel": "members",
                  "href": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172/members",
                  "uri": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172/members",
                  "type": "application/vnd.sas.collection",
                  "itemType": "application/vnd.sas.content.folder"
                },
                {
                  "method": "POST",
                  "rel": "addMember",
                  "href": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172/members",
                  "uri": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172/members",
                  "type": "application/vnd.sas.content.folder.member",
                  "responseType": "application/vnd.sas.content.folder.member"
                },
                {
                  "method": "GET",
                  "rel": "up",
                  "href": "/folders/folders/c18ba574-76d3-4104-b9b3-9332b6106453",
                  "uri": "/folders/folders/c18ba574-76d3-4104-b9b3-9332b6106453",
                  "type": "application/vnd.sas.content.folder"
                },
                {
                  "method": "GET",
                  "rel": "ancestors",
                  "href": "/folders/ancestors?childUri=/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172",
                  "uri": "/folders/ancestors?childUri=/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172",
                  "type": "application/vnd.sas.content.folder.ancestor"
                },
                {
                  "method": "POST",
                  "rel": "createChild",
                  "href": "/folders/folders?parentFolderUri=/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172",
                  "uri": "/folders/folders?parentFolderUri=/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172",
                  "type": "application/vnd.sas.content.folder"
                },
                {
                  "method": "PUT",
                  "rel": "validateNewMemberName",
                  "href": "/folders/commons/validations/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172/members/@new/name?value={newname}&type={newtype}",
                  "uri": "/folders/commons/validations/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172/members/@new/name?value={newname}&type={newtype}",
                  "type": "application/vnd.sas.validation"
                },
                {
                  "method": "GET",
                  "rel": "transferExport",
                  "href": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172",
                  "uri": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172",
                  "responseType": "application/vnd.sas.transfer.object"
                },
                {
                  "method": "PUT",
                  "rel": "transferImportUpdate",
                  "href": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172",
                  "uri": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172",
                  "type": "application/vnd.sas.transfer.object",
                  "responseType": "application/vnd.sas.summary"
                },
                {
                  "method": "POST",
                  "rel": "transferImport",
                  "href": "/folders/folders",
                  "uri": "/folders/folders",
                  "type": "application/vnd.sas.transfer.object",
                  "responseType": "application/vnd.sas.summary"
                }
              ]
            },
            {
              "creationTimeStamp": "2022-06-17T18:33:22.626045Z",
              "createdBy": "bob",
              "modifiedTimeStamp": "2022-06-17T18:33:22.626048Z",
              "modifiedBy": "bob",
              "version": 1,
              "id": "c18ba574-76d3-4104-b9b3-9332b6106453",
              "name": "bob",
              "parentFolderUri": "/folders/folders/329d3711-3c38-4391-8920-c35478e2456b",
              "description": "The user folder for bob",
              "type": "userFolder",
              "memberCount": 5,
              "properties": {
                "allowMove": "false",
                "hidden": "true"
              },
              "links": [
                {
                  "method": "GET",
                  "rel": "self",
                  "href": "/folders/folders/c18ba574-76d3-4104-b9b3-9332b6106453",
                  "uri": "/folders/folders/c18ba574-76d3-4104-b9b3-9332b6106453",
                  "type": "application/vnd.sas.content.folder"
                },
                {
                  "method": "DELETE",
                  "rel": "delete",
                  "href": "/folders/folders/c18ba574-76d3-4104-b9b3-9332b6106453",
                  "uri": "/folders/folders/c18ba574-76d3-4104-b9b3-9332b6106453"
                },
                {
                  "method": "DELETE",
                  "rel": "deleteRecursively",
                  "href": "/folders/folders/c18ba574-76d3-4104-b9b3-9332b6106453?recursive=true",
                  "uri": "/folders/folders/c18ba574-76d3-4104-b9b3-9332b6106453?recursive=true"
                },
                {
                  "method": "GET",
                  "rel": "members",
                  "href": "/folders/folders/c18ba574-76d3-4104-b9b3-9332b6106453/members",
                  "uri": "/folders/folders/c18ba574-76d3-4104-b9b3-9332b6106453/members",
                  "type": "application/vnd.sas.collection",
                  "itemType": "application/vnd.sas.content.folder"
                },
                {
                  "method": "POST",
                  "rel": "addMember",
                  "href": "/folders/folders/c18ba574-76d3-4104-b9b3-9332b6106453/members",
                  "uri": "/folders/folders/c18ba574-76d3-4104-b9b3-9332b6106453/members",
                  "type": "application/vnd.sas.content.folder.member",
                  "responseType": "application/vnd.sas.content.folder.member"
                },
                {
                  "method": "GET",
                  "rel": "up",
                  "href": "/folders/folders/329d3711-3c38-4391-8920-c35478e2456b",
                  "uri": "/folders/folders/329d3711-3c38-4391-8920-c35478e2456b",
                  "type": "application/vnd.sas.content.folder"
                },
                {
                  "method": "GET",
                  "rel": "ancestors",
                  "href": "/folders/ancestors?childUri=/folders/folders/c18ba574-76d3-4104-b9b3-9332b6106453",
                  "uri": "/folders/ancestors?childUri=/folders/folders/c18ba574-76d3-4104-b9b3-9332b6106453",
                  "type": "application/vnd.sas.content.folder.ancestor"
                },
                {
                  "method": "POST",
                  "rel": "createChild",
                  "href": "/folders/folders?parentFolderUri=/folders/folders/c18ba574-76d3-4104-b9b3-9332b6106453",
                  "uri": "/folders/folders?parentFolderUri=/folders/folders/c18ba574-76d3-4104-b9b3-9332b6106453",
                  "type": "application/vnd.sas.content.folder"
                },
                {
                  "method": "PUT",
                  "rel": "validateNewMemberName",
                  "href": "/folders/commons/validations/folders/c18ba574-76d3-4104-b9b3-9332b6106453/members/@new/name?value={newname}&type={newtype}",
                  "uri": "/folders/commons/validations/folders/c18ba574-76d3-4104-b9b3-9332b6106453/members/@new/name?value={newname}&type={newtype}",
                  "type": "application/vnd.sas.validation"
                },
                {
                  "method": "GET",
                  "rel": "transferExport",
                  "href": "/folders/folders/c18ba574-76d3-4104-b9b3-9332b6106453",
                  "uri": "/folders/folders/c18ba574-76d3-4104-b9b3-9332b6106453",
                  "responseType": "application/vnd.sas.transfer.object"
                },
                {
                  "method": "PUT",
                  "rel": "transferImportUpdate",
                  "href": "/folders/folders/c18ba574-76d3-4104-b9b3-9332b6106453",
                  "uri": "/folders/folders/c18ba574-76d3-4104-b9b3-9332b6106453",
                  "type": "application/vnd.sas.transfer.object",
                  "responseType": "application/vnd.sas.summary"
                },
                {
                  "method": "POST",
                  "rel": "transferImport",
                  "href": "/folders/folders",
                  "uri": "/folders/folders",
                  "type": "application/vnd.sas.transfer.object",
                  "responseType": "application/vnd.sas.summary"
                }
              ]
            },
            {
              "creationTimeStamp": "2022-06-17T16:33:36.212131Z",
              "createdBy": "anonymous",
              "modifiedTimeStamp": "2022-06-17T16:33:36.212133Z",
              "modifiedBy": "anonymous",
              "version": 1,
              "id": "329d3711-3c38-4391-8920-c35478e2456b",
              "name": "Users",
              "description": "Base Folder for all user folders.",
              "type": "userRoot",
              "memberCount": 6,
              "properties": {
                "allowMove": "false",
                "uuid": "e911697e-fe53-497c-a27c-909c757ba04a"
              },
              "links": [
                {
                  "method": "GET",
                  "rel": "self",
                  "href": "/folders/folders/329d3711-3c38-4391-8920-c35478e2456b",
                  "uri": "/folders/folders/329d3711-3c38-4391-8920-c35478e2456b",
                  "type": "application/vnd.sas.content.folder"
                },
                {
                  "method": "DELETE",
                  "rel": "delete",
                  "href": "/folders/folders/329d3711-3c38-4391-8920-c35478e2456b",
                  "uri": "/folders/folders/329d3711-3c38-4391-8920-c35478e2456b"
                },
                {
                  "method": "DELETE",
                  "rel": "deleteRecursively",
                  "href": "/folders/folders/329d3711-3c38-4391-8920-c35478e2456b?recursive=true",
                  "uri": "/folders/folders/329d3711-3c38-4391-8920-c35478e2456b?recursive=true"
                },
                {
                  "method": "GET",
                  "rel": "members",
                  "href": "/folders/folders/329d3711-3c38-4391-8920-c35478e2456b/members",
                  "uri": "/folders/folders/329d3711-3c38-4391-8920-c35478e2456b/members",
                  "type": "application/vnd.sas.collection",
                  "itemType": "application/vnd.sas.content.folder"
                },
                {
                  "method": "POST",
                  "rel": "addMember",
                  "href": "/folders/folders/329d3711-3c38-4391-8920-c35478e2456b/members",
                  "uri": "/folders/folders/329d3711-3c38-4391-8920-c35478e2456b/members",
                  "type": "application/vnd.sas.content.folder.member",
                  "responseType": "application/vnd.sas.content.folder.member"
                },
                {
                  "method": "GET",
                  "rel": "ancestors",
                  "href": "/folders/ancestors?childUri=/folders/folders/329d3711-3c38-4391-8920-c35478e2456b",
                  "uri": "/folders/ancestors?childUri=/folders/folders/329d3711-3c38-4391-8920-c35478e2456b",
                  "type": "application/vnd.sas.content.folder.ancestor"
                },
                {
                  "method": "POST",
                  "rel": "createChild",
                  "href": "/folders/folders?parentFolderUri=/folders/folders/329d3711-3c38-4391-8920-c35478e2456b",
                  "uri": "/folders/folders?parentFolderUri=/folders/folders/329d3711-3c38-4391-8920-c35478e2456b",
                  "type": "application/vnd.sas.content.folder"
                },
                {
                  "method": "PUT",
                  "rel": "validateNewMemberName",
                  "href": "/folders/commons/validations/folders/329d3711-3c38-4391-8920-c35478e2456b/members/@new/name?value={newname}&type={newtype}",
                  "uri": "/folders/commons/validations/folders/329d3711-3c38-4391-8920-c35478e2456b/members/@new/name?value={newname}&type={newtype}",
                  "type": "application/vnd.sas.validation"
                },
                {
                  "method": "GET",
                  "rel": "transferExport",
                  "href": "/folders/folders/329d3711-3c38-4391-8920-c35478e2456b",
                  "uri": "/folders/folders/329d3711-3c38-4391-8920-c35478e2456b",
                  "responseType": "application/vnd.sas.transfer.object"
                },
                {
                  "method": "PUT",
                  "rel": "transferImportUpdate",
                  "href": "/folders/folders/329d3711-3c38-4391-8920-c35478e2456b",
                  "uri": "/folders/folders/329d3711-3c38-4391-8920-c35478e2456b",
                  "type": "application/vnd.sas.transfer.object",
                  "responseType": "application/vnd.sas.summary"
                },
                {
                  "method": "POST",
                  "rel": "transferImport",
                  "href": "/folders/folders",
                  "uri": "/folders/folders",
                  "type": "application/vnd.sas.transfer.object",
                  "responseType": "application/vnd.sas.summary"
                }
              ]
            }
          ],
          "version": 1
        }
      ],
      "links": [
        {
          "method": "GET",
          "rel": "self",
          "href": "/folders/folders?start=0&limit=10",
          "uri": "/folders/folders?start=0&limit=10",
          "type": "application/vnd.sas.collection",
          "itemType": "application/vnd.sas.content.folder.ancestor"
        },
        {
          "method": "POST",
          "rel": "create",
          "href": "/folders/folders",
          "uri": "/folders/folders",
          "type": "application/vnd.sas.content.folder.ancestor",
          "responseType": "application/vnd.sas.content.folder.ancestor"
        }
      ]
    }
    

    Example of an error response from the service

    {
      "version": 2,
      "httpStatusCode": 400,
      "errorCode": 1020,
      "message": "Field blah is invalid for the target type.",
      "details": [
        "path: /folders/rootFolders",
        "correlator: 103aed3e-d183-459e-8c8f-f0c57013995f"
      ]
    }
    
    Responses
    Status Meaning Description Schema
    200 OK The ancestors for each URI was returned. ancestorCollection
    400 Bad Request The request was invalid. The body was malformed or is missing. errorResponse

    Get a resource's ancestors

    Code samples

    # You can also use wget
    curl -X GET https://example.com/folders/ancestors?childUri=string \
      -H 'Authorization: Bearer <access-token-goes-here>' \
      -H 'Accept: application/vnd.sas.content.folder.ancestor+json'
    
    
    
    const headers = {
      'Accept':'application/vnd.sas.content.folder.ancestor+json'
    };
    
    fetch('https://example.com/folders/ancestors?childUri=string',
    {
      method: 'GET',
    
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    import requests
    headers = {
      'Accept': 'application/vnd.sas.content.folder.ancestor+json'
    }
    
    r = requests.get('https://example.com/folders/ancestors', params={
      'childUri': 'string'
    }, headers = headers)
    
    print(r.json())
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Accept": []string{"application/vnd.sas.content.folder.ancestor+json"},
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("GET", "https://example.com/folders/ancestors", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    

    GET /ancestors

    Get the ancestors of a resource by URI as a flat list, ordered starting with the parent folder of the resource, and continuing up to the root folder.

    Parameters
    Name In Type Required Description
    childUri query string true The URI of the target resource whose ancestry is desired.
    allowPartialPath query boolean false Allow a partial path from the item if the user doesn't have access to all the folders in the path.

    Example responses

    A sample of an ancestors response for a single URI

    {
      "childUri": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172",
      "ancestors": [
        {
          "creationTimeStamp": "2022-06-17T18:33:22.626045Z",
          "createdBy": "bob",
          "modifiedTimeStamp": "2022-06-17T18:33:22.626048Z",
          "modifiedBy": "bob",
          "version": 1,
          "id": "c18ba574-76d3-4104-b9b3-9332b6106453",
          "name": "bob",
          "parentFolderUri": "/folders/folders/329d3711-3c38-4391-8920-c35478e2456b",
          "description": "The user folder for bob",
          "type": "userFolder",
          "memberCount": 5,
          "properties": {
            "allowMove": "false",
            "hidden": "true"
          },
          "links": [
            {
              "method": "GET",
              "rel": "self",
              "href": "/folders/folders/c18ba574-76d3-4104-b9b3-9332b6106453",
              "uri": "/folders/folders/c18ba574-76d3-4104-b9b3-9332b6106453",
              "type": "application/vnd.sas.content.folder"
            },
            {
              "method": "DELETE",
              "rel": "delete",
              "href": "/folders/folders/c18ba574-76d3-4104-b9b3-9332b6106453",
              "uri": "/folders/folders/c18ba574-76d3-4104-b9b3-9332b6106453"
            },
            {
              "method": "DELETE",
              "rel": "deleteRecursively",
              "href": "/folders/folders/c18ba574-76d3-4104-b9b3-9332b6106453?recursive=true",
              "uri": "/folders/folders/c18ba574-76d3-4104-b9b3-9332b6106453?recursive=true"
            },
            {
              "method": "GET",
              "rel": "members",
              "href": "/folders/folders/c18ba574-76d3-4104-b9b3-9332b6106453/members",
              "uri": "/folders/folders/c18ba574-76d3-4104-b9b3-9332b6106453/members",
              "type": "application/vnd.sas.collection",
              "itemType": "application/vnd.sas.content.folder"
            },
            {
              "method": "POST",
              "rel": "addMember",
              "href": "/folders/folders/c18ba574-76d3-4104-b9b3-9332b6106453/members",
              "uri": "/folders/folders/c18ba574-76d3-4104-b9b3-9332b6106453/members",
              "type": "application/vnd.sas.content.folder.member",
              "responseType": "application/vnd.sas.content.folder.member"
            },
            {
              "method": "GET",
              "rel": "up",
              "href": "/folders/folders/329d3711-3c38-4391-8920-c35478e2456b",
              "uri": "/folders/folders/329d3711-3c38-4391-8920-c35478e2456b",
              "type": "application/vnd.sas.content.folder"
            },
            {
              "method": "GET",
              "rel": "ancestors",
              "href": "/folders/ancestors?childUri=/folders/folders/c18ba574-76d3-4104-b9b3-9332b6106453",
              "uri": "/folders/ancestors?childUri=/folders/folders/c18ba574-76d3-4104-b9b3-9332b6106453",
              "type": "application/vnd.sas.content.folder.ancestor"
            },
            {
              "method": "POST",
              "rel": "createChild",
              "href": "/folders/folders?parentFolderUri=/folders/folders/c18ba574-76d3-4104-b9b3-9332b6106453",
              "uri": "/folders/folders?parentFolderUri=/folders/folders/c18ba574-76d3-4104-b9b3-9332b6106453",
              "type": "application/vnd.sas.content.folder"
            },
            {
              "method": "PUT",
              "rel": "validateNewMemberName",
              "href": "/folders/commons/validations/folders/c18ba574-76d3-4104-b9b3-9332b6106453/members/@new/name?value={newname}&type={newtype}",
              "uri": "/folders/commons/validations/folders/c18ba574-76d3-4104-b9b3-9332b6106453/members/@new/name?value={newname}&type={newtype}",
              "type": "application/vnd.sas.validation"
            },
            {
              "method": "GET",
              "rel": "transferExport",
              "href": "/folders/folders/c18ba574-76d3-4104-b9b3-9332b6106453",
              "uri": "/folders/folders/c18ba574-76d3-4104-b9b3-9332b6106453",
              "responseType": "application/vnd.sas.transfer.object"
            },
            {
              "method": "PUT",
              "rel": "transferImportUpdate",
              "href": "/folders/folders/c18ba574-76d3-4104-b9b3-9332b6106453",
              "uri": "/folders/folders/c18ba574-76d3-4104-b9b3-9332b6106453",
              "type": "application/vnd.sas.transfer.object",
              "responseType": "application/vnd.sas.summary"
            }
          ]
        },
        {
          "creationTimeStamp": "2022-06-17T16:33:36.212131Z",
          "createdBy": "anonymous",
          "modifiedTimeStamp": "2022-06-17T16:33:36.212133Z",
          "modifiedBy": "anonymous",
          "version": 1,
          "id": "329d3711-3c38-4391-8920-c35478e2456b",
          "name": "Users",
          "description": "Base Folder for all user folders.",
          "type": "userRoot",
          "memberCount": 6,
          "properties": {
            "allowMove": "false",
            "uuid": "e911697e-fe53-497c-a27c-909c757ba04a"
          },
          "links": [
            {
              "method": "GET",
              "rel": "self",
              "href": "/folders/folders/329d3711-3c38-4391-8920-c35478e2456b",
              "uri": "/folders/folders/329d3711-3c38-4391-8920-c35478e2456b",
              "type": "application/vnd.sas.content.folder"
            },
            {
              "method": "GET",
              "rel": "members",
              "href": "/folders/folders/329d3711-3c38-4391-8920-c35478e2456b/members",
              "uri": "/folders/folders/329d3711-3c38-4391-8920-c35478e2456b/members",
              "type": "application/vnd.sas.collection",
              "itemType": "application/vnd.sas.content.folder"
            },
            {
              "method": "GET",
              "rel": "ancestors",
              "href": "/folders/ancestors?childUri=/folders/folders/329d3711-3c38-4391-8920-c35478e2456b",
              "uri": "/folders/ancestors?childUri=/folders/folders/329d3711-3c38-4391-8920-c35478e2456b",
              "type": "application/vnd.sas.content.folder.ancestor"
            },
            {
              "method": "PUT",
              "rel": "validateNewMemberName",
              "href": "/folders/commons/validations/folders/329d3711-3c38-4391-8920-c35478e2456b/members/@new/name?value={newname}&type={newtype}",
              "uri": "/folders/commons/validations/folders/329d3711-3c38-4391-8920-c35478e2456b/members/@new/name?value={newname}&type={newtype}",
              "type": "application/vnd.sas.validation"
            },
            {
              "method": "GET",
              "rel": "transferExport",
              "href": "/folders/folders/329d3711-3c38-4391-8920-c35478e2456b",
              "uri": "/folders/folders/329d3711-3c38-4391-8920-c35478e2456b",
              "responseType": "application/vnd.sas.transfer.object"
            }
          ]
        }
      ],
      "version": 1
    }
    
    {
      "childUri": "/folders/folders/f4300a6d-407e-46fc-9c8a-e8142bd5d172",
      "ancestors": [
        {
          "creationTimeStamp": "2022-06-17T18:33:22.626045Z",
          "createdBy": "bob",
          "modifiedTimeStamp": "2022-06-17T18:33:22.626048Z",
          "modifiedBy": "bob",
          "version": 1,
          "id": "c18ba574-76d3-4104-b9b3-9332b6106453",
          "name": "bob",
          "parentFolderUri": "/folders/folders/329d3711-3c38-4391-8920-c35478e2456b",
          "description": "The user folder for bob",
          "type": "userFolder",
          "memberCount": 5,
          "properties": {
            "allowMove": "false",
            "hidden": "true"
          },
          "links": [
            {
              "method": "GET",
              "rel": "self",
              "href": "/folders/folders/c18ba574-76d3-4104-b9b3-9332b6106453",
              "uri": "/folders/folders/c18ba574-76d3-4104-b9b3-9332b6106453",
              "type": "application/vnd.sas.content.folder"
            },
            {
              "method": "DELETE",
              "rel": "delete",
              "href": "/folders/folders/c18ba574-76d3-4104-b9b3-9332b6106453",
              "uri": "/folders/folders/c18ba574-76d3-4104-b9b3-9332b6106453"
            },
            {
              "method": "DELETE",
              "rel": "deleteRecursively",
              "href": "/folders/folders/c18ba574-76d3-4104-b9b3-9332b6106453?recursive=true",
              "uri": "/folders/folders/c18ba574-76d3-4104-b9b3-9332b6106453?recursive=true"
            },
            {
              "method": "GET",
              "rel": "members",
              "href": "/folders/folders/c18ba574-76d3-4104-b9b3-9332b6106453/members",
              "uri": "/folders/folders/c18ba574-76d3-4104-b9b3-9332b6106453/members",
              "type": "application/vnd.sas.collection",
              "itemType": "application/vnd.sas.content.folder"
            },
            {
              "method": "POST",
              "rel": "addMember",
              "href": "/folders/folders/c18ba574-76d3-4104-b9b3-9332b6106453/members",
              "uri": "/folders/folders/c18ba574-76d3-4104-b9b3-9332b6106453/members",
              "type": "application/vnd.sas.content.folder.member",
              "responseType": "application/vnd.sas.content.folder.member"
            },
            {
              "method": "GET",
              "rel": "up",
              "href": "/folders/folders/329d3711-3c38-4391-8920-c35478e2456b",
              "uri": "/folders/folders/329d3711-3c38-4391-8920-c35478e2456b",
              "type": "application/vnd.sas.content.folder"
            },
            {
              "method": "GET",
              "rel": "ancestors",
              "href": "/folders/ancestors?childUri=/folders/folders/c18ba574-76d3-4104-b9b3-9332b6106453",
              "uri": "/folders/ancestors?childUri=/folders/folders/c18ba574-76d3-4104-b9b3-9332b6106453",
              "type": "application/vnd.sas.content.folder.ancestor"
            },
            {
              "method": "POST",
              "rel": "createChild",
              "href": "/folders/folders?parentFolderUri=/folders/folders/c18ba574-76d3-4104-b9b3-9332b6106453",
              "uri": "/folders/folders?parentFolderUri=/folders/folders/c18ba574-76d3-4104-b9b3-9332b6106453",
              "type": "application/vnd.sas.content.folder"
            },
            {
              "method": "PUT",
              "rel": "validateNewMemberName",
              "href": "/folders/commons/validations/folders/c18ba574-76d3-4104-b9b3-9332b6106453/members/@new/name?value={newname}&type={newtype}",
              "uri": "/folders/commons/validations/folders/c18ba574-76d3-4104-b9b3-9332b6106453/members/@new/name?value={newname}&type={newtype}",
              "type": "application/vnd.sas.validation"
            },
            {
              "method": "GET",
              "rel": "transferExport",
              "href": "/folders/folders/c18ba574-76d3-4104-b9b3-9332b6106453",
              "uri": "/folders/folders/c18ba574-76d3-4104-b9b3-9332b6106453",
              "responseType": "application/vnd.sas.transfer.object"
            },
            {
              "method": "PUT",
              "rel": "transferImportUpdate",
              "href": "/folders/folders/c18ba574-76d3-4104-b9b3-9332b6106453",
              "uri": "/folders/folders/c18ba574-76d3-4104-b9b3-9332b6106453",
              "type": "application/vnd.sas.transfer.object",
              "responseType": "application/vnd.sas.summary"
            }
          ]
        },
        {
          "creationTimeStamp": "2022-06-17T16:33:36.212131Z",
          "createdBy": "anonymous",
          "modifiedTimeStamp": "2022-06-17T16:33:36.212133Z",
          "modifiedBy": "anonymous",
          "version": 1,
          "id": "329d3711-3c38-4391-8920-c35478e2456b",
          "name": "Users",
          "description": "Base Folder for all user folders.",
          "type": "userRoot",
          "memberCount": 6,
          "properties": {
            "allowMove": "false",
            "uuid": "e911697e-fe53-497c-a27c-909c757ba04a"
          },
          "links": [
            {
              "method": "GET",
              "rel": "self",
              "href": "/folders/folders/329d3711-3c38-4391-8920-c35478e2456b",
              "uri": "/folders/folders/329d3711-3c38-4391-8920-c35478e2456b",
              "type": "application/vnd.sas.content.folder"
            },
            {
              "method": "GET",
              "rel": "members",
              "href": "/folders/folders/329d3711-3c38-4391-8920-c35478e2456b/members",
              "uri": "/folders/folders/329d3711-3c38-4391-8920-c35478e2456b/members",
              "type": "application/vnd.sas.collection",
              "itemType": "application/vnd.sas.content.folder"
            },
            {
              "method": "GET",
              "rel": "ancestors",
              "href": "/folders/ancestors?childUri=/folders/folders/329d3711-3c38-4391-8920-c35478e2456b",
              "uri": "/folders/ancestors?childUri=/folders/folders/329d3711-3c38-4391-8920-c35478e2456b",
              "type": "application/vnd.sas.content.folder.ancestor"
            },
            {
              "method": "PUT",
              "rel": "validateNewMemberName",
              "href": "/folders/commons/validations/folders/329d3711-3c38-4391-8920-c35478e2456b/members/@new/name?value={newname}&type={newtype}",
              "uri": "/folders/commons/validations/folders/329d3711-3c38-4391-8920-c35478e2456b/members/@new/name?value={newname}&type={newtype}",
              "type": "application/vnd.sas.validation"
            },
            {
              "method": "GET",
              "rel": "transferExport",
              "href": "/folders/folders/329d3711-3c38-4391-8920-c35478e2456b",
              "uri": "/folders/folders/329d3711-3c38-4391-8920-c35478e2456b",
              "responseType": "application/vnd.sas.transfer.object"
            }
          ]
        }
      ],
      "version": 1
    }
    

    Example of an error response from the service

    {
      "version": 2,
      "httpStatusCode": 400,
      "errorCode": 1020,
      "message": "Field blah is invalid for the target type.",
      "details": [
        "path: /folders/rootFolders",
        "correlator: 103aed3e-d183-459e-8c8f-f0c57013995f"
      ]
    }
    
    {
      "version": 2,
      "httpStatusCode": 400,
      "errorCode": 1020,
      "message": "Field blah is invalid for the target type.",
      "details": [
        "path: /folders/rootFolders",
        "correlator: 103aed3e-d183-459e-8c8f-f0c57013995f"
      ]
    }
    
    Responses
    Status Meaning Description Schema
    200 OK The member was found and the ancestry was returned. In the case of a root folder, a 200 HTTP status code and an empty list of ancestors is returned. ancestor
    204 No Content No ancestors were found for the URI. None
    400 Bad Request No childUri parameter was provided. errorResponse

    Get a list of acceptable folder types

    Code samples

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

    GET /folderTypes

    Retrieves the list of folder types that are recognized by the folders service. Returns a collection of application/vnd.sas.content.folder.type+json objects.

    Example responses

    A sample response to a folders/folderTypes request

    {
      "version": 2,
      "accept": "application/vnd.sas.content.folder.type",
      "count": 9,
      "start": 0,
      "limit": 0,
      "name": "folderTypes",
      "items": [
        {
          "name": "applicationDataFolder",
          "label": "Application Data Folder",
          "userAssignable": false,
          "version": 1
        },
        {
          "name": "folder",
          "label": "Folder",
          "userAssignable": true,
          "version": 1
        },
        {
          "name": "favoritesFolder",
          "label": "Favorites Folder",
          "userAssignable": true,
          "version": 1
        },
        {
          "name": "historyFolder",
          "label": "History Folder",
          "userAssignable": true,
          "version": 1
        },
        {
          "name": "myFolder",
          "label": "Personal Folder",
          "userAssignable": false,
          "version": 1
        },
        {
          "name": "userFolder",
          "label": "User Home Folder",
          "userAssignable": false,
          "version": 1
        },
        {
          "name": "userRoot",
          "label": "Users Root folder",
          "userAssignable": false,
          "version": 1
        },
        {
          "name": "trashFolder",
          "label": "Recycle Bin Folder",
          "userAssignable": false,
          "version": 1
        },
        {
          "name": "hiddenFolder",
          "label": "Hidden Folder",
          "userAssignable": true,
          "version": 1
        }
      ],
      "links": [
        {
          "method": "GET",
          "rel": "collection",
          "href": "/folders/folderTypes",
          "uri": "/folders/folderTypes",
          "type": "application/vnd.sas.collection"
        },
        {
          "method": "GET",
          "rel": "self",
          "href": "/folders/folderTypes",
          "uri": "/folders/folderTypes",
          "type": "application/vnd.sas.collection"
        }
      ]
    }
    
    {
      "version": 2,
      "accept": "application/vnd.sas.content.folder.type",
      "count": 9,
      "start": 0,
      "limit": 0,
      "name": "folderTypes",
      "items": [
        {
          "name": "applicationDataFolder",
          "label": "Application Data Folder",
          "userAssignable": false,
          "version": 1
        },
        {
          "name": "folder",
          "label": "Folder",
          "userAssignable": true,
          "version": 1
        },
        {
          "name": "favoritesFolder",
          "label": "Favorites Folder",
          "userAssignable": true,
          "version": 1
        },
        {
          "name": "historyFolder",
          "label": "History Folder",
          "userAssignable": true,
          "version": 1
        },
        {
          "name": "myFolder",
          "label": "Personal Folder",
          "userAssignable": false,
          "version": 1
        },
        {
          "name": "userFolder",
          "label": "User Home Folder",
          "userAssignable": false,
          "version": 1
        },
        {
          "name": "userRoot",
          "label": "Users Root folder",
          "userAssignable": false,
          "version": 1
        },
        {
          "name": "trashFolder",
          "label": "Recycle Bin Folder",
          "userAssignable": false,
          "version": 1
        },
        {
          "name": "hiddenFolder",
          "label": "Hidden Folder",
          "userAssignable": true,
          "version": 1
        }
      ],
      "links": [
        {
          "method": "GET",
          "rel": "collection",
          "href": "/folders/folderTypes",
          "uri": "/folders/folderTypes",
          "type": "application/vnd.sas.collection"
        },
        {
          "method": "GET",
          "rel": "self",
          "href": "/folders/folderTypes",
          "uri": "/folders/folderTypes",
          "type": "application/vnd.sas.collection"
        }
      ]
    }
    
    Responses
    Status Meaning Description Schema
    200 OK The request succeeded. folderTypeCollection

    Get a list of known delegate-represented folders

    Code samples

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

    GET /delegateInfo

    Returns the set of delegates known to the folders service.

    Example responses

    Sample response to the delegateInfo request

    {
      "version": 2,
      "accept": "application/vnd.sas.content.folder.delegate",
      "count": 5,
      "start": 0,
      "limit": 0,
      "name": "delegates",
      "items": [
        {
          "name": "@myFolder",
          "folderName": "My Folder",
          "folderType": "myFolder",
          "version": 1
        },
        {
          "name": "@myFavorites",
          "folderName": "My Favorites",
          "folderType": "favoritesFolder",
          "version": 1
        },
        {
          "name": "@myHistory",
          "folderName": "My History",
          "folderType": "historyFolder",
          "version": 1
        },
        {
          "name": "@appDataFolder",
          "folderName": "Application Data",
          "folderType": "applicationDataFolder",
          "version": 1
        },
        {
          "name": "@myRecycleBin",
          "folderName": "Recycle Bin",
          "folderType": "trashFolder",
          "version": 1
        }
      ],
      "links": [
        {
          "method": "GET",
          "rel": "collection",
          "href": "/folders/delegateInfo",
          "uri": "/folders/delegateInfo",
          "type": "application/vnd.sas.collection"
        },
        {
          "method": "GET",
          "rel": "self",
          "href": "/folders/delegateInfo",
          "uri": "/folders/delegateInfo",
          "type": "application/vnd.sas.collection"
        }
      ]
    }
    
    {
      "version": 2,
      "accept": "application/vnd.sas.content.folder.delegate",
      "count": 5,
      "start": 0,
      "limit": 0,
      "name": "delegates",
      "items": [
        {
          "name": "@myFolder",
          "folderName": "My Folder",
          "folderType": "myFolder",
          "version": 1
        },
        {
          "name": "@myFavorites",
          "folderName": "My Favorites",
          "folderType": "favoritesFolder",
          "version": 1
        },
        {
          "name": "@myHistory",
          "folderName": "My History",
          "folderType": "historyFolder",
          "version": 1
        },
        {
          "name": "@appDataFolder",
          "folderName": "Application Data",
          "folderType": "applicationDataFolder",
          "version": 1
        },
        {
          "name": "@myRecycleBin",
          "folderName": "Recycle Bin",
          "folderType": "trashFolder",
          "version": 1
        }
      ],
      "links": [
        {
          "method": "GET",
          "rel": "collection",
          "href": "/folders/delegateInfo",
          "uri": "/folders/delegateInfo",
          "type": "application/vnd.sas.collection"
        },
        {
          "method": "GET",
          "rel": "self",
          "href": "/folders/delegateInfo",
          "uri": "/folders/delegateInfo",
          "type": "application/vnd.sas.collection"
        }
      ]
    }
    
    Responses
    Status Meaning Description Schema
    200 OK The request succeeded. delegateCollection

    Schemas

    baseCollection

    {
      "name": "string",
      "start": 0,
      "limit": 0,
      "count": 0,
      "accept": "string",
      "links": [
        {
          "method": "string",
          "rel": "string",
          "uri": "string",
          "href": "string",
          "type": "string"
        }
      ],
      "version": 0
    }
    
    

    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)

    Properties
    Name Type Required Restrictions Description
    name string false none The name of the collection.
    start integer false none The zero-based index of the first item in the collection.
    limit integer false none The number of items that were requested for the collection.
    count integer(int64) false none If populated indicates the number of items in the collection.
    accept string false none A space-delimited list of media types from which an Accept header may be constructed.
    links [link] false none The links that apply to the collection.
    version integer false none The version number of the collection representation. This representation is version 2.

    errorResponse

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

    Error

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

    {
      "method": "string",
      "rel": "string",
      "uri": "string",
      "href": "string",
      "type": "string"
    }
    
    

    Link

    Properties
    Name Type Required Restrictions Description
    method string false none The HTTP method to invoke this endpoint.
    rel string false none The relationship of this URL to the object.
    uri string false none The relative URI of the REST endpoint.
    href string false none The full URL of the REST endpoint.
    type string false none The media type consumed/produced.

    summary

    {
      "id": "string",
      "name": "string",
      "type": "string",
      "description": "string",
      "createdBy": "string",
      "creationTimeStamp": "2019-08-24T14:15:22Z",
      "modifiedBy": "string",
      "modifiedTimeStamp": "2019-08-24T14:15:22Z",
      "links": [
        {
          "method": "string",
          "rel": "string",
          "uri": "string",
          "href": "string",
          "type": "string"
        }
      ],
      "version": 0
    }
    
    

    Resource Summary

    Properties
    Name Type Required Restrictions Description
    id string true none The unique identifier for the resource.
    name string false none The name of the resource.
    type string false none The type of the resource.
    description string false none The description of the resource.
    createdBy string false none The user who created the resource.
    creationTimeStamp string(date-time) false none The timestamp in YYYY-MM-DDThh:mm:ss.sssZ format when the resource was created.
    modifiedBy string false none The user who most recently modified the resource.
    modifiedTimeStamp string(date-time) false none The timestamp in YYYY-MM-DDThh:mm:ss.sssZ format when the resource was last modified.
    links [link] true none The links that apply to the resource.
    version integer true none The version number of the resource. This representation is version 1.

    validation

    {
      "version": 0,
      "valid": true,
      "error": {
        "message": "string",
        "id": "string",
        "errorCode": 0,
        "httpStatusCode": 0,
        "details": [
          "string"
        ],
        "remediation": "string",
        "errors": [
          null
        ],
        "links": [
          {
            "method": "string",
            "rel": "string",
            "uri": "string",
            "href": "string",
            "type": "string"
          }
        ],
        "version": 0
      },
      "links": [
        {
          "method": "string",
          "rel": "string",
          "uri": "string",
          "href": "string",
          "type": "string"
        }
      ]
    }
    
    

    Validation Response

    Properties
    Name Type Required Restrictions Description
    version integer true none This media type's schema version number. This representation is version 1.
    valid boolean true none true if and only if the validation was successful.
    error errorResponse false none The representation of an error.
    links [link] false none An array of links to related resources and actions.

    folderIn

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

    Folder Schema

    Properties
    Name Type Required Restrictions Description
    name string true none Localizable folder name.
    description string false none Localizable folder description.
    folderType string false none Specialized subtype for this folder. The default value is 'folder'.
    parentFolderUri string false none The URI of this folder's parent folder. This is writable by the client. In order to perform a move, PUT this folder with an updated parentFolderUri pointing to the new parent. It is valid for this field to be null, which indicates a root folder.
    version integer false none This media type's schema version number. This representation is version 1.

    folder

    {
      "id": "string",
      "name": "string",
      "description": "string",
      "parentFolderUri": "string",
      "creationTimeStamp": "2019-08-24T14:15:22Z",
      "modifiedTimeStamp": "2019-08-24T14:15:22Z",
      "createdBy": "string",
      "modifiedBy": "string",
      "type": "string",
      "iconUri": "string",
      "memberCount": 0,
      "links": [
        {
          "method": "string",
          "rel": "string",
          "uri": "string",
          "href": "string",
          "type": "string"
        }
      ],
      "properties": {
        "property1": "string",
        "property2": "string"
      },
      "version": 0
    }
    
    

    Folder

    Properties
    Name Type Required Restrictions Description
    id string(object-id) false none Folder id.
    name string false none Localizable folder name.
    description string false none Folder description.
    parentFolderUri string false none The URI of this folder's parent folder. This is writable by the client. In order to perform a move, PUT this folder with an updated parentFolderUri pointing to the new parent. It is valid for this field to be null, which indicates a root folder.
    creationTimeStamp string(date-time) false none Timestamp of folder creation.
    modifiedTimeStamp string(date-time) false none Timestamp of last folder modification.
    createdBy string false none The name of the user who created this folder.
    modifiedBy string false none The name of the last user who modified this object.
    type string false none The folder type.
    iconUri string(relative URI) false none The folder icon URI.
    memberCount integer false none The number of members in the folder.
    links [link] false none Links that apply to this object. Includes "self", "members", and "delete".
    properties object false none A collection of name/value pairs that help describe the folder.
    » additionalProperties string false none none
    version integer false none This media type's schema version number. This representation is version 1.

    memberIn

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

    Member Schema

    Properties
    Name Type Required Restrictions Description
    uri string(relative URI) true none The URI of the item that the member represents. The service does not make any attempt to validate this field, so it can be anything. However, if this is a folder, it MUST be the folder's URI. It should come from the folder's "self" link, and not be assembled from pieces.
    type string true none Must be "child" or "reference". Child members are deleted when the parent folder is deleted. Child members that rely on SAS authorization checking inherit authorization settings from the parent folder. An object can be a child of one and only one folder. Reference members have no such restrictions. Any member object can be referenced from an unrestricted number of containers.
    parentFolderUri string false none The URI of this member's parent folder. This is writable by the client. In order to perform a move, PUT this member with an updated parentFolderUri pointing to the new parent.
    name string true none Localizable name of the member object. This attribute is persisted with the folder for performance reasons. For SAS managed objects, this value is intended to be synchronized with the attribute persisted with the object.
    description string false none Localizable description of the member object. Member attribute is synchronized with attribute of member object for SAS managed objects.
    creationTimeStamp string(date-time) false none Timestamp of member object creation. Member attribute is synchronized with attribute of member object for SAS managed objects.
    modifiedTimeStamp string(date-time) false none Timestamp of last member object modification. Member attribute is synchronized with attribute of member object for SAS managed objects.
    contentType string false none Member object type. Member attribute is synchronized with attribute of member object for SAS managed objects.
    typeDefName string false none (version 2) If the resource has a subtype that applies, the client can specify it when creating the member. This gives the client navigating the members more information for filtering, sorting, or searching for matching members.
    iconUri string(relative URI) false none Member object icon URI. Member attribute is synchronized with attribute of member object for SAS managed objects.
    orderNum integer false none Optional ordering specifier to provide user ordering of members. When retrieving members, if no other ordering is specified, members are ordered by this field in ascending order. The values do not have to be sequential; the results are ordered according to the values provided. The values also do not have to be unique. However, duplicates result in arbitrary ordering of records with duplicate values.
    version integer false none This media type's schema version number. This representation is version 2.

    member

    {
      "id": "string",
      "uri": "string",
      "added": "2019-08-24T14:15:22Z",
      "type": "string",
      "parentFolderUri": "string",
      "name": "string",
      "description": "string",
      "createdBy": "string",
      "creationTimeStamp": "2019-08-24T14:15:22Z",
      "modifiedBy": "string",
      "modifiedTimeStamp": "2019-08-24T14:15:22Z",
      "contentType": "string",
      "typeDefName": "string",
      "iconUri": "string",
      "orderNum": 0,
      "links": [
        {
          "method": "string",
          "rel": "string",
          "uri": "string",
          "href": "string",
          "type": "string"
        }
      ],
      "version": 0
    }
    
    

    Member

    Properties
    Name Type Required Restrictions Description
    id string(object-id) false none Member id.
    uri string(relative URI) false none The URI of the item that the member represents. The service does not make any attempt to validate this field, so it can be anything. However, if this is a folder, it MUST be the folder's URI. It should come from the folder's "self" link, and not be assembled from pieces.
    added string(date-time) false none Timestamp when member was last added to folder.
    type string false none Must be "child" or "reference". Child members are deleted when the parent folder is deleted. Child members that rely on SAS authorization checking inherit authorization settings from the parent folder. An object can be a child of one and only one folder. Reference members have no such restrictions. Any member object can be referenced from an unrestricted number of containers.
    parentFolderUri string false none The URI of this member's parent folder. This is writable by the client. In order to perform a move, PUT this member with an updated parentFolderUri pointing to the new parent.
    name string false none Localizable name of the member object. This attribute is persisted with the folder for performance reasons. For SAS managed objects, this value is intended to be synchronized with the attribute persisted with the object.
    description string false none Localizable description of the member object. Member attribute is synchronized with attribute of member object for SAS managed objects.
    createdBy string false none The username of the user who created the object represented by this member.
    creationTimeStamp string(date-time) false none Timestamp of member object creation. Member attribute is synchronized with attribute of member object for SAS managed objects.
    modifiedBy string false none The username of the user who last modified the object represented by this member.
    modifiedTimeStamp string(date-time) false none Timestamp of last member object modification. Member attribute is synchronized with attribute of member object for SAS managed objects.
    contentType string false none Member object type. Member attribute is synchronized with attribute of member object for SAS managed objects.
    typeDefName string false none (version 2) If the resource has a subtype that applies, the client can specify it when creating the member. This gives the client navigating the members more information for filtering, sorting, or searching for matching members.
    iconUri string(relative URI) false none Member object icon URI. Member attribute is synchronized with attribute of member object for SAS managed objects.
    orderNum integer false none Optional ordering specifier to provide user ordering of members. When retrieving members, if no other ordering is specified, members are ordered by this field in ascending order. The values do not have to be sequential; the results are ordered according to the values provided. They also do not have to be unique. However, duplicates result in arbitrary ordering of records with duplicate values.
    links [link] false none Links that apply to this object. Links for members include "self" and "delete".
    version integer false none This media type's schema version number. This representation is version 2.

    folderCollection

    {
      "name": "string",
      "start": 0,
      "limit": 0,
      "count": 0,
      "accept": "string",
      "links": [
        {
          "method": "string",
          "rel": "string",
          "uri": "string",
          "href": "string",
          "type": "string"
        }
      ],
      "version": 0,
      "items": [
        {
          "id": "string",
          "name": "string",
          "description": "string",
          "parentFolderUri": "string",
          "creationTimeStamp": "2019-08-24T14:15:22Z",
          "modifiedTimeStamp": "2019-08-24T14:15:22Z",
          "createdBy": "string",
          "modifiedBy": "string",
          "type": "string",
          "iconUri": "string",
          "memberCount": 0,
          "links": [
            {
              "method": "string",
              "rel": "string",
              "uri": "string",
              "href": "string",
              "type": "string"
            }
          ],
          "properties": {
            "property1": "string",
            "property2": "string"
          },
          "version": 0
        }
      ]
    }
    
    

    Folder Collection

    Properties
    Name Type Required Restrictions Description
    Folder Collection any false none A collection of folders.

    allOf

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

    and

    Name Type Required Restrictions Description
    anonymous object false none none
    » items [folder] false none The actual results of a query.

    memberCollection

    {
      "name": "string",
      "start": 0,
      "limit": 0,
      "count": 0,
      "accept": "string",
      "links": [
        {
          "method": "string",
          "rel": "string",
          "uri": "string",
          "href": "string",
          "type": "string"
        }
      ],
      "version": 0,
      "items": [
        {
          "id": "string",
          "uri": "string",
          "added": "2019-08-24T14:15:22Z",
          "type": "string",
          "parentFolderUri": "string",
          "name": "string",
          "description": "string",
          "createdBy": "string",
          "creationTimeStamp": "2019-08-24T14:15:22Z",
          "modifiedBy": "string",
          "modifiedTimeStamp": "2019-08-24T14:15:22Z",
          "contentType": "string",
          "typeDefName": "string",
          "iconUri": "string",
          "orderNum": 0,
          "links": [
            {
              "method": "string",
              "rel": "string",
              "uri": "string",
              "href": "string",
              "type": "string"
            }
          ],
          "version": 0
        }
      ]
    }
    
    

    Member Collection

    Properties
    Name Type Required Restrictions Description
    Member Collection any false none A collection of folder members.

    allOf

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

    and

    Name Type Required Restrictions Description
    anonymous object false none none
    » items [member] false none The actual results of a query.

    ancestor

    {
      "childUri": "string",
      "ancestors": [
        {
          "id": "string",
          "name": "string",
          "description": "string",
          "parentFolderUri": "string",
          "creationTimeStamp": "2019-08-24T14:15:22Z",
          "modifiedTimeStamp": "2019-08-24T14:15:22Z",
          "createdBy": "string",
          "modifiedBy": "string",
          "type": "string",
          "iconUri": "string",
          "memberCount": 0,
          "links": [
            {
              "method": "string",
              "rel": "string",
              "uri": "string",
              "href": "string",
              "type": "string"
            }
          ],
          "properties": {
            "property1": "string",
            "property2": "string"
          },
          "version": 0
        }
      ],
      "version": 0
    }
    
    

    Ancestor Type

    Properties
    Name Type Required Restrictions Description
    childUri string false none The URI whose ancestry was requested.
    ancestors [folder] false none An ordered list of the folders that parent the URI, starting with the immediate parent.
    version integer false none This media type's schema version number. This representation is version 1.

    ancestorCollection

    {
      "name": "string",
      "start": 0,
      "limit": 0,
      "count": 0,
      "accept": "string",
      "links": [
        {
          "method": "string",
          "rel": "string",
          "uri": "string",
          "href": "string",
          "type": "string"
        }
      ],
      "version": 0,
      "items": [
        {
          "childUri": "string",
          "ancestors": [
            {
              "id": "string",
              "name": "string",
              "description": "string",
              "parentFolderUri": "string",
              "creationTimeStamp": "2019-08-24T14:15:22Z",
              "modifiedTimeStamp": "2019-08-24T14:15:22Z",
              "createdBy": "string",
              "modifiedBy": "string",
              "type": "string",
              "iconUri": "string",
              "memberCount": 0,
              "links": [
                {
                  "method": "string",
                  "rel": "string",
                  "uri": "string",
                  "href": "string",
                  "type": "string"
                }
              ],
              "properties": {
                "property1": "string",
                "property2": "string"
              },
              "version": 0
            }
          ],
          "version": 0
        }
      ]
    }
    
    

    Ancestor Collection

    Properties
    Name Type Required Restrictions Description
    Ancestor Collection any false none A collection of ancestor entries that are returned from an ancestors request.

    allOf

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

    and

    Name Type Required Restrictions Description
    anonymous object false none none
    » items [ancestor] false none The collection of ancestor results.

    folderType

    {
      "name": "string",
      "label": "string",
      "userAssignable": true,
      "version": 0
    }
    
    

    Folder Type

    Properties
    Name Type Required Restrictions Description
    name string false none The name of the folder type. This is the value that goes in the folderType field of a folder.
    label string false none The localizable label that can be presented to a user.
    userAssignable boolean false none True if the type is acceptable to use in a folder being created by a client.
    version integer false none This media type's schema version number. This representation is version 1.

    folderTypeCollection

    {
      "name": "string",
      "start": 0,
      "limit": 0,
      "count": 0,
      "accept": "string",
      "links": [
        {
          "method": "string",
          "rel": "string",
          "uri": "string",
          "href": "string",
          "type": "string"
        }
      ],
      "version": 0,
      "items": [
        {
          "name": "string",
          "label": "string",
          "userAssignable": true,
          "version": 0
        }
      ]
    }
    
    

    Folder Type Collection

    Properties
    Name Type Required Restrictions Description
    Folder Type Collection any false none A collection of folder types.

    allOf

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

    and

    Name Type Required Restrictions Description
    anonymous object false none none
    » items [folderType] false none The collection of folder types.

    delegate

    {
      "name": "string",
      "folderName": "string",
      "folderType": "string",
      "version": 0
    }
    
    

    Delegate

    Properties
    Name Type Required Restrictions Description
    name string false none The delegate name, always starting with '@'.
    folderName string false none The folder name of the delegate, for example, for @myFolder, My Folder.
    folderType string false none The value of the type field for this delegate. For example, for @myFolder, myFolder.
    version integer false none This media type's schema version number. This representation is version 1.

    delegateCollection

    {
      "name": "string",
      "start": 0,
      "limit": 0,
      "count": 0,
      "accept": "string",
      "links": [
        {
          "method": "string",
          "rel": "string",
          "uri": "string",
          "href": "string",
          "type": "string"
        }
      ],
      "version": 0,
      "items": [
        {
          "name": "string",
          "folderName": "string",
          "folderType": "string",
          "version": 0
        }
      ]
    }
    
    

    Delegate Collection

    Properties
    Name Type Required Restrictions Description
    Delegate Collection any false none A collection of delegate objects.

    allOf

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

    and

    Name Type Required Restrictions Description
    anonymous object false none none
    » items [delegate] false none The collection of delegate definitions.

    path

    {
      "items": [
        "string"
      ],
      "contentType": "string",
      "typeDefName": "string",
      "version": 0
    }
    
    

    Path

    Properties
    Name Type Required Restrictions Description
    items [string] false none An ordered list of parent folder names, with the desired object's name at the end of the list.
    contentType string false none The content type of the object to return. Must match the content type of the Member entry.
    typeDefName string false none The type definition name of the member being requested.
    version integer false none This media type's schema version number. This representation is version 1.

    Examples

    Github Examples

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

    Projects

    Base URLs:

    Terms of service Email: SAS Developers Web: SAS Developers

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

    The Projects API provides support for creating projects to group a set of objects, referenced resources, and participants (users or groups).

    Usage Notes

    Overview

    A project is a container that groups a set of resources along with a set of participants (users or groups). This can be used for collaborative purposes where one or more participants are working on a set of related resources. The resources contained in a project are referenced through a URI that points to that resource. The Projects API has no other knowledge of the target resource. That resource might be in the SAS service sphere, it might be external, or it might not actually exist at all. When a resource is removed from a project, no attempt is made to delete the underlying resource. However, if a target resource that is managed by a SAS service is deleted, that service fires an event and the Projects API removes that resource from any projects that contained it.

    Resource Relationships

    The Projects API can also be used to retrieve information about various project-related activities. These activities include the following: * Project created/renamed/deleted * Project description changed * Project avatar changed * Participant added/modified/removed * Resource added/modified/removed * Folder member added/modified/removed * Comment added/modified/removed

    Terminology

    project

    a container that groups a set of resources along with a set of participants.

    participant

    a SAS user or group.

    role

    assigned to each participant to determine their level of access. Different permissions are associated with different roles.

    resource

    an atomic unit of data to which a project applies. These could be a SAS folder member, a data resource (such as a dataSource or dataTable), or some other item identified with a URI.

    activity

    an event (or events) related to a project. These could be created/modified/deleted events for the project itself, a participant or resource, or a member of the underlying folder.

    Error Codes

    The list below contains the set of error codes that are used for following error conditions.

    Http Status Code Error Code Description
    400 18900 Project creation failed.
    400 18904 Project ID did not match ID in request url.
    400 18905 Provided project description exceeds its maximum length.
    400 18906 Provided project name exceeds its maximum length.
    400 18907 Provided project image uri exceeds its maximum length.
    400 18908 Provided property name exceeds its maximum length.
    400 18909 Provided property value exceeds its maximum length.
    400 18910 Provided project ID exceeds its maximum length.
    400 18911 Provided project ID already exists.
    400 18912 Required project ID was not specified.
    400 18913 Required project name was not specified.
    400 18915 Provided IDentity uri exceeds its maximum length.
    400 18916 Identity was not found.
    400 18917 Unexpected status code for identity returned.
    400 18918 Invalid participant role.
    400 18919 Project must have an owner.
    400 18920 Duplicate project property specified.
    400 18921 Self link for user ID not found.
    400 18922 Invalid participant identity uri.
    400 18924 Participant identity uri not specified.
    400 18925 Property name not specified.
    400 18926 Property value not specified.
    400 18929 Resource uri not specified.
    400 18931 Invalid project name.
    400 18932 Required participant ID was not specified.
    400 18933 Participant ID did not match ID in request url.
    400 18934 Provided participant ID exceeds its maximum length.
    400 18938 Project update failed.
    400 18939 Required resource ID was not specified.
    400 18940 Provided resource ID exceeds its maximum length.
    400 18941 Resource ID did not match ID in request url.
    400 18942 Provided resource uri exceeds its maximum length.
    400 18943 Invalid resource uri.
    400 18944 Resource identified by resourceUri was not found.
    400 18945 Unexpected status code for resource uri returned.
    400 18946 Transfer object is missing content.
    400 18947 Invalid connector type for transfer object.
    400 18950 Participant identity uri cannot be modified.
    404 18901 Project was not found.
    404 18914 Participant was not found.
    404 18928 Resource was not found.
    409 18923 Project name already exists.
    409 18927 Provided participant identity uri already exists.
    409 18930 Provided resource uri already exists.
    409 18937 Project folder already exists.
    412 18902 ETag did not match for conditional put request.
    428 18903 Required ETag for conditional put was not specified.
    500 18935 Projects root folder missing.
    500 18948 Error removing folder members for transfer operation.
    500 18949 Error adding folder members for transfer operation.

    Operations

    Projects

    Contains the operations for the Project resource.

    Get projects

    Code samples

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

    GET /projects

    Returns a list of projects. Standard paging, filtering, and sorting options are provided. The media type of the returned collection items is either application/vnd.sas.project.summary (default), or application/vnd.sas.project depending on the Accept-Item header. Default sorting for this collection is name:ascending. HEAD is also supported and returns status and headers only.

    Parameters
    Name In Type Required Description
    Accept-Item header string false The desired project representation. If no Accept-Item is specified, application/vnd.sas.project.summary items are returned.
    start query integer false The offset of the first project to return. The default is 0.
    limit query integer false The maximum number of projects to return. The default is 20.
    filter query string(filter-criteria) false The criteria for filtering the projects. See Filtering in REST APIs.
    sortBy query string(sort-criteria) false The criteria for sorting the projects. See Sorting in REST APIs.
    resourceUri query string(uri) false Return projects containing only a resource with the specified resourceUri. This should be the URI of the underlying resource object itself and not the vnd.sas.project.resource object's URI.
    identityUri query string(uri) false Return projects containing only a participant with the specified identityUri. This should be the URI of the actual user or group object from the Identities service.
    Enumerated Values
    Parameter Value
    Accept-Item application/vnd.sas.project.summary+json
    Accept-Item application/vnd.sas.project+json

    Example responses

    200 Response

    {
      "name": "string",
      "start": 0,
      "limit": 0,
      "count": 0,
      "accept": "string",
      "links": [
        {
          "method": "string",
          "rel": "string",
          "uri": "string",
          "href": "string",
          "title": "string",
          "type": "string",
          "itemType": "string",
          "responseType": "string",
          "responseItemType": "string"
        }
      ],
      "version": 0,
      "items": [
        {
          "name": "string",
          "description": "string",
          "imageUri": "https://example.com",
          "properties": {
            "property1": "string",
            "property2": "string"
          },
          "version": 0,
          "id": "string",
          "folderUri": "https://example.com",
          "userCount": 0,
          "groupCount": 0,
          "createdBy": "string",
          "creationTimeStamp": "2019-08-24T14:15:22Z",
          "modifiedBy": "string",
          "modifiedTimeStamp": "2019-08-24T14:15:22Z",
          "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. The list of projects was returned. projectCollection
    400 Bad Request The request was invalid. An invalid filter or combination of request parameters was provided. error2

    Create a new project

    Code samples

    # You can also use wget
    curl -X POST https://example.com/projects/projects \
      -H 'Authorization: Bearer <access-token-goes-here>' \
      -H 'Content-Type: application/vnd.sas.project+json' \
      -H 'Accept: application/vnd.sas.project+json'
    
    
    const inputBody = '{
      "name": "string",
      "description": "string",
      "imageUri": "https://example.com",
      "properties": {
        "property1": "string",
        "property2": "string"
      },
      "version": 0
    }';
    const headers = {
      'Content-Type':'application/vnd.sas.project+json',
      'Accept':'application/vnd.sas.project+json'
    };
    
    fetch('https://example.com/projects/projects',
    {
      method: 'POST',
      body: inputBody,
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    import requests
    headers = {
      'Content-Type': 'application/vnd.sas.project+json',
      'Accept': 'application/vnd.sas.project+json'
    }
    
    r = requests.post('https://example.com/projects/projects', headers = headers)
    
    print(r.json())
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Content-Type": []string{"application/vnd.sas.project+json"},
            "Accept": []string{"application/vnd.sas.project+json"},
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("POST", "https://example.com/projects/projects", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    

    POST /projects

    Creates a new empty project. Resources can be added to the project using the /projects/{projectId}/resources endpoint. Participants can be added to the project using the /projects/{projectId}/participants endpoint. Name uniqueness across projects is enforced. Only the name, description, imageUri, and properties fields are editable.

    Body parameter

    {
      "name": "string",
      "description": "string",
      "imageUri": "https://example.com",
      "properties": {
        "property1": "string",
        "property2": "string"
      },
      "version": 0
    }
    
    Parameters
    Name In Type Required Description
    body body createProject true none

    Example responses

    201 Response

    {
      "name": "string",
      "description": "string",
      "imageUri": "https://example.com",
      "properties": {
        "property1": "string",
        "property2": "string"
      },
      "version": 0,
      "id": "string",
      "folderUri": "https://example.com",
      "userCount": 0,
      "groupCount": 0,
      "createdBy": "string",
      "creationTimeStamp": "2019-08-24T14:15:22Z",
      "modifiedBy": "string",
      "modifiedTimeStamp": "2019-08-24T14:15:22Z",
      "links": [
        {
          "method": "string",
          "rel": "string",
          "uri": "string",
          "href": "string",
          "title": "string",
          "type": "string",
          "itemType": "string",
          "responseType": "string",
          "responseItemType": "string"
        }
      ]
    }
    
    Responses
    Status Meaning Description Schema
    201 Created The project was created. project
    400 Bad Request The request was invalid. error2
    409 Conflict The project name already exists. error2
    Response Headers
    Status Header Type Format Description
    201 Location string The URI of the newly created project.
    201 Last-Modified string The ISO8601 date string representing the timestamp of the last update to this project.
    201 ETag string A tag that identifies the current revision of the object.

    Get project

    Code samples

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

    GET /projects/{projectId}

    Returns the specified project. HEAD is also supported and returns status and headers only.

    Parameters
    Name In Type Required Description
    projectId path string(object-id) true The identifier of a specific project.

    Example responses

    200 Response

    {
      "name": "string",
      "description": "string",
      "imageUri": "https://example.com",
      "properties": {
        "property1": "string",
        "property2": "string"
      },
      "version": 0,
      "id": "string",
      "folderUri": "https://example.com",
      "userCount": 0,
      "groupCount": 0,
      "createdBy": "string",
      "creationTimeStamp": "2019-08-24T14:15:22Z",
      "modifiedBy": "string",
      "modifiedTimeStamp": "2019-08-24T14:15:22Z",
      "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. project
    404 Not Found The project does not exist. error2
    Response Headers
    Status Header Type Format Description
    200 Last-Modified string The ISO8601 date string representing the timestamp of the last update to this project.
    200 ETag string A tag that identifies the current revision of the object.

    Update project

    Code samples

    # You can also use wget
    curl -X PUT https://example.com/projects/projects/{projectId} \
      -H 'Authorization: Bearer <access-token-goes-here>' \
      -H 'Content-Type: application/vnd.sas.project+json' \
      -H 'Accept: application/vnd.sas.project+json' \
      -H 'If-Match: string'
    
    
    const inputBody = '{
      "name": "string",
      "description": "string",
      "imageUri": "https://example.com",
      "properties": {
        "property1": "string",
        "property2": "string"
      },
      "version": 0,
      "id": "string"
    }';
    const headers = {
      'Content-Type':'application/vnd.sas.project+json',
      'Accept':'application/vnd.sas.project+json',
      'If-Match':'string'
    };
    
    fetch('https://example.com/projects/projects/{projectId}',
    {
      method: 'PUT',
      body: inputBody,
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    import requests
    headers = {
      'Content-Type': 'application/vnd.sas.project+json',
      'Accept': 'application/vnd.sas.project+json',
      'If-Match': 'string'
    }
    
    r = requests.put('https://example.com/projects/projects/{projectId}', headers = headers)
    
    print(r.json())
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Content-Type": []string{"application/vnd.sas.project+json"},
            "Accept": []string{"application/vnd.sas.project+json"},
            "If-Match": []string{"string"},
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("PUT", "https://example.com/projects/projects/{projectId}", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    

    PUT /projects/{projectId}

    Replaces an existing project. Only the name, description, imageUri, and properties fields are editable.

    Body parameter

    {
      "name": "string",
      "description": "string",
      "imageUri": "https://example.com",
      "properties": {
        "property1": "string",
        "property2": "string"
      },
      "version": 0,
      "id": "string"
    }
    
    Parameters
    Name In Type Required Description
    projectId path string(object-id) true The identifier of a specific project and MUST exactly match project.id sent in the body of the request.
    If-Match header string true The ETag that was returned from a GET, POST, or PUT request of this project.
    body body updateProject true none

    Example responses

    200 Response

    {
      "name": "string",
      "description": "string",
      "imageUri": "https://example.com",
      "properties": {
        "property1": "string",
        "property2": "string"
      },
      "version": 0,
      "id": "string",
      "folderUri": "https://example.com",
      "userCount": 0,
      "groupCount": 0,
      "createdBy": "string",
      "creationTimeStamp": "2019-08-24T14:15:22Z",
      "modifiedBy": "string",
      "modifiedTimeStamp": "2019-08-24T14:15:22Z",
      "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. The project was updated. project
    400 Bad Request The request was invalid. error2
    404 Not Found The project does not exist. error2
    409 Conflict The request could not be completed. The project name already exists. error2
    412 Precondition Failed The ETag provided does not match the current version of the object. error2
    428 Precondition Required The ETag was not provided when updating an existing type. error2
    Response Headers
    Status Header Type Format Description
    200 Last-Modified string The ISO8601 date string representing the timestamp of the last update to this project.
    200 ETag string A tag that identifies the current revision of the object.

    Delete project

    Code samples

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

    DELETE /projects/{projectId}

    The specified project is deleted along with all participants and resources. If keepFolder=true is not specified, the underlying folder and all its content are deleted also.

    Parameters
    Name In Type Required Description
    projectId path string(object-id) true The identifier of a specific project.
    keepFolder query boolean false If true, the underlying folder and all its content is not deleted. The default is false.

    Example responses

    404 Response

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

    Resources

    Contains the operations for a Resource.

    Get project resources

    Code samples

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

    GET /projects/{projectId}/resources

    Returns a list of project resources. Standard paging, filtering, and sorting options are available. The media type of the returned collection items is application/vnd.sas.project.resource. Default sorting for this collection is name:ascending. HEAD is also supported and returns status and headers only.

    Parameters
    Name In Type Required Description
    projectId path string(object-id) true The identifier of a specific project.
    start query integer(int64) false The offset of the first resource to return. The default is 0.
    limit query integer(int64) false Maximum number of resources to return. The default is 20.
    filter query string(filter-criteria) false The criteria for filtering the resources. See Filtering in REST APIs.
    sortBy query string(sort-criteria) false The criteria for sorting the resources. See Sorting in REST APIs.

    Example responses

    200 Response

    {
      "name": "string",
      "start": 0,
      "limit": 0,
      "count": 0,
      "accept": "string",
      "links": [
        {
          "method": "string",
          "rel": "string",
          "uri": "string",
          "href": "string",
          "title": "string",
          "type": "string",
          "itemType": "string",
          "responseType": "string",
          "responseItemType": "string"
        }
      ],
      "version": 0,
      "items": [
        {
          "resourceUri": "https://example.com",
          "version": 0,
          "properties": {
            "property1": "string",
            "property2": "string"
          },
          "id": "string",
          "name": "string",
          "description": "string",
          "contentType": "string",
          "statusCode": 0,
          "errorMessage": "string",
          "createdBy": "string",
          "creationTimeStamp": "2019-08-24T14:15:22Z",
          "modifiedBy": "string",
          "modifiedTimeStamp": "2019-08-24T14:15:22Z",
          "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. The project resources were returned. resourceCollection
    404 Not Found The project does not exist. error2

    Add resource to project

    Code samples

    # You can also use wget
    curl -X POST https://example.com/projects/projects/{projectId}/resources \
      -H 'Authorization: Bearer <access-token-goes-here>' \
      -H 'Content-Type: application/vnd.sas.project.resource+json' \
      -H 'Accept: application/vnd.sas.project.resource+json'
    
    
    const inputBody = '{
      "resourceUri": "https://example.com",
      "version": 0,
      "properties": {
        "property1": "string",
        "property2": "string"
      }
    }';
    const headers = {
      'Content-Type':'application/vnd.sas.project.resource+json',
      'Accept':'application/vnd.sas.project.resource+json'
    };
    
    fetch('https://example.com/projects/projects/{projectId}/resources',
    {
      method: 'POST',
      body: inputBody,
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    import requests
    headers = {
      'Content-Type': 'application/vnd.sas.project.resource+json',
      'Accept': 'application/vnd.sas.project.resource+json'
    }
    
    r = requests.post('https://example.com/projects/projects/{projectId}/resources', headers = headers)
    
    print(r.json())
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Content-Type": []string{"application/vnd.sas.project.resource+json"},
            "Accept": []string{"application/vnd.sas.project.resource+json"},
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("POST", "https://example.com/projects/projects/{projectId}/resources", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    

    POST /projects/{projectId}/resources

    Adds a new resource reference to the project. If the resource object referenced is already a member of this project, this operation fails with a 409 status (conflict).

    Body parameter

    {
      "resourceUri": "https://example.com",
      "version": 0,
      "properties": {
        "property1": "string",
        "property2": "string"
      }
    }
    
    Parameters
    Name In Type Required Description
    projectId path string(object-id) true The identifier of a specific project.
    body body createResource true none

    Example responses

    201 Response

    {
      "resourceUri": "https://example.com",
      "version": 0,
      "properties": {
        "property1": "string",
        "property2": "string"
      },
      "id": "string",
      "name": "string",
      "description": "string",
      "contentType": "string",
      "statusCode": 0,
      "errorMessage": "string",
      "createdBy": "string",
      "creationTimeStamp": "2019-08-24T14:15:22Z",
      "modifiedBy": "string",
      "modifiedTimeStamp": "2019-08-24T14:15:22Z",
      "links": [
        {
          "method": "string",
          "rel": "string",
          "uri": "string",
          "href": "string",
          "title": "string",
          "type": "string",
          "itemType": "string",
          "responseType": "string",
          "responseItemType": "string"
        }
      ]
    }
    
    Responses
    Status Meaning Description Schema
    201 Created A new resource was created. resource
    400 Bad Request The request was invalid. error2
    404 Not Found The project does not exist. error2
    409 Conflict The request could not be completed. The URI already exists as a resource of this project. error2
    Response Headers
    Status Header Type Format Description
    201 Location string The URI of the newly created resource.
    201 Last-Modified string The ISO8601 date string representing the timestamp of the last update to this project.
    201 ETag string A tag that identifies this revision of this object.

    Get project resource

    Code samples

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

    GET /projects/{projectId}/resources/{resourceId}

    Returns the specified resource. HEAD is also supported and returns status and headers only.

    Parameters
    Name In Type Required Description
    projectId path string(object-id) true The identifier of a specific project.
    resourceId path string true Unique identifier of the resource.

    Example responses

    200 Response

    {
      "resourceUri": "https://example.com",
      "version": 0,
      "properties": {
        "property1": "string",
        "property2": "string"
      },
      "id": "string",
      "name": "string",
      "description": "string",
      "contentType": "string",
      "statusCode": 0,
      "errorMessage": "string",
      "createdBy": "string",
      "creationTimeStamp": "2019-08-24T14:15:22Z",
      "modifiedBy": "string",
      "modifiedTimeStamp": "2019-08-24T14:15:22Z",
      "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. The project's resource was returned. resource
    404 Not Found The project or resource does not exist. error2
    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.

    Update project resource

    Code samples

    # You can also use wget
    curl -X PUT https://example.com/projects/projects/{projectId}/resources/{resourceId} \
      -H 'Authorization: Bearer <access-token-goes-here>' \
      -H 'Content-Type: application/vnd.sas.project.resource+json' \
      -H 'Accept: application/vnd.sas.project.resource+json' \
      -H 'If-Match: string'
    
    
    const inputBody = '{
      "resourceUri": "https://example.com",
      "version": 0,
      "properties": {
        "property1": "string",
        "property2": "string"
      },
      "id": "string"
    }';
    const headers = {
      'Content-Type':'application/vnd.sas.project.resource+json',
      'Accept':'application/vnd.sas.project.resource+json',
      'If-Match':'string'
    };
    
    fetch('https://example.com/projects/projects/{projectId}/resources/{resourceId}',
    {
      method: 'PUT',
      body: inputBody,
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    import requests
    headers = {
      'Content-Type': 'application/vnd.sas.project.resource+json',
      'Accept': 'application/vnd.sas.project.resource+json',
      'If-Match': 'string'
    }
    
    r = requests.put('https://example.com/projects/projects/{projectId}/resources/{resourceId}', headers = headers)
    
    print(r.json())
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Content-Type": []string{"application/vnd.sas.project.resource+json"},
            "Accept": []string{"application/vnd.sas.project.resource+json"},
            "If-Match": []string{"string"},
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("PUT", "https://example.com/projects/projects/{projectId}/resources/{resourceId}", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    

    PUT /projects/{projectId}/resources/{resourceId}

    Replaces an existing project resource.

    Body parameter

    {
      "resourceUri": "https://example.com",
      "version": 0,
      "properties": {
        "property1": "string",
        "property2": "string"
      },
      "id": "string"
    }
    
    Parameters
    Name In Type Required Description
    projectId path string(object-id) true The identifier of a specific project.
    resourceId path string true The identifier of a specific resource.
    If-Match header string true The ETag that was returned from a GET, POST, or PUT of this object.
    body body updateResource true none

    Example responses

    200 Response

    {
      "resourceUri": "https://example.com",
      "version": 0,
      "properties": {
        "property1": "string",
        "property2": "string"
      },
      "id": "string",
      "name": "string",
      "description": "string",
      "contentType": "string",
      "statusCode": 0,
      "errorMessage": "string",
      "createdBy": "string",
      "creationTimeStamp": "2019-08-24T14:15:22Z",
      "modifiedBy": "string",
      "modifiedTimeStamp": "2019-08-24T14:15:22Z",
      "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. The project resource was updated. resource
    400 Bad Request The request was invalid. error2
    404 Not Found The project or resource does not exist. error2
    409 Conflict The request could not be completed. The URI already exists as a resource of this project. error2
    412 Precondition Failed The ETag provided does not match the current version of the object. error2
    428 Precondition Required The ETag was not provided when updating an existing type. error2
    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.

    Remove resource from project

    Code samples

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

    DELETE /projects/{projectId}/resources/{resourceId}

    Removes the specified resource from the project. 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. That should generate an event that causes the projects service to clean up any members that have that target resource's URI.

    Parameters
    Name In Type Required Description
    projectId path string(object-id) true The identifier of a specific project.
    resourceId path string true The identifier of a specific resource.

    Example responses

    404 Response

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

    Participants

    Contains the operations for a Participant resource.

    Get project participants

    Code samples

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

    GET /projects/{projectId}/participants

    Returns a list of project participants. Standard paging, filtering, and options are available. The media type of the returned collection items is application/vnd.sas.project.participant. Default sorting for this collection is name:ascending. HEAD is also supported and returns status and headers only.

    Parameters
    Name In Type Required Description
    projectId path string(object-id) true The identifier of a specific project.
    start query integer(int64) false The offset of the first participant to return. The default is 0.
    limit query integer(int64) false Maximum number of participants to return. The default is 20.
    filter query string(filter-criteria) false The criteria for filtering the participants. See Filtering in REST APIs.
    sortBy query string(sort-criteria) false The criteria for sorting the participants. See Sorting in REST APIs.

    Example responses

    200 Response

    {
      "name": "string",
      "start": 0,
      "limit": 0,
      "count": 0,
      "accept": "string",
      "links": [
        {
          "method": "string",
          "rel": "string",
          "uri": "string",
          "href": "string",
          "title": "string",
          "type": "string",
          "itemType": "string",
          "responseType": "string",
          "responseItemType": "string"
        }
      ],
      "version": 0,
      "items": [
        {
          "id": "string",
          "identityUri": "https://example.com",
          "role": "contributor",
          "version": 0,
          "name": "string",
          "type": "user",
          "avatarUri": "https://example.com",
          "createdBy": "string",
          "creationTimeStamp": "2019-08-24T14:15:22Z",
          "modifiedBy": "string",
          "modifiedTimeStamp": "2019-08-24T14:15:22Z",
          "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. participantCollection
    404 Not Found The project does not exist. error2

    Add participant to project

    Code samples

    # You can also use wget
    curl -X POST https://example.com/projects/projects/{projectId}/participants \
      -H 'Authorization: Bearer <access-token-goes-here>' \
      -H 'Content-Type: application/vnd.sas.project.participant+json' \
      -H 'Accept: application/vnd.sas.project.participant+json'
    
    
    const inputBody = '{
      "identityUri": "https://example.com",
      "role": "contributor",
      "version": 0
    }';
    const headers = {
      'Content-Type':'application/vnd.sas.project.participant+json',
      'Accept':'application/vnd.sas.project.participant+json'
    };
    
    fetch('https://example.com/projects/projects/{projectId}/participants',
    {
      method: 'POST',
      body: inputBody,
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    import requests
    headers = {
      'Content-Type': 'application/vnd.sas.project.participant+json',
      'Accept': 'application/vnd.sas.project.participant+json'
    }
    
    r = requests.post('https://example.com/projects/projects/{projectId}/participants', headers = headers)
    
    print(r.json())
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Content-Type": []string{"application/vnd.sas.project.participant+json"},
            "Accept": []string{"application/vnd.sas.project.participant+json"},
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("POST", "https://example.com/projects/projects/{projectId}/participants", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    

    POST /projects/{projectId}/participants

    Adds a new participant to the project. If the participant referenced is already a participant of this project, this operation fails with a 409 status (conflict).

    Body parameter

    {
      "identityUri": "https://example.com",
      "role": "contributor",
      "version": 0
    }
    
    Parameters
    Name In Type Required Description
    projectId path string(object-id) true The identifier of a specific project.
    body body createParticipant true none

    Example responses

    201 Response

    {
      "id": "string",
      "identityUri": "https://example.com",
      "role": "contributor",
      "version": 0,
      "name": "string",
      "type": "user",
      "avatarUri": "https://example.com",
      "createdBy": "string",
      "creationTimeStamp": "2019-08-24T14:15:22Z",
      "modifiedBy": "string",
      "modifiedTimeStamp": "2019-08-24T14:15:22Z",
      "links": [
        {
          "method": "string",
          "rel": "string",
          "uri": "string",
          "href": "string",
          "title": "string",
          "type": "string",
          "itemType": "string",
          "responseType": "string",
          "responseItemType": "string"
        }
      ]
    }
    
    Responses
    Status Meaning Description Schema
    201 Created A participant was created. participant
    400 Bad Request The request was invalid. error2
    404 Not Found The project does not exist. error2
    409 Conflict The request could not be completed. The URI already exists as a participant of this project. error2
    Response Headers
    Status Header Type Format Description
    201 Location string The URI of the newly created participant
    201 Last-Modified string The ISO8601 date string representing the timestamp of the last update to this project.
    201 ETag string A tag that identifies this revision of this object.

    Get project participant

    Code samples

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

    GET /projects/{projectId}/participants/{participantId}

    Returns the specified participant. HEAD is also supported and returns status and headers only.

    Parameters
    Name In Type Required Description
    projectId path string(object-id) true The identifier of a specific project.
    participantId path string true The identifier of a specific participant.

    Example responses

    200 Response

    {
      "id": "string",
      "identityUri": "https://example.com",
      "role": "contributor",
      "version": 0,
      "name": "string",
      "type": "user",
      "avatarUri": "https://example.com",
      "createdBy": "string",
      "creationTimeStamp": "2019-08-24T14:15:22Z",
      "modifiedBy": "string",
      "modifiedTimeStamp": "2019-08-24T14:15:22Z",
      "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. The project participant was returned. participant
    404 Not Found The project or participant does not exist. error2
    Response Headers
    Status Header Type Format Description
    200 Last-Modified string The ISO8601 timestamp representing the last time this participant was updated.
    200 ETag string A tag that identifies this revision of this object.

    Update project participant

    Code samples

    # You can also use wget
    curl -X PUT https://example.com/projects/projects/{projectId}/participants/{participantId} \
      -H 'Authorization: Bearer <access-token-goes-here>' \
      -H 'Content-Type: application/vnd.sas.project.participant+json' \
      -H 'Accept: application/vnd.sas.project.participant+json' \
      -H 'If-Match: string'
    
    
    const inputBody = '{
      "id": "string",
      "role": "contributor",
      "version": 0
    }';
    const headers = {
      'Content-Type':'application/vnd.sas.project.participant+json',
      'Accept':'application/vnd.sas.project.participant+json',
      'If-Match':'string'
    };
    
    fetch('https://example.com/projects/projects/{projectId}/participants/{participantId}',
    {
      method: 'PUT',
      body: inputBody,
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    import requests
    headers = {
      'Content-Type': 'application/vnd.sas.project.participant+json',
      'Accept': 'application/vnd.sas.project.participant+json',
      'If-Match': 'string'
    }
    
    r = requests.put('https://example.com/projects/projects/{projectId}/participants/{participantId}', headers = headers)
    
    print(r.json())
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Content-Type": []string{"application/vnd.sas.project.participant+json"},
            "Accept": []string{"application/vnd.sas.project.participant+json"},
            "If-Match": []string{"string"},
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("PUT", "https://example.com/projects/projects/{projectId}/participants/{participantId}", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    

    PUT /projects/{projectId}/participants/{participantId}

    Replaces an existing project participant.

    Body parameter

    {
      "id": "string",
      "role": "contributor",
      "version": 0
    }
    
    Parameters
    Name In Type Required Description
    projectId path string(object-id) true The identifier of a specific project.
    participantId path string true The identifier of a specific participant.
    If-Match header string true The ETag that was returned from a GET, POST, or PUT of this object.
    body body updateParticipant true none

    Example responses

    200 Response

    {
      "id": "string",
      "identityUri": "https://example.com",
      "role": "contributor",
      "version": 0,
      "name": "string",
      "type": "user",
      "avatarUri": "https://example.com",
      "createdBy": "string",
      "creationTimeStamp": "2019-08-24T14:15:22Z",
      "modifiedBy": "string",
      "modifiedTimeStamp": "2019-08-24T14:15:22Z",
      "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. The participant was updated. participant
    400 Bad Request The request was invalid. error2
    404 Not Found The project or participant does not exist. error2
    409 Conflict The request could not be completed. The URI already exists as a participant of this project. error2
    412 Precondition Failed The ETag provided does not match the current version of the object. error2
    428 Precondition Required The ETag was not provided when updating an existing type. error2
    Response Headers
    Status Header Type Format Description
    200 Last-Modified string The ISO8601 date string representing the timestamp of the last update to this participant.
    200 ETag string A tag that identifies this revision of this object.

    Remove participant from project

    Code samples

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

    DELETE /projects/{projectId}/participants/{participantId}

    Removes the specified participant from the project. This does not delete the identity from the Identities service. If the corresponding identity is deleted from the Identity service, an event is generated and any associated participants are deleted. Since a project must have at least one owner, the last owner cannot be deleted. It is possible that the last owner could be removed if the corresponding identity is deleted from the Identities service. The project would be visible only to administrators who can delete the project or add a new owner.

    Parameters
    Name In Type Required Description
    projectId path string(object-id) true The identifier of a specific project.
    participantId path string true The identifier of a specific participant.

    Example responses

    400 Response

    Responses
    Status Meaning Description Schema
    204 No Content The participant was removed. None
    400 Bad Request The request was invalid. Cannot delete the last owner. A project must have at least one owner. error2
    404 Not Found The project or participant does not exist. error2

    Activities

    Contains the operations for an Activity resource.

    Get project activities

    Code samples

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

    GET /projects/{projectId}/activities

    Returns a list of project activities. Standard paging, filtering, and options are available. The media type of the returned collection items is application/vnd.sas.project.activity. Default sorting for this collection is timeStamp:ascending. HEAD is also supported and returns status and headers only.

    Parameters
    Name In Type Required Description
    projectId path string(object-id) true The identifier of a specific project.
    start query integer(int64) false The offset of the first activity to return. The default is 0.
    limit query integer(int64) false Maximum number of activities to return. The default is 20.
    filter query string(filter-criteria) false The criteria for filtering the activities. See Filtering in REST APIs.
    sortBy query string(sort-criteria) false The criteria for sorting the activities. See Sorting in REST APIs.
    since query string(date-time) false To get activities occurred since the timestamp.

    Example responses

    200 Response

    {
      "name": "string",
      "start": 0,
      "limit": 0,
      "count": 0,
      "accept": "string",
      "links": [
        {
          "method": "string",
          "rel": "string",
          "uri": "string",
          "href": "string",
          "title": "string",
          "type": "string",
          "itemType": "string",
          "responseType": "string",
          "responseItemType": "string"
        }
      ],
      "version": 0,
      "items": [
        {
          "resourceUri": "https://example.com",
          "resourceName": "string",
          "resourceType": "string",
          "projectUris": [
            "https://example.com"
          ],
          "action": "string",
          "user": "string",
          "timeStamp": "2019-08-24T14:15:22Z",
          "properties": {
            "property1": "string",
            "property2": "string"
          },
          "version": 0
        }
      ]
    }
    
    Responses
    Status Meaning Description Schema
    200 OK The request succeeded. The project activities were returned. activityCollection
    404 Not Found The project does not exist. error2

    Get activities across all projects

    Code samples

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

    GET /activities

    Returns a list of activities across all projects. Standard paging, filtering, and options are available. The media type of the returned collection items is application/vnd.sas.project.activity. Default sorting for this collection is timeStamp:ascending. HEAD is also supported and returns status and headers only.

    Parameters
    Name In Type Required Description
    start query integer(int64) false The offset of the first activity to return. The default is 0.
    limit query integer(int64) false Maximum number of activities to return. The default is 20.
    filter query string(filter-criteria) false The criteria for filtering the activities. See Filtering in REST APIs.
    sortBy query string(sort-criteria) false The criteria for sorting the activities. See Sorting in REST APIs.
    resourceUri query string(uri) false Return activities with the specified resourceUri.
    since query string(date-time) false To get activities occurred since the timestamp.

    Example responses

    200 Response

    {
      "name": "string",
      "start": 0,
      "limit": 0,
      "count": 0,
      "accept": "string",
      "links": [
        {
          "method": "string",
          "rel": "string",
          "uri": "string",
          "href": "string",
          "title": "string",
          "type": "string",
          "itemType": "string",
          "responseType": "string",
          "responseItemType": "string"
        }
      ],
      "version": 0,
      "items": [
        {
          "resourceUri": "https://example.com",
          "resourceName": "string",
          "resourceType": "string",
          "projectUris": [
            "https://example.com"
          ],
          "action": "string",
          "user": "string",
          "timeStamp": "2019-08-24T14:15:22Z",
          "properties": {
            "property1": "string",
            "property2": "string"
          },
          "version": 0
        }
      ]
    }
    
    Responses
    Status Meaning Description Schema
    200 OK Returned project activities. activityCollection

    Roles

    Contains the operations for a Role resource.

    Get the set of valid roles for a project

    Code samples

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

    GET /roles

    Returns the set of valid roles for participants of a project. The media type of the returned collection items is application/vnd.sas.project.role. Default sorting for this collection is name:ascending. HEAD is also supported and returns status and headers only.

    Parameters
    Name In Type Required Description
    start query integer(int64) false The offset of the first role to return. The default is 0.
    limit query integer(int64) false Maximum number of roles to return. The default is 20.
    sortBy query string(sort-criteria) false The criteria for sorting the activities. See Sorting in REST APIs.

    Example responses

    200 Response

    {
      "name": "string",
      "start": 0,
      "limit": 0,
      "count": 0,
      "accept": "string",
      "links": [
        {
          "method": "string",
          "rel": "string",
          "uri": "string",
          "href": "string",
          "title": "string",
          "type": "string",
          "itemType": "string",
          "responseType": "string",
          "responseItemType": "string"
        }
      ],
      "version": 0,
      "items": [
        {
          "id": "string",
          "name": "string",
          "description": "string",
          "version": 0
        }
      ]
    }
    
    Responses
    Status Meaning Description Schema
    200 OK The request succeeded. The set of valid roles for participants of a project was returned. roleCollection

    Root

    Contains the operation for the root resource.

    Code samples

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

    GET /

    Returns a list of links to the top-level collections through the API. HEAD is also supported and returns status and headers only.

    Example responses

    200 Response

    {
      "version": 1,
      "links": [
        {
          "method": "string",
          "rel": "string",
          "uri": "string",
          "href": "string",
          "title": "string",
          "type": "string",
          "itemType": "string",
          "responseType": "string",
          "responseItemType": "string"
        }
      ]
    }
    
    Status Meaning Description Schema
    200 OK The request succeeded. api
    404 Not Found The request was invalid. The service is not available. error2

    FixUp

    Synchronizes a projects database with folders.

    Code samples

    # You can also use wget
    curl -X PUT https://example.com/projects/projects/@root \
      -H 'Authorization: Bearer <access-token-goes-here>' \
      -H 'Accept: text/plain'
    
    
    
    const headers = {
      'Accept':'text/plain'
    };
    
    fetch('https://example.com/projects/projects/@root',
    {
      method: 'PUT',
    
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    import requests
    headers = {
      'Accept': 'text/plain'
    }
    
    r = requests.put('https://example.com/projects/projects/@root', headers = headers)
    
    print(r.json())
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Accept": []string{"text/plain"},
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("PUT", "https://example.com/projects/projects/@root", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    

    PUT /projects/@root

    This endpoint is used when the "Projects" folder has been deleted from the Folder service by an administrator. All of the projects need to be restored. Restarting the projects service restores the "Projects" folder, but not all the folders that were in it prior to deletion. This end point restores these folders.

    Example responses

    400 Response

    {"message":"string","id":"string","errorCode":0,"httpStatusCode":0,"details":["string"],"remediation":"string","errors":[null],"links":[{"method":"string","rel":"string","uri":"string","href":"string","title":"string","type":"string","itemType":"string","responseType":"string","responseItemType":"string"}],"version":0}
    
    {
      "message": "string",
      "id": "string",
      "errorCode": 0,
      "httpStatusCode": 0,
      "details": [
        "string"
      ],
      "remediation": "string",
      "errors": [
        null
      ],
      "links": [
        {
          "method": "string",
          "rel": "string",
          "uri": "string",
          "href": "string",
          "title": "string",
          "type": "string",
          "itemType": "string",
          "responseType": "string",
          "responseItemType": "string"
        }
      ],
      "version": 0
    }
    
    Responses
    Status Meaning Description Schema
    200 OK The request succeeded. None
    400 Bad Request The request was invalid. error2

    Schemas

    createProject

    {
      "name": "string",
      "description": "string",
      "imageUri": "https://example.com",
      "properties": {
        "property1": "string",
        "property2": "string"
      },
      "version": 0
    }
    
    

    Create Project

    Properties
    Name Type Required Restrictions Description
    name string true none The identifier of a specific project.
    description string false none The project's description.
    imageUri string(uri) false none URI to image used as the project avatar. If a URI is not supplied on a POST request, then a default URI is substituted. Null or blank values are allowed on a PUT request.
    properties object false none Additional properties that could be specified for the project.
    » additionalProperties string false none none
    version integer false none The version of the object.

    updateProject

    {
      "name": "string",
      "description": "string",
      "imageUri": "https://example.com",
      "properties": {
        "property1": "string",
        "property2": "string"
      },
      "version": 0,
      "id": "string"
    }
    
    

    Update Project

    Properties

    allOf

    Name Type Required Restrictions Description
    anonymous createProject false none The representation used to create a new project.

    and

    Name Type Required Restrictions Description
    anonymous object false none none
    » id string(object-id) false none The identifier of a specific project.

    project

    {
      "name": "string",
      "description": "string",
      "imageUri": "https://example.com",
      "properties": {
        "property1": "string",
        "property2": "string"
      },
      "version": 0,
      "id": "string",
      "folderUri": "https://example.com",
      "userCount": 0,
      "groupCount": 0,
      "createdBy": "string",
      "creationTimeStamp": "2019-08-24T14:15:22Z",
      "modifiedBy": "string",
      "modifiedTimeStamp": "2019-08-24T14:15:22Z",
      "links": [
        {
          "method": "string",
          "rel": "string",
          "uri": "string",
          "href": "string",
          "title": "string",
          "type": "string",
          "itemType": "string",
          "responseType": "string",
          "responseItemType": "string"
        }
      ]
    }
    
    

    Project

    Properties
    Name Type Required Restrictions Description
    Project any false none The representation of a project.

    allOf

    Name Type Required Restrictions Description
    anonymous updateProject false none The representation used to update a project.

    and

    Name Type Required Restrictions Description
    anonymous object false none none
    » folderUri string(uri) false none URI of the project's folder. This is a read-only property.
    » userCount integer false none The number of participants in the project with type 'user'. This is a read-only property.
    » groupCount integer false none The number of participants in the project with type 'group'. This is a read-only property.
    » createdBy string false none The user who created this project.
    » creationTimeStamp string(date-time) false none The timestamp of the project's creation.
    » modifiedBy string false none The user who last modified this project.
    » modifiedTimeStamp string(date-time) false none The timestamp of the last project modification.
    » links links false none Links to related resources and operations.

    createResource

    {
      "resourceUri": "https://example.com",
      "version": 0,
      "properties": {
        "property1": "string",
        "property2": "string"
      }
    }
    
    

    Create Resource

    Properties
    Name Type Required Restrictions Description
    resourceUri string(uri) true none The URI of the item that the resource represents.
    version integer false none The version of the object.
    properties object false none Additional properties that could be specified for the resource.
    » additionalProperties string false none none

    updateResource

    {
      "resourceUri": "https://example.com",
      "version": 0,
      "properties": {
        "property1": "string",
        "property2": "string"
      },
      "id": "string"
    }
    
    

    Update Resource

    Properties

    allOf

    Name Type Required Restrictions Description
    anonymous createResource false none The representation used to create a new resource.

    and

    Name Type Required Restrictions Description
    anonymous object false none none
    » id string(object-id) false none The identifier of a specific resource.

    resource

    {
      "resourceUri": "https://example.com",
      "version": 0,
      "properties": {
        "property1": "string",
        "property2": "string"
      },
      "id": "string",
      "name": "string",
      "description": "string",
      "contentType": "string",
      "statusCode": 0,
      "errorMessage": "string",
      "createdBy": "string",
      "creationTimeStamp": "2019-08-24T14:15:22Z",
      "modifiedBy": "string",
      "modifiedTimeStamp": "2019-08-24T14:15:22Z",
      "links": [
        {
          "method": "string",
          "rel": "string",
          "uri": "string",
          "href": "string",
          "title": "string",
          "type": "string",
          "itemType": "string",
          "responseType": "string",
          "responseItemType": "string"
        }
      ]
    }
    
    

    Resource

    Properties
    Name Type Required Restrictions Description
    Resource any false none The representation of a resource.

    allOf

    Name Type Required Restrictions Description
    anonymous updateResource false none The representation used to update a resource.

    and

    Name Type Required Restrictions Description
    anonymous object false none none
    » name string false none Name of the resource object. This attribute is read-only and is obtained from the target object if possible. This attribute cannot be used in a filter query.
    » description string false none Description of the resource object. This attribute is read-only and is obtained from the target object if possible. This attribute cannot be used in a filter query.
    » contentType string false none Resource object type. This should match a type from the Types service. This attribute is read-only and is obtained from the target object if possible. This attribute cannot be used in a filter query.
    » statusCode integer false none HTTP status code returned by the resourceUri. This is a read-only property.
    » errorMessage string false none Error message returned by the resourceUri. This is a read-only property.
    » createdBy string false none The user who added the resource.
    » creationTimeStamp string(date-time) false none The timestamp of the resource object's creation.
    » modifiedBy string false none The user who last updated the resource.
    » modifiedTimeStamp string(date-time) false none The timestamp of the last resource object modification.
    » links links false none Links to related resources and operations.

    createParticipant

    {
      "identityUri": "https://example.com",
      "role": "contributor",
      "version": 0
    }
    
    

    Create Participant

    Properties
    Name Type Required Restrictions Description
    identityUri string(uri) true none The URI of the participant. This must be a valid URI pointing to a user or group from the Identities service.
    role string false none The role of the participant in the project.
    version integer false none The version of the object.
    Enumerated Values
    Property Value
    role owner
    role contributor

    updateParticipant

    {
      "id": "string",
      "role": "contributor",
      "version": 0
    }
    
    

    Update Participant

    Properties
    Name Type Required Restrictions Description
    id string(object-id) false none The identifier of a specific participant.
    role string false none The role of the participant in the project.
    version integer false none The version of the object.
    Enumerated Values
    Property Value
    role owner
    role contributor

    participant

    {
      "id": "string",
      "identityUri": "https://example.com",
      "role": "contributor",
      "version": 0,
      "name": "string",
      "type": "user",
      "avatarUri": "https://example.com",
      "createdBy": "string",
      "creationTimeStamp": "2019-08-24T14:15:22Z",
      "modifiedBy": "string",
      "modifiedTimeStamp": "2019-08-24T14:15:22Z",
      "links": [
        {
          "method": "string",
          "rel": "string",
          "uri": "string",
          "href": "string",
          "title": "string",
          "type": "string",
          "itemType": "string",
          "responseType": "string",
          "responseItemType": "string"
        }
      ]
    }
    
    

    Participant

    Properties
    Name Type Required Restrictions Description
    id string(object-id) false none The identifier of a specific participant.
    identityUri string(uri) false none The URI of the participant. This must be a valid URI pointing to a user or group from the Identities service.
    role string false none The role of the participant in the project.
    version integer false none The version of the object.
    name string false none The name of the participant. This attribute is read-only and is obtained from the Identities service. This attribute cannot be used in a filter query.
    type string false none The type of participant from the Identities service. This attribute is read-only and is obtained from the Identities service. This attribute cannot be used in a filter query.
    avatarUri string(uri) false none The participant avatar URI. This attribute is read-only and is obtained from the Identities service. This attribute cannot be used in a filter query.
    createdBy string false none The user who added this participant.
    creationTimeStamp string(date-time) false none The timestamp of the participant object's creation.
    modifiedBy string false none The user who last updated this participant.
    modifiedTimeStamp string(date-time) false none The timestamp of the last participant object modification.
    links links false none Links to related resources and operations.
    Enumerated Values
    Property Value
    role owner
    role contributor
    type user
    type group

    activity

    {
      "resourceUri": "https://example.com",
      "resourceName": "string",
      "resourceType": "string",
      "projectUris": [
        "https://example.com"
      ],
      "action": "string",
      "user": "string",
      "timeStamp": "2019-08-24T14:15:22Z",
      "properties": {
        "property1": "string",
        "property2": "string"
      },
      "version": 0
    }
    
    

    Activity

    Properties
    Name Type Required Restrictions Description
    resourceUri string(uri) false none The URI of the resource that is the target of this activity.
    resourceName string false none The name of the resource that is the target of this activity.
    resourceType string false none The type of the resource that is the target of this activity.
    projectUris [string] false none The URIs of the projects containing the resource that is the target of this activity.
    action string false none The action associated with this activity (such as create, update, and delete.).
    user string false none The authenticated user that triggered the activity.
    timeStamp string(date-time) false none The date and time that the activity was triggered.
    properties object false none Additional properties that could be specified for the activity type.
    » additionalProperties string false none none
    version integer false none The version of the object.

    role

    {
      "id": "string",
      "name": "string",
      "description": "string",
      "version": 0
    }
    
    

    Role

    Properties
    Name Type Required Restrictions Description
    id string false none The identifier of a specific role.
    name string false none The localized name of the role.
    description string false none The localized description of the role.
    version integer false none The version of the object.

    projectCollection

    {
      "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": [
        {
          "name": "string",
          "description": "string",
          "imageUri": "https://example.com",
          "properties": {
            "property1": "string",
            "property2": "string"
          },
          "version": 0,
          "id": "string",
          "folderUri": "https://example.com",
          "userCount": 0,
          "groupCount": 0,
          "createdBy": "string",
          "creationTimeStamp": "2019-08-24T14:15:22Z",
          "modifiedBy": "string",
          "modifiedTimeStamp": "2019-08-24T14:15:22Z",
          "links": [
            {
              "method": "string",
              "rel": "string",
              "uri": "string",
              "href": "string",
              "title": "string",
              "type": "string",
              "itemType": "string",
              "responseType": "string",
              "responseItemType": "string"
            }
          ]
        }
      ]
    }
    
    

    Project Collection

    Properties
    Name Type Required Restrictions Description
    Project Collection any false none A collection of project representations.

    allOf

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

    and

    Name Type Required Restrictions Description
    anonymous object false none none
    » items [project] false none The array of project representations.

    resourceCollection

    {
      "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": [
        {
          "resourceUri": "https://example.com",
          "version": 0,
          "properties": {
            "property1": "string",
            "property2": "string"
          },
          "id": "string",
          "name": "string",
          "description": "string",
          "contentType": "string",
          "statusCode": 0,
          "errorMessage": "string",
          "createdBy": "string",
          "creationTimeStamp": "2019-08-24T14:15:22Z",
          "modifiedBy": "string",
          "modifiedTimeStamp": "2019-08-24T14:15:22Z",
          "links": [
            {
              "method": "string",
              "rel": "string",
              "uri": "string",
              "href": "string",
              "title": "string",
              "type": "string",
              "itemType": "string",
              "responseType": "string",
              "responseItemType": "string"
            }
          ]
        }
      ]
    }
    
    

    Resource Collection

    Properties
    Name Type Required Restrictions Description
    Resource Collection any false none A collection of resource representations.

    allOf

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

    and

    Name Type Required Restrictions Description
    anonymous object false none none
    » items [resource] false none The array of resource representations.

    participantCollection

    {
      "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": [
        {
          "id": "string",
          "identityUri": "https://example.com",
          "role": "contributor",
          "version": 0,
          "name": "string",
          "type": "user",
          "avatarUri": "https://example.com",
          "createdBy": "string",
          "creationTimeStamp": "2019-08-24T14:15:22Z",
          "modifiedBy": "string",
          "modifiedTimeStamp": "2019-08-24T14:15:22Z",
          "links": [
            {
              "method": "string",
              "rel": "string",
              "uri": "string",
              "href": "string",
              "title": "string",
              "type": "string",
              "itemType": "string",
              "responseType": "string",
              "responseItemType": "string"
            }
          ]
        }
      ]
    }
    
    

    Participant Collection

    Properties
    Name Type Required Restrictions Description
    Participant Collection any false none A collection of participant representations.

    allOf

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

    and

    Name Type Required Restrictions Description
    anonymous object false none none
    » items [participant] false none The array of participant representations.

    activityCollection

    {
      "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": [
        {
          "resourceUri": "https://example.com",
          "resourceName": "string",
          "resourceType": "string",
          "projectUris": [
            "https://example.com"
          ],
          "action": "string",
          "user": "string",
          "timeStamp": "2019-08-24T14:15:22Z",
          "properties": {
            "property1": "string",
            "property2": "string"
          },
          "version": 0
        }
      ]
    }
    
    

    Activity Collection

    Properties
    Name Type Required Restrictions Description
    Activity Collection any false none A collection of activity representations.

    allOf

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

    and

    Name Type Required Restrictions Description
    anonymous object false none none
    » items [activity] false none The array of activity representations.

    roleCollection

    {
      "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": [
        {
          "id": "string",
          "name": "string",
          "description": "string",
          "version": 0
        }
      ]
    }
    
    

    Role Collection

    Properties
    Name Type Required Restrictions Description
    Role Collection any false none A collection of role representations.

    allOf

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

    and

    Name Type Required Restrictions Description
    anonymous object false none none
    » items [role] false none The array of role representations.

    baseCollection

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

    None

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

    Links

    Properties
    Name Type Required Restrictions Description
    Links [link] false none Links to related resources and operations.

    api

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

    API

    Properties
    Name Type Required Restrictions Description
    version integer true none The version number of the API representation. This is version 1.
    links [link] true none The API's top-level links.

    error

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

    None

    baseCollection2

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

    Base Collection

    Properties
    Name Type Required Restrictions Description
    name string false none The name of the collection.
    start integer(int64) false none The zero-based index of the first item in the collection.
    limit integer false none The number of items that were requested for the collection.
    count integer(int64) false none If populated indicates the number of items in the collection.
    accept string false none A space-delimited list of media types from which an Accept header may be constructed.
    links [link] false none The links that apply to the collection.
    version integer false none The version number of the collection representation. This representation is version 2.

    error2

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

    Error

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

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

    Link

    Properties
    Name Type Required Restrictions Description
    method string false none The HTTP method for the link.
    rel string true none The relationship of the link to the resource.
    uri string false none The relative URI for the link.
    href string false none The URL for the link.
    title string false none The title for the link.
    type string false none The media type or link type for the link.
    itemType string false none If this is a link to a container, itemType is the media type or link type for the items in the container.
    responseType string false none The media type or link type of the response body for a PUT, POST, or PATCH operation.
    responseItemType string false none The media type or link type of the items in the response body for a PUT, POST, or PATCH operation.

    Examples

    Github Examples

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

    Media Type Samples

    Externally Defined Media Types
    application/vnd.sas.api

    The application/vnd.sas.api media type is returned from a GET of the top-level context. It contains the links for basic operations on the service.

    The link relations for the base URL (root of the API).

    Relation Method Description
    projects GET Returns a collection of projects.
    URI: /projects/projects.
    Item type: application/vnd.sas.project.summary.
    Response type: application/vnd.sas.collection.
    createProject POST Creates a new project.
    URI: /projects/projects.
    Response Type: application/vnd.sas.project
    activity GET Returns a collection of activities across all projects.
    URI: /projects/activities.
    Item type: application/vnd.sas.project.activity.
    Response Type: application/vnd.sas.collection.
    roles GET Returns a collection of valid roles for project participants.
    URI: /projects/roles.
    Item type: application/vnd.sas.project.role.
    Response Type: application/vnd.sas.collection.
    application/vnd.sas.project

    The application/vnd.sas.project media type represents the data describing a project.

    Relation Method Description
    self GET Retrieves the project resource.
    URI: /projects/projects/{projectId}.
    Response Type: application/vnd.sas.project.
    alternate GET Retrieves the project summary resource.
    URI: /projects/projects/{projectId}.
    Response Type: application/vnd.sas.project.summary.
    update PUT Updates the project resource.
    URI: /projects/project/{projectId}.
    Response Type: application/vnd.sas.project.
    delete DELETE Deletes the project resource.
    URI: /projects/projects/{projectId}.
    folder GET Retrieves the underlying folder for the project.
    URI: /folders/folders/{folderId}.
    Response Type: application/vnd.sas.content.folder.
    resources GET Retrieves the project resources.
    URI: /projects/projects/{projectId}/resources.
    Response Type: application/vnd.sas.collection.
    Item Type: application/vnd.sas.project.resource.
    addResource POST Adds a new project resource.
    URI: /projects/projects/{projectId}/resources.
    Response Type: application/vnd.sas.project.resource.
    participants GET Retrieves the project participants.
    URI: /projects/projects/{projectId}/participants.
    Response Type: application/vnd.sas.collection.
    Item Type: application/vnd.sas.project.participant.
    addParticipant POST Adds a new project participant.
    URI: /projects/projects/{projectId}/participants.
    Response Type: application/vnd.sas.project.participant.
    comments GET Retrieves the comments attached to the project.
    URI: /comments/comments?resourceUri={projectUri}.
    Response Type: application/vnd.sas.collection.
    Item Type: application/vnd.sas.comment.
    createComment POST Creates a comment attached to the project.
    URI: /comments/comments.
    Response Type: application/vnd.sas.comment.
    activities GET Retrieves the project-related activities.
    URI: /projects/projects/{projectId}/activities.
    Response Type: application/vnd.sas.collection.
    Item Type: application/vnd.sas.project.activity.
    application/vnd.sas.project.summary

    The application/vnd.sas.project.summary media type describes the summary details of a project.

    application/vnd.sas.project.summary has the following links of the application/vnd.sas.project media type: * self * delete

    The following links of application/vnd.sas.project are not included: * alternate * update * folder * resources * addResource * participants * addParticipant * comments * createComment * activities

    application/vnd.sas.project.resource

    The application/vnd.sas.project.resource media type describes data representing a resource contained in a project. These are resource references that are persisted directly in the Project Service and not the backing folder.

    Relation Method Description
    self GET Retrieves the resource.
    URI: /projects/projects/{projectId}/resources/{resourceId}.
    Response Type: application/vnd.sas.project.resource.
    update PUT Updates the resource.
    URI: /projects/projects/{projectId}/resources/{resourceId}.
    Response Type: application/vnd.sas.project.resource.
    delete DELETE Deletes a resource.
    URI: /projects/projects/{projectId}/resources/{resourceId}.
    projects GET Retrieves the projects containing the resource.
    URI: /projects/projects?resourceUri={resourceUri}.
    Response Type: application/vnd.sas.collection.
    Item Type: application/vnd.sas.project.summary.
    up GET Gets the parent project.
    URI: /projects/projects/{projectId}.
    Response Type: application/vnd.sas.project.
    application/vnd.sas.project.participant

    The application/vnd.sas.project.participant media type describes data representing a participant associated with a project.

    Relation Method Description
    self GET Retrieves the participant data.
    URI: /projects/projects/{projectId}/participants/{participantId}.
    Response Type: [application/vnd.sas.project.participant](#application-vnd.sas.project.participant.
    update PUT Updates the participant data.
    URI: /projects/projects/{projectId}/participants/{participantId}.
    Response Type: application/vnd.sas.project.participant.
    delete DELETE Deletes the participant data.
    URI: /projects/projects/{projectId}/participants/{participantId}.
    projects GET Retrieves the projects containing this participant.
    URI: /projects/projects?identityUri={identityUri}.
    Response Type: application/vnd.sas.collection.
    Item Type: application/vnd.sas.project.summary.
    up GET Gets the participant's project.
    URI: /projects/projects/{projectId}.
    Response Type: application/vnd.sas.project.
    application/vnd.sas.project.activity

    The application/vnd.sas.project.activity media type represents the data describing certain events related to a project. These could be created/modified/deleted events for the project itself, a participant or resource, or a member of the underlying folder. These activities could be used to display an "activity feed", allowing users to see relevant information about changes to projects, including changes to their participants and content.

    There are no links associated with activities as they are not mutable, and they are not individually retrievable.

    application/vnd.sas.project.role

    The application/vnd.sas.project.role media type represents a valid role for participants that are added to projects. Roles determine the level of permissions that a participant has within the project.

    There are no links associated with roles as they are not mutable, and they are not individually retrievable.

    Methods in this API that operate on a collection support the following features: * Pagination - The default page limit is set to 50 for all collections. This limit can be modified by specifying the ?limit query parameter when applicable. * Sorting- A default sort order of ascending by name is automatically applied to the contents of the collections. An alternate sort order can be specified via the ?sortBy query parameter. A sort order can be applied only to the simple fields of a resource. Methods within this API do not support the various strength options as outlined by the sorting guidelines. * Filtering - An optional ?filter parameter can be specified to query the exact set of items that should be included within the collection. Standard functional notation is supported. * Standard functions are supported. * The list of fields that can be searched on for projects by default include the following: name, description, creationTimeStamp, modifiedTimeStamp * Example query strings are listed below: * Filter by the name field of a project - ?filter=contains(name,"myProject") * Filter by the name field startingWith - ?filter=startsWith(name,"myProj") * Filter by name or description field - ?filter=or(contains(name,"myProject"),contains(description,"my project"))

    Collection Resources
    Path: /projects

    This API provides collections of projects.

    The projects representation is application/vnd.sas.collection.

    The response includes the following links:

    Relation Method Description
    collection GET Returns a link to the collection of projects.
    Response type: application/vnd.sas.collection.
    self GET Returns a link to the current page in the collection of projects.
    Response type: application/vnd.sas.collection.
    first GET Returns a link to the first page of collection results.
    Response type: application/vnd.sas.collection.
    prev GET Returns a link to the previous page of collection results.
    Response type: application/vnd.sas.collection.
    next GET Returns a link to the next page of collection results.
    Response type: application/vnd.sas.collection.
    last GET Returns a link to the last page of collection results.
    Response type: application/vnd.sas.collection.
    Path: /projects/{projectId}/resources

    This API provides collections of project resources.

    The resources representation is application/vnd.sas.collection.

    The response includes the following links:

    Relation Method Description
    collection GET Returns a link to the collection.
    Response type: application/vnd.sas.collection.
    self GET Returns a link to the current page in the collection.
    Response type: application/vnd.sas.collection.
    first GET Returns a link to the first page of collection results.
    Response type: application/vnd.sas.collection.
    prev GET Returns a link to the previous page of collection results.
    Response type: application/vnd.sas.collection.
    next GET Returns a link to the next page of collection results.
    Response type: application/vnd.sas.collection.
    last GET Returns a link to the last page of collection results.
    Response type: application/vnd.sas.collection.
    Path: /projects/{projectId}/participants

    This API provides collections of project participants.

    The participants representation is application/vnd.sas.collection.

    The response includes the following links:

    Relation Method Description
    collection GET Returns a link to the collection.
    Response type: application/vnd.sas.collection.
    self GET Returns a link to the current page in the collection.
    Response type: application/vnd.sas.collection.
    first GET Returns a link to the first page of collection results.
    Response type: application/vnd.sas.collection.
    prev GET Returns a link to the previous page of collection results.
    Response type: application/vnd.sas.collection.
    next GET Returns a link to the next page of collection results.
    Response type: application/vnd.sas.collection.
    last GET Returns a link to the last page of collection results.
    Response type: application/vnd.sas.collection.
    Path: /projects/{projectId}/activities

    This API provides collections of project activities.

    The activities representation is application/vnd.sas.collection.

    The response includes the following links:

    Relation Method Description
    collection GET Returns a link to the collection.
    Response type: application/vnd.sas.collection.
    self GET Returns a link to the current page in the collection.
    Response type: application/vnd.sas.collection.
    first GET Returns a link to the first page of collection results.
    Response type: application/vnd.sas.collection.
    prev GET Returns a link to the previous page of collection results.
    Response type: application/vnd.sas.collection.
    next GET Returns a link to the next page of collection results.
    Response type: application/vnd.sas.collection.
    last GET Returns a link to the last page of collection results.
    Response type: application/vnd.sas.collection.
    Path: /activities

    This API provides collections of activities.

    The activities representation is application/vnd.sas.collection.

    The response includes the following links:

    Relation Method Description
    collection GET Returns a link to the collection.
    Response type: application/vnd.sas.collection.
    self GET Returns a link to the current page in the collection.
    Response type: application/vnd.sas.collection.
    first GET Returns a link to the first page of collection results.
    Response type: application/vnd.sas.collection.
    prev GET Returns a link to the previous page of collection results.
    Response type: application/vnd.sas.collection.
    next GET Returns a link to the next page of collection results.
    Response type: application/vnd.sas.collection.
    last GET Returns a link to the last page of collection results.
    Response type: application/vnd.sas.collection.
    Path: /roles

    This API provides collections of roles.

    The roles representation is application/vnd.sas.collection.

    The response includes the following links:

    Relation Method Description
    collection GET Returns a link to the collection.
    Response type: application/vnd.sas.collection.
    self GET Returns a link to the current page in the collection.
    Response type: application/vnd.sas.collection.
    first GET Returns a link to the first page of collection results.
    Response type: application/vnd.sas.collection.
    prev GET Returns a link to the previous page of collection results.
    Response type: application/vnd.sas.collection.
    next GET Returns a link to the next page of collection results.
    Response type: application/vnd.sas.collection.
    last GET Returns a link to the last page of collection results.
    Response type: application/vnd.sas.collection.
    Deletion Behavior

    When a project is deleted, the project, backing folder and all its content, resources, and participants are deleted. You do have the option to keep the backing folder.

    Since a project must have at least one participant with a role of "owner", the last owner cannot be deleted. It is possible to have a project with no owners, if the identity of that owner is deleted from the Identities service. The project would be visible only to administrators who could delete the project or add a new owner.

    Authorization Behavior

    The authorizations of the project folder are synchronized with the project's participants. Project owners and contributors have permissions to read the project folder, as well as to add and remove members. Project owners also have read/write/add/remove/delete permissions for everything underneath the project folder. Owners and contributors can also add and remove resources from the project, but no other authorizations are implied on these resources. It is expected that the underlying storage mechanisms for these resources enforce their own security.

    These authorizations are applied:

    /projects : authenticated-users: read

    /projects/projects : authenticated-users: read, create : Projects collection is filtered by read permission on individual projects

    /projects/projects/{projectId} : owners: read, update, delete : contributors: read

    /projects/projects/{projectId}/participants/** : owners: read, create, update, delete : contributors: read

    /projects/projects/{projectId}/resources/** : owners: read, create, update, delete : contributors: read, create, update, delete

    /projects/projects/{projectId}/activities/** : owners: read : contributors: read

    /projects/activities : authenticated-users: read : Activities collection is filtered by read permission on project associated with each activity

    /projects/roles : authenticated-users: read


    These authorizations are applied to the backing folder:

    /folders/folders/{folderId} : owners: read, add, remove : contributors: read, add, remove

    /folders/folders/{folderId}/** : owners: read, add, remove, update, delete : contributors: read, add, remove, update, delete

    Relationships

    Base URLs:

    Terms of service Email: SAS Developers Web: SAS Developers

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

    The Relationships API manages the storage and discovery of relationships, and the retrieval of networks of relationship data.

    Usage Notes

    Overview

    The Relationships API manages a repository of relationships, relationship types, and references.

    Relationships

    A relationship describes how two resources are connected. A relationship contains a subject resource, the related resource, and the relationship type.

    Relationship Types

    A relationship type describes the nature of the relationship between two resources. The relationship type includes a name, label, and description.

    Relationships are either directional or non-directional. Directional relationships have a different role from related resource to the subject. For directional relationships, a partner name, partner label, and partner description are provided. Non-directional relationships have the same role to and from the subject to the related resource.

    The set of relationship types is immutable.

    The relationships types:

    Type Name Label Description Partner Label Partner Description Directional
    Dependent Is dependent on An object is dependent on another object when it cannot function or be defined without that related object being present. For example, a job could be dependent on a table. Impacts This object impacts the other. true
    Contains Contains An object contains another object when the included object does not exist without the object that includes it. For example, a table contains a column. Is contained by Is contained by the other. true
    Parent Is parent of An object is the parent of any object that cannot be located or found within a hierarchy without the parent object. Is child of Is the child of the other. true
    Version Has a version of This relationship relates an object to a version of this object. Is version of This object is a version of the other. true
    Associated Is associated with An object is associated with another object through a known or unknown system or method. For example, a table is associated with another table via foreign key -> primary key false
    Equivalent Is equal to An object is equal to another object if it represents the same object accessed through another method or system. false
    Synonymous Is synonymous with An object is synonymous with another object if it is alike in meaning or significance. false
    References

    A reference is a metadata representation of a data asset or process. Networks of relationship data can contain URI references to multiple resources.

    References can also contain metadata about resources from third-party applications for which the metadata would not be immediately available to users of this API.

    Because the metadata about references is in the relationships repository, the metadata and the relationships network can be quickly retrieved.

    A reference must have a resource URI and a content type. The resource URI is an address for the location of resource. The content type identifies the type of resource referenced, and typically corresponds to a registered type in the Object Type Registry Service.

    The relationships service assigns an ID to the reference. The reference ID is used in the {referenceId} in the resource paths in this API, and the "id" member of a reference. The reference has an analysis time stamp indicating the time that the relationships for this resource were obtained. The reference can also have a source. The source is an indicator of the context from where this referenced resource was obtained. For example, a table modeled by Erwin in model.erx and stored in Oracle can be used by SAS for reporting and used by a third-party application for an ETL process. An import from each source would result in four references. The sources would be model.erx, JDBC connection information, sas, and the name of the third-party file or connection.

    The reference caches information about the resource, including name, createdBy, modifiedBy, createdTimeStamp, modifiedTimeStamp. The created and modified members contain the user ID that created or modified the referenced resource. For third-party resources where the user ID of the original resource is unavailable, the user ID from the create/update request is used. The time stamps are the created and modified time stamps of the referenced resource. For third-party resources where an original time stamp is unavailable, the time stamp of the source file or the analysis time stamp is used.

    Error Codes

    The Relationships API uses the standard error response type application/vnd.sas.error to propagate all error messages and codes to the consumer.

    The range of error codes assigned to the Relationships API is: 10600 - 10699

    HTTP Status Code Error Code Description
    400 10600 No resource exists at the specified path.
    400 10601 The JSON Patch is invalid.
    400 10602 Invalid direction parameter. Valid values: to, from, both.
    409 10603 A reference exists with the specified resource URI.
    409 10604 A reference exists with the specified ID.
    409 10605 A reference exists with a different id using the specified resource URI.
    412 10606 The reference has been updated after you retrieved it.
    412 10607 The value of the "if-match" header does not match the value of the current item.
    404 10608 The reference was not found.
    409 10609 A relationship exists with the specified relationship ID.
    409 10610 A relationship exists with the specified resource URI, and related resource URI.
    404 10611 Relationship type not found.
    409 10612 The resource URI has already been added during this request.
    404 10613 The relationship was not found.
    400 10614 Only one of resourceUri or referenceId is allowed.
    400 10615 If direction is provided, either resourceUri or referenceId must also be provided.
    400 10616 An invalid patch operation was provided. This endpoint supports only "remove" operations.
    400 10617 The ID in the URI does not match the ID in the body of the request.
    412 10618 The PUT request must include an Etag in the "if-match" header or a last-modified timestamp in the "if-unmodified-since" header.
    409 10619 A relationship already exists between the specified resource URI and the related resource URI.
    409 10620 A job is already running.
    404 10621 Job was not found.
    400 10622 Invalid search options.

    Security

    The Relationships API follows the common rules for SAS REST APIs, and requires authentication for all operations.

    GET operations are allowed for all authenticated users.

    POST, PUT, and DELETE operations require that a user be a SAS administrator or a SAS service.

    Operations

    Root

    The operations for root.

    Code samples

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

    GET /

    Returns a list of links to the top-level collections surfaced through this API. These top level links will include "relationships", "types", and "references".

    Authorization: Any authenticated user.

    Name In Type Required Description
    Accept header string false The desired representation for the response.
    Enumerated Values
    Parameter Value
    Accept application/vnd.sas.api+json
    Accept application/json

    Example responses

    The root response consists of a collection of links that can be used to navigate the Relationships service API.

    {
      "version": 1,
      "links": [
        {
          "method": "GET",
          "rel": "types",
          "href": "/relationships/types",
          "uri": "/relationships/types",
          "type": "application/vnd.sas.collection",
          "itemType": "application/vnd.sas.relationship.type"
        },
        {
          "method": "GET",
          "rel": "references",
          "href": "/relationships/references",
          "uri": "/relationships/references",
          "type": "application/vnd.sas.collection",
          "itemType": "application/vnd.sas.relationship.reference"
        },
        {
          "method": "POST",
          "rel": "createReference",
          "href": "/relationships/references",
          "uri": "/relationships/references",
          "type": "application/vnd.sas.relationship.reference",
          "responseType": "application/vnd.sas.relationship.reference"
        },
        {
          "method": "POST",
          "rel": "createReferences",
          "href": "/relationships/references",
          "uri": "/relationships/references",
          "type": "application/vnd.sas.collection",
          "responseType": "application/vnd.sas.collection",
          "itemType": "application/vnd.sas.relationship.reference",
          "responseItemType": "application/vnd.sas.relationship.reference"
        },
        {
          "method": "GET",
          "rel": "relationships",
          "href": "/relationships/relationships",
          "uri": "/relationships/relationships",
          "type": "application/vnd.sas.collection",
          "itemType": "application/vnd.sas.relationship"
        },
        {
          "method": "POST",
          "rel": "createRelationship",
          "href": "/relationships/relationships",
          "uri": "/relationships/relationships",
          "type": "application/vnd.sas.relationship",
          "responseType": "application/vnd.sas.relationship"
        },
        {
          "method": "POST",
          "rel": "createRelationships",
          "href": "/relationships/relationships",
          "uri": "/relationships/relationships",
          "type": "application/vnd.sas.collection",
          "responseType": "application/vnd.sas.collection",
          "itemType": "application/vnd.sas.relationship",
          "responseItemType": "application/vnd.sas.relationship"
        },
        {
          "method": "POST",
          "rel": "startLoad",
          "href": "/relationships/jobs",
          "uri": "/relationships/jobs",
          "type": "application/vnd.sas.relationship.job.load",
          "responseType": "application/vnd.sas.relationship.job.load"
        }
      ]
    }
    
    {
      "version": 1,
      "links": [
        {
          "method": "GET",
          "rel": "types",
          "href": "/relationships/types",
          "uri": "/relationships/types",
          "type": "application/vnd.sas.collection",
          "itemType": "application/vnd.sas.relationship.type"
        },
        {
          "method": "GET",
          "rel": "references",
          "href": "/relationships/references",
          "uri": "/relationships/references",
          "type": "application/vnd.sas.collection",
          "itemType": "application/vnd.sas.relationship.reference"
        },
        {
          "method": "POST",
          "rel": "createReference",
          "href": "/relationships/references",
          "uri": "/relationships/references",
          "type": "application/vnd.sas.relationship.reference",
          "responseType": "application/vnd.sas.relationship.reference"
        },
        {
          "method": "POST",
          "rel": "createReferences",
          "href": "/relationships/references",
          "uri": "/relationships/references",
          "type": "application/vnd.sas.collection",
          "responseType": "application/vnd.sas.collection",
          "itemType": "application/vnd.sas.relationship.reference",
          "responseItemType": "application/vnd.sas.relationship.reference"
        },
        {
          "method": "GET",
          "rel": "relationships",
          "href": "/relationships/relationships",
          "uri": "/relationships/relationships",
          "type": "application/vnd.sas.collection",
          "itemType": "application/vnd.sas.relationship"
        },
        {
          "method": "POST",
          "rel": "createRelationship",
          "href": "/relationships/relationships",
          "uri": "/relationships/relationships",
          "type": "application/vnd.sas.relationship",
          "responseType": "application/vnd.sas.relationship"
        },
        {
          "method": "POST",
          "rel": "createRelationships",
          "href": "/relationships/relationships",
          "uri": "/relationships/relationships",
          "type": "application/vnd.sas.collection",
          "responseType": "application/vnd.sas.collection",
          "itemType": "application/vnd.sas.relationship",
          "responseItemType": "application/vnd.sas.relationship"
        },
        {
          "method": "POST",
          "rel": "startLoad",
          "href": "/relationships/jobs",
          "uri": "/relationships/jobs",
          "type": "application/vnd.sas.relationship.job.load",
          "responseType": "application/vnd.sas.relationship.job.load"
        }
      ]
    }
    
    Status Meaning Description Schema
    200 OK OK. api
    404 Not Found The service was not avaialable. None
    Response Headers
    Status Header Type Format Description
    200 Content-Type string The media type of the response body.

    Relationships Management

    The operations for relationships management.

    Get a paginated list of relationships

    Code samples

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

    GET /relationships

    Returns a paginated collection of relationships. The subject(s) are specified using either the resourceUri or the referenceId query parameter. Using resourceUri or referenceId in the filter parameter can conflict with the resourceUri or referenceId query parameter. Standard paging, filtering, and sorting options are provided. The media type of the returned items in the collection is application/vnd.sas.relationship+json. References may also be queried using POST /relationships#withQuery with the query string in the request body.

    Parameters
    Name In Type Required Description
    resourceUri query string false The subject or subjects for which to get relationships. Specify multiple subjects by using the `'
    referenceId query string false The ID of the subject or subjects for which to get relationships. Specify multiple subjects by using the `'
    depth query integer(int32) false How deep to traverse the relationships tree. A value >1 specifies a recursive traversal through the list of related resources up to the specified depth. A value of -1 returns all relationships for all resources. The default setting is 1, which returns only direct relationships of the resource.
    direction query string false The direction of the relationships to return. A relationship is defined as a resource URI "to" a related resource URI. A direction value of "from" returns relationships where the resource(s) indicated by the resourceUri or referenceId parameter is the related resource. A value of "both" returns all relationships that include the resource(s) indicated by the resourceUri or referenceId parameter.
    start query integer(int64) false The 0-based start index of a paginated request.
    limit query integer(int32) false The maximum number of items to return in this request.
    sortBy query string(sort-criteria) false The sort criteria for returned relationships. Supports the following fields in either ascending or descending order: id, type, resourceUri, referenceId, relatedResourceUri, relatedReferenceId, source, modifiedTimeStamp, creationTimeStamp, createdBy, modifiedBy.
    filter query string(filter-criteria) false An expression for filtering the collection. Valid expressions include eq(member,"string"). Allowed members: id, resourceUri, type, relatedResourceUri, source, resource.type. The resource.type criteria is applied to each resource and related resource. When depth > 1, the relationship type and resource.type criteria are applied at each level. Relationships that are filtered out for a given level are not used to search the next level.
    Detailed descriptions

    resourceUri: The subject or subjects for which to get relationships. Specify multiple subjects by using the '|' separator.

    referenceId: The ID of the subject or subjects for which to get relationships. Specify multiple subjects by using the '|' separator.

    depth: How deep to traverse the relationships tree. A value >1 specifies a recursive traversal through the list of related resources up to the specified depth. A value of -1 returns all relationships for all resources. The default setting is 1, which returns only direct relationships of the resource.

    direction: The direction of the relationships to return. A relationship is defined as a resource URI "to" a related resource URI. A direction value of "from" returns relationships where the resource(s) indicated by the resourceUri or referenceId parameter is the related resource. A value of "both" returns all relationships that include the resource(s) indicated by the resourceUri or referenceId parameter.

    Example responses

    A collection of relationships.

    {
      "version": 2,
      "accept": "application/vnd.sas.relationship",
      "count": 3021,
      "start": 0,
      "limit": 2,
      "name": "items",
      "items": [
        {
          "creationTimeStamp": "2022-11-18T20:48:29.987Z",
          "createdBy": "sasuser",
          "modifiedTimeStamp": "2022-11-18T20:48:29.987Z",
          "modifiedBy": "sasuser",
          "id": "001a6075-617d-40a0-aae0-96e9db639a26",
          "links": [
            {
              "method": "GET",
              "rel": "self",
              "href": "/relationships/relationships/001a6075-617d-40a0-aae0-96e9db639a26",
              "uri": "/relationships/relationships/001a6075-617d-40a0-aae0-96e9db639a26",
              "type": "application/vnd.sas.relationship"
            },
            {
              "method": "DELETE",
              "rel": "delete",
              "href": "/relationships/relationships/001a6075-617d-40a0-aae0-96e9db639a26",
              "uri": "/relationships/relationships/001a6075-617d-40a0-aae0-96e9db639a26"
            },
            {
              "method": "PUT",
              "rel": "update",
              "href": "/relationships/relationships/001a6075-617d-40a0-aae0-96e9db639a26",
              "uri": "/relationships/relationships/001a6075-617d-40a0-aae0-96e9db639a26",
              "type": "application/vnd.sas.relationship",
              "responseType": "application/vnd.sas.relationship"
            },
            {
              "method": "GET",
              "rel": "up",
              "href": "/relationships/relationships",
              "uri": "/relationships/relationships",
              "type": "application/vnd.sas.collection",
              "itemType": "application/vnd.sas.relationship"
            }
          ],
          "resourceUri": "/dataTables/dataSources/Compute~fs~99e703fb-eeaa-43cb-ab9a-21f65b83a0e8~fs~DEMO_TGT/tables/NY_CLUSTERS/columns/LATLONG",
          "type": "Contains",
          "relatedResourceUri": "/catalog/instances/9dfc07c9-88a1-43dc-a3d9-19a4cdba3fc7",
          "referenceId": "f28417bd-5c5b-864d-82b3-923cd1671741",
          "relatedReferenceId": "9dfc07c9-88a1-43dc-a3d9-19a4cdba3fc7",
          "version": 1
        },
        {
          "creationTimeStamp": "2022-11-17T09:25:04.033Z",
          "createdBy": "sasuser",
          "modifiedTimeStamp": "2022-11-17T09:25:04.033Z",
          "modifiedBy": "sasuser",
          "id": "001bc483-2dc4-4707-860d-5107abd3e460",
          "links": [
            {
              "method": "GET",
              "rel": "self",
              "href": "/relationships/relationships/001bc483-2dc4-4707-860d-5107abd3e460",
              "uri": "/relationships/relationships/001bc483-2dc4-4707-860d-5107abd3e460",
              "type": "application/vnd.sas.relationship"
            },
            {
              "method": "DELETE",
              "rel": "delete",
              "href": "/relationships/relationships/001bc483-2dc4-4707-860d-5107abd3e460",
              "uri": "/relationships/relationships/001bc483-2dc4-4707-860d-5107abd3e460"
            },
            {
              "method": "PUT",
              "rel": "update",
              "href": "/relationships/relationships/001bc483-2dc4-4707-860d-5107abd3e460",
              "uri": "/relationships/relationships/001bc483-2dc4-4707-860d-5107abd3e460",
              "type": "application/vnd.sas.relationship",
              "responseType": "application/vnd.sas.relationship"
            },
            {
              "method": "GET",
              "rel": "up",
              "href": "/relationships/relationships",
              "uri": "/relationships/relationships",
              "type": "application/vnd.sas.collection",
              "itemType": "application/vnd.sas.relationship"
            }
          ],
          "resourceUri": "/casManagement/servers/cas-shared-default/caslibs/COMMON_PROD/tables/CONTACTS_ONLY",
          "type": "Equivalent",
          "relatedResourceUri": "/dataTables/dataSources/cas~fs~cas-shared-default~fs~COMMON_PROD/tables/CONTACTS_ONLY",
          "referenceId": "b5fbc8bf-57c2-4166-ae7c-bbfd2fc226eb",
          "relatedReferenceId": "c06dfdc9-1990-4df0-a7ec-ec517b7d9847",
          "version": 1
        }
      ],
      "links": [
        {
          "method": "GET",
          "rel": "self",
          "href": "/relationships/relationships?start=0&limit=2&sortBy=id",
          "uri": "/relationships/relationships?start=0&limit=2&sortBy=id",
          "type": "application/vnd.sas.collection",
          "itemType": "application/vnd.sas.relationship"
        },
        {
          "method": "GET",
          "rel": "collection",
          "href": "/relationships/relationships",
          "uri": "/relationships/relationships",
          "type": "application/vnd.sas.collection",
          "itemType": "application/vnd.sas.relationship"
        },
        {
          "method": "GET",
          "rel": "up",
          "href": "/relationships",
          "uri": "/relationships",
          "type": "application/vnd.sas.api"
        },
        {
          "method": "POST",
          "rel": "create",
          "href": "/relationships/relationships",
          "uri": "/relationships/relationships",
          "type": "application/vnd.sas.relationship",
          "responseType": "application/vnd.sas.relationship"
        },
        {
          "method": "GET",
          "rel": "next",
          "href": "/relationships/relationships?limit=2&sortBy=id&start=2",
          "uri": "/relationships/relationships?limit=2&sortBy=id&start=2",
          "type": "application/vnd.sas.collection",
          "itemType": "application/vnd.sas.relationship"
        }
      ]
    }
    
    {
      "version": 2,
      "accept": "application/vnd.sas.relationship",
      "count": 3021,
      "start": 0,
      "limit": 2,
      "name": "items",
      "items": [
        {
          "creationTimeStamp": "2022-11-18T20:48:29.987Z",
          "createdBy": "sasuser",
          "modifiedTimeStamp": "2022-11-18T20:48:29.987Z",
          "modifiedBy": "sasuser",
          "id": "001a6075-617d-40a0-aae0-96e9db639a26",
          "links": [
            {
              "method": "GET",
              "rel": "self",
              "href": "/relationships/relationships/001a6075-617d-40a0-aae0-96e9db639a26",
              "uri": "/relationships/relationships/001a6075-617d-40a0-aae0-96e9db639a26",
              "type": "application/vnd.sas.relationship"
            },
            {
              "method": "DELETE",
              "rel": "delete",
              "href": "/relationships/relationships/001a6075-617d-40a0-aae0-96e9db639a26",
              "uri": "/relationships/relationships/001a6075-617d-40a0-aae0-96e9db639a26"
            },
            {
              "method": "PUT",
              "rel": "update",
              "href": "/relationships/relationships/001a6075-617d-40a0-aae0-96e9db639a26",
              "uri": "/relationships/relationships/001a6075-617d-40a0-aae0-96e9db639a26",
              "type": "application/vnd.sas.relationship",
              "responseType": "application/vnd.sas.relationship"
            },
            {
              "method": "GET",
              "rel": "up",
              "href": "/relationships/relationships",
              "uri": "/relationships/relationships",
              "type": "application/vnd.sas.collection",
              "itemType": "application/vnd.sas.relationship"
            }
          ],
          "resourceUri": "/dataTables/dataSources/Compute~fs~99e703fb-eeaa-43cb-ab9a-21f65b83a0e8~fs~DEMO_TGT/tables/NY_CLUSTERS/columns/LATLONG",
          "type": "Contains",
          "relatedResourceUri": "/catalog/instances/9dfc07c9-88a1-43dc-a3d9-19a4cdba3fc7",
          "referenceId": "f28417bd-5c5b-864d-82b3-923cd1671741",
          "relatedReferenceId": "9dfc07c9-88a1-43dc-a3d9-19a4cdba3fc7",
          "version": 1
        },
        {
          "creationTimeStamp": "2022-11-17T09:25:04.033Z",
          "createdBy": "sasuser",
          "modifiedTimeStamp": "2022-11-17T09:25:04.033Z",
          "modifiedBy": "sasuser",
          "id": "001bc483-2dc4-4707-860d-5107abd3e460",
          "links": [
            {
              "method": "GET",
              "rel": "self",
              "href": "/relationships/relationships/001bc483-2dc4-4707-860d-5107abd3e460",
              "uri": "/relationships/relationships/001bc483-2dc4-4707-860d-5107abd3e460",
              "type": "application/vnd.sas.relationship"
            },
            {
              "method": "DELETE",
              "rel": "delete",
              "href": "/relationships/relationships/001bc483-2dc4-4707-860d-5107abd3e460",
              "uri": "/relationships/relationships/001bc483-2dc4-4707-860d-5107abd3e460"
            },
            {
              "method": "PUT",
              "rel": "update",
              "href": "/relationships/relationships/001bc483-2dc4-4707-860d-5107abd3e460",
              "uri": "/relationships/relationships/001bc483-2dc4-4707-860d-5107abd3e460",
              "type": "application/vnd.sas.relationship",
              "responseType": "application/vnd.sas.relationship"
            },
            {
              "method": "GET",
              "rel": "up",
              "href": "/relationships/relationships",
              "uri": "/relationships/relationships",
              "type": "application/vnd.sas.collection",
              "itemType": "application/vnd.sas.relationship"
            }
          ],
          "resourceUri": "/casManagement/servers/cas-shared-default/caslibs/COMMON_PROD/tables/CONTACTS_ONLY",
          "type": "Equivalent",
          "relatedResourceUri": "/dataTables/dataSources/cas~fs~cas-shared-default~fs~COMMON_PROD/tables/CONTACTS_ONLY",
          "referenceId": "b5fbc8bf-57c2-4166-ae7c-bbfd2fc226eb",
          "relatedReferenceId": "c06dfdc9-1990-4df0-a7ec-ec517b7d9847",
          "version": 1
        }
      ],
      "links": [
        {
          "method": "GET",
          "rel": "self",
          "href": "/relationships/relationships?start=0&limit=2&sortBy=id",
          "uri": "/relationships/relationships?start=0&limit=2&sortBy=id",
          "type": "application/vnd.sas.collection",
          "itemType": "application/vnd.sas.relationship"
        },
        {
          "method": "GET",
          "rel": "collection",
          "href": "/relationships/relationships",
          "uri": "/relationships/relationships",
          "type": "application/vnd.sas.collection",
          "itemType": "application/vnd.sas.relationship"
        },
        {
          "method": "GET",
          "rel": "up",
          "href": "/relationships",
          "uri": "/relationships",
          "type": "application/vnd.sas.api"
        },
        {
          "method": "POST",
          "rel": "create",
          "href": "/relationships/relationships",
          "uri": "/relationships/relationships",
          "type": "application/vnd.sas.relationship",
          "responseType": "application/vnd.sas.relationship"
        },
        {
          "method": "GET",
          "rel": "next",
          "href": "/relationships/relationships?limit=2&sortBy=id&start=2",
          "uri": "/relationships/relationships?limit=2&sortBy=id&start=2",
          "type": "application/vnd.sas.collection",
          "itemType": "application/vnd.sas.relationship"
        }
      ]
    }
    

    Bad request (the request is not well-formed).

    {
      "details": [
        "The filter 'contains(id,'6293390f-8f76-4620-afc1-29a94d09fb83'' is not valid.",
        "path: /relationships/relationships",
        "correlator: cfd05e5d-1b05-49a2-b9af-460c86ecc993"
      ],
      "errorCode": 1104,
      "httpStatusCode": 400,
      "message": "Bad Request",
      "version": 2
    }
    
    Responses
    Status Meaning Description Schema
    200 OK Ok. relationshipCollection
    400 Bad Request Bad request (the request is not well-formed). error2
    Response Headers
    Status Header Type Format Description
    200 Content-Type string The media type of the response body.
    200 Last-Modified string date-time The time stamp in EEE, dd MMM yyyy HH:mm:ss GMT format when the relationship was last modified.

    Add a relationship

    Code samples

    # You can also use wget
    curl -X POST https://example.com/relationships/relationships \
      -H 'Authorization: Bearer <access-token-goes-here>' \
      -H 'Content-Type: application/vnd.sas.relationship+json' \
      -H 'Accept: application/vnd.sas.relationship+json'
    
    
    const inputBody = '{
      "version": 1,
      "resourceUri": "/containers/containerUri",
      "relatedResourceUri": "/items/item1Uri",
      "type": "Contains"
    }';
    const headers = {
      'Content-Type':'application/vnd.sas.relationship+json',
      'Accept':'application/vnd.sas.relationship+json'
    };
    
    fetch('https://example.com/relationships/relationships',
    {
      method: 'POST',
      body: inputBody,
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    import requests
    headers = {
      'Content-Type': 'application/vnd.sas.relationship+json',
      'Accept': 'application/vnd.sas.relationship+json'
    }
    
    r = requests.post('https://example.com/relationships/relationships', headers = headers)
    
    print(r.json())
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Content-Type": []string{"application/vnd.sas.relationship+json"},
            "Accept": []string{"application/vnd.sas.relationship+json"},
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("POST", "https://example.com/relationships/relationships", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    

    POST /relationships

    Adds a new relationship. A relationship requires a resource, a related resource and the relationship type. A resource can be specified by either a resource URI or a reference ID. The related resource can be defined by either a related resource URI or a related reference ID. Relationship uniqueness is defined by the combination of the resource and the related resource. If an invalid reference ID is provided a 404 is returned. If a reference does not exist for a resource URI a reeference will be created. When possible, additional resource information is queried and added to the reference. For resources external to the SAS system, the client should provide additional reference information. Attempting to add a relationship that already exists leaves the existing relationship unchanged.

    Body parameter

    Create a relationship between two references.

    {
      "version": 1,
      "resourceUri": "/containers/containerUri",
      "relatedResourceUri": "/items/item1Uri",
      "type": "Contains"
    }
    
    Parameters
    Name In Type Required Description
    body body createRelationship true A relationship.

    Example responses

    A relationship.

    {
      "creationTimeStamp": "2022-11-17T09:25:04.033Z",
      "modifiedTimeStamp": "2022-11-17T09:25:04.033Z",
      "id": "001bc483-2dc4-4707-860d-5107abd3e460",
      "links": [
        {
          "method": "GET",
          "rel": "self",
          "href": "/relationships/relationships/001bc483-2dc4-4707-860d-5107abd3e460",
          "uri": "/relationships/relationships/001bc483-2dc4-4707-860d-5107abd3e460",
          "type": "application/vnd.sas.relationship"
        },
        {
          "method": "DELETE",
          "rel": "delete",
          "href": "/relationships/relationships/001bc483-2dc4-4707-860d-5107abd3e460",
          "uri": "/relationships/relationships/001bc483-2dc4-4707-860d-5107abd3e460"
        },
        {
          "method": "PUT",
          "rel": "update",
          "href": "/relationships/relationships/001bc483-2dc4-4707-860d-5107abd3e460",
          "uri": "/relationships/relationships/001bc483-2dc4-4707-860d-5107abd3e460",
          "type": "application/vnd.sas.relationship",
          "responseType": "application/vnd.sas.relationship"
        },
        {
          "method": "GET",
          "rel": "up",
          "href": "/relationships/relationships",
          "uri": "/relationships/relationships",
          "type": "application/vnd.sas.collection",
          "itemType": "application/vnd.sas.relationship"
        }
      ],
      "resourceUri": "/casManagement/servers/cas-shared-default/caslibs/COMMON_PROD/tables/CONTACTS_ONLY",
      "type": "Equivalent",
      "relatedResourceUri": "/dataTables/dataSources/cas~fs~cas-shared-default~fs~COMMON_PROD/tables/CONTACTS_ONLY",
      "referenceId": "b5fbc8bf-57c2-4166-ae7c-bbfd2fc226eb",
      "relatedReferenceId": "c06dfdc9-1990-4df0-a7ec-ec517b7d9847",
      "version": 1
    }
    
    {
      "creationTimeStamp": "2022-11-17T09:25:04.033Z",
      "modifiedTimeStamp": "2022-11-17T09:25:04.033Z",
      "id": "001bc483-2dc4-4707-860d-5107abd3e460",
      "links": [
        {
          "method": "GET",
          "rel": "self",
          "href": "/relationships/relationships/001bc483-2dc4-4707-860d-5107abd3e460",
          "uri": "/relationships/relationships/001bc483-2dc4-4707-860d-5107abd3e460",
          "type": "application/vnd.sas.relationship"
        },
        {
          "method": "DELETE",
          "rel": "delete",
          "href": "/relationships/relationships/001bc483-2dc4-4707-860d-5107abd3e460",
          "uri": "/relationships/relationships/001bc483-2dc4-4707-860d-5107abd3e460"
        },
        {
          "method": "PUT",
          "rel": "update",
          "href": "/relationships/relationships/001bc483-2dc4-4707-860d-5107abd3e460",
          "uri": "/relationships/relationships/001bc483-2dc4-4707-860d-5107abd3e460",
          "type": "application/vnd.sas.relationship",
          "responseType": "application/vnd.sas.relationship"
        },
        {
          "method": "GET",
          "rel": "up",
          "href": "/relationships/relationships",
          "uri": "/relationships/relationships",
          "type": "application/vnd.sas.collection",
          "itemType": "application/vnd.sas.relationship"
        }
      ],
      "resourceUri": "/casManagement/servers/cas-shared-default/caslibs/COMMON_PROD/tables/CONTACTS_ONLY",
      "type": "Equivalent",
      "relatedResourceUri": "/dataTables/dataSources/cas~fs~cas-shared-default~fs~COMMON_PROD/tables/CONTACTS_ONLY",
      "referenceId": "b5fbc8bf-57c2-4166-ae7c-bbfd2fc226eb",
      "relatedReferenceId": "c06dfdc9-1990-4df0-a7ec-ec517b7d9847",
      "version": 1
    }
    

    Bad request (the request is not well-formed).

    {
      "details": [
        "The required field \"resourceUri\" is empty. Specify a valid value.",
        "path: /relationships/references",
        "correlator: 449b1a7e-6780-445b-9ae6-23070189dd3a"
      ],
      "httpStatusCode": 400,
      "message": "Bad Request",
      "version": 2
    }
    

    The requested object already exists.

    {
      "details": [
        {
          "A relationship already exists with the specified endpoints": "c40c242b-952a-4750-838a-d7559192b558."
        },
        "path: /relationships/relationships",
        "correlator: c5290209-eaa2-45ca-af79-415a3390d999"
      ],
      "errorCode": 10603,
      "httpStatusCode": 409,
      "message": "Conflict",
      "version": 2
    }
    
    Responses
    Status Meaning Description Schema
    201 Created The relationship was added. relationship
    400 Bad Request Bad request (the request is not well-formed). error2
    409 Conflict The requested object already exists. error2
    Response Headers
    Status Header Type Format Description
    201 Location string Location (URL) of the new relationship.
    201 ETag string The entity tag for the relationship.
    201 Last-Modified string date-time The time stamp in EEE, dd MMM yyyy HH:mm:ss GMT format when the relationship was last modified.

    Delete relationships

    Code samples

    # You can also use wget
    curl -X PATCH https://example.com/relationships/relationships \
      -H 'Authorization: Bearer <access-token-goes-here>' \
      -H 'Content-Type: application/json-patch' \
      -H 'Accept: application/vnd.sas.error+json'
    
    
    const inputBody = '[
      {
        "op": "remove",
        "path": "/001bc483-2dc4-4707-860d-5107abd3e460"
      }
    ]';
    const headers = {
      'Content-Type':'application/json-patch',
      'Accept':'application/vnd.sas.error+json'
    };
    
    fetch('https://example.com/relationships/relationships',
    {
      method: 'PATCH',
      body: inputBody,
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    import requests
    headers = {
      'Content-Type': 'application/json-patch',
      'Accept': 'application/vnd.sas.error+json'
    }
    
    r = requests.patch('https://example.com/relationships/relationships', headers = headers)
    
    print(r.json())
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Content-Type": []string{"application/json-patch"},
            "Accept": []string{"application/vnd.sas.error+json"},
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("PATCH", "https://example.com/relationships/relationships", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    

    PATCH /relationships

    Delete a list of relationships. Uses a JSON Patch body with "op" : "remove" on a specific relationship ID. Clients which do not support PATCH can use POST and specify a query parameter of ?_method=PATCH. All referenced resources must exist for the PATCH to be applied.

    Body parameter

    Delete the requested items.

    [
      {
        "op": "remove",
        "path": "/001bc483-2dc4-4707-860d-5107abd3e460"
      }
    ]
    
    Parameters
    Name In Type Required Description
    body body multiDeleteCollection false The relationships.

    Example responses

    Bad request (the request is not well-formed).

    {
      "details": [
        "No resource exists at the specified path.  /001bc483-2dc4-4707-860d-5107abd3e460",
        "path: /relationships/relationships",
        "correlator: 300efa3c-68ea-4e1b-a0c6-a6310e7bf6a2"
      ],
      "errorCode": 10600,
      "httpStatusCode": 400,
      "message": "Bad Request",
      "version": 2
    }
    
    Responses
    Status Meaning Description Schema
    204 No Content Ok. The relationships were deleted. None
    400 Bad Request Bad request (the request is not well-formed). error2

    Check if relationship exists

    Code samples

    # You can also use wget
    curl -X HEAD https://example.com/relationships/relationships/{relationshipId} \
      -H 'Authorization: Bearer <access-token-goes-here>' \
      -H 'Accept: application/vnd.sas.error+json'
    
    
    
    const headers = {
      'Accept':'application/vnd.sas.error+json'
    };
    
    fetch('https://example.com/relationships/relationships/{relationshipId}',
    {
      method: 'HEAD',
    
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    import requests
    headers = {
      'Accept': 'application/vnd.sas.error+json'
    }
    
    r = requests.head('https://example.com/relationships/relationships/{relationshipId}', headers = headers)
    
    print(r.json())
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Accept": []string{"application/vnd.sas.error+json"},
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("HEAD", "https://example.com/relationships/relationships/{relationshipId}", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    

    HEAD /relationships/{relationshipId}

    Returns whether or not a relationship with the specified ID exists, along with appropriate headers.

    Parameters
    Name In Type Required Description
    relationshipId path string true The relationship ID.

    Example responses

    The specified resource was not found.

    {
      "details": [
        "path: /relationships/relationships/c48fff9b-2802-451e-82ea-00526952dcee",
        "correlator: a78e068d-bef1-405c-8984-d346e2881520"
      ],
      "errorCode": 10600,
      "httpStatusCode": 404,
      "message": "Not Found",
      "version": 2
    }
    
    Responses
    Status Meaning Description Schema
    200 OK Ok. The relationship exists. None
    404 Not Found No relationship exists at the requested path. error2
    Response Headers
    Status Header Type Format Description
    200 ETag string The entity tag for the relationship.
    200 Last-Modified string date-time The time stamp in EEE, dd MMM yyyy HH:mm:ss GMT format when the relationship was last modified.

    Get a relationship

    Code samples

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

    GET /relationships/{relationshipId}

    Returns an existing relationship.

    Parameters
    Name In Type Required Description
    relationshipId path string true The relationship ID.

    Example responses

    A relationship.

    {
      "creationTimeStamp": "2022-11-17T09:25:04.033Z",
      "modifiedTimeStamp": "2022-11-17T09:25:04.033Z",
      "id": "001bc483-2dc4-4707-860d-5107abd3e460",
      "links": [
        {
          "method": "GET",
          "rel": "self",
          "href": "/relationships/relationships/001bc483-2dc4-4707-860d-5107abd3e460",
          "uri": "/relationships/relationships/001bc483-2dc4-4707-860d-5107abd3e460",
          "type": "application/vnd.sas.relationship"
        },
        {
          "method": "DELETE",
          "rel": "delete",
          "href": "/relationships/relationships/001bc483-2dc4-4707-860d-5107abd3e460",
          "uri": "/relationships/relationships/001bc483-2dc4-4707-860d-5107abd3e460"
        },
        {
          "method": "PUT",
          "rel": "update",
          "href": "/relationships/relationships/001bc483-2dc4-4707-860d-5107abd3e460",
          "uri": "/relationships/relationships/001bc483-2dc4-4707-860d-5107abd3e460",
          "type": "application/vnd.sas.relationship",
          "responseType": "application/vnd.sas.relationship"
        },
        {
          "method": "GET",
          "rel": "up",
          "href": "/relationships/relationships",
          "uri": "/relationships/relationships",
          "type": "application/vnd.sas.collection",
          "itemType": "application/vnd.sas.relationship"
        }
      ],
      "resourceUri": "/casManagement/servers/cas-shared-default/caslibs/COMMON_PROD/tables/CONTACTS_ONLY",
      "type": "Equivalent",
      "relatedResourceUri": "/dataTables/dataSources/cas~fs~cas-shared-default~fs~COMMON_PROD/tables/CONTACTS_ONLY",
      "referenceId": "b5fbc8bf-57c2-4166-ae7c-bbfd2fc226eb",
      "relatedReferenceId": "c06dfdc9-1990-4df0-a7ec-ec517b7d9847",
      "version": 1
    }
    
    {
      "creationTimeStamp": "2022-11-17T09:25:04.033Z",
      "modifiedTimeStamp": "2022-11-17T09:25:04.033Z",
      "id": "001bc483-2dc4-4707-860d-5107abd3e460",
      "links": [
        {
          "method": "GET",
          "rel": "self",
          "href": "/relationships/relationships/001bc483-2dc4-4707-860d-5107abd3e460",
          "uri": "/relationships/relationships/001bc483-2dc4-4707-860d-5107abd3e460",
          "type": "application/vnd.sas.relationship"
        },
        {
          "method": "DELETE",
          "rel": "delete",
          "href": "/relationships/relationships/001bc483-2dc4-4707-860d-5107abd3e460",
          "uri": "/relationships/relationships/001bc483-2dc4-4707-860d-5107abd3e460"
        },
        {
          "method": "PUT",
          "rel": "update",
          "href": "/relationships/relationships/001bc483-2dc4-4707-860d-5107abd3e460",
          "uri": "/relationships/relationships/001bc483-2dc4-4707-860d-5107abd3e460",
          "type": "application/vnd.sas.relationship",
          "responseType": "application/vnd.sas.relationship"
        },
        {
          "method": "GET",
          "rel": "up",
          "href": "/relationships/relationships",
          "uri": "/relationships/relationships",
          "type": "application/vnd.sas.collection",
          "itemType": "application/vnd.sas.relationship"
        }
      ],
      "resourceUri": "/casManagement/servers/cas-shared-default/caslibs/COMMON_PROD/tables/CONTACTS_ONLY",
      "type": "Equivalent",
      "relatedResourceUri": "/dataTables/dataSources/cas~fs~cas-shared-default~fs~COMMON_PROD/tables/CONTACTS_ONLY",
      "referenceId": "b5fbc8bf-57c2-4166-ae7c-bbfd2fc226eb",
      "relatedReferenceId": "c06dfdc9-1990-4df0-a7ec-ec517b7d9847",
      "version": 1
    }
    

    The specified resource was not found.

    {
      "details": [
        "path: /relationships/relationships/c48fff9b-2802-451e-82ea-00526952dcee",
        "correlator: a78e068d-bef1-405c-8984-d346e2881520"
      ],
      "errorCode": 10600,
      "httpStatusCode": 404,
      "message": "Not Found",
      "version": 2
    }
    
    Responses
    Status Meaning Description Schema
    200 OK Ok. relationship
    404 Not Found No relationship exists at the requested path. error2
    Response Headers
    Status Header Type Format Description
    200 ETag string The entity tag for the relationship.
    200 Last-Modified string date-time The time stamp in EEE, dd MMM yyyy HH:mm:ss GMT format when the relationship was last modified.

    Update a relationship

    Code samples

    # You can also use wget
    curl -X PUT https://example.com/relationships/relationships/{relationshipId} \
      -H 'Authorization: Bearer <access-token-goes-here>' \
      -H 'Content-Type: application/vnd.sas.relationship+json' \
      -H 'Accept: application/vnd.sas.relationship+json' \
      -H 'If-Match: string' \
      -H 'If-Unmodified-Since: string'
    
    
    const inputBody = '{
      "version": 1,
      "id": "39b040ad-6866-45f8-b49f-9829ac3d6c2c",
      "resourceUri": "/casManagement/servers/cas-shared-default/caslibs/COMMON_PROD/tables/CONTACTS_ONLY",
      "relatedResourceUri": "/dataTables/dataSources/cas~fs~cas-shared-default~fs~COMMON_PROD/tables/CONTACTS_ONLY",
      "type": "Equivalent"
    }';
    const headers = {
      'Content-Type':'application/vnd.sas.relationship+json',
      'Accept':'application/vnd.sas.relationship+json',
      'If-Match':'string',
      'If-Unmodified-Since':'string'
    };
    
    fetch('https://example.com/relationships/relationships/{relationshipId}',
    {
      method: 'PUT',
      body: inputBody,
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    import requests
    headers = {
      'Content-Type': 'application/vnd.sas.relationship+json',
      'Accept': 'application/vnd.sas.relationship+json',
      'If-Match': 'string',
      'If-Unmodified-Since': 'string'
    }
    
    r = requests.put('https://example.com/relationships/relationships/{relationshipId}', headers = headers)
    
    print(r.json())
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Content-Type": []string{"application/vnd.sas.relationship+json"},
            "Accept": []string{"application/vnd.sas.relationship+json"},
            "If-Match": []string{"string"},
            "If-Unmodified-Since": []string{"string"},
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("PUT", "https://example.com/relationships/relationships/{relationshipId}", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    

    PUT /relationships/{relationshipId}

    The PUT will fail if the ID in the body does match not the relationshipId. Only the type field can be updated.

    Body parameter

    Update a relationship between two references.

    {
      "version": 1,
      "id": "39b040ad-6866-45f8-b49f-9829ac3d6c2c",
      "resourceUri": "/casManagement/servers/cas-shared-default/caslibs/COMMON_PROD/tables/CONTACTS_ONLY",
      "relatedResourceUri": "/dataTables/dataSources/cas~fs~cas-shared-default~fs~COMMON_PROD/tables/CONTACTS_ONLY",
      "type": "Equivalent"
    }
    
    Parameters
    Name In Type Required Description
    relationshipId path string true The relationship ID.
    If-Match header string false The eEag that was returned from a GET, POST, or PUT of this relationship.
    If-Unmodified-Since header string false The value of the lastModified date of the relationship. If the relationship has been updated since this time, the update will fail.
    body body updateRelationship true The relationship.

    Example responses

    A relationship.

    {
      "creationTimeStamp": "2022-11-17T09:25:04.033Z",
      "modifiedTimeStamp": "2022-11-17T09:25:04.033Z",
      "id": "001bc483-2dc4-4707-860d-5107abd3e460",
      "links": [
        {
          "method": "GET",
          "rel": "self",
          "href": "/relationships/relationships/001bc483-2dc4-4707-860d-5107abd3e460",
          "uri": "/relationships/relationships/001bc483-2dc4-4707-860d-5107abd3e460",
          "type": "application/vnd.sas.relationship"
        },
        {
          "method": "DELETE",
          "rel": "delete",
          "href": "/relationships/relationships/001bc483-2dc4-4707-860d-5107abd3e460",
          "uri": "/relationships/relationships/001bc483-2dc4-4707-860d-5107abd3e460"
        },
        {
          "method": "PUT",
          "rel": "update",
          "href": "/relationships/relationships/001bc483-2dc4-4707-860d-5107abd3e460",
          "uri": "/relationships/relationships/001bc483-2dc4-4707-860d-5107abd3e460",
          "type": "application/vnd.sas.relationship",
          "responseType": "application/vnd.sas.relationship"
        },
        {
          "method": "GET",
          "rel": "up",
          "href": "/relationships/relationships",
          "uri": "/relationships/relationships",
          "type": "application/vnd.sas.collection",
          "itemType": "application/vnd.sas.relationship"
        }
      ],
      "resourceUri": "/casManagement/servers/cas-shared-default/caslibs/COMMON_PROD/tables/CONTACTS_ONLY",
      "type": "Equivalent",
      "relatedResourceUri": "/dataTables/dataSources/cas~fs~cas-shared-default~fs~COMMON_PROD/tables/CONTACTS_ONLY",
      "referenceId": "b5fbc8bf-57c2-4166-ae7c-bbfd2fc226eb",
      "relatedReferenceId": "c06dfdc9-1990-4df0-a7ec-ec517b7d9847",
      "version": 1
    }
    
    {
      "creationTimeStamp": "2022-11-17T09:25:04.033Z",
      "modifiedTimeStamp": "2022-11-17T09:25:04.033Z",
      "id": "001bc483-2dc4-4707-860d-5107abd3e460",
      "links": [
        {
          "method": "GET",
          "rel": "self",
          "href": "/relationships/relationships/001bc483-2dc4-4707-860d-5107abd3e460",
          "uri": "/relationships/relationships/001bc483-2dc4-4707-860d-5107abd3e460",
          "type": "application/vnd.sas.relationship"
        },
        {
          "method": "DELETE",
          "rel": "delete",
          "href": "/relationships/relationships/001bc483-2dc4-4707-860d-5107abd3e460",
          "uri": "/relationships/relationships/001bc483-2dc4-4707-860d-5107abd3e460"
        },
        {
          "method": "PUT",
          "rel": "update",
          "href": "/relationships/relationships/001bc483-2dc4-4707-860d-5107abd3e460",
          "uri": "/relationships/relationships/001bc483-2dc4-4707-860d-5107abd3e460",
          "type": "application/vnd.sas.relationship",
          "responseType": "application/vnd.sas.relationship"
        },
        {
          "method": "GET",
          "rel": "up",
          "href": "/relationships/relationships",
          "uri": "/relationships/relationships",
          "type": "application/vnd.sas.collection",
          "itemType": "application/vnd.sas.relationship"
        }
      ],
      "resourceUri": "/casManagement/servers/cas-shared-default/caslibs/COMMON_PROD/tables/CONTACTS_ONLY",
      "type": "Equivalent",
      "relatedResourceUri": "/dataTables/dataSources/cas~fs~cas-shared-default~fs~COMMON_PROD/tables/CONTACTS_ONLY",
      "referenceId": "b5fbc8bf-57c2-4166-ae7c-bbfd2fc226eb",
      "relatedReferenceId": "c06dfdc9-1990-4df0-a7ec-ec517b7d9847",
      "version": 1
    }
    

    Bad request (the request is not well-formed).

    {
      "details": [
        "The required field \"resourceUri\" is empty. Specify a valid value.",
        "path: /relationships/references",
        "correlator: 449b1a7e-6780-445b-9ae6-23070189dd3a"
      ],
      "httpStatusCode": 400,
      "message": "Bad Request",
      "version": 2
    }
    

    The specified resource was not found.

    {
      "details": [
        "path: /relationships/relationships/c48fff9b-2802-451e-82ea-00526952dcee",
        "correlator: a78e068d-bef1-405c-8984-d346e2881520"
      ],
      "errorCode": 10600,
      "httpStatusCode": 404,
      "message": "Not Found",
      "version": 2
    }
    

    The requested object already exists.

    {
      "details": [
        {
          "A relationship already exists with the specified endpoints": "c40c242b-952a-4750-838a-d7559192b558."
        },
        "path: /relationships/relationships",
        "correlator: c5290209-eaa2-45ca-af79-415a3390d999"
      ],
      "errorCode": 10603,
      "httpStatusCode": 409,
      "message": "Conflict",
      "version": 2
    }
    

    Precondition failed. The target has changed since it was last fetched.

    {
      "details": [
        "path: /relationships/relationships/c48fff9b-2802-451e-82ea-00526952dced",
        "correlator: a1cb6f8c-628b-4d25-ba3f-7a0407a58e5b"
      ],
      "httpStatusCode": 412,
      "message": "The header field \\\"If-Match\\\" has a value that is different from the entity tag for the resource. (The specified values are \\\"W/\\\"1669132124099132000\\\"\\\" and \\\"W/\\\"1669138300986000000\\\"\\\", respectively.)",
      "version": 2
    }
    

    Precondition required. Include an If-Match header with the request.

    {
      "details": [
        "path: /relationships/relationships/c48fff9b-2802-451e-82ea-00526952dced",
        "correlator: a1cb6f8c-628b-4d25-ba3f-7a0407a58e5b"
      ],
      "httpStatusCode": 428,
      "message": "The header field \\\"If-Match\\\" is missing or does not have a value.",
      "version": 2
    }
    
    Responses
    Status Meaning Description Schema
    200 OK Ok. relationship
    400 Bad Request Bad request (the request is not well-formed). error2
    404 Not Found No relationship exists at the requested path. error2
    409 Conflict A conflict exists with an existing relationship. error2
    412 Precondition Failed Precondition failed. The target has changed since it was last fetched. error2
    428 Precondition Required The request headers did not include an If-Match or If-Unmodified-Since precondition. error2
    Response Headers
    Status Header Type Format Description
    200 Location string Location (URL) of the new reference.
    200 ETag string The entity tag for the reference.
    200 Last-Modified string date-time The time stamp in EEE, dd MMM yyyy HH:mm:ss GMT format when the reference was last modified.

    Remove a relationship

    Code samples

    # You can also use wget
    curl -X DELETE https://example.com/relationships/relationships/{relationshipId}
      -H 'Authorization: Bearer <access-token-goes-here>' \
    
    
    
    fetch('https://example.com/relationships/relationships/{relationshipId}',
    {
      method: 'DELETE'
    
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    import requests
    
    r = requests.delete('https://example.com/relationships/relationships/{relationshipId}')
    
    print(r.json())
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("DELETE", "https://example.com/relationships/relationships/{relationshipId}", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    

    DELETE /relationships/{relationshipId}

    Removes the specified relationship. This operation will not remove references even if there are no relationships which use the referenced resource.

    Parameters
    Name In Type Required Description
    relationshipId path string true The relationship ID.
    Responses
    Status Meaning Description Schema
    204 No Content The relationship was deleted. None

    Update or create relationships

    Code samples

    # You can also use wget
    curl -X POST https://example.com/relationships/relationships#multiPost \
      -H 'Authorization: Bearer <access-token-goes-here>' \
      -H 'Content-Type: application/vnd.sas.collection+json' \
      -H 'Accept: application/vnd.sas.collection+json' \
      -H 'If-Unmodified-Since: string'
    
    
    const inputBody = '{
      "items": [
        {
          "resourceUri": "/containers/containerUri",
          "relatedResourceUri": "/terms/term1Uri",
          "type": "Associated"
        },
        {
          "resourceUri": "/containers/containerUri",
          "relatedResourceUri": "/items/item1Uri",
          "type": "Contains"
        },
        {
          "resourceUri": "/containers/containerUri",
          "relatedResourceUri": "/items/item2Uri",
          "type": "Contains"
        }
      ]
    }';
    const headers = {
      'Content-Type':'application/vnd.sas.collection+json',
      'Accept':'application/vnd.sas.collection+json',
      'If-Unmodified-Since':'string'
    };
    
    fetch('https://example.com/relationships/relationships#multiPost',
    {
      method: 'POST',
      body: inputBody,
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    import requests
    headers = {
      'Content-Type': 'application/vnd.sas.collection+json',
      'Accept': 'application/vnd.sas.collection+json',
      'If-Unmodified-Since': 'string'
    }
    
    r = requests.post('https://example.com/relationships/relationships#multiPost', headers = headers)
    
    print(r.json())
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Content-Type": []string{"application/vnd.sas.collection+json"},
            "Accept": []string{"application/vnd.sas.collection+json"},
            "If-Unmodified-Since": []string{"string"},
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("POST", "https://example.com/relationships/relationships#multiPost", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    

    POST /relationships#multiPost

    A relationship requires a resource, a related resource, and a relationship type. A resource can be specified by either a resource URI or a reference ID. The related resource can be defined by either a related resource URI or a related reference ID. Relationship uniqueness is defined by the combination of the resource and the related resource. When the ID is provided, this operation performs a full replacement of the relationship. When no ID is provided, and the relationship is not unique, the relationship is not updated. The parameter ?onConflict=update can be used to update existing relationships with a matching resource and related URIs. The ID field cannot be updated during this operation. The response is a collection of application/vnd.sas.relationship resources. When a resource creation or update fails, the collection includes an application/vnd.sas.error object that describes why the operation failed. If an invalid reference ID is provided a 404 is returned. If a reference does not exist for a resource URI a reeference will be created. When possible, additional resource information is queried and added to the reference. For resources external to the SAS system, the client should provide additional reference information. The media type application/vnd.sas.collection+json is required for this endpoint to prevent ambiguity with other POST operations to this collection.

    Body parameter

    Creates a collection of relationships.

    {
      "items": [
        {
          "resourceUri": "/containers/containerUri",
          "relatedResourceUri": "/terms/term1Uri",
          "type": "Associated"
        },
        {
          "resourceUri": "/containers/containerUri",
          "relatedResourceUri": "/items/item1Uri",
          "type": "Contains"
        },
        {
          "resourceUri": "/containers/containerUri",
          "relatedResourceUri": "/items/item2Uri",
          "type": "Contains"
        }
      ]
    }
    
    Parameters
    Name In Type Required Description
    onConflict query string false How to handle conflicts when a reference already exists.
    If-Unmodified-Since header string false The value of the lastModified date of the relationship. If the relationship has been updated since this time, the update will fail. This header is only required when the onConflict='update' parameter is specified, and is only applied to relationships being updated.
    body body createRelationshipCollection true A collection of application/vnd.sas.relationship resources.
    Enumerated Values
    Parameter Value
    onConflict update
    onConflict ignore

    Example responses

    Response contains created and updated representations of the request.

    {
      "version": 2,
      "accept": "application/vnd.sas.relationship+json application/vnd.sas.error",
      "count": 3,
      "start": 0,
      "limit": 3,
      "name": "items",
      "items": [
        {
          "version": 2,
          "httpStatusCode": 409,
          "errorCode": 10610,
          "message": "Conflict",
          "details": [
            "A relationship already exists with the specified endpoints: c40c242b-952a-4750-838a-d7559192b558"
          ]
        },
        {
          "creationTimeStamp": "2022-11-19T02:19:16.844Z",
          "createdBy": "sasuser",
          "modifiedTimeStamp": "2022-11-19T02:19:16.844Z",
          "modifiedBy": "sasuser",
          "id": "c40c242b-952a-4750-838a-d7559192b558",
          "links": [
            {
              "method": "GET",
              "rel": "self",
              "href": "/relationships/relationships/c40c242b-952a-4750-838a-d7559192b558",
              "uri": "/relationships/relationships/c40c242b-952a-4750-838a-d7559192b558",
              "type": "application/vnd.sas.relationship"
            },
            {
              "method": "DELETE",
              "rel": "delete",
              "href": "/relationships/relationships/c40c242b-952a-4750-838a-d7559192b558",
              "uri": "/relationships/relationships/c40c242b-952a-4750-838a-d7559192b558"
            },
            {
              "method": "PUT",
              "rel": "update",
              "href": "/relationships/relationships/c40c242b-952a-4750-838a-d7559192b558",
              "uri": "/relationships/relationships/c40c242b-952a-4750-838a-d7559192b558",
              "type": "application/vnd.sas.relationship",
              "responseType": "application/vnd.sas.relationship"
            },
            {
              "method": "GET",
              "rel": "up",
              "href": "/relationships/relationships",
              "uri": "/relationships/relationships",
              "type": "application/vnd.sas.collection",
              "itemType": "application/vnd.sas.relationship"
            }
          ],
          "resourceUri": "/containers/containerUri",
          "type": "Contains",
          "relatedResourceUri": "/items/item1Uri",
          "referenceId": "228dff66-0b62-4217-b686-a62ef881228a",
          "relatedReferenceId": "cdca263d-c7b3-494c-9868-191d81699414",
          "version": 1
        },
        {
          "creationTimeStamp": "2022-11-19T02:19:16.907Z",
          "createdBy": "sasuser",
          "modifiedTimeStamp": "2022-11-19T02:19:16.907Z",
          "modifiedBy": "sasuser",
          "id": "ce6a0656-c437-4ed0-9418-5a866908b53f",
          "links": [
            {
              "method": "GET",
              "rel": "self",
              "href": "/relationships/relationships/ce6a0656-c437-4ed0-9418-5a866908b53f",
              "uri": "/relationships/relationships/ce6a0656-c437-4ed0-9418-5a866908b53f",
              "type": "application/vnd.sas.relationship"
            },
            {
              "method": "DELETE",
              "rel": "delete",
              "href": "/relationships/relationships/ce6a0656-c437-4ed0-9418-5a866908b53f",
              "uri": "/relationships/relationships/ce6a0656-c437-4ed0-9418-5a866908b53f"
            },
            {
              "method": "PUT",
              "rel": "update",
              "href": "/relationships/relationships/ce6a0656-c437-4ed0-9418-5a866908b53f",
              "uri": "/relationships/relationships/ce6a0656-c437-4ed0-9418-5a866908b53f",
              "type": "application/vnd.sas.relationship",
              "responseType": "application/vnd.sas.relationship"
            },
            {
              "method": "GET",
              "rel": "up",
              "href": "/relationships/relationships",
              "uri": "/relationships/relationships",
              "type": "application/vnd.sas.collection",
              "itemType": "application/vnd.sas.relationship"
            }
          ],
          "resourceUri": "/containers/containerUri",
          "type": "Contains",
          "relatedResourceUri": "/items/item2Uri",
          "referenceId": "228dff66-0b62-4217-b686-a62ef881228a",
          "relatedReferenceId": "89d61f3d-f94b-47ca-9fdd-6bc1eb63c074",
          "version": 1
        }
      ],
      "links": [
        {
          "method": "GET",
          "rel": "self",
          "href": "/relationships/relationships?start=0&limit=10&sortBy=id",
          "uri": "/relationships/relationships?start=0&limit=10&sortBy=id",
          "type": "application/vnd.sas.collection",
          "itemType": "application/vnd.sas.relationship+json"
        },
        {
          "method": "GET",
          "rel": "collection",
          "href": "/relationships/relationships",
          "uri": "/relationships/relationships",
          "type": "application/vnd.sas.collection",
          "itemType": "application/vnd.sas.relationship+json"
        },
        {
          "method": "POST",
          "rel": "create",
          "href": "/relationships/relationships",
          "uri": "/relationships/relationships",
          "type": "application/vnd.sas.relationship",
          "responseType": "application/vnd.sas.relationship"
        }
      ]
    }
    

    Bad request (the request is not well-formed).

    {
      "details": [
        "Updates are not allowed for this relationship.",
        "path: /relationships/relationships",
        "correlator: 449b1a7e-6780-445b-9ae6-23070189dd3a"
      ],
      "httpStatusCode": 400,
      "message": "Bad Request",
      "version": 2
    }
    
    Responses
    Status Meaning Description Schema
    200 OK Ok. relationshipCollection
    400 Bad Request Bad request (the request is not well-formed). error2
    Response Headers
    Status Header Type Format Description
    200 Content-Type string The media type of the response body.

    Get paginated list of relationships via query

    Code samples

    # You can also use wget
    curl -X POST https://example.com/relationships/relationships#withQuery \
      -H 'Authorization: Bearer <access-token-goes-here>' \
      -H 'Content-Type: application/vnd.sas.relationship.query+json' \
      -H 'Accept: application/vnd.sas.collection+json'
    
    
    const inputBody = '{
      "referenceId": [
        "228dff66-0b62-4217-b686-a62ef881228a"
      ],
      "depth": 2,
      "direction": "both",
      "filter": "eq(type,'Associated')"
    }';
    const headers = {
      'Content-Type':'application/vnd.sas.relationship.query+json',
      'Accept':'application/vnd.sas.collection+json'
    };
    
    fetch('https://example.com/relationships/relationships#withQuery',
    {
      method: 'POST',
      body: inputBody,
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    import requests
    headers = {
      'Content-Type': 'application/vnd.sas.relationship.query+json',
      'Accept': 'application/vnd.sas.collection+json'
    }
    
    r = requests.post('https://example.com/relationships/relationships#withQuery', headers = headers)
    
    print(r.json())
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Content-Type": []string{"application/vnd.sas.relationship.query+json"},
            "Accept": []string{"application/vnd.sas.collection+json"},
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("POST", "https://example.com/relationships/relationships#withQuery", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    

    POST /relationships#withQuery

    Returns a paginated collection of relationships. Standard paging, filtering, and sorting options are provided. The media type of the returned items in the collection is application/vnd.sas.relationship+json. This call is an extended GET operation and therefore idempotent.

    Body parameter

    Query relationships with a relationship query.

    {
      "referenceId": [
        "228dff66-0b62-4217-b686-a62ef881228a"
      ],
      "depth": 2,
      "direction": "both",
      "filter": "eq(type,'Associated')"
    }
    
    Parameters
    Name In Type Required Description
    start query integer(int64) false The 0-based start index of a paginated request.
    limit query integer(int32) false The maximum number of items to return in this request.
    sortBy query string(sort-criteria) false The sort criteria supports the following fields in ascending or descending order: id, type, resourceUri, referenceId, relatedResourceUri, relatedReferenceId, source, modifiedTimeStamp, creationTimeStamp, createdBy, modifiedBy.
    body body relationshipQuery true relationshipQuery

    Example responses

    Relationships query response.

    {
      "version": 2,
      "accept": "application/vnd.sas.relationship",
      "count": 1,
      "start": 0,
      "limit": 10,
      "name": "items",
      "items": [
        {
          "creationTimeStamp": "2022-11-19T02:55:55.675Z",
          "createdBy": "etladm",
          "modifiedTimeStamp": "2022-11-19T02:55:55.675Z",
          "modifiedBy": "etladm",
          "id": "3f72e77b-1966-487e-8ada-d89c69c92807",
          "links": [
            {
              "method": "GET",
              "rel": "self",
              "href": "/relationships/relationships/3f72e77b-1966-487e-8ada-d89c69c92807",
              "uri": "/relationships/relationships/3f72e77b-1966-487e-8ada-d89c69c92807",
              "type": "application/vnd.sas.relationship"
            },
            {
              "method": "DELETE",
              "rel": "delete",
              "href": "/relationships/relationships/3f72e77b-1966-487e-8ada-d89c69c92807",
              "uri": "/relationships/relationships/3f72e77b-1966-487e-8ada-d89c69c92807"
            },
            {
              "method": "PUT",
              "rel": "update",
              "href": "/relationships/relationships/3f72e77b-1966-487e-8ada-d89c69c92807",
              "uri": "/relationships/relationships/3f72e77b-1966-487e-8ada-d89c69c92807",
              "type": "application/vnd.sas.relationship",
              "responseType": "application/vnd.sas.relationship"
            },
            {
              "method": "GET",
              "rel": "up",
              "href": "/relationships/relationships",
              "uri": "/relationships/relationships",
              "type": "application/vnd.sas.collection",
              "itemType": "application/vnd.sas.relationship"
            }
          ],
          "resourceUri": "/containers/containerUri",
          "type": "Associated",
          "relatedResourceUri": "/terms/term1Uri",
          "referenceId": "228dff66-0b62-4217-b686-a62ef881228a",
          "relatedReferenceId": "fdbdfe27-75f6-4623-96bf-fc744258c38a",
          "version": 1
        }
      ],
      "links": [
        {
          "method": "GET",
          "rel": "self",
          "href": "/relationships/relationships?start=0&limit=10&sortBy=id&depth=2&direction=both",
          "uri": "/relationships/relationships?start=0&limit=10&sortBy=id&depth=2&direction=both",
          "type": "application/vnd.sas.collection",
          "itemType": "application/vnd.sas.relationship"
        },
        {
          "method": "GET",
          "rel": "collection",
          "href": "/relationships/relationships",
          "uri": "/relationships/relationships",
          "type": "application/vnd.sas.collection",
          "itemType": "application/vnd.sas.relationship"
        },
        {
          "method": "GET",
          "rel": "up",
          "href": "/relationships",
          "uri": "/relationships",
          "type": "application/vnd.sas.api"
        },
        {
          "method": "POST",
          "rel": "create",
          "href": "/relationships/relationships",
          "uri": "/relationships/relationships",
          "type": "application/vnd.sas.relationship",
          "responseType": "application/vnd.sas.relationship"
        }
      ]
    }
    
    {
      "version": 2,
      "accept": "application/vnd.sas.relationship",
      "count": 1,
      "start": 0,
      "limit": 10,
      "name": "items",
      "items": [
        {
          "creationTimeStamp": "2022-11-19T02:55:55.675Z",
          "createdBy": "etladm",
          "modifiedTimeStamp": "2022-11-19T02:55:55.675Z",
          "modifiedBy": "etladm",
          "id": "3f72e77b-1966-487e-8ada-d89c69c92807",
          "links": [
            {
              "method": "GET",
              "rel": "self",
              "href": "/relationships/relationships/3f72e77b-1966-487e-8ada-d89c69c92807",
              "uri": "/relationships/relationships/3f72e77b-1966-487e-8ada-d89c69c92807",
              "type": "application/vnd.sas.relationship"
            },
            {
              "method": "DELETE",
              "rel": "delete",
              "href": "/relationships/relationships/3f72e77b-1966-487e-8ada-d89c69c92807",
              "uri": "/relationships/relationships/3f72e77b-1966-487e-8ada-d89c69c92807"
            },
            {
              "method": "PUT",
              "rel": "update",
              "href": "/relationships/relationships/3f72e77b-1966-487e-8ada-d89c69c92807",
              "uri": "/relationships/relationships/3f72e77b-1966-487e-8ada-d89c69c92807",
              "type": "application/vnd.sas.relationship",
              "responseType": "application/vnd.sas.relationship"
            },
            {
              "method": "GET",
              "rel": "up",
              "href": "/relationships/relationships",
              "uri": "/relationships/relationships",
              "type": "application/vnd.sas.collection",
              "itemType": "application/vnd.sas.relationship"
            }
          ],
          "resourceUri": "/containers/containerUri",
          "type": "Associated",
          "relatedResourceUri": "/terms/term1Uri",
          "referenceId": "228dff66-0b62-4217-b686-a62ef881228a",
          "relatedReferenceId": "fdbdfe27-75f6-4623-96bf-fc744258c38a",
          "version": 1
        }
      ],
      "links": [
        {
          "method": "GET",
          "rel": "self",
          "href": "/relationships/relationships?start=0&limit=10&sortBy=id&depth=2&direction=both",
          "uri": "/relationships/relationships?start=0&limit=10&sortBy=id&depth=2&direction=both",
          "type": "application/vnd.sas.collection",
          "itemType": "application/vnd.sas.relationship"
        },
        {
          "method": "GET",
          "rel": "collection",
          "href": "/relationships/relationships",
          "uri": "/relationships/relationships",
          "type": "application/vnd.sas.collection",
          "itemType": "application/vnd.sas.relationship"
        },
        {
          "method": "GET",
          "rel": "up",
          "href": "/relationships",
          "uri": "/relationships",
          "type": "application/vnd.sas.api"
        },
        {
          "method": "POST",
          "rel": "create",
          "href": "/relationships/relationships",
          "uri": "/relationships/relationships",
          "type": "application/vnd.sas.relationship",
          "responseType": "application/vnd.sas.relationship"
        }
      ]
    }
    

    Bad request (the request is not well-formed).

    {
      "details": [
        "The filter 'contains(id,'6293390f-8f76-4620-afc1-29a94d09fb83'' is not valid.",
        "path: /relationships/relationships",
        "correlator: cfd05e5d-1b05-49a2-b9af-460c86ecc993"
      ],
      "errorCode": 1104,
      "httpStatusCode": 400,
      "message": "Bad Request",
      "version": 2
    }
    
    Responses
    Status Meaning Description Schema
    200 OK Ok. relationshipCollection
    400 Bad Request Bad request (the request is not well-formed). error2
    Response Headers
    Status Header Type Format Description
    200 Content-Type string The media type of the response body.
    200 Last-Modified string date-time The time stamp in EEE, dd MMM yyyy HH:mm:ss GMT format when the relationship was last modified.

    Relationships Types Management

    The operations for relationships types management.

    Get relationships types

    Code samples

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

    GET /types

    Returns a collection of relationships types. The media type of the returned collection items is application/vnd.sas.relationship.type+json. Accept-Language is specified to return locale-specific labels and descriptions.

    Parameters
    Name In Type Required Description
    Accept-Language header string false The lanaguage/locale to use for localizable content.
    start query integer false The starting index of the first relationship type in a page.
    limit query integer false The maximum number of types to return in this page of results. The actual number of returned types may be less if the collection has been exhausted.
    filter query string(filter-criteria) false Filter criteria for returned types. Filters are supported on the following top level fields for types: name, description, directional, label, partnerName, partnerDescription, partnerLabel.
    sortBy query string(sort-criteria) false Sort returned types. The sort criteria supports the following fields in ascending or descending order: name, description, directional, label, partnerName, partnerDescription, partnerLabel.

    Example responses

    The relationship role types available on this system.

    {
      "version": 2,
      "accept": "application/vnd.sas.relationship.type",
      "count": 7,
      "start": 0,
      "limit": 10,
      "name": "items",
      "items": [
        {
          "version": 1,
          "name": "Dependent",
          "description": "A dependency exists when an object cannot function or be defined without the related object. For example, this \"job\" object must have its source \"table\" object.",
          "label": "Is dependent on",
          "directional": true,
          "partnerLabel": "Impacts",
          "partnerDescription": "This object impacts the other object.",
          "links": [
            {
              "method": "GET",
              "rel": "self",
              "href": "/relationships/types/Dependent",
              "uri": "/relationships/types/Dependent",
              "type": "application/vnd.sas.relationship.type"
            },
            {
              "method": "GET",
              "rel": "up",
              "href": "/relationships/types",
              "uri": "/relationships/types",
              "type": "application/vnd.sas.relationship.type"
            }
          ]
        },
        {
          "version": 1,
          "name": "Contains",
          "description": "An application that models the structure of a top-level entity. A parent object contains another object when the contained object does not make sense or exist without the parent object. For example, a \"table\" object contains a \"column\" object.",
          "label": "Contains",
          "directional": true,
          "partnerLabel": "Is contained by",
          "partnerDescription": "This object is contained by another object.",
          "links": [
            {
              "method": "GET",
              "rel": "self",
              "href": "/relationships/types/Contains",
              "uri": "/relationships/types/Contains",
              "type": "application/vnd.sas.relationship.type"
            },
            {
              "method": "GET",
              "rel": "up",
              "href": "/relationships/types",
              "uri": "/relationships/types",
              "type": "application/vnd.sas.relationship.type"
            }
          ]
        },
        {
          "version": 1,
          "name": "Parent",
          "description": "This relationship describes the parent in a parent-child hierarchy.",
          "label": "Is parent of",
          "directional": true,
          "partnerLabel": "Is child of",
          "partnerDescription": "This relationship describes the child in a parent-child hierarchy.",
          "links": [
            {
              "method": "GET",
              "rel": "self",
              "href": "/relationships/types/Parent",
              "uri": "/relationships/types/Parent",
              "type": "application/vnd.sas.relationship.type"
            },
            {
              "method": "GET",
              "rel": "up",
              "href": "/relationships/types",
              "uri": "/relationships/types",
              "type": "application/vnd.sas.relationship.type"
            }
          ]
        },
        {
          "version": 1,
          "name": "Version",
          "description": "This relationship relates an object to a version of this object.",
          "label": "Has a version of",
          "directional": true,
          "partnerLabel": "Is version of",
          "partnerDescription": "This object is a version of the other.",
          "links": [
            {
              "method": "GET",
              "rel": "self",
              "href": "/relationships/types/Version",
              "uri": "/relationships/types/Version",
              "type": "application/vnd.sas.relationship.type"
            },
            {
              "method": "GET",
              "rel": "up",
              "href": "/relationships/types",
              "uri": "/relationships/types",
              "type": "application/vnd.sas.relationship.type"
            }
          ]
        },
        {
          "version": 1,
          "name": "Associated",
          "description": "This relationship describes a general association between two objects.",
          "label": "Is associated with",
          "directional": false,
          "links": [
            {
              "method": "GET",
              "rel": "self",
              "href": "/relationships/types/Associated",
              "uri": "/relationships/types/Associated",
              "type": "application/vnd.sas.relationship.type"
            },
            {
              "method": "GET",
              "rel": "up",
              "href": "/relationships/types",
              "uri": "/relationships/types",
              "type": "application/vnd.sas.relationship.type"
            }
          ]
        },
        {
          "version": 1,
          "name": "Equivalent",
          "description": "This relationship equates two objects that represent the same entity.",
          "label": "Is equivalent to",
          "directional": false,
          "links": [
            {
              "method": "GET",
              "rel": "self",
              "href": "/relationships/types/Equivalent",
              "uri": "/relationships/types/Equivalent",
              "type": "application/vnd.sas.relationship.type"
            },
            {
              "method": "GET",
              "rel": "up",
              "href": "/relationships/types",
              "uri": "/relationships/types",
              "type": "application/vnd.sas.relationship.type"
            }
          ]
        },
        {
          "version": 1,
          "name": "Synonymous",
          "description": "This relationship equates two objects that have the same connotations, implications, or reference.",
          "label": "Is synonymous with",
          "directional": false,
          "links": [
            {
              "method": "GET",
              "rel": "self",
              "href": "/relationships/types/Synonymous",
              "uri": "/relationships/types/Synonymous",
              "type": "application/vnd.sas.relationship.type"
            },
            {
              "method": "GET",
              "rel": "up",
              "href": "/relationships/types",
              "uri": "/relationships/types",
              "type": "application/vnd.sas.relationship.type"
            }
          ]
        }
      ],
      "links": [
        {
          "method": "GET",
          "rel": "self",
          "href": "/relationships/types?start=0&limit=10&sortBy=name",
          "uri": "/relationships/types?start=0&limit=10&sortBy=name",
          "type": "application/vnd.sas.collection",
          "itemType": "application/vnd.sas.relationship.type"
        },
        {
          "method": "GET",
          "rel": "collection",
          "href": "/relationships/types",
          "uri": "/relationships/types",
          "type": "application/vnd.sas.collection",
          "itemType": "application/vnd.sas.relationship.type"
        },
        {
          "method": "GET",
          "rel": "up",
          "href": "/relationships",
          "uri": "/relationships",
          "type": "application/vnd.sas.api"
        }
      ]
    }
    
    {
      "version": 2,
      "accept": "application/vnd.sas.relationship.type",
      "count": 7,
      "start": 0,
      "limit": 10,
      "name": "items",
      "items": [
        {
          "version": 1,
          "name": "Dependent",
          "description": "A dependency exists when an object cannot function or be defined without the related object. For example, this \"job\" object must have its source \"table\" object.",
          "label": "Is dependent on",
          "directional": true,
          "partnerLabel": "Impacts",
          "partnerDescription": "This object impacts the other object.",
          "links": [
            {
              "method": "GET",
              "rel": "self",
              "href": "/relationships/types/Dependent",
              "uri": "/relationships/types/Dependent",
              "type": "application/vnd.sas.relationship.type"
            },
            {
              "method": "GET",
              "rel": "up",
              "href": "/relationships/types",
              "uri": "/relationships/types",
              "type": "application/vnd.sas.relationship.type"
            }
          ]
        },
        {
          "version": 1,
          "name": "Contains",
          "description": "An application that models the structure of a top-level entity. A parent object contains another object when the contained object does not make sense or exist without the parent object. For example, a \"table\" object contains a \"column\" object.",
          "label": "Contains",
          "directional": true,
          "partnerLabel": "Is contained by",
          "partnerDescription": "This object is contained by another object.",
          "links": [
            {
              "method": "GET",
              "rel": "self",
              "href": "/relationships/types/Contains",
              "uri": "/relationships/types/Contains",
              "type": "application/vnd.sas.relationship.type"
            },
            {
              "method": "GET",
              "rel": "up",
              "href": "/relationships/types",
              "uri": "/relationships/types",
              "type": "application/vnd.sas.relationship.type"
            }
          ]
        },
        {
          "version": 1,
          "name": "Parent",
          "description": "This relationship describes the parent in a parent-child hierarchy.",
          "label": "Is parent of",
          "directional": true,
          "partnerLabel": "Is child of",
          "partnerDescription": "This relationship describes the child in a parent-child hierarchy.",
          "links": [
            {
              "method": "GET",
              "rel": "self",
              "href": "/relationships/types/Parent",
              "uri": "/relationships/types/Parent",
              "type": "application/vnd.sas.relationship.type"
            },
            {
              "method": "GET",
              "rel": "up",
              "href": "/relationships/types",
              "uri": "/relationships/types",
              "type": "application/vnd.sas.relationship.type"
            }
          ]
        },
        {
          "version": 1,
          "name": "Version",
          "description": "This relationship relates an object to a version of this object.",
          "label": "Has a version of",
          "directional": true,
          "partnerLabel": "Is version of",
          "partnerDescription": "This object is a version of the other.",
          "links": [
            {
              "method": "GET",
              "rel": "self",
              "href": "/relationships/types/Version",
              "uri": "/relationships/types/Version",
              "type": "application/vnd.sas.relationship.type"
            },
            {
              "method": "GET",
              "rel": "up",
              "href": "/relationships/types",
              "uri": "/relationships/types",
              "type": "application/vnd.sas.relationship.type"
            }
          ]
        },
        {
          "version": 1,
          "name": "Associated",
          "description": "This relationship describes a general association between two objects.",
          "label": "Is associated with",
          "directional": false,
          "links": [
            {
              "method": "GET",
              "rel": "self",
              "href": "/relationships/types/Associated",
              "uri": "/relationships/types/Associated",
              "type": "application/vnd.sas.relationship.type"
            },
            {
              "method": "GET",
              "rel": "up",
              "href": "/relationships/types",
              "uri": "/relationships/types",
              "type": "application/vnd.sas.relationship.type"
            }
          ]
        },
        {
          "version": 1,
          "name": "Equivalent",
          "description": "This relationship equates two objects that represent the same entity.",
          "label": "Is equivalent to",
          "directional": false,
          "links": [
            {
              "method": "GET",
              "rel": "self",
              "href": "/relationships/types/Equivalent",
              "uri": "/relationships/types/Equivalent",
              "type": "application/vnd.sas.relationship.type"
            },
            {
              "method": "GET",
              "rel": "up",
              "href": "/relationships/types",
              "uri": "/relationships/types",
              "type": "application/vnd.sas.relationship.type"
            }
          ]
        },
        {
          "version": 1,
          "name": "Synonymous",
          "description": "This relationship equates two objects that have the same connotations, implications, or reference.",
          "label": "Is synonymous with",
          "directional": false,
          "links": [
            {
              "method": "GET",
              "rel": "self",
              "href": "/relationships/types/Synonymous",
              "uri": "/relationships/types/Synonymous",
              "type": "application/vnd.sas.relationship.type"
            },
            {
              "method": "GET",
              "rel": "up",
              "href": "/relationships/types",
              "uri": "/relationships/types",
              "type": "application/vnd.sas.relationship.type"
            }
          ]
        }
      ],
      "links": [
        {
          "method": "GET",
          "rel": "self",
          "href": "/relationships/types?start=0&limit=10&sortBy=name",
          "uri": "/relationships/types?start=0&limit=10&sortBy=name",
          "type": "application/vnd.sas.collection",
          "itemType": "application/vnd.sas.relationship.type"
        },
        {
          "method": "GET",
          "rel": "collection",
          "href": "/relationships/types",
          "uri": "/relationships/types",
          "type": "application/vnd.sas.collection",
          "itemType": "application/vnd.sas.relationship.type"
        },
        {
          "method": "GET",
          "rel": "up",
          "href": "/relationships",
          "uri": "/relationships",
          "type": "application/vnd.sas.api"
        }
      ]
    }
    

    Bad request (the request is not well-formed).

    {
      "details": [
        "The filter 'contains(id,'6293390f-8f76-4620-afc1-29a94d09fb83'' is not valid.",
        "path: /relationships/types",
        "correlator: cfd05e5d-1b05-49a2-b9af-460c86ecc993"
      ],
      "errorCode": 1104,
      "httpStatusCode": 400,
      "message": "Bad Request",
      "version": 2
    }
    
    Responses
    Status Meaning Description Schema
    200 OK Ok. typeCollection
    400 Bad Request Bad request (the request is not well-formed). error2
    Response Headers
    Status Header Type Format Description
    200 Content-Type string The media type of the response body.

    Get relationship type

    Code samples

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

    GET /types/{typeName}

    Returns information about a relationship type. The default return media type is application/vnd.sas.relationship.type+json. To return locale-specific labels and descriptions, specify an Accept-Language.

    Parameters
    Name In Type Required Description
    Accept-Language header string false The lanaguage/locale to use for localizable content.
    typeName path string true The type name.

    Example responses

    The relationship type specified by the URI

    {
      "version": 1,
      "name": "Dependent",
      "description": "A dependency exists when an object cannot function or be defined without the related object. For example, this \"job\" object must have its source \"table\" object.",
      "label": "Is dependent on",
      "directional": true,
      "partnerLabel": "Impacts",
      "partnerDescription": "This object impacts the other object.",
      "links": [
        {
          "method": "GET",
          "rel": "self",
          "href": "/relationships/types/Dependent",
          "uri": "/relationships/types/Dependent",
          "type": "application/vnd.sas.relationship.type"
        },
        {
          "method": "GET",
          "rel": "up",
          "href": "/relationships/types",
          "uri": "/relationships/types",
          "type": "application/vnd.sas.relationship.type"
        }
      ]
    }
    
    {
      "version": 1,
      "name": "Dependent",
      "description": "A dependency exists when an object cannot function or be defined without the related object. For example, this \"job\" object must have its source \"table\" object.",
      "label": "Is dependent on",
      "directional": true,
      "partnerLabel": "Impacts",
      "partnerDescription": "This object impacts the other object.",
      "links": [
        {
          "method": "GET",
          "rel": "self",
          "href": "/relationships/types/Dependent",
          "uri": "/relationships/types/Dependent",
          "type": "application/vnd.sas.relationship.type"
        },
        {
          "method": "GET",
          "rel": "up",
          "href": "/relationships/types",
          "uri": "/relationships/types",
          "type": "application/vnd.sas.relationship.type"
        }
      ]
    }
    

    The specified resource was not found.

    {
      "details": [
        "path: /relationships/type/Symbol",
        "correlator: a78e068d-bef1-405c-8984-d346e2881520"
      ],
      "errorCode": 10600,
      "httpStatusCode": 404,
      "message": "Not Found",
      "version": 2
    }
    
    Responses
    Status Meaning Description Schema
    200 OK Ok. type
    404 Not Found No type exists at the requested path. error2
    Response Headers
    Status Header Type Format Description
    200 Content-Type string The media type of the response body.

    References Management

    The operations for references management.

    Get references

    Code samples

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

    GET /references

    Returns a collection of references. Standard paging, filtering, and sorting options are provided. The default media type of the returned items in the collection is application/vnd.sas.relationship.reference+json. References may also be queried using POST /references#withQuery with the query string in the request body.

    Parameters
    Name In Type Required Description
    Accept-Item header string false An alternative media type that the service recognizes. Optional. If the service can not provide the media type, a 406 response is returned.
    start query integer false The starting index of the first reference in a page.
    limit query integer false The maximum number of references to return in this page of results. The actual number of returned references may be less if the collection has been exhausted.
    filter query string(filter-criteria) false Filter criteria for returned references. Filters are supported on the following top level fields for references: id, name, resourceUri, type, source, analysisTimeStamp, modifiedTimeStamp, creationTimeStamp, createdBy, modifiedBy.
    sortBy query string(sort-criteria) false Sort the returned resources. The sort criteria supports the following fields in ascending or descending order: id, name, resourceUri, type, source, analysisTimeStamp, modifiedTimeStamp, creationTimeStamp, createdBy, modifiedBy.
    Enumerated Values
    Parameter Value
    Accept-Item application/vnd.sas.summary+json
    Accept-Item application/vnd.sas.relationship.reference+json

    Example responses

    The collection of references requested.

    {
      "version": 2,
      "accept": "application/vnd.sas.relationship.reference",
      "count": 1,
      "start": 0,
      "limit": 2,
      "name": "items",
      "items": [
        {
          "creationTimeStamp": "2022-11-22T16:43:41.586Z",
          "modifiedTimeStamp": "2022-11-22T16:43:41.586Z",
          "id": "6293390f-8f76-4620-afc1-29a94d09fb83",
          "links": [
            {
              "method": "GET",
              "rel": "self",
              "href": "/relationships/references/6293390f-8f76-4620-afc1-29a94d09fb83",
              "uri": "/relationships/references/6293390f-8f76-4620-afc1-29a94d09fb83",
              "type": "application/vnd.sas.relationship.reference"
            },
            {
              "method": "GET",
              "rel": "up",
              "href": "/relationships/references",
              "uri": "/relationships/references",
              "type": "application/vnd.sas.collection",
              "itemType": "application/vnd.sas.relationship.reference"
            },
            {
              "method": "PUT",
              "rel": "update",
              "href": "/relationships/references/6293390f-8f76-4620-afc1-29a94d09fb83",
              "uri": "/relationships/references/6293390f-8f76-4620-afc1-29a94d09fb83",
              "type": "application/vnd.sas.relationship.reference",
              "responseType": "application/vnd.sas.relationship.reference"
            },
            {
              "method": "DELETE",
              "rel": "delete",
              "href": "/relationships/references/6293390f-8f76-4620-afc1-29a94d09fb83",
              "uri": "/relationships/references/6293390f-8f76-4620-afc1-29a94d09fb83"
            },
            {
              "method": "GET",
              "rel": "getRelationships",
              "href": "/relationships/relationships?referenceId=6293390f-8f76-4620-afc1-29a94d09fb83",
              "uri": "/relationships/relationships?referenceId=6293390f-8f76-4620-afc1-29a94d09fb83",
              "type": "application/vnd.sas.collection",
              "responseType": "application/vnd.sas.collection",
              "itemType": "application/vnd.sas.relationship"
            }
          ],
          "name": "COSTCHANGE",
          "resourceUri": "/dataTables/dataSources/cas~fs~cas-shared-default~fs~Samples/tables/COSTCHANGE",
          "contentType": "casTable",
          "source": "SAS",
          "analysisTimeStamp": "2022-11-22T16:43:42.543Z",
          "version": 1
        }
      ],
      "links": [
        {
          "method": "GET",
          "rel": "self",
          "href": "/relationships/references?start=0&limit=2&filter=eq%28name%2C%27COSTCHANGE%27%29&sortBy=name",
          "uri": "/relationships/references?start=0&limit=2&filter=eq%28name%2C%27COSTCHANGE%27%29&sortBy=name",
          "type": "application/vnd.sas.collection",
          "itemType": "application/vnd.sas.relationship.reference"
        },
        {
          "method": "GET",
          "rel": "collection",
          "href": "/relationships/references",
          "uri": "/relationships/references",
          "type": "application/vnd.sas.collection",
          "itemType": "application/vnd.sas.relationship.reference"
        },
        {
          "method": "GET",
          "rel": "up",
          "href": "/relationships",
          "uri": "/relationships",
          "type": "application/vnd.sas.api"
        },
        {
          "method": "POST",
          "rel": "create",
          "href": "/relationships/references",
          "uri": "/relationships/references",
          "type": "application/vnd.sas.relationship.reference",
          "responseType": "application/vnd.sas.relationship.reference"
        }
      ]
    }
    
    {
      "version": 2,
      "accept": "application/vnd.sas.relationship.reference",
      "count": 1,
      "start": 0,
      "limit": 2,
      "name": "items",
      "items": [
        {
          "creationTimeStamp": "2022-11-22T16:43:41.586Z",
          "modifiedTimeStamp": "2022-11-22T16:43:41.586Z",
          "id": "6293390f-8f76-4620-afc1-29a94d09fb83",
          "links": [
            {
              "method": "GET",
              "rel": "self",
              "href": "/relationships/references/6293390f-8f76-4620-afc1-29a94d09fb83",
              "uri": "/relationships/references/6293390f-8f76-4620-afc1-29a94d09fb83",
              "type": "application/vnd.sas.relationship.reference"
            },
            {
              "method": "GET",
              "rel": "up",
              "href": "/relationships/references",
              "uri": "/relationships/references",
              "type": "application/vnd.sas.collection",
              "itemType": "application/vnd.sas.relationship.reference"
            },
            {
              "method": "PUT",
              "rel": "update",
              "href": "/relationships/references/6293390f-8f76-4620-afc1-29a94d09fb83",
              "uri": "/relationships/references/6293390f-8f76-4620-afc1-29a94d09fb83",
              "type": "application/vnd.sas.relationship.reference",
              "responseType": "application/vnd.sas.relationship.reference"
            },
            {
              "method": "DELETE",
              "rel": "delete",
              "href": "/relationships/references/6293390f-8f76-4620-afc1-29a94d09fb83",
              "uri": "/relationships/references/6293390f-8f76-4620-afc1-29a94d09fb83"
            },
            {
              "method": "GET",
              "rel": "getRelationships",
              "href": "/relationships/relationships?referenceId=6293390f-8f76-4620-afc1-29a94d09fb83",
              "uri": "/relationships/relationships?referenceId=6293390f-8f76-4620-afc1-29a94d09fb83",
              "type": "application/vnd.sas.collection",
              "responseType": "application/vnd.sas.collection",
              "itemType": "application/vnd.sas.relationship"
            }
          ],
          "name": "COSTCHANGE",
          "resourceUri": "/dataTables/dataSources/cas~fs~cas-shared-default~fs~Samples/tables/COSTCHANGE",
          "contentType": "casTable",
          "source": "SAS",
          "analysisTimeStamp": "2022-11-22T16:43:42.543Z",
          "version": 1
        }
      ],
      "links": [
        {
          "method": "GET",
          "rel": "self",
          "href": "/relationships/references?start=0&limit=2&filter=eq%28name%2C%27COSTCHANGE%27%29&sortBy=name",
          "uri": "/relationships/references?start=0&limit=2&filter=eq%28name%2C%27COSTCHANGE%27%29&sortBy=name",
          "type": "application/vnd.sas.collection",
          "itemType": "application/vnd.sas.relationship.reference"
        },
        {
          "method": "GET",
          "rel": "collection",
          "href": "/relationships/references",
          "uri": "/relationships/references",
          "type": "application/vnd.sas.collection",
          "itemType": "application/vnd.sas.relationship.reference"
        },
        {
          "method": "GET",
          "rel": "up",
          "href": "/relationships",
          "uri": "/relationships",
          "type": "application/vnd.sas.api"
        },
        {
          "method": "POST",
          "rel": "create",
          "href": "/relationships/references",
          "uri": "/relationships/references",
          "type": "application/vnd.sas.relationship.reference",
          "responseType": "application/vnd.sas.relationship.reference"
        }
      ]
    }
    

    Bad request (the request is not well-formed).

    {
      "details": [
        "The filter 'contains(id,'6293390f-8f76-4620-afc1-29a94d09fb83'' is not valid.",
        "path: /relationships/references",
        "correlator: cfd05e5d-1b05-49a2-b9af-460c86ecc993"
      ],
      "errorCode": 1104,
      "httpStatusCode": 400,
      "message": "Bad Request",
      "version": 2
    }
    
    Responses
    Status Meaning Description Schema
    200 OK Ok. referenceCollection
    400 Bad Request Bad request (the request is not well-formed). error2
    Response Headers
    Status Header Type Format Description
    200 Content-Type string The media type of the response body.
    200 Last-Modified string date-time The time stamp in EEE, dd MMM yyyy HH:mm:ss GMT format when the relationship was last modified.

    Create a new reference

    Code samples

    # You can also use wget
    curl -X POST https://example.com/relationships/references \
      -H 'Authorization: Bearer <access-token-goes-here>' \
      -H 'Content-Type: application/vnd.sas.relationship.reference+json' \
      -H 'Accept: application/vnd.sas.relationship.reference+json'
    
    
    const inputBody = '{
      "resourceUri": "/reports/reports/7339e5a3-3857-4be0-a7c6-9e0cb214888cd",
      "contentType": "report",
      "name": "Quarter 1 results"
    }';
    const headers = {
      'Content-Type':'application/vnd.sas.relationship.reference+json',
      'Accept':'application/vnd.sas.relationship.reference+json'
    };
    
    fetch('https://example.com/relationships/references',
    {
      method: 'POST',
      body: inputBody,
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    import requests
    headers = {
      'Content-Type': 'application/vnd.sas.relationship.reference+json',
      'Accept': 'application/vnd.sas.relationship.reference+json'
    }
    
    r = requests.post('https://example.com/relationships/references', headers = headers)
    
    print(r.json())
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Content-Type": []string{"application/vnd.sas.relationship.reference+json"},
            "Accept": []string{"application/vnd.sas.relationship.reference+json"},
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("POST", "https://example.com/relationships/references", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    

    POST /references

    The resource URI must be set by the client within the request body, and this URI must be unique across the entire system.

    Body parameter

    The request body to create a single reference.

    {
      "resourceUri": "/reports/reports/7339e5a3-3857-4be0-a7c6-9e0cb214888cd",
      "contentType": "report",
      "name": "Quarter 1 results"
    }
    
    Parameters
    Name In Type Required Description
    body body createReference true The new reference.

    Example responses

    Create a single reference response.

    {
      "creationTimeStamp": "2022-11-22T19:05:44.122Z",
      "createdBy": "sasuser",
      "modifiedTimeStamp": "2022-11-22T19:05:44.122Z",
      "modifiedBy": "sasuser",
      "id": "bc35f42f-712e-4a2b-bf77-aff28e8c0aeb",
      "links": [
        {
          "method": "GET",
          "rel": "self",
          "href": "/relationships/references/bc35f42f-712e-4a2b-bf77-aff28e8c0aeb",
          "uri": "/relationships/references/bc35f42f-712e-4a2b-bf77-aff28e8c0aeb",
          "type": "application/vnd.sas.relationship.reference"
        },
        {
          "method": "GET",
          "rel": "up",
          "href": "/relationships/references",
          "uri": "/relationships/references",
          "type": "application/vnd.sas.collection",
          "itemType": "application/vnd.sas.relationship.reference"
        },
        {
          "method": "PUT",
          "rel": "update",
          "href": "/relationships/references/bc35f42f-712e-4a2b-bf77-aff28e8c0aeb",
          "uri": "/relationships/references/bc35f42f-712e-4a2b-bf77-aff28e8c0aeb",
          "type": "application/vnd.sas.relationship.reference",
          "responseType": "application/vnd.sas.relationship.reference"
        },
        {
          "method": "DELETE",
          "rel": "delete",
          "href": "/relationships/references/bc35f42f-712e-4a2b-bf77-aff28e8c0aeb",
          "uri": "/relationships/references/bc35f42f-712e-4a2b-bf77-aff28e8c0aeb"
        },
        {
          "method": "GET",
          "rel": "getRelationships",
          "href": "/relationships/relationships?referenceId=bc35f42f-712e-4a2b-bf77-aff28e8c0aeb",
          "uri": "/relationships/relationships?referenceId=bc35f42f-712e-4a2b-bf77-aff28e8c0aeb",
          "type": "application/vnd.sas.collection",
          "responseType": "application/vnd.sas.collection",
          "itemType": "application/vnd.sas.relationship"
        }
      ],
      "name": "Quarter 1 results",
      "resourceUri": "/reports/reports/7339e5a3-3857-4be0-a7c6-9e0cb214888cd",
      "contentType": "report",
      "source": "SAS",
      "analysisTimeStamp": "2022-11-22T19:05:44.122Z",
      "version": 1
    }
    
    {
      "creationTimeStamp": "2022-11-22T19:05:44.122Z",
      "createdBy": "sasuser",
      "modifiedTimeStamp": "2022-11-22T19:05:44.122Z",
      "modifiedBy": "sasuser",
      "id": "bc35f42f-712e-4a2b-bf77-aff28e8c0aeb",
      "links": [
        {
          "method": "GET",
          "rel": "self",
          "href": "/relationships/references/bc35f42f-712e-4a2b-bf77-aff28e8c0aeb",
          "uri": "/relationships/references/bc35f42f-712e-4a2b-bf77-aff28e8c0aeb",
          "type": "application/vnd.sas.relationship.reference"
        },
        {
          "method": "GET",
          "rel": "up",
          "href": "/relationships/references",
          "uri": "/relationships/references",
          "type": "application/vnd.sas.collection",
          "itemType": "application/vnd.sas.relationship.reference"
        },
        {
          "method": "PUT",
          "rel": "update",
          "href": "/relationships/references/bc35f42f-712e-4a2b-bf77-aff28e8c0aeb",
          "uri": "/relationships/references/bc35f42f-712e-4a2b-bf77-aff28e8c0aeb",
          "type": "application/vnd.sas.relationship.reference",
          "responseType": "application/vnd.sas.relationship.reference"
        },
        {
          "method": "DELETE",
          "rel": "delete",
          "href": "/relationships/references/bc35f42f-712e-4a2b-bf77-aff28e8c0aeb",
          "uri": "/relationships/references/bc35f42f-712e-4a2b-bf77-aff28e8c0aeb"
        },
        {
          "method": "GET",
          "rel": "getRelationships",
          "href": "/relationships/relationships?referenceId=bc35f42f-712e-4a2b-bf77-aff28e8c0aeb",
          "uri": "/relationships/relationships?referenceId=bc35f42f-712e-4a2b-bf77-aff28e8c0aeb",
          "type": "application/vnd.sas.collection",
          "responseType": "application/vnd.sas.collection",
          "itemType": "application/vnd.sas.relationship"
        }
      ],
      "name": "Quarter 1 results",
      "resourceUri": "/reports/reports/7339e5a3-3857-4be0-a7c6-9e0cb214888cd",
      "contentType": "report",
      "source": "SAS",
      "analysisTimeStamp": "2022-11-22T19:05:44.122Z",
      "version": 1
    }
    

    Bad request (the request is not well-formed).

    {
      "details": [
        "The required field \"resourceUri\" is empty. Specify a valid value.",
        "path: /relationships/references",
        "correlator: 449b1a7e-6780-445b-9ae6-23070189dd3a"
      ],
      "httpStatusCode": 400,
      "message": "Bad Request",
      "version": 2
    }
    

    The requested object already exists.

    {
      "details": [
        "A reference already exists for the resource URI \"/reports/reports/7339e5a3-3857-4be0-a7c6-9e0cb214888cd\".",
        "path: /relationships/references",
        "correlator: c5290209-eaa2-45ca-af79-415a3390d999"
      ],
      "errorCode": 10603,
      "httpStatusCode": 409,
      "message": "Conflict",
      "version": 2
    }
    
    Responses
    Status Meaning Description Schema
    201 Created The reference was created. reference
    400 Bad Request Bad request (the request is not well-formed). error2
    405 Method Not Allowed Method Not Allowed. The resource was not allowed to be created. None
    409 Conflict There was a conflict. A reference exists with the resource URI. error2
    Response Headers
    Status Header Type Format Description
    201 Location string Location (URL) of the new reference.
    201 ETag string The entity tag for the reference.
    201 Last-Modified string date-time The time stamp in EEE, dd MMM yyyy HH:mm:ss GMT format when the reference was last modified.

    Delete references

    Code samples

    # You can also use wget
    curl -X PATCH https://example.com/relationships/references \
      -H 'Authorization: Bearer <access-token-goes-here>' \
      -H 'Content-Type: application/json-patch' \
      -H 'Accept: application/vnd.sas.error+json'
    
    
    const inputBody = '[
      {
        "op": "remove",
        "path": "/001bc483-2dc4-4707-860d-5107abd3e460"
      }
    ]';
    const headers = {
      'Content-Type':'application/json-patch',
      'Accept':'application/vnd.sas.error+json'
    };
    
    fetch('https://example.com/relationships/references',
    {
      method: 'PATCH',
      body: inputBody,
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    import requests
    headers = {
      'Content-Type': 'application/json-patch',
      'Accept': 'application/vnd.sas.error+json'
    }
    
    r = requests.patch('https://example.com/relationships/references', headers = headers)
    
    print(r.json())
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Content-Type": []string{"application/json-patch"},
            "Accept": []string{"application/vnd.sas.error+json"},
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("PATCH", "https://example.com/relationships/references", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    

    PATCH /references

    Delete a list of references. Uses a JSON Patch body with "op" : "remove" on a specific reference ID. Clients which do not support PATCH can use POST and specify a query parameter of ?_method=PATCH. All referenced resources must exist for the PATCH to be applied.

    Body parameter

    Delete the requested items.

    [
      {
        "op": "remove",
        "path": "/001bc483-2dc4-4707-860d-5107abd3e460"
      }
    ]
    
    Parameters
    Name In Type Required Description
    body body multiDeleteCollection false references

    Example responses

    Bad request (the request is not well-formed).

    {
      "details": [
        "No resource exists at the specified path.  /001bc483-2dc4-4707-860d-5107abd3e460",
        "path: /relationships/relationships",
        "correlator: 300efa3c-68ea-4e1b-a0c6-a6310e7bf6a2"
      ],
      "errorCode": 10600,
      "httpStatusCode": 400,
      "message": "Bad Request",
      "version": 2
    }
    
    Responses
    Status Meaning Description Schema
    204 No Content Ok. The references were deleted. None
    400 Bad Request Bad request (the request is not well-formed). error2

    Update or create references

    Code samples

    # You can also use wget
    curl -X POST https://example.com/relationships/references#multiPost \
      -H 'Authorization: Bearer <access-token-goes-here>' \
      -H 'Content-Type: application/vnd.sas.collection+json' \
      -H 'Accept: application/vnd.sas.collection+json' \
      -H 'If-Unmodified-Since: string'
    
    
    const inputBody = '{
      "items": [
        {
          "resourceUri": "/reports/reports/7339e5a3-3857-4be0-a7c6-9e0cb214888cd",
          "contentType": "report",
          "name": "Quarter 1 results"
        },
        {
          "resourceUri": "/reports/reports/85a5b46f-f9ca-4d69-8f6b-fc53bf482029",
          "contentType": "report",
          "name": "Quarter 3 results"
        }
      ]
    }';
    const headers = {
      'Content-Type':'application/vnd.sas.collection+json',
      'Accept':'application/vnd.sas.collection+json',
      'If-Unmodified-Since':'string'
    };
    
    fetch('https://example.com/relationships/references#multiPost',
    {
      method: 'POST',
      body: inputBody,
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    import requests
    headers = {
      'Content-Type': 'application/vnd.sas.collection+json',
      'Accept': 'application/vnd.sas.collection+json',
      'If-Unmodified-Since': 'string'
    }
    
    r = requests.post('https://example.com/relationships/references#multiPost', headers = headers)
    
    print(r.json())
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Content-Type": []string{"application/vnd.sas.collection+json"},
            "Accept": []string{"application/vnd.sas.collection+json"},
            "If-Unmodified-Since": []string{"string"},
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("POST", "https://example.com/relationships/references#multiPost", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    

    POST /references#multiPost

    Updates or creates references. When the ID is provided for a reference in the collection, the operation performs a full replacement of the reference. If no ID is provided, and the resource URI is not unique in the system, the reference is not updated (the default). The parameter ?onConflict=update can be used to update existing references with a matching resource URI. The ID field can not be updated during this operation. If the reference does not exist, one is created. The response will be a collection of application/vnd.sas.relationship.reference resources. If a reference creation or update fails, the collection will include an application/vnd.sas.error object that describes why the reference failed. The specific media type of application/vnd.sas.collection+json is required for this endpoint to prevent ambiguity with other POST operations to this collection.

    Body parameter

    Create references resquest.

    {
      "items": [
        {
          "resourceUri": "/reports/reports/7339e5a3-3857-4be0-a7c6-9e0cb214888cd",
          "contentType": "report",
          "name": "Quarter 1 results"
        },
        {
          "resourceUri": "/reports/reports/85a5b46f-f9ca-4d69-8f6b-fc53bf482029",
          "contentType": "report",
          "name": "Quarter 3 results"
        }
      ]
    }
    
    Parameters
    Name In Type Required Description
    onConflict query string false How to handle conflicts when a reference already exists.
    If-Unmodified-Since header string false The value of the lastModified date of the reference. If the reference has been updated since this time, the update will fail. This header is required only when the onConflict='update' parameter is specified and is applied only to updated references.
    body body createReferenceCollection true A collection of application/vnd.sas.relationship.reference resources.
    Enumerated Values
    Parameter Value
    onConflict update
    onConflict ignore

    Example responses

    Create references response.

    {
      "version": 2,
      "accept": "application/vnd.sas.relationship.reference application/vnd.sas.error",
      "count": 2,
      "start": 0,
      "limit": 2,
      "name": "items",
      "items": [
        {
          "version": 2,
          "httpStatusCode": 409,
          "errorCode": 10603,
          "message": "Conflict",
          "details": [
            "A reference already exists for the resource URI \"/reports/reports/7339e5a3-3857-4be0-a7c6-9e0cb214888cd\"."
          ]
        },
        {
          "creationTimeStamp": "2022-11-23T16:58:18.374Z",
          "createdBy": "etladm",
          "modifiedTimeStamp": "2022-11-23T16:58:18.374Z",
          "modifiedBy": "etladm",
          "id": "1cdf57c0-cd68-44a0-8cb6-f66ac767851a",
          "links": [
            {
              "method": "GET",
              "rel": "self",
              "href": "/relationships/references/1cdf57c0-cd68-44a0-8cb6-f66ac767851a",
              "uri": "/relationships/references/1cdf57c0-cd68-44a0-8cb6-f66ac767851a",
              "type": "application/vnd.sas.relationship.reference"
            },
            {
              "method": "GET",
              "rel": "up",
              "href": "/relationships/references",
              "uri": "/relationships/references",
              "type": "application/vnd.sas.collection",
              "itemType": "application/vnd.sas.relationship.reference"
            },
            {
              "method": "PUT",
              "rel": "update",
              "href": "/relationships/references/1cdf57c0-cd68-44a0-8cb6-f66ac767851a",
              "uri": "/relationships/references/1cdf57c0-cd68-44a0-8cb6-f66ac767851a",
              "type": "application/vnd.sas.relationship.reference",
              "responseType": "application/vnd.sas.relationship.reference"
            },
            {
              "method": "DELETE",
              "rel": "delete",
              "href": "/relationships/references/1cdf57c0-cd68-44a0-8cb6-f66ac767851a",
              "uri": "/relationships/references/1cdf57c0-cd68-44a0-8cb6-f66ac767851a"
            },
            {
              "method": "GET",
              "rel": "getRelationships",
              "href": "/relationships/relationships?referenceId=1cdf57c0-cd68-44a0-8cb6-f66ac767851a",
              "uri": "/relationships/relationships?referenceId=1cdf57c0-cd68-44a0-8cb6-f66ac767851a",
              "type": "application/vnd.sas.collection",
              "responseType": "application/vnd.sas.collection",
              "itemType": "application/vnd.sas.relationship"
            }
          ],
          "name": "Quarter 3 results",
          "resourceUri": "/reports/reports/85a5b46f-f9ca-4d69-8f6b-fc53bf482029",
          "contentType": "report",
          "source": "SAS",
          "analysisTimeStamp": "2022-11-23T16:58:18.374Z",
          "version": 1
        }
      ],
      "links": [
        {
          "method": "GET",
          "rel": "self",
          "href": "/relationships/references?start=0&limit=10&sortBy=name",
          "uri": "/relationships/references?start=0&limit=10&sortBy=name",
          "type": "application/vnd.sas.collection",
          "itemType": "application/vnd.sas.relationship.reference application/vnd.sas.error"
        },
        {
          "method": "GET",
          "rel": "collection",
          "href": "/relationships/references",
          "uri": "/relationships/references",
          "type": "application/vnd.sas.collection",
          "itemType": "application/vnd.sas.relationship.reference application/vnd.sas.error"
        },
        {
          "method": "POST",
          "rel": "create",
          "href": "/relationships/references",
          "uri": "/relationships/references",
          "type": "application/vnd.sas.relationship.reference",
          "responseType": "application/vnd.sas.relationship.reference"
        }
      ]
    }
    

    Bad request (the request is not well-formed).

    {
      "details": [
        "The required field \"resourceUri\" is empty. Specify a valid value.",
        "path: /relationships/references",
        "correlator: 449b1a7e-6780-445b-9ae6-23070189dd3a"
      ],
      "httpStatusCode": 400,
      "message": "Bad Request",
      "version": 2
    }
    
    Responses
    Status Meaning Description Schema
    200 OK Ok. referenceCollection
    400 Bad Request Bad request (the request is not well-formed). error2
    Response Headers
    Status Header Type Format Description
    200 Content-Type string The media type of the response body.

    Get a paginated list of references

    Code samples

    # You can also use wget
    curl -X POST https://example.com/relationships/references#withQuery \
      -H 'Authorization: Bearer <access-token-goes-here>' \
      -H 'Content-Type: text/plain' \
      -H 'Accept: application/vnd.sas.collection+json' \
      -H 'Accept-Item: application/vnd.sas.summary+json'
    
    
    const inputBody = 'contains(name,'COSTCHANGE')';
    const headers = {
      'Content-Type':'text/plain',
      'Accept':'application/vnd.sas.collection+json',
      'Accept-Item':'application/vnd.sas.summary+json'
    };
    
    fetch('https://example.com/relationships/references#withQuery',
    {
      method: 'POST',
      body: inputBody,
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    import requests
    headers = {
      'Content-Type': 'text/plain',
      'Accept': 'application/vnd.sas.collection+json',
      'Accept-Item': 'application/vnd.sas.summary+json'
    }
    
    r = requests.post('https://example.com/relationships/references#withQuery', headers = headers)
    
    print(r.json())
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Content-Type": []string{"text/plain"},
            "Accept": []string{"application/vnd.sas.collection+json"},
            "Accept-Item": []string{"application/vnd.sas.summary+json"},
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("POST", "https://example.com/relationships/references#withQuery", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    

    POST /references#withQuery

    Returns a paginated collection of references. Standard paging, filtering, and sorting options are provided. The default media type of the returned items in the collection is application/vnd.sas.relationship.reference+json. This call is an extended GET operation and therefore idempotent. The body of the request contains the query parameters and filters to apply to the request. To find references with the content type of table the body of the request would be eq(contentType, "table").

    Body parameter

    The filter for the references request.

    contains(name,'COSTCHANGE')
    
    
    Parameters
    Name In Type Required Description
    Accept-Item header string false An alternative media type that the service recognizes. Optional. If the service can not provide the media type, a 406 response is returned.
    start query integer false The starting index of the first reference in a page.
    limit query integer false The maximum number of references to return in this page of results. The actual number of returned references can be less if the collection has been exhausted.
    sortBy query string(sort-criteria) false Sort the returned resources. The sort criteria supports the following fields in ascending or descending order: id, name, resourceUri, type, source, analysisTimeStamp, modifiedTimeStamp, creationTimeStamp, createdBy, modifiedBy.
    body body filterText true The filter criteria for returned references. Filters are supported on the following top level fields for references: id, name, resourceUri, type, source, analysisTimeStamp, modifiedTimeStamp, creationTimeStamp, createdBy, and modifiedBy.
    Enumerated Values
    Parameter Value
    Accept-Item application/vnd.sas.summary+json
    Accept-Item application/vnd.sas.relationship.reference+json

    Example responses

    The collection of references requested.

    {
      "version": 2,
      "accept": "application/vnd.sas.relationship.reference",
      "count": 1,
      "start": 0,
      "limit": 2,
      "name": "items",
      "items": [
        {
          "creationTimeStamp": "2022-11-22T16:43:41.586Z",
          "modifiedTimeStamp": "2022-11-22T16:43:41.586Z",
          "id": "6293390f-8f76-4620-afc1-29a94d09fb83",
          "links": [
            {
              "method": "GET",
              "rel": "self",
              "href": "/relationships/references/6293390f-8f76-4620-afc1-29a94d09fb83",
              "uri": "/relationships/references/6293390f-8f76-4620-afc1-29a94d09fb83",
              "type": "application/vnd.sas.relationship.reference"
            },
            {
              "method": "GET",
              "rel": "up",
              "href": "/relationships/references",
              "uri": "/relationships/references",
              "type": "application/vnd.sas.collection",
              "itemType": "application/vnd.sas.relationship.reference"
            },
            {
              "method": "PUT",
              "rel": "update",
              "href": "/relationships/references/6293390f-8f76-4620-afc1-29a94d09fb83",
              "uri": "/relationships/references/6293390f-8f76-4620-afc1-29a94d09fb83",
              "type": "application/vnd.sas.relationship.reference",
              "responseType": "application/vnd.sas.relationship.reference"
            },
            {
              "method": "DELETE",
              "rel": "delete",
              "href": "/relationships/references/6293390f-8f76-4620-afc1-29a94d09fb83",
              "uri": "/relationships/references/6293390f-8f76-4620-afc1-29a94d09fb83"
            },
            {
              "method": "GET",
              "rel": "getRelationships",
              "href": "/relationships/relationships?referenceId=6293390f-8f76-4620-afc1-29a94d09fb83",
              "uri": "/relationships/relationships?referenceId=6293390f-8f76-4620-afc1-29a94d09fb83",
              "type": "application/vnd.sas.collection",
              "responseType": "application/vnd.sas.collection",
              "itemType": "application/vnd.sas.relationship"
            }
          ],
          "name": "COSTCHANGE",
          "resourceUri": "/dataTables/dataSources/cas~fs~cas-shared-default~fs~Samples/tables/COSTCHANGE",
          "contentType": "casTable",
          "source": "SAS",
          "analysisTimeStamp": "2022-11-22T16:43:42.543Z",
          "version": 1
        }
      ],
      "links": [
        {
          "method": "GET",
          "rel": "self",
          "href": "/relationships/references?start=0&limit=2&filter=eq%28name%2C%27COSTCHANGE%27%29&sortBy=name",
          "uri": "/relationships/references?start=0&limit=2&filter=eq%28name%2C%27COSTCHANGE%27%29&sortBy=name",
          "type": "application/vnd.sas.collection",
          "itemType": "application/vnd.sas.relationship.reference"
        },
        {
          "method": "GET",
          "rel": "collection",
          "href": "/relationships/references",
          "uri": "/relationships/references",
          "type": "application/vnd.sas.collection",
          "itemType": "application/vnd.sas.relationship.reference"
        },
        {
          "method": "GET",
          "rel": "up",
          "href": "/relationships",
          "uri": "/relationships",
          "type": "application/vnd.sas.api"
        },
        {
          "method": "POST",
          "rel": "create",
          "href": "/relationships/references",
          "uri": "/relationships/references",
          "type": "application/vnd.sas.relationship.reference",
          "responseType": "application/vnd.sas.relationship.reference"
        }
      ]
    }
    
    {
      "version": 2,
      "accept": "application/vnd.sas.relationship.reference",
      "count": 1,
      "start": 0,
      "limit": 2,
      "name": "items",
      "items": [
        {
          "creationTimeStamp": "2022-11-22T16:43:41.586Z",
          "modifiedTimeStamp": "2022-11-22T16:43:41.586Z",
          "id": "6293390f-8f76-4620-afc1-29a94d09fb83",
          "links": [
            {
              "method": "GET",
              "rel": "self",
              "href": "/relationships/references/6293390f-8f76-4620-afc1-29a94d09fb83",
              "uri": "/relationships/references/6293390f-8f76-4620-afc1-29a94d09fb83",
              "type": "application/vnd.sas.relationship.reference"
            },
            {
              "method": "GET",
              "rel": "up",
              "href": "/relationships/references",
              "uri": "/relationships/references",
              "type": "application/vnd.sas.collection",
              "itemType": "application/vnd.sas.relationship.reference"
            },
            {
              "method": "PUT",
              "rel": "update",
              "href": "/relationships/references/6293390f-8f76-4620-afc1-29a94d09fb83",
              "uri": "/relationships/references/6293390f-8f76-4620-afc1-29a94d09fb83",
              "type": "application/vnd.sas.relationship.reference",
              "responseType": "application/vnd.sas.relationship.reference"
            },
            {
              "method": "DELETE",
              "rel": "delete",
              "href": "/relationships/references/6293390f-8f76-4620-afc1-29a94d09fb83",
              "uri": "/relationships/references/6293390f-8f76-4620-afc1-29a94d09fb83"
            },
            {
              "method": "GET",
              "rel": "getRelationships",
              "href": "/relationships/relationships?referenceId=6293390f-8f76-4620-afc1-29a94d09fb83",
              "uri": "/relationships/relationships?referenceId=6293390f-8f76-4620-afc1-29a94d09fb83",
              "type": "application/vnd.sas.collection",
              "responseType": "application/vnd.sas.collection",
              "itemType": "application/vnd.sas.relationship"
            }
          ],
          "name": "COSTCHANGE",
          "resourceUri": "/dataTables/dataSources/cas~fs~cas-shared-default~fs~Samples/tables/COSTCHANGE",
          "contentType": "casTable",
          "source": "SAS",
          "analysisTimeStamp": "2022-11-22T16:43:42.543Z",
          "version": 1
        }
      ],
      "links": [
        {
          "method": "GET",
          "rel": "self",
          "href": "/relationships/references?start=0&limit=2&filter=eq%28name%2C%27COSTCHANGE%27%29&sortBy=name",
          "uri": "/relationships/references?start=0&limit=2&filter=eq%28name%2C%27COSTCHANGE%27%29&sortBy=name",
          "type": "application/vnd.sas.collection",
          "itemType": "application/vnd.sas.relationship.reference"
        },
        {
          "method": "GET",
          "rel": "collection",
          "href": "/relationships/references",
          "uri": "/relationships/references",
          "type": "application/vnd.sas.collection",
          "itemType": "application/vnd.sas.relationship.reference"
        },
        {
          "method": "GET",
          "rel": "up",
          "href": "/relationships",
          "uri": "/relationships",
          "type": "application/vnd.sas.api"
        },
        {
          "method": "POST",
          "rel": "create",
          "href": "/relationships/references",
          "uri": "/relationships/references",
          "type": "application/vnd.sas.relationship.reference",
          "responseType": "application/vnd.sas.relationship.reference"
        }
      ]
    }
    

    Bad request (the request is not well-formed).

    {
      "details": [
        "The filter 'contains(id,'6293390f-8f76-4620-afc1-29a94d09fb83'' is not valid.",
        "path: /relationships/references",
        "correlator: cfd05e5d-1b05-49a2-b9af-460c86ecc993"
      ],
      "errorCode": 1104,
      "httpStatusCode": 400,
      "message": "Bad Request",
      "version": 2
    }
    
    Responses
    Status Meaning Description Schema
    200 OK Ok. referenceCollection
    400 Bad Request Bad request (the request is not well-formed). error2
    Response Headers
    Status Header Type Format Description
    200 Content-Type string The media type of the response body.

    Get reference

    Code samples

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

    GET /references/{referenceId}

    Returns information about a single reference based on its unique id. The default media type returned is application/vnd.sas.relationship.reference+json.

    Parameters
    Name In Type Required Description
    referenceId path string true reference id

    Example responses

    The reference requested.

    {
      "creationTimeStamp": "2022-11-22T16:43:41.586Z",
      "modifiedTimeStamp": "2022-11-22T16:43:41.586Z",
      "id": "6293390f-8f76-4620-afc1-29a94d09fb83",
      "links": [
        {
          "method": "GET",
          "rel": "self",
          "href": "/relationships/references/6293390f-8f76-4620-afc1-29a94d09fb83",
          "uri": "/relationships/references/6293390f-8f76-4620-afc1-29a94d09fb83",
          "type": "application/vnd.sas.relationship.reference"
        },
        {
          "method": "GET",
          "rel": "up",
          "href": "/relationships/references",
          "uri": "/relationships/references",
          "type": "application/vnd.sas.collection",
          "itemType": "application/vnd.sas.relationship.reference"
        },
        {
          "method": "PUT",
          "rel": "update",
          "href": "/relationships/references/6293390f-8f76-4620-afc1-29a94d09fb83",
          "uri": "/relationships/references/6293390f-8f76-4620-afc1-29a94d09fb83",
          "type": "application/vnd.sas.relationship.reference",
          "responseType": "application/vnd.sas.relationship.reference"
        },
        {
          "method": "DELETE",
          "rel": "delete",
          "href": "/relationships/references/6293390f-8f76-4620-afc1-29a94d09fb83",
          "uri": "/relationships/references/6293390f-8f76-4620-afc1-29a94d09fb83"
        },
        {
          "method": "GET",
          "rel": "getRelationships",
          "href": "/relationships/relationships?referenceId=6293390f-8f76-4620-afc1-29a94d09fb83",
          "uri": "/relationships/relationships?referenceId=6293390f-8f76-4620-afc1-29a94d09fb83",
          "type": "application/vnd.sas.collection",
          "responseType": "application/vnd.sas.collection",
          "itemType": "application/vnd.sas.relationship"
        }
      ],
      "name": "COSTCHANGE",
      "resourceUri": "/dataTables/dataSources/cas~fs~cas-shared-default~fs~Samples/tables/COSTCHANGE",
      "contentType": "casTable",
      "source": "SAS",
      "analysisTimeStamp": "2022-11-22T16:43:42.543Z",
      "version": 1
    }
    
    {
      "creationTimeStamp": "2022-11-22T16:43:41.586Z",
      "modifiedTimeStamp": "2022-11-22T16:43:41.586Z",
      "id": "6293390f-8f76-4620-afc1-29a94d09fb83",
      "links": [
        {
          "method": "GET",
          "rel": "self",
          "href": "/relationships/references/6293390f-8f76-4620-afc1-29a94d09fb83",
          "uri": "/relationships/references/6293390f-8f76-4620-afc1-29a94d09fb83",
          "type": "application/vnd.sas.relationship.reference"
        },
        {
          "method": "GET",
          "rel": "up",
          "href": "/relationships/references",
          "uri": "/relationships/references",
          "type": "application/vnd.sas.collection",
          "itemType": "application/vnd.sas.relationship.reference"
        },
        {
          "method": "PUT",
          "rel": "update",
          "href": "/relationships/references/6293390f-8f76-4620-afc1-29a94d09fb83",
          "uri": "/relationships/references/6293390f-8f76-4620-afc1-29a94d09fb83",
          "type": "application/vnd.sas.relationship.reference",
          "responseType": "application/vnd.sas.relationship.reference"
        },
        {
          "method": "DELETE",
          "rel": "delete",
          "href": "/relationships/references/6293390f-8f76-4620-afc1-29a94d09fb83",
          "uri": "/relationships/references/6293390f-8f76-4620-afc1-29a94d09fb83"
        },
        {
          "method": "GET",
          "rel": "getRelationships",
          "href": "/relationships/relationships?referenceId=6293390f-8f76-4620-afc1-29a94d09fb83",
          "uri": "/relationships/relationships?referenceId=6293390f-8f76-4620-afc1-29a94d09fb83",
          "type": "application/vnd.sas.collection",
          "responseType": "application/vnd.sas.collection",
          "itemType": "application/vnd.sas.relationship"
        }
      ],
      "name": "COSTCHANGE",
      "resourceUri": "/dataTables/dataSources/cas~fs~cas-shared-default~fs~Samples/tables/COSTCHANGE",
      "contentType": "casTable",
      "source": "SAS",
      "analysisTimeStamp": "2022-11-22T16:43:42.543Z",
      "version": 1
    }
    
    {
      "creationTimeStamp": "2022-11-22T16:43:41.586Z",
      "modifiedTimeStamp": "2022-11-22T16:43:41.586Z",
      "id": "6293390f-8f76-4620-afc1-29a94d09fb83",
      "links": [
        {
          "method": "GET",
          "rel": "self",
          "href": "/relationships/references/6293390f-8f76-4620-afc1-29a94d09fb83",
          "uri": "/relationships/references/6293390f-8f76-4620-afc1-29a94d09fb83",
          "type": "application/vnd.sas.relationship.reference"
        },
        {
          "method": "GET",
          "rel": "up",
          "href": "/relationships/references",
          "uri": "/relationships/references",
          "type": "application/vnd.sas.collection",
          "itemType": "application/vnd.sas.relationship.reference"
        },
        {
          "method": "PUT",
          "rel": "update",
          "href": "/relationships/references/6293390f-8f76-4620-afc1-29a94d09fb83",
          "uri": "/relationships/references/6293390f-8f76-4620-afc1-29a94d09fb83",
          "type": "application/vnd.sas.relationship.reference",
          "responseType": "application/vnd.sas.relationship.reference"
        },
        {
          "method": "DELETE",
          "rel": "delete",
          "href": "/relationships/references/6293390f-8f76-4620-afc1-29a94d09fb83",
          "uri": "/relationships/references/6293390f-8f76-4620-afc1-29a94d09fb83"
        },
        {
          "method": "GET",
          "rel": "getRelationships",
          "href": "/relationships/relationships?referenceId=6293390f-8f76-4620-afc1-29a94d09fb83",
          "uri": "/relationships/relationships?referenceId=6293390f-8f76-4620-afc1-29a94d09fb83",
          "type": "application/vnd.sas.collection",
          "responseType": "application/vnd.sas.collection",
          "itemType": "application/vnd.sas.relationship"
        }
      ],
      "name": "COSTCHANGE",
      "resourceUri": "/dataTables/dataSources/cas~fs~cas-shared-default~fs~Samples/tables/COSTCHANGE",
      "contentType": "casTable",
      "source": "SAS",
      "analysisTimeStamp": "2022-11-22T16:43:42.543Z",
      "version": 1
    }
    

    The specified resource was not found.

    {
      "details": [
        "path: /relationships/references/c48fff9b-2802-451e-82ea-00526952dcee",
        "correlator: a78e068d-bef1-405c-8984-d346e2881520"
      ],
      "errorCode": 10600,
      "httpStatusCode": 404,
      "message": "Not Found",
      "version": 2
    }
    
    Responses
    Status Meaning Description Schema
    200 OK Ok. reference
    404 Not Found No reference exists at the requested path. error2
    Response Headers
    Status Header Type Format Description
    200 ETag string The entity tag for the reference.
    200 Last-Modified string date-time The time stamp in EEE, dd MMM yyyy HH:mm:ss GMT format when the reference was last modified.

    Check if reference exists

    Code samples

    # You can also use wget
    curl -X HEAD https://example.com/relationships/references/{referenceId} \
      -H 'Authorization: Bearer <access-token-goes-here>' \
      -H 'Accept: application/vnd.sas.error+json'
    
    
    
    const headers = {
      'Accept':'application/vnd.sas.error+json'
    };
    
    fetch('https://example.com/relationships/references/{referenceId}',
    {
      method: 'HEAD',
    
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    import requests
    headers = {
      'Accept': 'application/vnd.sas.error+json'
    }
    
    r = requests.head('https://example.com/relationships/references/{referenceId}', headers = headers)
    
    print(r.json())
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Accept": []string{"application/vnd.sas.error+json"},
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("HEAD", "https://example.com/relationships/references/{referenceId}", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    

    HEAD /references/{referenceId}

    Returns whether or not a reference with the specified ID exists, along with appropriate headers.

    Parameters
    Name In Type Required Description
    referenceId path string true The reference ID.

    Example responses

    The specified resource was not found.

    {
      "details": [
        "path: /relationships/references/c48fff9b-2802-451e-82ea-00526952dcee",
        "correlator: a78e068d-bef1-405c-8984-d346e2881520"
      ],
      "errorCode": 10600,
      "httpStatusCode": 404,
      "message": "Not Found",
      "version": 2
    }
    
    Responses
    Status Meaning Description Schema
    200 OK Ok. The reference exists. None
    404 Not Found No reference exists at the requested path. error2
    Response Headers
    Status Header Type Format Description
    200 ETag string The entity tag for the reference.
    200 Last-Modified string date-time The time stamp in EEE, dd MMM yyyy HH:mm:ss GMT format when the reference was last modified.

    Update a reference

    Code samples

    # You can also use wget
    curl -X PUT https://example.com/relationships/references/{referenceId} \
      -H 'Authorization: Bearer <access-token-goes-here>' \
      -H 'Content-Type: application/vnd.sas.resources.reference+json' \
      -H 'Accept: application/vnd.sas.resources.reference+json' \
      -H 'If-Match: string' \
      -H 'If-Unmodified-Since: string'
    
    
    const inputBody = '{
      "id": "bc35f42f-712e-4a2b-bf77-aff28e8c0aeb",
      "resourceUri": "/reports/reports/7339e5a3-3857-4be0-a7c6-9e0cb214888cd",
      "contentType": "report",
      "name": "Quarter 1 results"
    }';
    const headers = {
      'Content-Type':'application/vnd.sas.resources.reference+json',
      'Accept':'application/vnd.sas.resources.reference+json',
      'If-Match':'string',
      'If-Unmodified-Since':'string'
    };
    
    fetch('https://example.com/relationships/references/{referenceId}',
    {
      method: 'PUT',
      body: inputBody,
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    import requests
    headers = {
      'Content-Type': 'application/vnd.sas.resources.reference+json',
      'Accept': 'application/vnd.sas.resources.reference+json',
      'If-Match': 'string',
      'If-Unmodified-Since': 'string'
    }
    
    r = requests.put('https://example.com/relationships/references/{referenceId}', headers = headers)
    
    print(r.json())
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Content-Type": []string{"application/vnd.sas.resources.reference+json"},
            "Accept": []string{"application/vnd.sas.resources.reference+json"},
            "If-Match": []string{"string"},
            "If-Unmodified-Since": []string{"string"},
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("PUT", "https://example.com/relationships/references/{referenceId}", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    

    PUT /references/{referenceId}

    Update a reference. The resourceUri can not be updated during this operation. The PUT will fail if the ID in the body does not match the referenceId.

    Body parameter

    The request body to update a single reference.

    {
      "id": "bc35f42f-712e-4a2b-bf77-aff28e8c0aeb",
      "resourceUri": "/reports/reports/7339e5a3-3857-4be0-a7c6-9e0cb214888cd",
      "contentType": "report",
      "name": "Quarter 1 results"
    }
    
    Parameters
    Name In Type Required Description
    referenceId path string true The reference ID.
    If-Match header string false The Etag that was returned from a GET, POST, or PUT of this reference.
    If-Unmodified-Since header string false The value of the lastModified date of the reference. If the reference has been updated since this time, the update will fail.
    body body updateReference true The reference.

    Example responses

    Update a single reference response.

    {
      "creationTimeStamp": "2022-11-22T19:05:44.122Z",
      "createdBy": "sasuser",
      "modifiedTimeStamp": "2022-11-22T19:05:44.122Z",
      "modifiedBy": "sasuser",
      "id": "bc35f42f-712e-4a2b-bf77-aff28e8c0aeb",
      "links": [
        {
          "method": "GET",
          "rel": "self",
          "href": "/relationships/references/bc35f42f-712e-4a2b-bf77-aff28e8c0aeb",
          "uri": "/relationships/references/bc35f42f-712e-4a2b-bf77-aff28e8c0aeb",
          "type": "application/vnd.sas.relationship.reference"
        },
        {
          "method": "GET",
          "rel": "up",
          "href": "/relationships/references",
          "uri": "/relationships/references",
          "type": "application/vnd.sas.collection",
          "itemType": "application/vnd.sas.relationship.reference"
        },
        {
          "method": "PUT",
          "rel": "update",
          "href": "/relationships/references/bc35f42f-712e-4a2b-bf77-aff28e8c0aeb",
          "uri": "/relationships/references/bc35f42f-712e-4a2b-bf77-aff28e8c0aeb",
          "type": "application/vnd.sas.relationship.reference",
          "responseType": "application/vnd.sas.relationship.reference"
        },
        {
          "method": "DELETE",
          "rel": "delete",
          "href": "/relationships/references/bc35f42f-712e-4a2b-bf77-aff28e8c0aeb",
          "uri": "/relationships/references/bc35f42f-712e-4a2b-bf77-aff28e8c0aeb"
        },
        {
          "method": "GET",
          "rel": "getRelationships",
          "href": "/relationships/relationships?referenceId=bc35f42f-712e-4a2b-bf77-aff28e8c0aeb",
          "uri": "/relationships/relationships?referenceId=bc35f42f-712e-4a2b-bf77-aff28e8c0aeb",
          "type": "application/vnd.sas.collection",
          "responseType": "application/vnd.sas.collection",
          "itemType": "application/vnd.sas.relationship"
        }
      ],
      "name": "Quarter 1 results",
      "resourceUri": "/reports/reports/7339e5a3-3857-4be0-a7c6-9e0cb214888cd",
      "contentType": "report",
      "source": "SAS",
      "analysisTimeStamp": "2022-11-22T19:05:44.122Z",
      "version": 1
    }
    
    {
      "creationTimeStamp": "2022-11-22T19:05:44.122Z",
      "createdBy": "sasuser",
      "modifiedTimeStamp": "2022-11-22T19:05:44.122Z",
      "modifiedBy": "sasuser",
      "id": "bc35f42f-712e-4a2b-bf77-aff28e8c0aeb",
      "links": [
        {
          "method": "GET",
          "rel": "self",
          "href": "/relationships/references/bc35f42f-712e-4a2b-bf77-aff28e8c0aeb",
          "uri": "/relationships/references/bc35f42f-712e-4a2b-bf77-aff28e8c0aeb",
          "type": "application/vnd.sas.relationship.reference"
        },
        {
          "method": "GET",
          "rel": "up",
          "href": "/relationships/references",
          "uri": "/relationships/references",
          "type": "application/vnd.sas.collection",
          "itemType": "application/vnd.sas.relationship.reference"
        },
        {
          "method": "PUT",
          "rel": "update",
          "href": "/relationships/references/bc35f42f-712e-4a2b-bf77-aff28e8c0aeb",
          "uri": "/relationships/references/bc35f42f-712e-4a2b-bf77-aff28e8c0aeb",
          "type": "application/vnd.sas.relationship.reference",
          "responseType": "application/vnd.sas.relationship.reference"
        },
        {
          "method": "DELETE",
          "rel": "delete",
          "href": "/relationships/references/bc35f42f-712e-4a2b-bf77-aff28e8c0aeb",
          "uri": "/relationships/references/bc35f42f-712e-4a2b-bf77-aff28e8c0aeb"
        },
        {
          "method": "GET",
          "rel": "getRelationships",
          "href": "/relationships/relationships?referenceId=bc35f42f-712e-4a2b-bf77-aff28e8c0aeb",
          "uri": "/relationships/relationships?referenceId=bc35f42f-712e-4a2b-bf77-aff28e8c0aeb",
          "type": "application/vnd.sas.collection",
          "responseType": "application/vnd.sas.collection",
          "itemType": "application/vnd.sas.relationship"
        }
      ],
      "name": "Quarter 1 results",
      "resourceUri": "/reports/reports/7339e5a3-3857-4be0-a7c6-9e0cb214888cd",
      "contentType": "report",
      "source": "SAS",
      "analysisTimeStamp": "2022-11-22T19:05:44.122Z",
      "version": 1
    }
    

    Bad request (the request is not well-formed).

    {
      "details": [
        "The required field \"resourceUri\" is empty. Specify a valid value.",
        "path: /relationships/references",
        "correlator: 449b1a7e-6780-445b-9ae6-23070189dd3a"
      ],
      "httpStatusCode": 400,
      "message": "Bad Request",
      "version": 2
    }
    

    The specified resource was not found.

    {
      "details": [
        "path: /relationships/references/c48fff9b-2802-451e-82ea-00526952dcee",
        "correlator: a78e068d-bef1-405c-8984-d346e2881520"
      ],
      "errorCode": 10600,
      "httpStatusCode": 404,
      "message": "Not Found",
      "version": 2
    }
    

    Precondition failed. The target has changed since it was last fetched.

    {
      "details": [
        "path: /relationships/references/c48fff9b-2802-451e-82ea-00526952dced",
        "correlator: a1cb6f8c-628b-4d25-ba3f-7a0407a58e5b"
      ],
      "httpStatusCode": 412,
      "message": "The header field \\\"If-Match\\\" has a value that is different from the entity tag for the resource. (The specified values are \\\"W/\\\"1669132124099132000\\\"\\\" and \\\"W/\\\"1669138300986000000\\\"\\\", respectively.)",
      "version": 2
    }
    

    Precondition required. Include an If-Match header with the request.

    {
      "details": [
        "path: /relationships/references/c48fff9b-2802-451e-82ea-00526952dced",
        "correlator: a1cb6f8c-628b-4d25-ba3f-7a0407a58e5b"
      ],
      "httpStatusCode": 428,
      "message": "The header field \\\"If-Match\\\" is missing or does not have a value.",
      "version": 2
    }
    
    Responses
    Status Meaning Description Schema
    200 OK Ok. reference
    400 Bad Request Bad request (the request is not well-formed). error2
    404 Not Found No reference exists at the requested path. error2
    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 time stamp. error2
    428 Precondition Required The request headers did not include an If-Match or If-Unmodified-Since precondition. error2
    Response Headers
    Status Header Type Format Description
    200 Location string The URL of the reference.
    200 ETag string The entity tag for the reference.
    200 Last-Modified string date-time The time stamp in EEE, dd MMM yyyy HH:mm:ss GMT format when the reference was last modified.

    Delete a reference

    Code samples

    # You can also use wget
    curl -X DELETE https://example.com/relationships/references/{referenceId}
      -H 'Authorization: Bearer <access-token-goes-here>' \
    
    
    
    fetch('https://example.com/relationships/references/{referenceId}',
    {
      method: 'DELETE'
    
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    import requests
    
    r = requests.delete('https://example.com/relationships/references/{referenceId}')
    
    print(r.json())
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("DELETE", "https://example.com/relationships/references/{referenceId}", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    

    DELETE /references/{referenceId}

    Deletes the specified reference and permanently removes it from the system along with the relationships which use this reference.

    Parameters
    Name In Type Required Description
    referenceId path string true The reference ID.
    Responses
    Status Meaning Description Schema
    204 No Content The reference was deleted. None

    Get the list values for a reference source

    Code samples

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

    GET /references/referenceSources

    Provides a list of distinct values used for a reference source.

    Parameters
    Name In Type Required Description
    start query integer(int64) false The 0-based start index of a paginated request.
    limit query integer(int32) false The maximum number of items to return in this request.

    Example responses

    Get reference sources.

    {
      "version": 2,
      "accept": "application/json",
      "count": 1,
      "start": 0,
      "limit": 10,
      "name": "items",
      "items": [
        "SAS"
      ],
      "links": [
        {
          "method": "GET",
          "rel": "self",
          "href": "/relationships/references/referenceSources?start=0&limit=10&sortBy=name",
          "uri": "/relationships/references/referenceSources?start=0&limit=10&sortBy=name",
          "type": "application/vnd.sas.collection",
          "itemType": "application/json"
        },
        {
          "method": "GET",
          "rel": "collection",
          "href": "/relationships/references/referenceSources",
          "uri": "/relationships/references/referenceSources",
          "type": "application/vnd.sas.collection",
          "itemType": "application/json"
        },
        {
          "method": "GET",
          "rel": "up",
          "href": "/relationships/references",
          "uri": "/relationships/references",
          "type": "application/vnd.sas.api"
        }
      ]
    }
    
    {
      "version": 2,
      "accept": "application/json",
      "count": 1,
      "start": 0,
      "limit": 10,
      "name": "items",
      "items": [
        "SAS"
      ],
      "links": [
        {
          "method": "GET",
          "rel": "self",
          "href": "/relationships/references/referenceSources?start=0&limit=10&sortBy=name",
          "uri": "/relationships/references/referenceSources?start=0&limit=10&sortBy=name",
          "type": "application/vnd.sas.collection",
          "itemType": "application/json"
        },
        {
          "method": "GET",
          "rel": "collection",
          "href": "/relationships/references/referenceSources",
          "uri": "/relationships/references/referenceSources",
          "type": "application/vnd.sas.collection",
          "itemType": "application/json"
        },
        {
          "method": "GET",
          "rel": "up",
          "href": "/relationships/references",
          "uri": "/relationships/references",
          "type": "application/vnd.sas.api"
        }
      ]
    }
    

    Bad request (the request is not well-formed).

    {
      "details": [
        "The filter 'contains(id,'6293390f-8f76-4620-afc1-29a94d09fb83'' is not valid.",
        "path: /relationships/references",
        "correlator: cfd05e5d-1b05-49a2-b9af-460c86ecc993"
      ],
      "errorCode": 1104,
      "httpStatusCode": 400,
      "message": "Bad Request",
      "version": 2
    }
    
    Responses
    Status Meaning Description Schema
    200 OK Ok. The collection returned will include an item for each distinct value present in the sytem for the reference source member. sourceValuesCollection
    400 Bad Request Bad request (the request is not well-formed). error2
    Response Headers
    Status Header Type Format Description
    200 Content-Type string The media type of the response body.

    Jobs Management

    The operations for jobs management.

    Get a job

    Code samples

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

    GET /jobs/{jobId}

    Get a job.

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

    Example responses

    Create load job response.

    {
      "id": "04dc4509-f68f-4e70-903c-63b8b2fa0213",
      "state": "running",
      "creationTimeStamp": "2022-11-23T17:12:15.792772601Z",
      "endTimeStamp": "0001-01-01T00:00:00Z",
      "version": 1,
      "links": [
        {
          "method": "GET",
          "rel": "self",
          "href": "/relationships/jobs/04dc4509-f68f-4e70-903c-63b8b2fa0213",
          "uri": "/relationships/jobs/04dc4509-f68f-4e70-903c-63b8b2fa0213",
          "type": "application/vnd.sas.relationship.job.load"
        },
        {
          "method": "GET",
          "rel": "state",
          "href": "/relationships/jobs/04dc4509-f68f-4e70-903c-63b8b2fa0213/state",
          "uri": "/relationships/jobs/04dc4509-f68f-4e70-903c-63b8b2fa0213/state",
          "type": "text/plain"
        },
        {
          "method": "DELETE",
          "rel": "delete",
          "href": "/relationships/jobs/04dc4509-f68f-4e70-903c-63b8b2fa0213",
          "uri": "/relationships/jobs/04dc4509-f68f-4e70-903c-63b8b2fa0213"
        }
      ]
    }
    
    {
      "id": "04dc4509-f68f-4e70-903c-63b8b2fa0213",
      "state": "running",
      "creationTimeStamp": "2022-11-23T17:12:15.792772601Z",
      "endTimeStamp": "0001-01-01T00:00:00Z",
      "version": 1,
      "links": [
        {
          "method": "GET",
          "rel": "self",
          "href": "/relationships/jobs/04dc4509-f68f-4e70-903c-63b8b2fa0213",
          "uri": "/relationships/jobs/04dc4509-f68f-4e70-903c-63b8b2fa0213",
          "type": "application/vnd.sas.relationship.job.load"
        },
        {
          "method": "GET",
          "rel": "state",
          "href": "/relationships/jobs/04dc4509-f68f-4e70-903c-63b8b2fa0213/state",
          "uri": "/relationships/jobs/04dc4509-f68f-4e70-903c-63b8b2fa0213/state",
          "type": "text/plain"
        },
        {
          "method": "DELETE",
          "rel": "delete",
          "href": "/relationships/jobs/04dc4509-f68f-4e70-903c-63b8b2fa0213",
          "uri": "/relationships/jobs/04dc4509-f68f-4e70-903c-63b8b2fa0213"
        }
      ]
    }
    

    The specified resource was not found.

    {
      "details": [
        "path: /relationships/jobs/c48fff9b-2802-451e-82ea-00526952dcee",
        "correlator: a78e068d-bef1-405c-8984-d346e2881520"
      ],
      "errorCode": 10600,
      "httpStatusCode": 404,
      "message": "Not Found",
      "version": 2
    }
    
    Responses
    Status Meaning Description Schema
    200 OK Ok. loadJob
    404 Not Found No job exists at the requested path. error2
    Response Headers
    Status Header Type Format Description
    200 Content-Type string The media type of the response body.

    Check if a job exists

    Code samples

    # You can also use wget
    curl -X HEAD https://example.com/relationships/jobs/{jobId} \
      -H 'Authorization: Bearer <access-token-goes-here>' \
      -H 'Accept: application/vnd.sas.relationship.job.load+json'
    
    
    
    const headers = {
      'Accept':'application/vnd.sas.relationship.job.load+json'
    };
    
    fetch('https://example.com/relationships/jobs/{jobId}',
    {
      method: 'HEAD',
    
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    import requests
    headers = {
      'Accept': 'application/vnd.sas.relationship.job.load+json'
    }
    
    r = requests.head('https://example.com/relationships/jobs/{jobId}', headers = headers)
    
    print(r.json())
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Accept": []string{"application/vnd.sas.relationship.job.load+json"},
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("HEAD", "https://example.com/relationships/jobs/{jobId}", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    

    HEAD /jobs/{jobId}

    Returns whether or not a job with the specified ID exists, along with appropriate headers.

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

    Example responses

    Create load job response.

    {
      "id": "04dc4509-f68f-4e70-903c-63b8b2fa0213",
      "state": "running",
      "creationTimeStamp": "2022-11-23T17:12:15.792772601Z",
      "endTimeStamp": "0001-01-01T00:00:00Z",
      "version": 1,
      "links": [
        {
          "method": "GET",
          "rel": "self",
          "href": "/relationships/jobs/04dc4509-f68f-4e70-903c-63b8b2fa0213",
          "uri": "/relationships/jobs/04dc4509-f68f-4e70-903c-63b8b2fa0213",
          "type": "application/vnd.sas.relationship.job.load"
        },
        {
          "method": "GET",
          "rel": "state",
          "href": "/relationships/jobs/04dc4509-f68f-4e70-903c-63b8b2fa0213/state",
          "uri": "/relationships/jobs/04dc4509-f68f-4e70-903c-63b8b2fa0213/state",
          "type": "text/plain"
        },
        {
          "method": "DELETE",
          "rel": "delete",
          "href": "/relationships/jobs/04dc4509-f68f-4e70-903c-63b8b2fa0213",
          "uri": "/relationships/jobs/04dc4509-f68f-4e70-903c-63b8b2fa0213"
        }
      ]
    }
    
    {
      "id": "04dc4509-f68f-4e70-903c-63b8b2fa0213",
      "state": "running",
      "creationTimeStamp": "2022-11-23T17:12:15.792772601Z",
      "endTimeStamp": "0001-01-01T00:00:00Z",
      "version": 1,
      "links": [
        {
          "method": "GET",
          "rel": "self",
          "href": "/relationships/jobs/04dc4509-f68f-4e70-903c-63b8b2fa0213",
          "uri": "/relationships/jobs/04dc4509-f68f-4e70-903c-63b8b2fa0213",
          "type": "application/vnd.sas.relationship.job.load"
        },
        {
          "method": "GET",
          "rel": "state",
          "href": "/relationships/jobs/04dc4509-f68f-4e70-903c-63b8b2fa0213/state",
          "uri": "/relationships/jobs/04dc4509-f68f-4e70-903c-63b8b2fa0213/state",
          "type": "text/plain"
        },
        {
          "method": "DELETE",
          "rel": "delete",
          "href": "/relationships/jobs/04dc4509-f68f-4e70-903c-63b8b2fa0213",
          "uri": "/relationships/jobs/04dc4509-f68f-4e70-903c-63b8b2fa0213"
        }
      ]
    }
    

    The specified resource was not found.

    {
      "details": [
        "path: /relationships/jobs/c48fff9b-2802-451e-82ea-00526952dcee",
        "correlator: a78e068d-bef1-405c-8984-d346e2881520"
      ],
      "errorCode": 10600,
      "httpStatusCode": 404,
      "message": "Not Found",
      "version": 2
    }
    
    Responses
    Status Meaning Description Schema
    200 OK Ok. loadJob
    404 Not Found No job exists at the requested path. error2
    Response Headers
    Status Header Type Format Description
    200 Content-Type string The media type of the response body.

    Remove a job

    Code samples

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

    DELETE /jobs/{jobId}

    Removes the specified job. Job will be stopped if it is running.

    Parameters
    Name In Type Required Description
    jobId path string true The job ID.
    Responses
    Status Meaning Description Schema
    204 No Content The job was deleted. None

    Get the state of the job

    Code samples

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

    GET /jobs/{jobId}/state

    Returns the state of the job: running, completed, or failed.

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

    Example responses

    200 Response

    "completed"
    
    Responses
    Status Meaning Description Schema
    200 OK The state of the job. string
    Response Headers
    Status Header Type Format Description
    200 Content-Type string The media type of the response body.

    Load metadata for types

    Code samples

    # You can also use wget
    curl -X POST https://example.com/relationships/jobs \
      -H 'Authorization: Bearer <access-token-goes-here>' \
      -H 'Accept: application/vnd.sas.relationship.job.load+json'
    
    
    
    const headers = {
      'Accept':'application/vnd.sas.relationship.job.load+json'
    };
    
    fetch('https://example.com/relationships/jobs',
    {
      method: 'POST',
    
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    import requests
    headers = {
      'Accept': 'application/vnd.sas.relationship.job.load+json'
    }
    
    r = requests.post('https://example.com/relationships/jobs', headers = headers)
    
    print(r.json())
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Accept": []string{"application/vnd.sas.relationship.job.load+json"},
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("POST", "https://example.com/relationships/jobs", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    

    POST /jobs

    Loads metadata for types.

    Parameters
    Name In Type Required Description
    type query string false The type or types for which to load relationships. Default is all types.

    Example responses

    Create load job response.

    {
      "id": "04dc4509-f68f-4e70-903c-63b8b2fa0213",
      "state": "running",
      "creationTimeStamp": "2022-11-23T17:12:15.792772601Z",
      "endTimeStamp": "0001-01-01T00:00:00Z",
      "version": 1,
      "links": [
        {
          "method": "GET",
          "rel": "self",
          "href": "/relationships/jobs/04dc4509-f68f-4e70-903c-63b8b2fa0213",
          "uri": "/relationships/jobs/04dc4509-f68f-4e70-903c-63b8b2fa0213",
          "type": "application/vnd.sas.relationship.job.load"
        },
        {
          "method": "GET",
          "rel": "state",
          "href": "/relationships/jobs/04dc4509-f68f-4e70-903c-63b8b2fa0213/state",
          "uri": "/relationships/jobs/04dc4509-f68f-4e70-903c-63b8b2fa0213/state",
          "type": "text/plain"
        },
        {
          "method": "DELETE",
          "rel": "delete",
          "href": "/relationships/jobs/04dc4509-f68f-4e70-903c-63b8b2fa0213",
          "uri": "/relationships/jobs/04dc4509-f68f-4e70-903c-63b8b2fa0213"
        }
      ]
    }
    
    Responses
    Status Meaning Description Schema
    202 Accepted The request was accepted. loadJob
    409 Conflict Unable to accept the request. None
    Response Headers
    Status Header Type Format Description
    202 Location string The URL of the job.

    Schemas

    createReference

    {
      "resourceUri": "string",
      "contentType": "string",
      "source": "string",
      "analysisTimeStamp": "2019-08-24T14:15:22Z",
      "creationTimeStamp": "2019-08-24T14:15:22Z",
      "modifiedTimeStamp": "2019-08-24T14:15:22Z",
      "createdBy": "string",
      "modifiedBy": "string",
      "name": "string",
      "version": 0
    }
    
    

    Create reference

    Properties
    Name Type Required Restrictions Description
    resourceUri string true none The URI of the resource that this reference represents.
    contentType string false none The type of the resource this refers to. This will be "report", or "storedprocess" or whatever type string is appropriate for the resource. The type should be registered with the types service so that services that retrieve this resource can look up the correct media type and endpoints for retrieving resources of this type. Also, it is very important that this value matches the type field of the summary representation (that is, the application/vnd.sas.summary+json representation).
    source string false none Source for this reference. This is an indicator of the context from which the referenced resource was obtained. For a resource external to the deployment the source value is defined either by the process providing the resource inforamtion or is user-defined. For resources populated from within the deployment the default value is sas.
    analysisTimeStamp string(date-time) false none Time stamp of the relationship analysis for this reference.
    creationTimeStamp string(date-time) false none Time stamp of the creation of the referenced resource not this resource. For a resource external to the deployment, where an original time stamp is unavailable, the time stamp of the source file or the analysis time stamp will be used.
    modifiedTimeStamp string(date-time) false none Time stamp of last modification of the referenced resource not this resource. For a resource external to the deployment, where an original time stamp is unavailable, the time stamp of the source file or the analysis time stamp will be used.
    createdBy string false none The id of the user who created the referenced resource not this resource. For a resource external to the deployment, where the original user id is unavailable, the user id from the create / update request will be used.
    modifiedBy string false none The id of the last user who modified the referenced resource not this resource. For a resource external to the deployment, where the original user id is unavailable, the user id from the create / update request will be used.
    name string false none The name of the referenced resource.
    version integer false none This media type's schema version number. This representation is version 1.

    createReferenceCollection

    {
      "accept": "string",
      "count": 0,
      "limit": 0,
      "links": [
        {
          "href": "string",
          "itemType": "string",
          "method": "string",
          "rel": "string",
          "responseItemType": "string",
          "responseType": "string",
          "title": "string",
          "type": "string",
          "uri": "string"
        }
      ],
      "name": "string",
      "start": 0,
      "version": 0,
      "items": [
        {
          "resourceUri": "string",
          "contentType": "string",
          "source": "string",
          "analysisTimeStamp": "2019-08-24T14:15:22Z",
          "creationTimeStamp": "2019-08-24T14:15:22Z",
          "modifiedTimeStamp": "2019-08-24T14:15:22Z",
          "createdBy": "string",
          "modifiedBy": "string",
          "name": "string",
          "version": 0
        }
      ]
    }
    
    

    Create references collection

    Properties
    Name Type Required Restrictions Description
    Create references collection any false none A collection used to create multiple references.

    allOf

    Name Type Required Restrictions Description
    anonymous baseCollection2 false none A collection of objects.

    and

    Name Type Required Restrictions Description
    anonymous object false none none
    » items [createReference] false none The array of application/vnd.sas.relationship.reference representations.

    referenceCollection

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

    References collection

    Properties
    Name Type Required Restrictions Description
    References collection any false none A collection of references.

    allOf

    Name Type Required Restrictions Description
    anonymous baseCollection2 false none A collection of objects.

    and

    Name Type Required Restrictions Description
    anonymous object false none none
    » items [anyOf] false none The array of application/vnd.sas.relationship.reference representations.

    anyOf

    Name Type Required Restrictions Description
    »» anonymous reference false none A reference contains basic information about a resource for which there is a relationship. This is the application/vnd.sas.relationship.reference media type.

    or

    Name Type Required Restrictions Description
    »» anonymous error2 false none The representation of an error.

    updateReference

    {
      "resourceUri": "string",
      "contentType": "string",
      "source": "string",
      "analysisTimeStamp": "2019-08-24T14:15:22Z",
      "creationTimeStamp": "2019-08-24T14:15:22Z",
      "modifiedTimeStamp": "2019-08-24T14:15:22Z",
      "createdBy": "string",
      "modifiedBy": "string",
      "name": "string",
      "version": 0,
      "id": "string"
    }
    
    

    Update reference resource

    Properties
    Name Type Required Restrictions Description
    Update reference resource any false none The reference to update.

    allOf

    Name Type Required Restrictions Description
    anonymous createReference false none Used to create a single reference.

    and

    Name Type Required Restrictions Description
    anonymous object false none none
    » id string false none System-assigned unique ID for this object.

    reference

    {
      "resourceUri": "string",
      "contentType": "string",
      "source": "string",
      "analysisTimeStamp": "2019-08-24T14:15:22Z",
      "creationTimeStamp": "2019-08-24T14:15:22Z",
      "modifiedTimeStamp": "2019-08-24T14:15:22Z",
      "createdBy": "string",
      "modifiedBy": "string",
      "name": "string",
      "version": 0,
      "id": "string",
      "links": [
        {
          "href": "string",
          "itemType": "string",
          "method": "string",
          "rel": "string",
          "responseItemType": "string",
          "responseType": "string",
          "title": "string",
          "type": "string",
          "uri": "string"
        }
      ]
    }
    
    

    Reference resource

    Properties
    Name Type Required Restrictions Description
    Reference resource any false none A reference contains basic information about a resource for which there is a relationship. This is the application/vnd.sas.relationship.reference media type.

    allOf

    Name Type Required Restrictions Description
    anonymous updateReference false none The reference to update.

    and

    Name Type Required Restrictions Description
    anonymous object false none none
    » links [link] false none Links that apply to this object. If provider is read only, the links will include "self", "alternate", and "relationships". If provider is not read only, the links will include "self", "alternate", "delete", "update", and "relationships".

    relationshipCollection

    {
      "accept": "string",
      "count": 0,
      "limit": 0,
      "links": [
        {
          "href": "string",
          "itemType": "string",
          "method": "string",
          "rel": "string",
          "responseItemType": "string",
          "responseType": "string",
          "title": "string",
          "type": "string",
          "uri": "string"
        }
      ],
      "name": "string",
      "start": 0,
      "version": 0,
      "items": [
        {
          "resourceUri": "string",
          "referenceId": "string",
          "type": "string",
          "relatedResourceUri": "string",
          "relatedReferenceId": "string",
          "source": "string",
          "version": 0
        }
      ]
    }
    
    

    Relationships collection

    Properties
    Name Type Required Restrictions Description
    Relationships collection any false none A collection of relationships.

    allOf

    Name Type Required Restrictions Description
    anonymous baseCollection2 false none A collection of objects.

    and

    Name Type Required Restrictions Description
    anonymous object false none none
    » items [anyOf] false none The array of application/vnd.sas.relationship representations.

    anyOf

    Name Type Required Restrictions Description
    »» anonymous createRelationship false none Used to create a single relationship.

    or

    Name Type Required Restrictions Description
    »» anonymous error2 false none The representation of an error.

    createRelationshipCollection

    {
      "accept": "string",
      "count": 0,
      "limit": 0,
      "links": [
        {
          "href": "string",
          "itemType": "string",
          "method": "string",
          "rel": "string",
          "responseItemType": "string",
          "responseType": "string",
          "title": "string",
          "type": "string",
          "uri": "string"
        }
      ],
      "name": "string",
      "start": 0,
      "version": 0,
      "items": [
        {
          "resourceUri": "string",
          "referenceId": "string",
          "type": "string",
          "relatedResourceUri": "string",
          "relatedReferenceId": "string",
          "source": "string",
          "version": 0
        }
      ]
    }
    
    

    Create relationships collection

    Properties
    Name Type Required Restrictions Description
    Create relationships collection any false none A collection used to create multiple relationships.

    allOf

    Name Type Required Restrictions Description
    anonymous baseCollection2 false none A collection of objects.

    and

    Name Type Required Restrictions Description
    anonymous object false none none
    » items [createRelationship] false none The array of application/vnd.sas.relationship representations.

    createRelationship

    {
      "resourceUri": "string",
      "referenceId": "string",
      "type": "string",
      "relatedResourceUri": "string",
      "relatedReferenceId": "string",
      "source": "string",
      "version": 0
    }
    
    

    Create relationship

    Properties
    Name Type Required Restrictions Description
    resourceUri string true none The URI of the subject resource of this relationship.
    referenceId string false none The id of the reference for the subject resource.
    type string true none The id of this relationship type.
    relatedResourceUri string true none The URI of the related resource of this relationship.
    relatedReferenceId string false none The id of the reference for the related resource.
    source string false none The source of this relationship. Typically the URI of the resource that manages this relationship.
    version integer false none This media type's schema version number. This representation is version 1.

    updateRelationship

    {
      "resourceUri": "string",
      "referenceId": "string",
      "type": "string",
      "relatedResourceUri": "string",
      "relatedReferenceId": "string",
      "source": "string",
      "version": 0,
      "id": "string"
    }
    
    

    Update relationship resource

    Properties
    Name Type Required Restrictions Description
    Update relationship resource any false none Update relationship resource.

    allOf

    Name Type Required Restrictions Description
    anonymous createRelationship false none Used to create a single relationship.

    and

    Name Type Required Restrictions Description
    anonymous object false none none
    » id string false none System-assigned unique ID for this object.

    relationship

    {
      "resourceUri": "string",
      "referenceId": "string",
      "type": "string",
      "relatedResourceUri": "string",
      "relatedReferenceId": "string",
      "source": "string",
      "version": 0,
      "id": "string",
      "creationTimeStamp": "2019-08-24T14:15:22Z",
      "modifiedTimeStamp": "2019-08-24T14:15:22Z",
      "createdBy": "string",
      "modifiedBy": "string",
      "links": [
        {
          "href": "string",
          "itemType": "string",
          "method": "string",
          "rel": "string",
          "responseItemType": "string",
          "responseType": "string",
          "title": "string",
          "type": "string",
          "uri": "string"
        }
      ]
    }
    
    

    Relationship resource

    Properties
    Name Type Required Restrictions Description
    Relationship resource any false none The connection between a subject resource and a related resource.

    allOf

    Name Type Required Restrictions Description
    anonymous updateRelationship false none Update relationship resource.

    and

    Name Type Required Restrictions Description
    anonymous object false none none
    » creationTimeStamp string(date-time) false none Timestamp of relationship creation.
    » modifiedTimeStamp string(date-time) false none Timestamp of last relationship modification.
    » createdBy string false none The id of the user who created the relationship.
    » modifiedBy string false none The id of the last user who modified the relationship.
    » links [link] false none Links that apply to this object. If provider is read only, the links will include "self". If provider is not read only, the links will include "self", "delete", "update".

    typeCollection

    {
      "accept": "string",
      "count": 0,
      "limit": 0,
      "links": [
        {
          "href": "string",
          "itemType": "string",
          "method": "string",
          "rel": "string",
          "responseItemType": "string",
          "responseType": "string",
          "title": "string",
          "type": "string",
          "uri": "string"
        }
      ],
      "name": "string",
      "start": 0,
      "version": 0,
      "items": [
        {
          "name": "string",
          "description": "string",
          "label": "string",
          "partnerLabel": "string",
          "partnerDescription": "string",
          "directional": true,
          "version": 0,
          "links": [
            {
              "href": "string",
              "itemType": "string",
              "method": "string",
              "rel": "string",
              "responseItemType": "string",
              "responseType": "string",
              "title": "string",
              "type": "string",
              "uri": "string"
            }
          ]
        }
      ]
    }
    
    

    Relationship types collection

    Properties
    Name Type Required Restrictions Description
    Relationship types collection any false none A collection of relationship types.

    allOf

    Name Type Required Restrictions Description
    anonymous baseCollection2 false none A collection of objects.

    and

    Name Type Required Restrictions Description
    anonymous object false none none
    » items [type] false none The array of application/vnd.sas.relationship.type representations.

    type

    {
      "name": "string",
      "description": "string",
      "label": "string",
      "partnerLabel": "string",
      "partnerDescription": "string",
      "directional": true,
      "version": 0,
      "links": [
        {
          "href": "string",
          "itemType": "string",
          "method": "string",
          "rel": "string",
          "responseItemType": "string",
          "responseType": "string",
          "title": "string",
          "type": "string",
          "uri": "string"
        }
      ]
    }
    
    

    Relationship type

    Properties
    Name Type Required Restrictions Description
    name string false none Identifier for the relationship type.
    description string false none Description of the relationship type.
    label string false none Label for the relationship from the subject to the target.
    partnerLabel string false none Label of the relationship from the target to the subject.
    partnerDescription string false none Description of the relationship from the target to the subject.
    directional boolean false none Set to true if the role for the relationship type is depends upon the direction of the relationship. Set to false if the relationship is bi-directional.
    version integer false none This media type's schema version number. This representation is version 1.
    links [link] false none Links that apply to this relationship type. Includes "self".

    sourceValuesCollection

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

    Distinct values collection

    Properties
    Name Type Required Restrictions Description
    Distinct values collection any false none A collection of distinct source values.

    allOf

    Name Type Required Restrictions Description
    anonymous baseCollection2 false none A collection of objects.

    and

    Name Type Required Restrictions Description
    anonymous object false none none
    » items [string] false none The collection of source values.

    multiDeleteCollection

    [
      {
        "op": "remove",
        "path": "/873f4dd0-14b1-4aa1-85d6-178c24171de"
      },
      {
        "op": "remove",
        "path": "/57657df4-f11b-46d7-a551-060b1605ee4e"
      },
      {
        "op": "remove",
        "path": "/73b889d8-6a06-47df-a368-4b1e91cf39da"
      }
    ]
    
    

    Multi-delete collection

    Properties
    Name Type Required Restrictions Description
    Multi-delete collection [multiDelete] false none A collection of resources to remove.

    multiDelete

    {
      "op": "remove",
      "path": "string"
    }
    
    

    JSONPatch document

    Properties
    Name Type Required Restrictions Description
    op string true none Operation set to 'remove'.
    path string true none The id of the resource to remove.
    Enumerated Values
    Property Value
    op remove

    relationshipQuery

    {
      "resourceUri": [
        "string"
      ],
      "referenceId": [
        "string"
      ],
      "depth": 0,
      "direction": "string",
      "filter": "string"
    }
    
    

    Relationship query

    Properties
    Name Type Required Restrictions Description
    resourceUri [string] false none The subject or subjects for which to get relationships.
    referenceId [string] false none The ID of subject or subjects for which to get relationships.
    depth integer false none The value used to control how deep to traverse the relationships tree. A value greater than 1 implies a recursive traversal through the list of related resources up to the specified depth. A value of -1 will result in all relationships for all resources returned. The default setting is 1, which implies only direct relationships of the resource will be returned.
    direction string false none The value used to control the direction of the relationships returned. A relationship is defined as resource uri "to" related resource uri. A value of "from" will return relationships where the resource(s) indicated by the resourceUri or referenceId parameter is the related resource. A value of "both" will return all relationships that include the resource(s) indicated by the resourceUri or referenceId parameter.
    filter string false none An expression for filtering the collection. Valid expressions include eq(member,\"string\"). Allowed members are id, resourceUri, type, relatedResourceUri, source, and resource.type. The resource.type criteria is applied to each resource and related resource. When depth > 1, the relationship type and resource.type criteria are applied at each level. Relationships that are filtered out for a given level are not used to search the next level.

    loadJob

    {
      "id": "string",
      "state": "string",
      "creationTimeStamp": "2019-08-24T14:15:22Z",
      "endTimeStamp": "2019-08-24T14:15:22Z",
      "version": 0,
      "links": [
        {
          "href": "string",
          "itemType": "string",
          "method": "string",
          "rel": "string",
          "responseItemType": "string",
          "responseType": "string",
          "title": "string",
          "type": "string",
          "uri": "string"
        }
      ]
    }
    
    

    Job that loads metadata

    Properties
    Name Type Required Restrictions Description
    id string false none System-assigned unique ID for this object.
    state string false none The job's state, one of running, completed, or failed.
    creationTimeStamp string(date-time) false none Timestamp of job creation.
    endTimeStamp string(date-time) false none Timestamp of job creation.
    version integer false none This media type's schema version number. This representation is version 1.
    links [link] false none Links that apply to this job type. Includes "self".

    filterText

    "string"
    
    

    Filter text

    Properties
    Name Type Required Restrictions Description
    Filter text string(filter-criteria) false none The filter criteria.

    api

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

    API

    Properties
    Name Type Required Restrictions Description
    links [link] false none The API's top-level links.
    version integer false none The version number of the API representation. This is version 1.

    error2

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

    Error

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

    baseCollection2

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

    Base Collection

    Properties
    Name Type Required Restrictions Description
    accept string false none A space-delimited list of media types from which an Accept header may be constructed.
    count integer(int64) false none If populated indicates the number of items in the collection.
    limit integer false none The number of items that were requested for the collection.
    links [link] false none The links that apply to the collection.
    name string false none The name of the collection.
    start integer(int64) false none The zero-based index of the first item in the collection.
    version integer false none The version number of the collection representation. This representation is version 2.

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

    Link

    Properties
    Name Type Required Restrictions Description
    href string false none The URL for the link.
    itemType string false none If this is a link to a container, itemType is the media type or link type for the items in the container.
    method string false none The HTTP method for the link.
    rel string false none The relationship of the link to the resource.
    responseItemType string false none The media type or link type of the items in the response body for a PUT, POST, or PATCH operation.
    responseType string false none The media type or link type of the response body for a PUT, POST, or PATCH operation.
    title string false none The title for the link.
    type string false none The media type or link type for the link.
    uri string false none The relative URI for the link.

    Examples

    Media Type Samples

    application/vnd.sas.collection

    A paginated, filterable, sortable collection of resource representations. In this API, this is a collection of application/vnd.sas.relationship, application/vnd.sas.relationship.reference, or application/vnd.sas.relationship.type representations.

    See application/vnd.sas.collection.

    application/vnd.sas.summary+json

    Represents a summary of a resource.

    See application/vnd.sas.summary

    application/vnd.sas.error

    Represents an error response.

    See application/vnd.sas.error.

    application/vnd.sas.relationship

    Provides relationship information. The schema is at relationship.

    application/vnd.sas.relationship+json

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

    
     {
                "version": 1,
                "resourceUri": "/tables/654",
                "referenceId": "03896389-6c4c-4e94-a5c0-5e76646b7667",
                "id": "873f4dd0-14b1-4aa1-85d6-178c24171de",
                "relatedResourceUri": "/libraries/452",
                "relatedReferenceId": "1113970d-43ef-4635-8da5-abe32e9f8712",
                "source": "/libraries/452",
                "type": "associated",
                "creationTimeStamp": "2015-09-22T21:20:43.454Z",
                "modifiedTimeStamp": "2015-09-22T21:20:43.454Z",
                "createdBy": "bob",
                "modifiedBy": "bob",
                "links": [
                    {
                        "method": "GET",
                        "rel": "self",
                        "href": "/relationships/relationships/873f4dd0-14b1-4aa1-85d6-178c24171de",
                        "uri": "/relationships/relationships/873f4dd0-14b1-4aa1-85d6-178c24171de",
                        "type": "application/vnd.sas.relationship"
                    },
                    {
                        "method": "PUT",
                        "rel": "update",
                        "href": "/relationships/relationships/873f4dd0-14b1-4aa1-85d6-178c24171de",
                        "uri": "/relationships/relationships/873f4dd0-14b1-4aa1-85d6-178c24171de",
                        "type": "application/vnd.sas.relationship"
                    },
                    {
                        "method": "DELETE",
                        "rel": "delete",
                        "href": "/relationships/relationships/873f4dd0-14b1-4aa1-85d6-178c24171de",
                        "uri": "/relationships/relationships/873f4dd0-14b1-4aa1-85d6-178c24171de"
                    }
                ]
            }
    

    application/vnd.sas.relationship.type

    Provides descriptive information and labels for predefined relationship types. The schema is at relationshipType

    application/vnd.sas.relationship.type+json

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

    
     {
        "version": 1,
        "name": "dependent",
        "description": "Any application modeling a depends upon relationship between entities. An object depends upon an object when it cannot function or be defined without that related object being present. Job->Table",
        "label": "Is dependent on",
        "directional": true,
        "partnerLabel": "Impacts",
        "partnerDescription": "This object impacts the other.",
        "links": [
            {
                "method": "GET",
                "rel": "self",
                "href": "/relationships/types/dependent",
                "uri": "/relationships/types/dependent",
                "type": "application/vnd.sas.relationship.type"
            }
          ]
        }
    

    application/vnd.sas.relationship.reference

    A reference to a resource. The reference includes the location and media type, and will cache certain information about the resource like the name, creationTimeStamp, createdBy, modifiedTimeStamp, and modifiedBy.

    The schema is at reference.

    application/vnd.sas.relationship.reference+json

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

    
     {
                "version": 1,
                "id": "57657df4-f11b-46d7-a551-060b1605ee4e",
                "resourceUri": "/libraries/123",
                "contentType": "library",
                "source": "sas",
                "name": "BIDdata",
                "analysisTimestamp": "2015-09-22T21:20:43.454Z",
                "creationTimeStamp": "2015-09-22T21:20:43.454Z",
                "modifiedTimeStamp": "2015-09-22T21:20:43.454Z",
                "createdBy": "bob",
                "modifiedBy": "bob",
                "links": [
                    {
                        "method": "GET",
                        "rel": "self",
                        "href": "/relationships/references/57657df4-f11b-46d7-a551-060b1605ee4e",
                        "uri": "/relationships/references/57657df4-f11b-46d7-a551-060b1605ee4e",
                        "type": "application/vnd.sas.relationship.reference"
                    },
                    {
                        "method": "PUT",
                        "rel": "update",
                        "href": "/relationships/references/57657df4-f11b-46d7-a551-060b1605ee4e",
                        "uri": "/relationships/references/57657df4-f11b-46d7-a551-060b1605ee4e",
                        "type": "application/vnd.sas.relationship.reference"
                    },
                    {
                        "method": "DELETE",
                        "rel": "delete",
                        "href": "/relationships/references/57657df4-f11b-46d7-a551-060b1605ee4e",
                        "uri": "/relationships/references/57657df4-f11b-46d7-a551-060b1605ee4e"
                    },
                    {
                        "method": "GET",
                        "rel": "relationships",
                        "href": "/relationships/relationships?referenceId=57657df4-f11b-46d7-a551-060b1605ee4e",
                        "uri": "/relationships/relationships?referenceId=57657df4-f11b-46d7-a551-060b1605ee4e",
                        "type:": "application/vnd.sas.collection",
                        "itemType": "application/vnd.sas.relationship.reference"
                    }
                ]
            }
    

    application/vnd.sas.relationship.query

    Provides query parameters for searching relationships. The query can include a list of resource URIs or reference IDs, depth, direction, and a filter.

    The schema is at relationshipQuery.

    application/vnd.sas.relationship.query+json

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

    
     {
                "version": 1,
                "referenceIds": ["57657df4-f11b-46d7-a551-060b1605ee4e"],
                "filter": "eq(type, 'Contains')"
    }
    

    application/vnd.sas.relationship.job.load

    Provides the state of the job.

    The schema is at loadJob

    application/vnd.sas.relationship.job.load+json

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

    
     {
      "version" : 1,
      "id" : "a8b86fc0-d4f1-4d35-91ae-6ae35335ed97",
      "state" : "running",
      "creationTimeStamp" : "2015-03-18T10:20:00Z",
      "endTimeStamp" :  "2015-03-18T11:24:00Z",
      "links" : [
                         {
                        "method": "GET",
                        "rel": "self",
                        "href": "/relationships/jobs/57657df4-f11b-46d7-a551-060b1605ee4e",
                        "uri": "/relationships/jobs/57657df4-f11b-46d7-a551-060b1605ee4e",
                        "type": "application/vnd.sas.relationship.job"
                    },
                    {
                        "method": "DELETE",
                        "rel": "delete",
                        "href": "/relationships/jobs/57657df4-f11b-46d7-a551-060b1605ee4e",
                        "uri": "/relationships/jobs/57657df4-f11b-46d7-a551-060b1605ee4e"
                    },
                    {
                        "method": "GET",
                        "rel": "state",
                        "href": "/relationships/jobs/57657df4-f11b-46d7-a551-060b1605ee4e/state",
                        "uri": "/relationships/jobs/57657df4-f11b-46d7-a551-060b1605ee4e/state",
                        "type" : "text/plain"
                    }
         ]
    }
    
    Resource Relationships

    Relationships service entity relationship diagram

    ## Root

    Path: /

    The root of the API. This resource contains links the top-level resources in the API. The top-level links include relationships, relationship types, references, and jobs.

    Relation Method Description
    relationships GET Returns the first page of the collection of relationships.
    URI: /relationships
    Response type: application/vnd.sas.collection
    Response item type: application/vnd.sas.relationship
    createRelationship POST Adds a new relationship.
    URI: /relationships
    Request type: application/vnd.sas.relationship
    Response type: application/vnd.sas.relationship
    types GET Returns the first page of the collection of relationship types.
    URI: /types
    Response type: application/vnd.sas.collection
    Response item type: application/vnd.sas.relationship.type
    references GET Returns the first page of the collection of references.
    URI: /references
    Response type: application/vnd.sas.collection
    Response item type: application/vnd.sas.relationship.reference
    createReference POST Adds a new resource reference.
    URI: /references
    Request type: application/vnd.sas.relationship.reference
    Response type: application/vnd.sas.relationship.reference
    startLoad POST Loads relationships for types supporting relationships.
    URI: /jobs
    Request type: application/vnd.sas.relationship.job.load
    Response type: application/vnd.sas.relationship.job.load

    Relationships

    Path: /relationships

    This API provides collections of relationships. Members of the /relationships collection are relationships, /relationships/{relationshipId}.

    The relationships collection representation is application/vnd.sas.collection. The collection items are application/vnd.sas.relationship resources. These types apply to the response for the self, collection, prev, next, first, and last links, below.

    Responses include the following links.

    Relation Method Description
    relationshipsQuery POST Returns the first page of the collection of relationships. Enables query parameters to be passed in the body of the request.
    createRelationship POST Adds a new relationship to the collection.
    Present only on the /relationships collection if the user has create permission.
    Request type: application/vnd.sas.relationship
    Response type: application/vnd.sas.relationship
    updateRelationships POST Updates or creates relationships in the collection. The input is a collection of application/vnd.sas.relationship resources. If a relationship does not already exist, one is created.
    Present only on the /relationships collection if the user has create permission.
    patchRelationships PATCH Deletes a list of relationships. Uses a JSON Patch body with "op" : "remove" on a specific relationship id. Clients that do not support PATCH can use POST and specify a query parameter of ?_method=PATCH.
    Present only on the /relationships collection if the user has create permission.
    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 resources from the collection.
    Present if not at the start of the collection.
    next GET Returns the next page of resources from the collection.
    Present if not at the end of the collection.
    first GET Returns the first page of resources from the collection.
    Present if not at the start of the collection.
    last GET Returns the last page of resources from the collection.
    Present if not at the end of the collection.

    Sorting and Filtering

    The subject(s) are specified using the resourceUri or referenceId query parameter. Use of resourceUri or referenceId in the filter parameter can create a conflict with the resourceUri or referenceId query parameter. These collections can be sorted and filtered using the ?sortBy= and ?filter= query parameters.

    The default sort order for the /relationships collection is by id.

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

    Filtering can also be done using the following members of the reference using resource or relatedResource.

    Request relationships for a single subject using resourceUri:

    ?resourceUri=/table/123

    Request relationships for multiple subjects:

    ?resourceUri=/table/123|/report/345

    Request relationships for a single subject using referenceId:

    ?referenceId=03896389-6c4c-4e94-a5c0-5e76646b7667

    Request relationships for multiple subjects:

    ?referenceId=1113970d-43ef-4635-8da5-abe32e9f8712|a374fac5-3be6-43ce-ac4b-6c0f96ea61fc

    Note that clients must URL encode the | character as %7c.

    Filter by relationship type:

    ?resourceUri=/table/123&filter=contains(type,"associated")

    Filter by reference content type:

    ?resourceUri=/table/123&filter=contains(relatedResource.contentType, "report")

    Combining filters:

    ?resourceUri=/table/123&filter=and(contains(relatedResource.contentType, "report"), contains(type,"dependent"))

    Relationship

    Path: /relationships/{relationshipId}

    A specific relationship.

    Relation Method Description
    self GET Returns the full/complete representation of the relationship.
    update PUT Updates a relationship.
    Present only if the user has create permission.
    delete DELETE Deletes the relationship.
    Present only if the user has create permission.

    Relationship types

    Path: /types

    The types collection representation is application/vnd.sas.collection. The collection items are application/vnd.sas.relationship.types resources. These types apply to the response for the self, collection, prev, next, first, and last links below.

    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 resources from the collection.
    Present if not at the start of the collection.
    next GET Returns the next page of resources from the collection.
    Present if not at the end of the collection.
    first GET Returns the first page of resources from the collection.
    Present if not at the start of the collection.
    last GET Returns the last page of resources from the collection.
    Present if not at the end of the collection.
    Sorting and Filtering

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

    The default sort order for the /types collection is by name.

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

    Relationship type

    Path: /types/{typeName}

    A specific relationship type.

    Relation Method Description
    self GET Returns the full/complete representation of the relationship type.

    References

    Path: /references

    This API provides collections of references. Members of the /references collection are references, /references/{referenceId}.

    The references collection representation is application/vnd.sas.collection. The collection items are application/vnd.sas.relationship.reference resources. These types apply to the response for the self, collection, prev, next, first, and last links, below.

    Responses include the following links.

    Relation Method Description
    referencesQuery POST Returns the first page of the collection of references. Allows for query parameters to be passed in the body of the request.
    createReference POST Adds a new reference to the collection.
    This link is available only on the /references collection if the user has create permission.
    Request type: application/vnd.sas.relationship.reference
    Response type: application/vnd.sas.relationship.reference
    updateReferences POST Updates or creates references in the collection. The input is a collection of application/vnd.sas.relationship.reference resources. If a reference does not already exist, one is created.
    This link is available only on the /references collection if the user has create permission.
    patchReferences PATCH Deletes references in the collection. Uses a JSON Patch body with "op" : "remove" on a specific reference ID. Clients that do not support PATCH can use POST to specify a query parameter of ?_method=PATCH.
    This link is available only on the /references collection if the user has create permission.
    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 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.
    Sorting and Filtering

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

    The default sort order for the /references collection is by id.

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

    Reference

    Path: /references/{referenceId}

    A specific reference.

    Relation Method Description
    self GET Returns the full/complete representation of the reference.
    alternate GET Returns a summary representation of the reference returns application/vnd.sas.summary.
    updateReference PUT Updates a reference.
    Present only if the user has create permission.
    deleteReference DELETE Deletes the reference.
    Present only if the user has create permission.

    Reference Sources

    Path: `/references/referenceSources

    This API provides a collection of distinct values for the source member of a reference.

    The referenceSources collection representation is application/vnd.sas.collection.

    The collection items are String values. These types apply to the response for the self, collection, prev, next, first, and last links below.

    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 resources from the collection.
    Present if not at the start of the collection.
    next GET Returns the next page of resources from the collection.
    Present if not at the end of the collection.
    first GET Returns the first page of resources from the collection.
    Present if not at the start of the collection.
    last GET Returns the last page of resources from the collection.
    Present if not at the end of the collection.
    Sorting and Filtering

    The default sort order for the /references/referenceSources collection is by source.

    SAS Logon

    Base URLs:

    Terms of service Email: SAS Developers Web: SAS Developers

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

    The SAS Logon API provides the standard OAuth protocol endpoints through which clients obtain access tokens to make API calls.

    Terminology:

    Usage Notes

    Overview

    Most SAS Viya APIs require authentication for all operations, and many require authorization. For SAS Viya APIs, authentication and authorization require a valid access token. The SAS Logon API provides the standard OAuth protocol endpoints through which clients obtain access tokens to make subsequent API calls. Access tokens are obtained when a client makes a request and authenticates to the SAS Logon API with a valid form of authorization, which is expressed in the form of an authorization grant.

    Developers must first have their SAS administrator register a client identifier. The SAS administrator then provides API developers with the client identifier and client secret to use in API calls. Developers must use the client identifier and secret in all API calls.

    Operations

    Root

    Contains the operations for the root resource.

    Code samples

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

    GET /

    Returns a list containing a link to only top-level collections surfaced by this API. These top level links include the server information endpoint.

    Example responses

    Get root links

    {
      "links": [
        {
          "method": "GET",
          "rel": "info",
          "href": "/SASLogon/info",
          "uri": "/SASLogon/info",
          "type": "application/json"
        }
      ],
      "version": 1
    }
    
    Status Meaning Description Schema
    200 OK OK - returns the collection of top level links links
    Response Headers
    Status Header Type Format Description
    200 Content-Type string No description

    Client Administration

    Contains the operations for administering the Client resource.

    Return collection of clients

    Code samples

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

    GET /oauth/clients

    Returns the collection of clients registered.

    Authorization: Bearer token with clients.read, clients.admin, zones.{zoneId}.admin, or equivalent (SASAdministrators) scope.

    Parameters
    Name In Type Required Description
    filter query string false The SCIM filter for querying clients. The default is 'client_id pr'.
    sortBy query string false The field to sort results by. The default is client_id.
    sortOrder query string false The sort order of results by ascending or descending order. The default is ascending.
    startIndex query integer false The index of the first result on which to begin the page. The default is 1.
    count query integer false The number of results per page. The default is 100.

    Example responses

    A GET request to list clients.

    {
      "items": [
        {
          "scope": [
            "openid",
            "uaa.user"
          ],
          "client_id": "app",
          "resource_ids": [
            "none"
          ],
          "authorized_grant_types": [
            "authorization_code"
          ],
          "redirect_uri": [
            "https://example.com/app"
          ],
          "autoapprove": [
            "true"
          ],
          "authorities": [
            "uaa.none"
          ],
          "name": "My custom application",
          "lastModified": 1548439765963
        },
        {
          "scope": [
            "uaa.none"
          ],
          "client_id": "azure",
          "resource_ids": [
            "none"
          ],
          "authorized_grant_types": [
            "client_credentials"
          ],
          "authorities": [
            "SCIM"
          ],
          "access_token_validity": 63070000,
          "name": "Microsoft Azure SCIM client",
          "lastModified": 1548439755441
        }
      ],
      "startIndex": 1,
      "itemsPerPage": 1,
      "totalResults": 2,
      "schemas": [
        "http://cloudfoundry.org/schema/scim/oauth-clients-1.0"
      ]
    }
    
    Responses
    Status Meaning Description Schema
    200 OK The request succeeded. clientCollection
    400 Bad Request The request was invalid. An invalid query parameter was specified. None
    Response Headers
    Status Header Type Format Description
    200 Content-Type string No description

    Create client

    Code samples

    # You can also use wget
    curl -X POST https://example.com/SASLogon/oauth/clients \
      -H 'Authorization: Bearer <access-token-goes-here>' \
      -H 'Content-Type: application/json' \
      -H 'Accept: application/json'
    
    
    const inputBody = '{
      "scope": [
        "openid",
        "uaa.user"
      ],
      "client_id": "app",
      "client_secret": "appclientsecret",
      "resource_ids": [
        "none"
      ],
      "authorized_grant_types": [
        "authorization_code"
      ],
      "redirect_uri": [
        "https://example.com/app"
      ],
      "autoapprove": [
        "true"
      ],
      "authorities": [
        "uaa.none"
      ],
      "name": "My custom application"
    }';
    const headers = {
      'Content-Type':'application/json',
      'Accept':'application/json'
    };
    
    fetch('https://example.com/SASLogon/oauth/clients',
    {
      method: 'POST',
      body: inputBody,
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    import requests
    headers = {
      'Content-Type': 'application/json',
      'Accept': 'application/json'
    }
    
    r = requests.post('https://example.com/SASLogon/oauth/clients', headers = headers)
    
    print(r.json())
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Content-Type": []string{"application/json"},
            "Accept": []string{"application/json"},
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("POST", "https://example.com/SASLogon/oauth/clients", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    

    POST /oauth/clients

    Creates a new client.

    Authorization: Bearer token with clients.write, clients.admin, zones.{zoneId}.admin, or equivalent (SASAdministrators) scope.

    Body parameter

    An example of a request body for creating a client

    {
      "scope": [
        "openid",
        "uaa.user"
      ],
      "client_id": "app",
      "client_secret": "appclientsecret",
      "resource_ids": [
        "none"
      ],
      "authorized_grant_types": [
        "authorization_code"
      ],
      "redirect_uri": [
        "https://example.com/app"
      ],
      "autoapprove": [
        "true"
      ],
      "authorities": [
        "uaa.none"
      ],
      "name": "My custom application"
    }
    
    Parameters
    Name In Type Required Description
    body body clientIn true The client to be created.

    Example responses

    An example of performing a POST request to create a client

    {
      "scope": [
        "openid",
        "uaa.user"
      ],
      "client_id": "app",
      "resource_ids": [
        "none"
      ],
      "authorized_grant_types": [
        "authorization_code"
      ],
      "redirect_uri": [
        "https://example.com/app"
      ],
      "autoapprove": [
        "true"
      ],
      "authorities": [
        "uaa.none"
      ],
      "name": "My custom application",
      "lastModified": 1548439765169
    }
    
    Responses
    Status Meaning Description Schema
    201 Created A client object was created. The secret is masked in the response. client
    400 Bad Request The request was invalid. errorResponse
    Response Headers
    Status Header Type Format Description
    201 Content-Type string Type of returned content.

    Determine whether client exists

    Code samples

    # You can also use wget
    curl -X HEAD https://example.com/SASLogon/oauth/clients/{clientId}
      -H 'Authorization: Bearer <access-token-goes-here>' \
    
    
    
    fetch('https://example.com/SASLogon/oauth/clients/{clientId}',
    {
      method: 'HEAD'
    
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    import requests
    
    r = requests.head('https://example.com/SASLogon/oauth/clients/{clientId}')
    
    print(r.json())
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("HEAD", "https://example.com/SASLogon/oauth/clients/{clientId}", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    

    HEAD /oauth/clients/{clientId}

    Returns whether the client that is specified in the request exists.

    Authorization: Bearer token with clients.read, clients.admin, zones.{zoneId}.admin, or equivalent (SASAdministrators) scope.

    Parameters
    Name In Type Required Description
    clientId path string true The ID of the request client.
    Responses
    Status Meaning Description Schema
    200 OK The request succeeded. The requested client exists. None
    404 Not Found No client exists at the requested path. None
    Response Headers
    Status Header Type Format Description
    200 Content-Type string No description

    Return client

    Code samples

    # You can also use wget
    curl -X GET https://example.com/SASLogon/oauth/clients/{clientId} \
      -H 'Authorization: Bearer <access-token-goes-here>' \
      -H 'Accept: application/json'
    
    
    
    const headers = {
      'Accept':'application/json'
    };
    
    fetch('https://example.com/SASLogon/oauth/clients/{clientId}',
    {
      method: 'GET',
    
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    import requests
    headers = {
      'Accept': 'application/json'
    }
    
    r = requests.get('https://example.com/SASLogon/oauth/clients/{clientId}', headers = headers)
    
    print(r.json())
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Accept": []string{"application/json"},
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("GET", "https://example.com/SASLogon/oauth/clients/{clientId}", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    

    GET /oauth/clients/{clientId}

    Returns the client that is specified in the request.

    Authorization: Bearer token with clients.read, clients.admin, zones.{zoneId}.admin, or equivalent (SASAdministrators) scope.

    Parameters
    Name In Type Required Description
    clientId path string true The ID of the requested client.

    Example responses

    A GET request to retrieve client.

    {
      "scope": [
        "openid",
        "uaa.user"
      ],
      "client_id": "app",
      "resource_ids": [
        "none"
      ],
      "authorized_grant_types": [
        "authorization_code"
      ],
      "redirect_uri": [
        "https://example.com/app"
      ],
      "autoapprove": [
        "true"
      ],
      "authorities": [
        "uaa.none"
      ],
      "name": "My custom application",
      "lastModified": 1548439765963
    }
    
    Responses
    Status Meaning Description Schema
    200 OK The request succeeded. client
    404 Not Found No client exists at the requested path. None
    Response Headers
    Status Header Type Format Description
    200 Content-Type string No description

    Update client

    Code samples

    # You can also use wget
    curl -X PUT https://example.com/SASLogon/oauth/clients/{clientId} \
      -H 'Authorization: Bearer <access-token-goes-here>' \
      -H 'Content-Type: application/json' \
      -H 'Accept: application/json'
    
    
    const inputBody = '{
      "scope": [
        "openid",
        "uaa.user"
      ],
      "client_id": "app",
      "resource_ids": [
        "none"
      ],
      "authorized_grant_types": [
        "authorization_code"
      ],
      "redirect_uri": [
        "https://example.com/app"
      ],
      "autoapprove": [
        "true"
      ],
      "authorities": [
        "uaa.none"
      ],
      "name": "My custom application"
    }';
    const headers = {
      'Content-Type':'application/json',
      'Accept':'application/json'
    };
    
    fetch('https://example.com/SASLogon/oauth/clients/{clientId}',
    {
      method: 'PUT',
      body: inputBody,
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    import requests
    headers = {
      'Content-Type': 'application/json',
      'Accept': 'application/json'
    }
    
    r = requests.put('https://example.com/SASLogon/oauth/clients/{clientId}', headers = headers)
    
    print(r.json())
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Content-Type": []string{"application/json"},
            "Accept": []string{"application/json"},
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("PUT", "https://example.com/SASLogon/oauth/clients/{clientId}", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    

    PUT /oauth/clients/{clientId}

    Updates the existing client that is specified in the request. This method performs a full replacement of the client resource. The ID may not be changed.

    Authorization: Bearer token with clients.write, clients.admin, zones.{zoneId}.admin, or equivalent (SASAdministrators) scope.

    Body parameter

    An example of a request body for updating a client

    {
      "scope": [
        "openid",
        "uaa.user"
      ],
      "client_id": "app",
      "resource_ids": [
        "none"
      ],
      "authorized_grant_types": [
        "authorization_code"
      ],
      "redirect_uri": [
        "https://example.com/app"
      ],
      "autoapprove": [
        "true"
      ],
      "authorities": [
        "uaa.none"
      ],
      "name": "My custom application"
    }
    
    Parameters
    Name In Type Required Description
    clientId path string true The ID of the request client.
    body body clientIn true The client to be updated.

    Example responses

    An example of performing a PUT request to update a client

    {
      "scope": [
        "openid",
        "uaa.user"
      ],
      "client_id": "app",
      "resource_ids": [
        "none"
      ],
      "authorized_grant_types": [
        "authorization_code"
      ],
      "redirect_uri": [
        "https://example.com/app"
      ],
      "autoapprove": [
        "true"
      ],
      "authorities": [
        "uaa.none"
      ],
      "name": "My custom application",
      "lastModified": 1548439765169
    }
    
    Responses
    Status Meaning Description Schema
    200 OK The request succeeded and the updated client object is returned. The secret is masked in the response. client
    400 Bad Request The request was invalid. errorResponse
    404 Not Found No client exists at the requested path. The requested client could not be updated. None
    Response Headers
    Status Header Type Format Description
    200 Content-Type string Type of returned content.

    Delete client

    Code samples

    # You can also use wget
    curl -X DELETE https://example.com/SASLogon/oauth/clients/{clientId}
      -H 'Authorization: Bearer <access-token-goes-here>' \
    
    
    
    fetch('https://example.com/SASLogon/oauth/clients/{clientId}',
    {
      method: 'DELETE'
    
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    import requests
    
    r = requests.delete('https://example.com/SASLogon/oauth/clients/{clientId}')
    
    print(r.json())
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("DELETE", "https://example.com/SASLogon/oauth/clients/{clientId}", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    

    DELETE /oauth/clients/{clientId}

    Deletes the client that is specified in the request.

    Authorization: Bearer token with clients.write, clients.admin, zones.{zoneId}.admin, or equivalent (SASAdministrators) scope.

    Parameters
    Name In Type Required Description
    clientId path string true The ID of the request client.
    Responses
    Status Meaning Description Schema
    200 OK client deleted None
    404 Not Found No client exists at the requested path. The requested client could not be found or was deleted successfully. None

    Change secret

    Code samples

    # You can also use wget
    curl -X PUT https://example.com/SASLogon/oauth/clients/{clientId}/secret \
      -H 'Authorization: Bearer <access-token-goes-here>' \
      -H 'Content-Type: application/json' \
      -H 'Accept: application/json'
    
    
    const inputBody = '{
      "clientId": "app",
      "secret": "new_secret"
    }';
    const headers = {
      'Content-Type':'application/json',
      'Accept':'application/json'
    };
    
    fetch('https://example.com/SASLogon/oauth/clients/{clientId}/secret',
    {
      method: 'PUT',
      body: inputBody,
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    import requests
    headers = {
      'Content-Type': 'application/json',
      'Accept': 'application/json'
    }
    
    r = requests.put('https://example.com/SASLogon/oauth/clients/{clientId}/secret', headers = headers)
    
    print(r.json())
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Content-Type": []string{"application/json"},
            "Accept": []string{"application/json"},
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("PUT", "https://example.com/SASLogon/oauth/clients/{clientId}/secret", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    

    PUT /oauth/clients/{clientId}/secret

    Changes the secret for the client that is specified in the request.

    Authorization: Bearer token with clients.write, clients.admin, zones.{zoneId}.admin, or equivalent (SASAdministrators) scope.

    Body parameter

    An example of a request body to change a secret.

    {
      "clientId": "app",
      "secret": "new_secret"
    }
    
    Parameters
    Name In Type Required Description
    clientId path string true The ID of the request client.
    body body clientSecretIn true The client secret information

    Example responses

    An example of performing a PUT request to change a secret.

    {
      "status": "ok",
      "message": "secret updated"
    }
    

    Here is an example of an error response when the body is missing from a PUT request to change the client secret.

    {
      "errorCode": 0,
      "message": "The request body was missing or invalid.",
      "details": [
        "traceId: a43905a77c578fa2",
        "path: /SASLogon/oauth/clients/app/secret"
      ],
      "links": [],
      "version": 2,
      "httpStatusCode": 404
    }
    
    Responses
    Status Meaning Description Schema
    200 OK The request succeeded. The secret was updated. None
    400 Bad Request The request was invalid. errorResponse
    404 Not Found No client exists at the requested path. The requested client could not be updated. None
    Response Schema
    Response Headers
    Status Header Type Format Description
    200 Content-Type string No description

    Authorization

    Contains the operations for client authorization.

    Grant access using client credentials

    Code samples

    # You can also use wget
    curl -X POST https://example.com/SASLogon/oauth/token#client_credentials \
      -H 'Authorization: Bearer <access-token-goes-here>' \
      -H 'Content-Type: application/x-www-form-urlencoded' \
      -H 'Accept: application/json' \
      -H 'Authorization: string'
    
    
    const inputBody = '{
      "grant_type": "client_credentials"
    }';
    const headers = {
      'Content-Type':'application/x-www-form-urlencoded',
      'Accept':'application/json',
      'Authorization':'string'
    };
    
    fetch('https://example.com/SASLogon/oauth/token#client_credentials',
    {
      method: 'POST',
      body: inputBody,
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    import requests
    headers = {
      'Content-Type': 'application/x-www-form-urlencoded',
      'Accept': 'application/json',
      'Authorization': 'string'
    }
    
    r = requests.post('https://example.com/SASLogon/oauth/token#client_credentials', headers = headers)
    
    print(r.json())
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Content-Type": []string{"application/x-www-form-urlencoded"},
            "Accept": []string{"application/json"},
            "Authorization": []string{"string"},
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("POST", "https://example.com/SASLogon/oauth/token#client_credentials", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    

    POST /oauth/token#client_credentials

    Obtains an access token based on client credentials that have been granted to the registered client application. The SAS Logon service verifies the supplied client credentials. If they are valid, an access token is returned. Obtaining access tokens via client credentials grant works only with SAS Viya APIs that do not enforce authorization.

    Body parameter

    An example of a request body for obtaining an access token using its client credentials

    grant_type: client_credentials
    
    
    Parameters
    Name In Type Required Description
    Authorization header string false The basic authorization header containing the registered OAuth client identifier and secret. Optional if this information is passed as part of the form data.
    body body object false none
    » client_id body string false The client identifier for the registered OAuth client and recipient of the token. Optional if this information is passed as part of the Authorization header.
    » client_secret body string false The client secret for the registered OAuth client. Optional if this information is passed as part of the Authorization header.
    » grant_type body string true The type of authentication used to obtain the token. In this case, 'client_credentials'.
    » scope body string false The space-limited list of scopes. Defaults to get all the authorities registered to the client.

    Example responses

    An example of a client application obtaining an access token using its client credentials

    {
      "access_token": "eyJhbGciOiJSUzI1NiIsImtpZCI6ImxlZ2FjeS10b2tlbi1rZXkiLCJ0eXAiOiJKV1QifQ.eyJqdGkiOiIzMjJmZGIyOTAyYzg0YTUxYTY2N2I5MGI5OWZhMWYwNiIsInN1YiI6ImFwcCIsImF1dGhvcml0aWVzIjpbInVhYS5ub25lIl0sInNjb3BlIjpbInVhYS5ub25lIl0sImNsaWVudF9pZCI6ImFwcCIsImNpZCI6ImFwcCIsImF6cCI6ImFwcCIsImdyYW50X3R5cGUiOiJjbGllbnRfY3JlZGVudGlhbHMiLCJyZXZfc2lnIjoiNjY4ZjYzYjkiLCJpYXQiOjE1MjIxNjY2MTEsImV4cCI6MTUyMjIwOTgxMSwiaXNzIjoiaHR0cHM6Ly9leGFtcGxlLnNhcy5jb20vU0FTTG9nb24vb2F1dGgvdG9rZW4iLCJ6aWQiOiJ1YWEiLCJhdWQiOlsiYXBwIl19.VPuBsB2Yod-OKtt87nhjPFlkkhG3eN48CvFkbxvWli5hDYMihTmTBVTSuAAdqaZoesNwSICYWmjBbS0FJkIp5kNKxuxb8sEtwUa8zVS5FZy0D9Ocir1mS5Fgz7ox0u6YQDXKe_mC6tij8YaYzRxJiS-fcVe6vCaRjXHbIRqVQ3U",
      "token_type": "bearer",
      "expires_in": 43199,
      "scope": "uaa.none",
      "revocable": false,
      "jti": "322fdb2902c84a51a667b90b99fa1f06"
    }
    
    Responses
    Status Meaning Description Schema
    200 OK The request succeeded. Inline
    Response Schema

    Status Code 200

    Name Type Required Restrictions Description
    » access_token string false none The access token to use for subsequent API calls.
    » token_type string false none The type of access token issued (for example, 'bearer').
    » expires_in integer false none The number of seconds until the token expires.
    » scope string false none The space-limited list of scopes authorized for this client.
    » revocable boolean false none Indicates if the returned token is revocable.
    » jti string false none The globally unique identifier for this token.

    Grant access using password

    Code samples

    # You can also use wget
    curl -X POST https://example.com/SASLogon/oauth/token#password \
      -H 'Authorization: Bearer <access-token-goes-here>' \
      -H 'Content-Type: application/x-www-form-urlencoded' \
      -H 'Accept: application/json' \
      -H 'Authorization: string'
    
    
    const inputBody = '{
      "grant_type": "password",
      "username": "bob",
      "password": "bobspassword"
    }';
    const headers = {
      'Content-Type':'application/x-www-form-urlencoded',
      'Accept':'application/json',
      'Authorization':'string'
    };
    
    fetch('https://example.com/SASLogon/oauth/token#password',
    {
      method: 'POST',
      body: inputBody,
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    import requests
    headers = {
      'Content-Type': 'application/x-www-form-urlencoded',
      'Accept': 'application/json',
      'Authorization': 'string'
    }
    
    r = requests.post('https://example.com/SASLogon/oauth/token#password', headers = headers)
    
    print(r.json())
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Content-Type": []string{"application/x-www-form-urlencoded"},
            "Accept": []string{"application/json"},
            "Authorization": []string{"string"},
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("POST", "https://example.com/SASLogon/oauth/token#password", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    

    POST /oauth/token#password

    Obtains an access token on behalf of an end user, using that user's authenticating credentials (such as username and password) along with the client identifier and the associated secret that have been registered with the SAS environment. The user credentials are validated. If they are valid, the SAS Logon API returns an access token. Obtaining access tokens on behalf of an end user is required for all SAS Viya APIs that support user and group authorization rules.

    Body parameter

    An example of a request body for obtaining an access token on behalf of an end user by providing the users password credentials

    grant_type: password
    username: bob
    password: bobspassword
    
    
    Parameters
    Name In Type Required Description
    Authorization header string false The basic authorization header containing the registered OAuth client identifier and secret. Optional if this information is passed as part of the form data.
    body body object false none
    » client_id body string false The client identifier for the registered OAuth client and recipient of the token. Optional if this information is passed as part of the Authorization header.
    » client_secret body string false The client secret for the registered OAuth client. Optional if this information is passed as part of the Authorization header.
    » grant_type body string true The type of authentication used to obtain the token. In this case, 'password'.
    » response_type body string false The type of token that should be issued.
    » username body string true The username of the end user for whom the client is obtaining an access token on behalf of.
    » password body string true The end user's password.
    » scope body string false The space-limited list of scopes. Usually omitted, defaults to the scope registered to the client.

    Example responses

    An example of a client application obtaining an access token on behalf of an end user by providing the users password credentials

    {
      "access_token": "eyJhbGciOiJSUzI1NiIsImtpZCI6ImxlZ2FjeS10b2tlbi1rZXkiLCJ0eXAiOiJKV1QifQ.eyJqdGkiOiIzNTM4ZTQxNTEyNDY0NmU3YTJiZjA1NDBlNTM3MjNlNSIsInN1YiI6IjAzMzNiODlkLTc5MjUtNDllZS04N2Y3LTQ4YzY1Mzg2N2RlZCIsInNjb3BlIjpbIm9wZW5pZCIsImdyb3VwMSIsImdyb3VwMiIsImdyb3VwMyJdLCJjbGllbnRfaWQiOiJhcHAiLCJjaWQiOiJhcHAiLCJhenAiOiJhcHAiLCJncmFudF90eXBlIjoicGFzc3dvcmQiLCJ1c2VyX2lkIjoiMDMzM2I4OWQtNzkyNS00OWVlLTg3ZjctNDhjNjUzODY3ZGVkIiwib3JpZ2luIjoidWFhIiwidXNlcl9uYW1lIjoiYm9iIiwiZW1haWwiOiJub25lIiwiYXV0aF90aW1lIjoxNTIyMTY3MTY3LCJyZXZfc2lnIjoiOWEzYzI0ZWQiLCJpYXQiOjE1MjIxNjcxNjcsImV4cCI6MTUyMjIxMDM2NywiaXNzIjoiaHR0cHM6Ly9leGFtcGxlLnNhcy5jb20vU0FTTG9nb24vb2F1dGgvdG9rZW4iLCJ6aWQiOiJ1YWEiLCJhdWQiOlsiYXBwIiwib3BlbmlkIl19.EOpYXf5acyiTn1wY5Tjr9vdu5Ez_UyPnYriMPlR9DkDTPtxxphdCiQweMEx8bjevWmFhDV-m4MDFm9F551F36cyhkpaXq39Xu6My_iDdc-xdAMvm04PHhz6p2NDSjCrmg9L5remIK-WQDyN3klkKNQvuN2V8jklVoXVMj_bBgpg",
      "id_token": "eyJhbGciOiJSUzI1NiIsImtpZCI6ImxlZ2FjeS10b2tlbi1rZXkiLCJ0eXAiOiJKV1QifQ.eyJqdGkiOiIzNTM4ZTQxNTEyNDY0NmU3YTJiZjA1NDBlNTM3MjNlNSIsInN1YiI6IjAzMzNiODlkLTc5MjUtNDllZS04N2Y3LTQ4YzY1Mzg2N2RlZCIsInNjb3BlIjpbIm9wZW5pZCIsImdyb3VwMSIsImdyb3VwMiIsImdyb3VwMyJdLCJjbGllbnRfaWQiOiJhcHAiLCJjaWQiOiJhcHAiLCJhenAiOiJhcHAiLCJncmFudF90eXBlIjoicGFzc3dvcmQiLCJ1c2VyX2lkIjoiMDMzM2I4OWQtNzkyNS00OWVlLTg3ZjctNDhjNjUzODY3ZGVkIiwib3JpZ2luIjoidWFhIiwidXNlcl9uYW1lIjoiYm9iIiwiZW1haWwiOiJub25lIiwiYXV0aF90aW1lIjoxNTIyMTY3MTY3LCJyZXZfc2lnIjoiOWEzYzI0ZWQiLCJpYXQiOjE1MjIxNjcxNjcsImV4cCI6MTUyMjIxMDM2NywiaXNzIjoiaHR0cHM6Ly9leGFtcGxlLnNhcy5jb20vU0FTTG9nb24vb2F1dGgvdG9rZW4iLCJ6aWQiOiJ1YWEiLCJhdWQiOlsiYXBwIiwib3BlbmlkIl19.EOpYXf5acyiTn1wY5Tjr9vdu5Ez_UyPnYriMPlR9DkDTPtxxphdCiQweMEx8bjevWmFhDV-m4MDFm9F551F36cyhkpaXq39Xu6My_iDdc-xdAMvm04PHhz6p2NDSjCrmg9L5remIK-WQDyN3klkKNQvuN2V8jklVoXVMj_bBgpg",
      "refresh_token": "dfd22292eaf447c4af633ff589f8c899-r",
      "token_type": "bearer",
      "expires_in": 43199,
      "scope": "openid group1 group2 group3",
      "refresh_expires_in": 1209599,
      "refresh_revocable": true,
      "revocable": false,
      "jti": "322fdb2902c84a51a667b90b99fa1f06"
    }
    
    Responses
    Status Meaning Description Schema
    200 OK The request succeeded. Inline
    400 Bad Request The request was invalid. errorResponse
    Response Schema

    Status Code 200

    Name Type Required Restrictions Description
    » access_token string false none The access token to use for subsequent API calls.
    » token_type string false none The type of access token issued (for example, 'bearer').
    » id_token string false none The OIDC token that may be used by the client to authenticate the end user.
    » refresh_token string false none The refresh token that may be used by the client to obtain new access tokens.
    » expires_in integer false none The number of seconds until the token expires.
    » scope string false none The space-limited list of scopes authorized for this client.
    » refresh_expires_in integer false none The number of seconds until the refresh token expires.
    » refresh_revocable boolean false none Indicates if the returned refresh token is revocable.
    » revocable boolean false none Indicates if the returned token is revocable.
    » jti string false none The globally unique identifier for this token.

    Grant access using authorization code

    Code samples

    # You can also use wget
    curl -X POST https://example.com/SASLogon/oauth/token#authorization_code \
      -H 'Authorization: Bearer <access-token-goes-here>' \
      -H 'Content-Type: application/x-www-form-urlencoded' \
      -H 'Accept: application/json' \
      -H 'Authorization: string'
    
    
    const inputBody = '{
      "grant_type": "authorization_code",
      "code": "UJOjs7dWkEfoS45EHHRZTvFT6B0iJjoS"
    }';
    const headers = {
      'Content-Type':'application/x-www-form-urlencoded',
      'Accept':'application/json',
      'Authorization':'string'
    };
    
    fetch('https://example.com/SASLogon/oauth/token#authorization_code',
    {
      method: 'POST',
      body: inputBody,
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    import requests
    headers = {
      'Content-Type': 'application/x-www-form-urlencoded',
      'Accept': 'application/json',
      'Authorization': 'string'
    }
    
    r = requests.post('https://example.com/SASLogon/oauth/token#authorization_code', headers = headers)
    
    print(r.json())
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Content-Type": []string{"application/x-www-form-urlencoded"},
            "Accept": []string{"application/json"},
            "Authorization": []string{"string"},
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("POST", "https://example.com/SASLogon/oauth/token#authorization_code", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    

    POST /oauth/token#authorization_code

    Obtains an access token on behalf of an end user, using an authorization code provided by the user along with the client identifier and the associated secret that have been registered with the SAS environment. The authorization code is validated and can be used only once. If it is valid, the SAS Logon API returns an access token. Obtaining access tokens on behalf of an end user is required for all SAS Viya APIs that support user and group authorization rules.

    Body parameter

    An example of a request body for obtaining an access token on behalf of an end user by providing an authorization code

    grant_type: authorization_code
    code: UJOjs7dWkEfoS45EHHRZTvFT6B0iJjoS
    
    
    Parameters
    Name In Type Required Description
    Authorization header string false The basic authorization header containing the registered OAuth client identifier and secret. Optional if this information is passed as part of the form data.
    body body object false none
    » client_id body string false The client identifier for the registered OAuth client and recipient of the token. Optional if this information is passed as part of the Authorization header.
    » client_secret body string false The client secret for the registered OAuth client. Optional if this information is passed as part of the Authorization header.
    » grant_type body string true The type of authentication used to obtain the token. In this case, 'authorization_code'.
    » response_type body string false The type of token that should be issued.
    » code body string true The authorization code provided by the end user for whom the client is obtaining an access token on behalf of.
    » scope body string false The space-limited list of scopes. Usually omitted, this value must match the scope in the authorization request.

    Example responses

    An example of a client application obtaining an access token on behalf of an end user by providing the users password credentials

    {
      "access_token": "eyJhbGciOiJSUzI1NiIsImtpZCI6ImxlZ2FjeS10b2tlbi1rZXkiLCJ0eXAiOiJKV1QifQ.eyJqdGkiOiIzNTM4ZTQxNTEyNDY0NmU3YTJiZjA1NDBlNTM3MjNlNSIsInN1YiI6IjAzMzNiODlkLTc5MjUtNDllZS04N2Y3LTQ4YzY1Mzg2N2RlZCIsInNjb3BlIjpbIm9wZW5pZCIsImdyb3VwMSIsImdyb3VwMiIsImdyb3VwMyJdLCJjbGllbnRfaWQiOiJhcHAiLCJjaWQiOiJhcHAiLCJhenAiOiJhcHAiLCJncmFudF90eXBlIjoicGFzc3dvcmQiLCJ1c2VyX2lkIjoiMDMzM2I4OWQtNzkyNS00OWVlLTg3ZjctNDhjNjUzODY3ZGVkIiwib3JpZ2luIjoidWFhIiwidXNlcl9uYW1lIjoiYm9iIiwiZW1haWwiOiJub25lIiwiYXV0aF90aW1lIjoxNTIyMTY3MTY3LCJyZXZfc2lnIjoiOWEzYzI0ZWQiLCJpYXQiOjE1MjIxNjcxNjcsImV4cCI6MTUyMjIxMDM2NywiaXNzIjoiaHR0cHM6Ly9leGFtcGxlLnNhcy5jb20vU0FTTG9nb24vb2F1dGgvdG9rZW4iLCJ6aWQiOiJ1YWEiLCJhdWQiOlsiYXBwIiwib3BlbmlkIl19.EOpYXf5acyiTn1wY5Tjr9vdu5Ez_UyPnYriMPlR9DkDTPtxxphdCiQweMEx8bjevWmFhDV-m4MDFm9F551F36cyhkpaXq39Xu6My_iDdc-xdAMvm04PHhz6p2NDSjCrmg9L5remIK-WQDyN3klkKNQvuN2V8jklVoXVMj_bBgpg",
      "id_token": "eyJhbGciOiJSUzI1NiIsImtpZCI6ImxlZ2FjeS10b2tlbi1rZXkiLCJ0eXAiOiJKV1QifQ.eyJqdGkiOiIzNTM4ZTQxNTEyNDY0NmU3YTJiZjA1NDBlNTM3MjNlNSIsInN1YiI6IjAzMzNiODlkLTc5MjUtNDllZS04N2Y3LTQ4YzY1Mzg2N2RlZCIsInNjb3BlIjpbIm9wZW5pZCIsImdyb3VwMSIsImdyb3VwMiIsImdyb3VwMyJdLCJjbGllbnRfaWQiOiJhcHAiLCJjaWQiOiJhcHAiLCJhenAiOiJhcHAiLCJncmFudF90eXBlIjoicGFzc3dvcmQiLCJ1c2VyX2lkIjoiMDMzM2I4OWQtNzkyNS00OWVlLTg3ZjctNDhjNjUzODY3ZGVkIiwib3JpZ2luIjoidWFhIiwidXNlcl9uYW1lIjoiYm9iIiwiZW1haWwiOiJub25lIiwiYXV0aF90aW1lIjoxNTIyMTY3MTY3LCJyZXZfc2lnIjoiOWEzYzI0ZWQiLCJpYXQiOjE1MjIxNjcxNjcsImV4cCI6MTUyMjIxMDM2NywiaXNzIjoiaHR0cHM6Ly9leGFtcGxlLnNhcy5jb20vU0FTTG9nb24vb2F1dGgvdG9rZW4iLCJ6aWQiOiJ1YWEiLCJhdWQiOlsiYXBwIiwib3BlbmlkIl19.EOpYXf5acyiTn1wY5Tjr9vdu5Ez_UyPnYriMPlR9DkDTPtxxphdCiQweMEx8bjevWmFhDV-m4MDFm9F551F36cyhkpaXq39Xu6My_iDdc-xdAMvm04PHhz6p2NDSjCrmg9L5remIK-WQDyN3klkKNQvuN2V8jklVoXVMj_bBgpg",
      "refresh_token": "dfd22292eaf447c4af633ff589f8c899-r",
      "token_type": "bearer",
      "expires_in": 43199,
      "scope": "openid group1 group2 group3",
      "refresh_expires_in": 1209599,
      "refresh_revocable": true,
      "revocable": false,
      "jti": "322fdb2902c84a51a667b90b99fa1f06"
    }
    
    Responses
    Status Meaning Description Schema
    200 OK The request succeeded. Inline
    400 Bad Request The request was invalid. errorResponse
    Response Schema

    Status Code 200

    Name Type Required Restrictions Description
    » access_token string false none The access token to use for subsequent API calls.
    » token_type string false none The type of access token issued (for example, 'bearer').
    » id_token string false none The OIDC token that may be used by the client to authenticate the end user.
    » expires_in integer false none The number of seconds until the token expires.
    » scope string false none The space-limited list of scopes authorized for this client.
    » refresh_expires_in integer false none The number of seconds until the refresh token expires.
    » refresh_revocable boolean false none Indicates if the returned refresh token is revocable.
    » revocable boolean false none Indicates if the returned token is revocable.
    » jti string false none The globally unique identifier for this token.

    Schemas

    clientIn

    {
      "client_id": "string",
      "authorized_grant_types": [
        "string"
      ],
      "redirect_uri": [
        "string"
      ],
      "scope": [
        "string"
      ],
      "resource_ids": [
        "string"
      ],
      "authorities": [
        "string"
      ],
      "autoapprove": [
        "string"
      ],
      "access_token_validity": 0,
      "refresh_token_validity": 0,
      "allowedproviders": [
        "string"
      ],
      "name": "string",
      "token_salt": "string",
      "createdwith": "string",
      "approvals_deleted": true,
      "required_user_groups": [
        "string"
      ],
      "client_secret": "string"
    }
    
    

    Client Input

    Properties
    Name Type Required Restrictions Description
    client_id string true none The client identifier that is unique within identity zone.
    authorized_grant_types [string] true none The list of grant types that can be used to obtain a token with this client. Types can include authorization_code, password, implicit, and client_credentials.
    redirect_uri [string] false none The allowed URI pattern for redirect during authorization or "urn:ietf:wg:oauth:2.0:oob" for out-of-band delivery.
    scope [string] false none The list of scopes allowed for the client to obtain on behalf of users, when using any grant type other than "client_credentials". For most SAS Viya APIs, "openid" and "uaa.user" are sufficient. For client applications that only use the grant type "client_credentials" and therefore do not act on behalf of users, use the default scope "uaa.none".
    resource_ids [string] false none The resources that the client is allowed to access.
    authorities [string] false none The list of groups the client is a member of, to access resources and endpoints.
    autoapprove [string] false none The scopes that do not require user approval, or a simple Boolean value to apply to all scopes.
    access_token_validity integer false none The time in seconds to access token expiration after it is issued.
    refresh_token_validity integer false none The time in seconds to refresh token expiration after it is issued.
    allowedproviders [string] false none The list of the origin keys (alias) for identity providers that the client is limited to. Null implies any identity provider is allowed.
    name string false none The human-readable name for the client.
    token_salt string false none A random string that is used to generate the client's revocation key. Change this value to revoke all active tokens for the client.
    createdwith string false none The scope that the bearer token had when the client was created.
    approvals_deleted boolean false none An indication whether the approvals were deleted for the client and an audit event was sent.
    required_user_groups [string] false none A list of group names. If a user does not belong to all the required groups, the user will not be authenticated and no tokens are issued to this client for that user. If this field is not specified, authentication and token issuance proceeds normally.
    client_secret string false none The secret string used for authenticating as this client. To support secret rotation this can be a space-delimited string of two secrets. This is required if the client allows authorization_code or client_credentials grant type.

    client

    {
      "client_id": "string",
      "authorized_grant_types": [
        "string"
      ],
      "redirect_uri": [
        "string"
      ],
      "scope": [
        "string"
      ],
      "resource_ids": [
        "string"
      ],
      "authorities": [
        "string"
      ],
      "autoapprove": [
        "string"
      ],
      "access_token_validity": 0,
      "refresh_token_validity": 0,
      "allowedproviders": [
        "string"
      ],
      "name": "string",
      "token_salt": "string",
      "createdwith": "string",
      "approvals_deleted": true,
      "required_user_groups": [
        "string"
      ],
      "client_secret": "string",
      "lastModified": 0
    }
    
    

    Client

    Properties
    Name Type Required Restrictions Description
    Client any false none The OAuth client information that is returned from the server response.

    allOf

    Name Type Required Restrictions Description
    anonymous clientIn false none The OAuth client information that is passed as input to the POST/PUT calls.

    and

    Name Type Required Restrictions Description
    anonymous object false none none
    » lastModified integer false none The epoch (milliseconds) of the moment the client information was last altered.

    clientCollection

    {
      "startIndex": 0,
      "itemsPerPage": 0,
      "totalResults": 0,
      "items": [
        {
          "client_id": "string",
          "authorized_grant_types": [
            "string"
          ],
          "redirect_uri": [
            "string"
          ],
          "scope": [
            "string"
          ],
          "resource_ids": [
            "string"
          ],
          "authorities": [
            "string"
          ],
          "autoapprove": [
            "string"
          ],
          "access_token_validity": 0,
          "refresh_token_validity": 0,
          "allowedproviders": [
            "string"
          ],
          "name": "string",
          "token_salt": "string",
          "createdwith": "string",
          "approvals_deleted": true,
          "required_user_groups": [
            "string"
          ],
          "client_secret": "string",
          "lastModified": 0
        }
      ]
    }
    
    

    Client Collection

    Properties
    Name Type Required Restrictions Description
    startIndex integer false none none
    itemsPerPage integer false none none
    totalResults integer false none none
    items [client] false none [The OAuth client information that is returned from the server response.]

    clientSecretIn

    {
      "clientId": "string",
      "oldSecret": "string",
      "secret": "string",
      "changeMode": "string"
    }
    
    

    Client Secret

    Properties
    Name Type Required Restrictions Description
    clientId string true none The client identifier that is unique within identity zone.
    oldSecret string false none The valid client secret before updating. This is optional if authenticated as an admin client. Otherwise, it is required.
    secret string true none The new client secret.
    changeMode string false none (Optional) The default is UPDATE. If change mode is set to ADD, then the new secret is added to the existing one. If the change mode is set to DELETE, then the old secret is deleted to support secret rotation. Only two client secrets are supported at any given time.

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

    Link

    Properties
    Name Type Required Restrictions Description
    method string false none The HTTP method to invoke this endpoint.
    rel string true none The relationship of this URL to the object.
    uri string false none The relative URI of the REST endpoint.
    href string false none The full URL of the REST endpoint.
    title string false none The title for the link.
    type string false none The media type consumed/produced.
    itemType string false none If this is a link to a container, itemType is the media type or link type for the items in the container.
    responseType string false none The media type or link type of the response body for a PUT, POST, or PATCH operation.
    responseItemType string false none The media type or link type of the items in the response body for a PUT, POST, or PATCH operation.

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

    Links

    Properties
    Name Type Required Restrictions Description
    version integer false none The version of the links model.
    links [link] false none [A link to a related operation or resource.]

    errorResponse

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

    Error

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

    Examples

    Github Examples

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