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.
    403 16321 The logged in used do not have access on this object.
    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

    Annotation Collection.

    {
      "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": "Bad Request",
      "httpStatusCode": 400,
      "errorCode": 16317,
      "details": [
        "path /annotations/annotations",
        "correlator 87b2b31a-043f-4b1a-97b0-d0e4d3a7ad03"
      ]
    }
    
    {
      "version": 2,
      "message": "Bad Request",
      "httpStatusCode": 400,
      "errorCode": 16317,
      "details": [
        "path /annotations/annotations",
        "correlator 87b2b31a-043f-4b1a-97b0-d0e4d3a7ad03"
      ]
    }
    
    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": "Bad Request",
      "httpStatusCode": 400,
      "errorCode": 16302,
      "details": [
        "path /annotations/annotations",
        "correlator 87b2b31a-043f-4b1a-97b0-d0e4d3a7ad03"
      ]
    }
    
    {
      "version": 2,
      "message": "Bad Request",
      "httpStatusCode": 400,
      "errorCode": 16302,
      "details": [
        "path /annotations/annotations",
        "correlator 87b2b31a-043f-4b1a-97b0-d0e4d3a7ad03"
      ]
    }
    
    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 corresponding 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": "The importRequest was not valid.",
      "httpStatusCode": 400,
      "errorCode": 16319,
      "details": [
        "path /transfer/importJobs",
        "correlator 87b2b31a-043f-4b1a-97b0-d0e4d3a7ad03"
      ]
    }
    
    {
      "version": 2,
      "message": "The importRequest was not valid.",
      "httpStatusCode": 400,
      "errorCode": 16319,
      "details": [
        "path /transfer/importJobs",
        "correlator 87b2b31a-043f-4b1a-97b0-d0e4d3a7ad03"
      ]
    }
    
    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

    Create multiple annotations

    Code samples

    # You can also use wget
    curl -X POST https://example.com/annotations/annotations#batchCreate \
      -H 'Authorization: Bearer <access-token-goes-here>' \
      -H 'Content-Type: application/vnd.sas.collection+json' \
      -H 'Accept: application/vnd.sas.collection+json'
    
    
    const inputBody = '{
      "items": [
        {
          "name": "Annotation1",
          "domain": "DomainLabel1",
          "label": "Label1",
          "description": "Description1"
        },
        {
          "name": "Annotation2",
          "domain": "DomainLabel2",
          "label": "Label2",
          "description": "Description2"
        }
      ]
    }';
    const headers = {
      'Content-Type':'application/vnd.sas.collection+json',
      'Accept':'application/vnd.sas.collection+json'
    };
    
    fetch('https://example.com/annotations/annotations#batchCreate',
    {
      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'
    }
    
    r = requests.post('https://example.com/annotations/annotations#batchCreate', 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"},
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("POST", "https://example.com/annotations/annotations#batchCreate", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    

    POST /annotations#batchCreate

    Multi-POST. This operation is used to add multiple annotation that do not exists. All successfully created annotations will be returned in the response body in the same order that they were provided in the request body. For any annotation that failed to be created, the collection returned will contain an application/vnd.sas.error object in place of application/vnd.sas.annotation object.

    Body parameter

    Request body for creating annotations.

    {
      "items": [
        {
          "name": "Annotation1",
          "domain": "DomainLabel1",
          "label": "Label1",
          "description": "Description1"
        },
        {
          "name": "Annotation2",
          "domain": "DomainLabel2",
          "label": "Label2",
          "description": "Description2"
        }
      ]
    }
    
    Parameters
    Name In Type Required Description
    body body batchCreateAnnotations true List of annotations to be created.

    Example responses

    Annotation Collection.

    {
      "count": 2,
      "limit": 2,
      "version": 2,
      "items": [
        {
          "id": "f9bd5124-418f-4326-86cf-b6d98d57778",
          "name": "Annotation1",
          "domain": "DomainLabel1",
          "description": "Description1",
          "label": "Label1",
          "creationTimeStamp": "2023-04-10T18:02:07.986Z",
          "modifiedTimeStamp": "2023-04-10T18: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"
            }
          ]
        },
        {
          "id": "y8bd5124-418f-4326-86cf-b6d98d57778",
          "name": "Annotation2",
          "domain": "DomainLabel2",
          "description": "Description2",
          "creationTimeStamp": "2023-04-10T18:02:07.986Z",
          "modifiedTimeStamp": "2023-04-10T18: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/y8bd5124-418f-4326-86cf-b6d98d57778",
              "uri": "/annotations/annotations/y8bd5124-418f-4326-86cf-b6d98d57778",
              "type": "application/vnd.sas.annotation"
            },
            {
              "method": "PUT",
              "rel": "update",
              "href": "/annotations/annotations/y8bd5124-418f-4326-86cf-b6d98d57778",
              "uri": "/annotations/annotations/y8bd5124-418f-4326-86cf-b6d98d57778",
              "type": "application/vnd.sas.annotation"
            },
            {
              "method": "DELETE",
              "rel": "delete",
              "href": "/annotations/annotations/y8bd5124-418f-4326-86cf-b6d98d57778",
              "uri": "/annotations/annotations/y8bd5124-418f-4326-86cf-b6d98d57778"
            }
          ]
        }
      ]
    }
    

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

    {
      "version": 2,
      "message": "Bad Request",
      "httpStatusCode": 400,
      "errorCode": 16302,
      "details": [
        "path /annotations/annotations",
        "correlator 87b2b31a-043f-4b1a-97b0-d0e4d3a7ad03"
      ]
    }
    
    Responses
    Status Meaning Description Schema
    200 OK At least one annotation was created. If individual resource creation fails, the corresponding item in the response collection will be an application/vnd.sas.error object that describes why/how that operation failed. The httpStatusCode member of the nested error item will indicate the failure (401, 403, etc.). annotationCollection
    400 Bad Request The request was invalid. error2

    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,
      "errorCode": 16304,
      "version": 2,
      "details": [
        "path /annotations/annotations/bd853c18-9faf-4f9a-a31a-3cdfc6bf866a",
        "correlator 87b2b31a-043f-4b1a-97b0-d0e4d3a7ad03"
      ]
    }
    
    {
      "message": "not found",
      "httpStatusCode": 404,
      "errorCode": 16304,
      "version": 2,
      "details": [
        "path /annotations/annotations/bd853c18-9faf-4f9a-a31a-3cdfc6bf866a",
        "correlator 87b2b31a-043f-4b1a-97b0-d0e4d3a7ad03"
      ]
    }
    
    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,
      "errorCode": 16306,
      "version": 2,
      "details": [
        "path /annotations/annotations/bd853c18-9faf-4f9a-a31a-3cdfc6bf866a",
        "correlator 87b2b31a-043f-4b1a-97b0-d0e4d3a7ad03"
      ]
    }
    
    {
      "message": "The specified \"If-Match\" header value did not match the value in the conditional PUT request for the object.",
      "httpStatusCode": 412,
      "errorCode": 16306,
      "version": 2,
      "details": [
        "path /annotations/annotations/bd853c18-9faf-4f9a-a31a-3cdfc6bf866a",
        "correlator 87b2b31a-043f-4b1a-97b0-d0e4d3a7ad03"
      ]
    }
    

    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,
      "errorCode": 16305,
      "version": 2,
      "details": [
        "path /annotations/annotations/bd853c18-9faf-4f9a-a31a-3cdfc6bf866a",
        "correlator 87b2b31a-043f-4b1a-97b0-d0e4d3a7ad03"
      ]
    }
    
    {
      "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,
      "errorCode": 16305,
      "version": 2,
      "details": [
        "path /annotations/annotations/bd853c18-9faf-4f9a-a31a-3cdfc6bf866a",
        "correlator 87b2b31a-043f-4b1a-97b0-d0e4d3a7ad03"
      ]
    }
    
    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,
      "errorCode": 16304,
      "version": 2,
      "details": [
        "path /annotations/annotations/bd853c18-9faf-4f9a-a31a-3cdfc6bf866a",
        "correlator 87b2b31a-043f-4b1a-97b0-d0e4d3a7ad03"
      ]
    }
    
    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 objects for an annotation.

    {
      "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"
            }
          ]
        }
      ],
      "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"
        }
      ],
      "limit": 10,
      "version": 2
    }
    
    {
      "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"
            }
          ]
        }
      ],
      "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"
        }
      ],
      "limit": 10,
      "version": 2
    }
    

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

    {
      "message": "not found",
      "httpStatusCode": 404,
      "errorCode": 16303,
      "version": 2,
      "details": [
        "path /annotations/annotations/bd853c18-9faf-4f9a-a31a-3cdfc6bf866a/member",
        "correlator 87b2b31a-043f-4b1a-97b0-d0e4d3a7ad03"
      ]
    }
    
    {
      "message": "not found",
      "httpStatusCode": 404,
      "errorCode": 16303,
      "version": 2,
      "details": [
        "path /annotations/annotations/bd853c18-9faf-4f9a-a31a-3cdfc6bf866a/member",
        "correlator 87b2b31a-043f-4b1a-97b0-d0e4d3a7ad03"
      ]
    }
    
    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 = '{
      "annotationId": "0782c5ec-7e39-45cc-a103-0ce854c41a72",
      "resourceType": "folder",
      "resourceUri": "/folders/folders/a0bf029d-802b-4eb2-ba18-0f1f7ddac66d",
      "value": "newFolder"
    }';
    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

    {
      "annotationId": "0782c5ec-7e39-45cc-a103-0ce854c41a72",
      "resourceType": "folder",
      "resourceUri": "/folders/folders/a0bf029d-802b-4eb2-ba18-0f1f7ddac66d",
      "value": "newFolder"
    }
    
    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,
      "errorCode": 16304,
      "version": 2,
      "details": [
        "path /annotations/annotations/bd853c18-9faf-4f9a-a31a-3cdfc6bf866a",
        "correlator 87b2b31a-043f-4b1a-97b0-d0e4d3a7ad03"
      ]
    }
    
    {
      "message": "not found",
      "httpStatusCode": 404,
      "errorCode": 16304,
      "version": 2,
      "details": [
        "path /annotations/annotations/bd853c18-9faf-4f9a-a31a-3cdfc6bf866a",
        "correlator 87b2b31a-043f-4b1a-97b0-d0e4d3a7ad03"
      ]
    }
    
    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,
      "errorCode": 16304,
      "version": 2,
      "details": [
        "path /annotations/annotations/bd853c18-9faf-4f9a-a31a-3cdfc6bf866a",
        "correlator 87b2b31a-043f-4b1a-97b0-d0e4d3a7ad03"
      ]
    }
    
    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,
      "errorCode": 16304,
      "version": 2,
      "details": [
        "path /annotations/annotations/bd853c18-9faf-4f9a-a31a-3cdfc6bf866a",
        "correlator 87b2b31a-043f-4b1a-97b0-d0e4d3a7ad03"
      ]
    }
    
    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,
      "errorCode": 16304,
      "version": 2,
      "details": [
        "path /annotations/annotations/bd853c18-9faf-4f9a-a31a-3cdfc6bf866a",
        "correlator 87b2b31a-043f-4b1a-97b0-d0e4d3a7ad03"
      ]
    }
    
    {
      "message": "not found",
      "httpStatusCode": 404,
      "errorCode": 16304,
      "version": 2,
      "details": [
        "path /annotations/annotations/bd853c18-9faf-4f9a-a31a-3cdfc6bf866a",
        "correlator 87b2b31a-043f-4b1a-97b0-d0e4d3a7ad03"
      ]
    }
    

    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,
      "errorCode": 16306,
      "version": 2,
      "details": [
        "path /annotations/annotations/bd853c18-9faf-4f9a-a31a-3cdfc6bf866a",
        "correlator 87b2b31a-043f-4b1a-97b0-d0e4d3a7ad03"
      ]
    }
    
    {
      "message": "The specified \"If-Match\" header value did not match the value in the conditional PUT request for the object.",
      "httpStatusCode": 412,
      "errorCode": 16306,
      "version": 2,
      "details": [
        "path /annotations/annotations/bd853c18-9faf-4f9a-a31a-3cdfc6bf866a",
        "correlator 87b2b31a-043f-4b1a-97b0-d0e4d3a7ad03"
      ]
    }
    

    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,
      "errorCode": 16305,
      "version": 2,
      "details": [
        "path /annotations/annotations/bd853c18-9faf-4f9a-a31a-3cdfc6bf866a",
        "correlator 87b2b31a-043f-4b1a-97b0-d0e4d3a7ad03"
      ]
    }
    
    {
      "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,
      "errorCode": 16305,
      "version": 2,
      "details": [
        "path /annotations/annotations/bd853c18-9faf-4f9a-a31a-3cdfc6bf866a",
        "correlator 87b2b31a-043f-4b1a-97b0-d0e4d3a7ad03"
      ]
    }
    
    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,
      "errorCode": 16304,
      "version": 2,
      "details": [
        "path /annotations/annotations/bd853c18-9faf-4f9a-a31a-3cdfc6bf866a",
        "correlator 87b2b31a-043f-4b1a-97b0-d0e4d3a7ad03"
      ]
    }
    
    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

    Create multiple members

    Code samples

    # You can also use wget
    curl -X POST https://example.com/annotations/annotations/members#batchCreate \
      -H 'Authorization: Bearer <access-token-goes-here>' \
      -H 'Content-Type: application/vnd.sas.collection+json' \
      -H 'Accept: application/vnd.sas.collection+json'
    
    
    const inputBody = '{
      "items": [
        {
          "annotationId": "561b0a40-70d2-4f48-a682-7c52c4c3b9b6",
          "members": [
            {
              "resourceType": "folder",
              "resourceUri": "/folders/folders/a0bf029d-802b-4eb2-ba18-0f1f7ddac66d",
              "value": "newFolder"
            },
            {
              "resourceType": "reports",
              "resourceUri": "/reports/reports/a0bf029d-802b-4eb2-ba18-0f1f7ddac66d",
              "value": "newReport"
            }
          ]
        },
        {
          "annotationId": "a92de124-1404-4431-8863-7d5978388222",
          "members": [
            {
              "resourceType": "folder",
              "resourceUri": "/folders/folders/0782c5ec-7e39-45cc-a103-0ce854c41a72",
              "value": "newFolder"
            }
          ]
        }
      ]
    }';
    const headers = {
      'Content-Type':'application/vnd.sas.collection+json',
      'Accept':'application/vnd.sas.collection+json'
    };
    
    fetch('https://example.com/annotations/annotations/members#batchCreate',
    {
      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'
    }
    
    r = requests.post('https://example.com/annotations/annotations/members#batchCreate', 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"},
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("POST", "https://example.com/annotations/annotations/members#batchCreate", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    

    POST /annotations/members#batchCreate

    Multi-POST. It takes map of annotationIds to list of members and creates the members if they don't exists. This operation is used to create members that will be associated with an annotation. All successfully created members will be returned in the response body in the order that they were provided in the request body. For any members that failed to be created, the collection returned will contain an application/vnd.sas.error object in place of application/vnd.sas.member object.

    Body parameter

    Response body for creating members.

    {
      "items": [
        {
          "annotationId": "561b0a40-70d2-4f48-a682-7c52c4c3b9b6",
          "members": [
            {
              "resourceType": "folder",
              "resourceUri": "/folders/folders/a0bf029d-802b-4eb2-ba18-0f1f7ddac66d",
              "value": "newFolder"
            },
            {
              "resourceType": "reports",
              "resourceUri": "/reports/reports/a0bf029d-802b-4eb2-ba18-0f1f7ddac66d",
              "value": "newReport"
            }
          ]
        },
        {
          "annotationId": "a92de124-1404-4431-8863-7d5978388222",
          "members": [
            {
              "resourceType": "folder",
              "resourceUri": "/folders/folders/0782c5ec-7e39-45cc-a103-0ce854c41a72",
              "value": "newFolder"
            }
          ]
        }
      ]
    }
    
    Parameters
    Name In Type Required Description
    body body batchCreateMembers true Collection of map of annotation Ids to the list of members to be created.

    Example responses

    Collection of members created.

    {
      "start": 0,
      "count": 3,
      "limit": 3,
      "version": 2,
      "items": [
        {
          "creationTimeStamp": "2023-04-10T20:11:17.132Z",
          "modifiedTimeStamp": "2023-04-10T20:11:17.132Z",
          "createdBy": "sasboot",
          "modifiedBy": "sasboot",
          "version": 1,
          "id": "a7f35cb5-c72d-4fae-a5f3-af74f26cdf42",
          "annotationId": "561b0a40-70d2-4f48-a682-7c52c4c3b9b6",
          "resourceType": "table",
          "resourceUri": "objects/b673660283/96764860d",
          "value": "objectValue",
          "links": [
            {
              "method": "GET",
              "rel": "annotation",
              "href": "/annotations/annotations/561b0a40-70d2-4f48-a682-7c52c4c3b9b6",
              "uri": "/annotations/annotations/561b0a40-70d2-4f48-a682-7c52c4c3b9b6",
              "type": "application/vnd.sas.annotation"
            },
            {
              "method": "GET",
              "rel": "self",
              "href": "/annotations/annotations/561b0a40-70d2-4f48-a682-7c52c4c3b9b6/members/a7f35cb5-c72d-4fae-a5f3-af74f26cdf42",
              "uri": "/annotations/annotations/561b0a40-70d2-4f48-a682-7c52c4c3b9b6/members/a7f35cb5-c72d-4fae-a5f3-af74f26cdf42",
              "type": "application/vnd.sas.annotation.member"
            },
            {
              "method": "PUT",
              "rel": "update",
              "href": "/annotations/annotations/561b0a40-70d2-4f48-a682-7c52c4c3b9b6/members/a7f35cb5-c72d-4fae-a5f3-af74f26cdf42",
              "uri": "/annotations/annotations/561b0a40-70d2-4f48-a682-7c52c4c3b9b6/members/a7f35cb5-c72d-4fae-a5f3-af74f26cdf42",
              "type": "application/vnd.sas.annotation.member"
            },
            {
              "method": "DELETE",
              "rel": "delete",
              "href": "/annotations/annotations/561b0a40-70d2-4f48-a682-7c52c4c3b9b6/members/a7f35cb5-c72d-4fae-a5f3-af74f26cdf42",
              "uri": "/annotations/annotations/561b0a40-70d2-4f48-a682-7c52c4c3b9b6/members/a7f35cb5-c72d-4fae-a5f3-af74f26cdf42"
            },
            {
              "method": "GET",
              "rel": "up",
              "href": "/annotations/annotations/561b0a40-70d2-4f48-a682-7c52c4c3b9b6/members",
              "uri": "/annotations/annotations/561b0a40-70d2-4f48-a682-7c52c4c3b9b6/members",
              "type": "application/vnd.sas.annotation.member",
              "responseType": "application/vnd.sas.annotation.member"
            }
          ]
        },
        {
          "creationTimeStamp": "2023-04-10T20:11:17.132Z",
          "modifiedTimeStamp": "2023-04-10T20:11:17.132Z",
          "createdBy": "sasboot",
          "modifiedBy": "sasboot",
          "version": 1,
          "id": "b7f35cb5-c72d-4fae-a5f3-af74f26cdf42",
          "annotationId": "561b0a40-70d2-4f48-a682-7c52c4c3b9b6",
          "resourceType": "table",
          "resourceUri": "objects/b673660283/96764860d",
          "value": "objectValue",
          "links": [
            {
              "method": "GET",
              "rel": "annotation",
              "href": "/annotations/annotations/561b0a40-70d2-4f48-a682-7c52c4c3b9b6",
              "uri": "/annotations/annotations/561b0a40-70d2-4f48-a682-7c52c4c3b9b6",
              "type": "application/vnd.sas.annotation"
            },
            {
              "method": "GET",
              "rel": "self",
              "href": "/annotations/annotations/561b0a40-70d2-4f48-a682-7c52c4c3b9b6/members/b7f35cb5-c72d-4fae-a5f3-af74f26cdf42",
              "uri": "/annotations/annotations/561b0a40-70d2-4f48-a682-7c52c4c3b9b6/members/b7f35cb5-c72d-4fae-a5f3-af74f26cdf42",
              "type": "application/vnd.sas.annotation.member"
            },
            {
              "method": "PUT",
              "rel": "update",
              "href": "/annotations/annotations/561b0a40-70d2-4f48-a682-7c52c4c3b9b6/members/b7f35cb5-c72d-4fae-a5f3-af74f26cdf42",
              "uri": "/annotations/annotations/561b0a40-70d2-4f48-a682-7c52c4c3b9b6/members/b7f35cb5-c72d-4fae-a5f3-af74f26cdf42",
              "type": "application/vnd.sas.annotation.member"
            },
            {
              "method": "DELETE",
              "rel": "delete",
              "href": "/annotations/annotations/561b0a40-70d2-4f48-a682-7c52c4c3b9b6/members/b7f35cb5-c72d-4fae-a5f3-af74f26cdf42",
              "uri": "/annotations/annotations/561b0a40-70d2-4f48-a682-7c52c4c3b9b6/members/b7f35cb5-c72d-4fae-a5f3-af74f26cdf42"
            },
            {
              "method": "GET",
              "rel": "up",
              "href": "/annotations/annotations/561b0a40-70d2-4f48-a682-7c52c4c3b9b6/members",
              "uri": "/annotations/annotations/561b0a40-70d2-4f48-a682-7c52c4c3b9b6/members",
              "type": "application/vnd.sas.annotation.member",
              "responseType": "application/vnd.sas.annotation.member"
            }
          ]
        },
        {
          "creationTimeStamp": "2023-04-10T20:11:17.132Z",
          "modifiedTimeStamp": "2023-04-10T20:11:17.132Z",
          "createdBy": "sasboot",
          "modifiedBy": "sasboot",
          "version": 1,
          "id": "c7f35cb5-c72d-4fae-a5f3-af74f26cdf42",
          "annotationId": "a92de124-1404-4431-8863-7d5978388222",
          "resourceType": "table",
          "resourceUri": "objects/b673660283/96764860d",
          "value": "objectValue",
          "links": [
            {
              "method": "GET",
              "rel": "annotation",
              "href": "/annotations/annotations/a92de124-1404-4431-8863-7d5978388222",
              "uri": "/annotations/annotations/a92de124-1404-4431-8863-7d5978388222",
              "type": "application/vnd.sas.annotation"
            },
            {
              "method": "GET",
              "rel": "self",
              "href": "/annotations/annotations/a92de124-1404-4431-8863-7d5978388222/members/c7f35cb5-c72d-4fae-a5f3-af74f26cdf42",
              "uri": "/annotations/annotations/a92de124-1404-4431-8863-7d5978388222/members/c7f35cb5-c72d-4fae-a5f3-af74f26cdf42",
              "type": "application/vnd.sas.annotation.member"
            },
            {
              "method": "PUT",
              "rel": "update",
              "href": "/annotations/annotations/a92de124-1404-4431-8863-7d5978388222/members/c7f35cb5-c72d-4fae-a5f3-af74f26cdf42",
              "uri": "/annotations/annotations/a92de124-1404-4431-8863-7d5978388222/members/c7f35cb5-c72d-4fae-a5f3-af74f26cdf42",
              "type": "application/vnd.sas.annotation.member"
            },
            {
              "method": "DELETE",
              "rel": "delete",
              "href": "/annotations/annotations/a92de124-1404-4431-8863-7d5978388222/members/c7f35cb5-c72d-4fae-a5f3-af74f26cdf42",
              "uri": "/annotations/annotations/a92de124-1404-4431-8863-7d5978388222/members/c7f35cb5-c72d-4fae-a5f3-af74f26cdf42"
            },
            {
              "method": "GET",
              "rel": "up",
              "href": "/annotations/annotations/a92de124-1404-4431-8863-7d5978388222/members",
              "uri": "/annotations/annotations/a92de124-1404-4431-8863-7d5978388222/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
    }
    
    Responses
    Status Meaning Description Schema
    200 OK At least one member was created. If individual resource creation fails, the corresponding item in the response collection will be an application/vnd.sas.error object that describes why/how that operation failed. The httpStatusCode member of the nested error item will indicate the failure (401, 403, etc.). memberCollection
    400 Bad Request The request was invalid. error2

    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",
      "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"
            }
          ]
        }
      ],
      "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.
    items [member] false none The actual results of a query.
    links [link] false none The paging links that apply to this object.
    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

    annotationMemberMap

    {
      "annotationId": "string",
      "members": [
        {
          "annotationId": "string",
          "resourceUri": "string",
          "resourceType": "string",
          "value": "string"
        }
      ]
    }
    
    

    Create multiple members

    Properties
    Name Type Required Restrictions Description
    annotationId string false none Common annotation ID for each member to be created
    members [createMember] false none [Information about the external object that is associated with the annotation.]

    batchCreateMembers

    {
      "items": [
        {
          "annotationId": "string",
          "members": [
            {
              "annotationId": "string",
              "resourceUri": "string",
              "resourceType": "string",
              "value": "string"
            }
          ]
        }
      ]
    }
    
    

    Annotation Member Map Collection

    Properties
    Name Type Required Restrictions Description
    items [annotationMemberMap] false none [Creating members for particular annotation]

    batchCreateAnnotations

    {
      "items": [
        {
          "domain": "string",
          "name": "string",
          "label": "string",
          "description": "string"
        }
      ]
    }
    
    

    Annotation Collection

    Properties
    Name Type Required Restrictions Description
    items [createAnnotation] false none List of annotations

    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.With this version File API will now support versioned files. A solution can maintain multiple versions of a file. There are few additional parameters which will be required while creation of File, which indicates that the File is a versioned file.

    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
    Retrieve fileVersion meta information authorized
    Retrieve fileVersion content authorized
    Retrieve file search schema authorized
    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 MB in the files.maxFileSizeMB property. For example, to specify a 10 MB limit, specify files.maxFileSizeMB=10.

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

    Create Versioned file

    File Service now has a provision to create versions of a given file.The end consumer can provide information at the time of file creation.

    Security features
    API input validations
    File name validation:

    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).
    400 124025 Communication error with antivirus.
    400 124026 Antivirus scan error.
    400 124027 URL scan error.

    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"
        }
      ]
    }
    
    Status Meaning Description Schema
    200 OK The request succeeded. api
    404 Not Found The service is not available. None

    Check the state of the service

    Code samples

    # You can also use wget
    curl -X HEAD https://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.
    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
    }
    
    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

    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

    Get schema for indexing

    Code samples

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

    GET /files#schema

    This endpoint returns schema field to be indexed by search service.

    Parameters
    Name In Type Required Description
    Accept header string false The type specific schema representation media type application/vnd.sas.search.type.schema+json.

    Example responses

    Here is schema response for GET request for representation application/vnd.sas.search.type.schema+json

    {
      "fields": [
        {
          "primaryKey": false,
          "name": "typeDefName",
          "type": "string",
          "label": "typeDefName",
          "facetable": true,
          "searchable": true,
          "defaultFacet": true,
          "multiValued": false,
          "displayableFacet": true
        }
      ],
      "version": 2
    }
    
    {
      "fields": [
        {
          "primaryKey": false,
          "name": "typeDefName",
          "type": "string",
          "label": "typeDefName",
          "facetable": true,
          "searchable": true,
          "defaultFacet": true,
          "multiValued": false,
          "displayableFacet": true
        }
      ],
      "version": 2
    }
    
    Responses
    Status Meaning Description Schema
    200 OK The schema representation of file service fields to be indexed. schema

    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.
    searchable query string false An indicator specifying if a file is searchable or not. Defaulted to 'true' indicating file is searchable.
    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".
    versioned query boolean false An indicator specifying if a file is a version control file or not. If set to true, the endpoint will return first version of the 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 4

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

    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

    Here is the response for file resource version 4

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

    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
    }
    

    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
    }
    
    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 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.
    searchable query string false An indicator specifying if a file is searchable or not. Defaulted to 'true' indicating file is searchable.
    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".
    versioned query boolean false An indicator specifying if a file is a version control file or not. If set to true, the endpoint will return first version of the file.
    recoverable query boolean false An indicator specifying if a file is recoverable or not.If a user deleted the file then those files can be recovered.There is a certain retention period till which the file will be retained.
    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 4

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

    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

    Here is the response for file resource version 4

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

    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
    }
    

    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
    }
    
    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 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 = '{
      "links": [
        {
          "href": "string",
          "itemType": "string",
          "method": "string",
          "rel": "string",
          "responseItemType": "string",
          "responseType": "string",
          "title": "string",
          "type": "string",
          "uri": "string"
        }
      ],
      "resources": [
        "string"
      ],
      "template": "https://example.com",
      "type": "id",
      "version": 0
    }';
    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

    {
      "links": [
        {
          "href": "string",
          "itemType": "string",
          "method": "string",
          "rel": "string",
          "responseItemType": "string",
          "responseType": "string",
          "title": "string",
          "type": "string",
          "uri": "string"
        }
      ],
      "resources": [
        "string"
      ],
      "template": "https://example.com",
      "type": "id",
      "version": 0
    }
    
    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
    }
    
    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 larger than the permitted size, the file type is not supported, or the multipart request contains more than one file. error2
    Response Headers
    Status Header Type Format Description
    200 Content-Type string No description

    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 4

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

    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

    Here is the response for file resource version 4

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

    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,
      "fileStatus": "unlocked",
      "fileVersion": 0,
      "expirationTimeStamp": "2022-04-07T20:00:03.651Z",
      "virusDetected": false,
      "urlDetected": false,
      "quarantine": false,
      "version": 4
    }';
    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, expirationTimeStamp,typeDefName and searchable

    Body parameter

    Here is the response for file resource version 4

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

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

    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

    Here is the response for file resource version 4

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

    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 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' \
      -H 'Access-Quarantine: true'
    
    
    
    const headers = {
      'If-Range':'string',
      'Range':'string',
      'Access-Quarantine':'true'
    };
    
    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',
      'Access-Quarantine': 'true'
    }
    
    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"},
            "Access-Quarantine": []string{"true"},
        }
    
        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.
    Access-Quarantine header boolean false If true, administrator can download the quarantine file content for analysis
    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
    403 Forbidden Non privilaged user trying to access quarantine file content, will get HTTP Forbidden error 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

    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 4

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

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

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

    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

    Here is the response for file resource version 4

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

    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
    }
    

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

    Check if a file resource exists for given fileVersion

    Code samples

    # You can also use wget
    curl -X HEAD https://example.com/files/files/{fileId}/version/{fileVersion}
      -H 'Authorization: Bearer <access-token-goes-here>' \
    
    
    
    fetch('https://example.com/files/files/{fileId}/version/{fileVersion}',
    {
      method: 'HEAD'
    
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    import requests
    
    r = requests.head('https://example.com/files/files/{fileId}/version/{fileVersion}')
    
    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/files/{fileId}/version/{fileVersion}", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    

    HEAD /files/{fileId}/version/{fileVersion}

    Determines whether a file resource exists for the specified version of fileId.

    Parameters
    Name In Type Required Description
    fileId path string true The identifier of the file resource.
    fileVersion path integer true The version of the file resource.
    Responses
    Status Meaning Description Schema
    200 OK The request succeeded. The file resource exists. None
    404 Not Found No file resource exists for the specified identifier or no file resource version exists for given file identifier. None
    Response Headers
    Status Header Type Format Description
    200 ETag string The entity tag for the file resource.
    200 Last-Modified string The last modified timestamp of the file resource.

    Get a file resource for specific version

    Code samples

    # You can also use wget
    curl -X GET https://example.com/files/files/{fileId}/version/{fileVersion} \
      -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}/version/{fileVersion}',
    {
      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}/version/{fileVersion}', 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}/version/{fileVersion}", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    

    GET /files/{fileId}/version/{fileVersion}

    Retrieves a file resource by specifying fileVersion of a fileId.

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

    Example responses

    Here is the response for file resource version 4

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

    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

    Here is the response for file resource version 4

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

    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 or no file resource exists for the specified version of 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 the file resource content for a specified version

    Code samples

    # You can also use wget
    curl -X GET https://example.com/files/files/{fileId}/version/{fileVersion}/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}/version/{fileVersion}/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}/version/{fileVersion}/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}/version/{fileVersion}/content", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    

    GET /files/{fileId}/version/{fileVersion}/content

    Retrieves the content of the file resource for a specified version.

    Parameters
    Name In Type Required Description
    fileId path string true The identifier of the file resource for which to fetch content.
    fileVersion path string true The version 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

    Get all the versions of a given file id

    Code samples

    # You can also use wget
    curl -X GET https://example.com/files/files/{fileId}/versions \
      -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/files/files/{fileId}/versions',
    {
      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/files/files/{fileId}/versions', 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/files/files/{fileId}/versions", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    

    GET /files/{fileId}/versions

    Retrieves file resources of all the versions of a given fileId. Standard paging, option is available.

    Parameters
    Name In Type Required Description
    fileId path string true The specific field identifier of the file 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.

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

    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 = '{
      "links": [
        {
          "href": "string",
          "itemType": "string",
          "method": "string",
          "rel": "string",
          "responseItemType": "string",
          "responseType": "string",
          "title": "string",
          "type": "string",
          "uri": "string"
        }
      ],
      "resources": [
        "string"
      ],
      "template": "https://example.com",
      "type": "id",
      "version": 0
    }';
    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

    {
      "links": [
        {
          "href": "string",
          "itemType": "string",
          "method": "string",
          "rel": "string",
          "responseItemType": "string",
          "responseType": "string",
          "title": "string",
          "type": "string",
          "uri": "string"
        }
      ],
      "resources": [
        "string"
      ],
      "template": "https://example.com",
      "type": "id",
      "version": 0
    }
    
    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
    }
    
    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 larger than the permitted size, the file type is not supported, or the multipart request contains more than one file. error2
    Response Headers
    Status Header Type Format Description
    200 Content-Type string No description

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

    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

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

    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

    Security

    The operations to unquarantine the file.

    Update the quarantine status of file resource

    Code samples

    # You can also use wget
    curl -X PATCH https://example.com/files/files/{fileId}/quarantine \
      -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,
      "fileStatus": "unlocked",
      "fileVersion": 0,
      "expirationTimeStamp": "2022-04-07T20:00:03.651Z",
      "virusDetected": false,
      "urlDetected": false,
      "quarantine": false,
      "version": 4
    }';
    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}/quarantine',
    {
      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}/quarantine', 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}/quarantine", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    

    PATCH /files/{fileId}/quarantine

    Updates the quarantine file resource information. The user can change only quarantine status. This end-Point is only accessible to SAS Administrators.

    Body parameter

    Here is the response for file resource version 4

    {
      "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
    }
    
    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 quarantineFileToPatch true The file resource to update for quarantine status.

    Example responses

    Here is the response for file resource version 4

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

    error reponse when file Id in the path and file Id from the request body do not match

    {
      "errorCode": 124017,
      "message": "The ID parameter in the path and the ID of the file does not match.",
      "details": [
        "traceId: 745cbe49b4fe235f",
        "path: /files/files/fde5c033-f35f-4728-abef-297fbaaaa781%20/quarantine"
      ],
      "links": [],
      "version": 2,
      "httpStatusCode": 400
    }
    

    error response when non admin is trying to access the content of quarantined file.

    {
      "errorCode": 124023,
      "message": "File is quarantined. User does not have permission to read the content of file. Please contact your system administrator.",
      "details": [
        "path: /files/files/9120fa35-36d1-43fb-8771-3733aae8842e/content"
      ],
      "links": [],
      "version": 2,
      "httpStatusCode": 403
    }
    

    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 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
    403 Forbidden File is quarantined. User does not have permission to read the content of 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 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.

    Settings

    The operations to return configuration settings information.

    Get the API/service configuration settings

    Code samples

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

    GET /commons/settings

    Returns the possible configuration settings that this API/service shares.

    Example responses

    sample response for the exposed configuration properties

    {
      "version": 1,
      "links": [
        {
          "method": "GET",
          "rel": "self",
          "href": "/files/commons/settings",
          "uri": "/files//commons/settings",
          "responseType": "application/vnd.sas.attributes"
        }
      ],
      "attributes": {
        "blockedTypes": [
          "application/x-msdownload"
        ],
        "maxFileSizeMB": 100,
        "allowedFileNameCharactersRegex": "^[\\p{L}\\p{N}\\p{Pd}\\p{Pc}\\p{Zs}\\p{Mn}\\p{Sc}\\.()\\[\\]\"\\']*$"
      }
    }
    
    {
      "version": 1,
      "links": [
        {
          "method": "GET",
          "rel": "self",
          "href": "/files/commons/settings",
          "uri": "/files//commons/settings",
          "responseType": "application/vnd.sas.attributes"
        }
      ],
      "attributes": {
        "blockedTypes": [
          "application/x-msdownload"
        ],
        "maxFileSizeMB": 100,
        "allowedFileNameCharactersRegex": "^[\\p{L}\\p{N}\\p{Pd}\\p{Pc}\\p{Zs}\\p{Mn}\\p{Sc}\\.()\\[\\]\"\\']*$"
      }
    }
    
    Responses
    Status Meaning Description Schema
    200 OK The request succeeded. settings

    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",
      "searchable": true,
      "typeDefName": "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.
    searchable boolean true none It indicates if a file is searchable or not.
    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".

    fileResourceCollection

    {
      "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": [
        {
          "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": [
            {
              "href": "string",
              "itemType": "string",
              "method": "string",
              "rel": "string",
              "responseItemType": "string",
              "responseType": "string",
              "title": "string",
              "type": "string",
              "uri": "string"
            }
          ],
          "modifiedBy": "string",
          "modifiedTimeStamp": "2019-08-24T14:15:22Z",
          "name": "string",
          "size": 0,
          "typeDefName": "string",
          "searchable": true,
          "fileVersion": 0,
          "fileStatus": "string",
          "virusDetected": true,
          "urlDetected": true,
          "quarantine": true
        }
      ]
    }
    
    

    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": [
        {
          "href": "string",
          "itemType": "string",
          "method": "string",
          "rel": "string",
          "responseItemType": "string",
          "responseType": "string",
          "title": "string",
          "type": "string",
          "uri": "string"
        }
      ],
      "modifiedBy": "string",
      "modifiedTimeStamp": "2019-08-24T14:15:22Z",
      "name": "string",
      "size": 0,
      "typeDefName": "string",
      "searchable": true,
      "fileVersion": 0,
      "fileStatus": "string",
      "virusDetected": true,
      "urlDetected": true,
      "quarantine": true
    }
    
    

    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".
    searchable boolean false none It indicates if a file is searchable or not.
    fileVersion integer false none It indicates the version of the file. In case the file is not versioned then the value will be '0'. If the file is versioned then the file Version will be greater then '0'.
    fileStatus string false none It indicates the fileStatus whether locked or unlocked.
    virusDetected boolean false none An indicator specifying if a file contains virus or not.
    urlDetected boolean false none An indicator specifying if a file of type html, JS or CSS, contains an URL.
    quarantine boolean false none An indicator that if a file contains vulnerability then the file will be quarantined.

    fileResourceIndexCollection

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

    {
      "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": [
        {
          "createdBy": "string",
          "creationTimeStamp": "2019-08-24T14:15:22Z",
          "description": "string",
          "id": "string",
          "links": [
            {
              "href": "string",
              "itemType": "string",
              "method": "string",
              "rel": "string",
              "responseItemType": "string",
              "responseType": "string",
              "title": "string",
              "type": "string",
              "uri": "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": [
        {
          "href": "string",
          "itemType": "string",
          "method": "string",
          "rel": "string",
          "responseItemType": "string",
          "responseType": "string",
          "title": "string",
          "type": "string",
          "uri": "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.

    api

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

    The list of links to top-level resources and operations available from the root of the 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
    }
    
    

    Standard media type for error response.

    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 false 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 false none The version number of the error representation. This representation is version 2.

    selection

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

    Multiple parentUri values that are specified as an array of string values.

    Properties
    Name Type Required Restrictions Description
    links [link] false none An array of links to related resources and actions.
    resources [string] false none An array of resource IDs or URIs
    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.

    version integer false none The schema version number of this media type. This representation is version 1.
    Enumerated Values
    Property Value
    type id
    type uri
    type mixed

    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
    }
    
    

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

    A link to a related operation or resource.

    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.

    schema

    {
      "fields": [
        {
          "primaryKey": true,
          "name": "string",
          "type": "string",
          "label": "string",
          "facetable": true,
          "searchable": true,
          "defaultFacet": true,
          "multiValued": true,
          "displayableFacet": true
        }
      ],
      "version": 0
    }
    
    

    The schema representation of file service fields to be indexed.

    Properties
    Name Type Required Restrictions Description
    fields [field] false none The collection of schema fields.
    version integer false none The version of the representation.

    field

    {
      "primaryKey": true,
      "name": "string",
      "type": "string",
      "label": "string",
      "facetable": true,
      "searchable": true,
      "defaultFacet": true,
      "multiValued": true,
      "displayableFacet": true
    }
    
    

    The file service field to be indexed.

    Properties
    Name Type Required Restrictions Description
    primaryKey boolean false none The boolean value to represent if the field is primary key.
    name string false none The name of the field.
    type string false none The type of the field.
    label string false none The label given to the field.
    facetable boolean false none It indicates if the field is facetable.
    searchable boolean false none It indicates if the field is searchable.
    defaultFacet boolean false none It indicates if the field is default facet.
    multiValued boolean false none It indicates if the field is multivalued.
    displayableFacet boolean false none It indicates if the field should be displayed.

    quarantineFileToPatch

    {
      "quarantine": true
    }
    
    

    Quarantine file to Patch

    Properties
    Name Type Required Restrictions Description
    quarantine boolean true none An indicator that if a file contains vulnerability then the file will be quarantined.

    settings

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

    File Service Configuration Settings

    Properties
    Name Type Required Restrictions Description
    version integer true none Version information for this attribute list.
    links [link] true none The navigable links relative to this media type.
    attributes attributesMap true none The configuration settings for this service.

    attributesMap

    {
      "blockedTypes": [
        "string"
      ],
      "maxFileSizeMB": 0,
      "allowedFileNameCharactersRegex": "string"
    }
    
    

    Attributes Nap

    Properties
    Name Type Required Restrictions Description
    blockedTypes [string] false none The comma seperated list of blocked media type.
    maxFileSizeMB integer false none The max files size which can be uploaded in the file service.
    allowedFileNameCharactersRegex string false none A regular expression used to validate allowed characters in filename.

    Examples

    Github Examples

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

    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.
    searchable Indicates if a file is searchable or not through search service.
    expirationTimeStamp The date and time at which the file expires or is deleted. The end user manages this.
    fileStatus The status of the file whether locked or unlocked. The end user manages this.
    virusDetected An indicator specifying if a file contains virus or not.
    urlDetected An indicator specifying if a file of type html, JS or CSS, contains an URL
    quarantine An indicator that if a file contains vulnerability then the file will be quarantined.
    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.
    Numeric fileVersion The version of the file. If file is version control then set to any value greater then 0.The end user manages this.
    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.
    409 11536 The URI in a new child member already exists as a child in the same 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, type, 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, type, 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 type: /folders?filter=in(type, '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.

    Move the child member for a resource to a folder specified by the parentFolderUri

    Code samples

    # You can also use wget
    curl -X PATCH 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: 'PATCH',
    
      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.patch('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("PATCH", "https://example.com/folders/folders/@item", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    

    PATCH /folders/@item

    Move the child member for the resource specified by childUri to the folder specified by parentFolderUri.

    Parameters
    Name In Type Required Description
    childUri query string false The URI of a resource whose parent folder is to be changed.
    parentFolderUri query string false The URI of the target folder to move the resource to.

    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 resource was moved to the new target folder and the new parent 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 resource with the given childUri was found as a child of any folder. 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 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
    }
    

    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"
      ]
    }
    
    Responses
    Status Meaning Description Schema
    200 OK The request succeeded. The folder was found and returned. member
    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 is returned. Any non-folder content is not 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

    Return a metadata archive for the requested folder

    Code samples

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

    GET /commons/catalog/folders/{folderId}

    This endpoint is used by the catalog service to retrieve information from a folder so that the members can be searched and displayed.

    Parameters
    Name In Type Required Description
    folderId path string true The identifier of the folder to catalog.

    Example responses

    A metadata archive used to catalog folders and members

    {
      "anchor": {
        "uri": "/folders/folders/0c7ebcc1-b1b9-41b9-967d-a345bda1edaf"
      },
      "entities": [
        {
          "creationTimeStamp": "0001-01-01T00:00:00Z",
          "modifiedTimeStamp": "0001-01-01T00:00:00Z",
          "instanceId": "0c7ebcc1-b1b9-41b9-967d-a345bda1edaf",
          "name": "My Folder",
          "type": "folder",
          "uri": "/folders/folders/0c7ebcc1-b1b9-41b9-967d-a345bda1edaf"
        },
        {
          "creationTimeStamp": "0001-01-01T00:00:00Z",
          "modifiedTimeStamp": "0001-01-01T00:00:00Z",
          "anchor": {
            "uri": "/files/files/a3906381-17d0-48ba-bbd6-9664cb97898d"
          },
          "name": "fiddle1.jpg",
          "type": "file",
          "uri": "/files/files/a3906381-17d0-48ba-bbd6-9664cb97898d"
        }
      ],
      "relationships": [
        {
          "creationTimeStamp": "0001-01-01T00:00:00Z",
          "modifiedTimeStamp": "0001-01-01T00:00:00Z",
          "type": "itemFolder",
          "endpoint1Uri": "/folders/folders/0c7ebcc1-b1b9-41b9-967d-a345bda1edaf",
          "endpoint2Uri": "/files/files/a3906381-17d0-48ba-bbd6-9664cb97898d"
        }
      ],
      "version": 1
    }
    
    {
      "anchor": {
        "uri": "/folders/folders/0c7ebcc1-b1b9-41b9-967d-a345bda1edaf"
      },
      "entities": [
        {
          "creationTimeStamp": "0001-01-01T00:00:00Z",
          "modifiedTimeStamp": "0001-01-01T00:00:00Z",
          "instanceId": "0c7ebcc1-b1b9-41b9-967d-a345bda1edaf",
          "name": "My Folder",
          "type": "folder",
          "uri": "/folders/folders/0c7ebcc1-b1b9-41b9-967d-a345bda1edaf"
        },
        {
          "creationTimeStamp": "0001-01-01T00:00:00Z",
          "modifiedTimeStamp": "0001-01-01T00:00:00Z",
          "anchor": {
            "uri": "/files/files/a3906381-17d0-48ba-bbd6-9664cb97898d"
          },
          "name": "fiddle1.jpg",
          "type": "file",
          "uri": "/files/files/a3906381-17d0-48ba-bbd6-9664cb97898d"
        }
      ],
      "relationships": [
        {
          "creationTimeStamp": "0001-01-01T00:00:00Z",
          "modifiedTimeStamp": "0001-01-01T00:00:00Z",
          "type": "itemFolder",
          "endpoint1Uri": "/folders/folders/0c7ebcc1-b1b9-41b9-967d-a345bda1edaf",
          "endpoint2Uri": "/files/files/a3906381-17d0-48ba-bbd6-9664cb97898d"
        }
      ],
      "version": 1
    }
    
    Responses
    Status Meaning Description Schema
    200 OK The request was successfully processed. The body contains the resulting metadata archive. metadataArchive

    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-Item: string' \
      -H 'Accept-Language: string'
    
    
    
    const headers = {
      'Accept-Item':'string',
      '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-Item': 'string',
      '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-Item": []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-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. Valid media types for the member collection are application/vnd.sas.content.folder.member+json (default), application/vnd.sas.content.folder.member.summary+json (an abbreviated format that provides fewer links, but better performance), and application/vnd.sas.summary+json (a standard summary representation).
    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.
    forceMove query boolean false If true, if this is a creation of a child member and if the URI in the member already exists in another folder, the member is moved to the requested folder. If it is already a member of the requested folder, the request succeeds. 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 is 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 does not 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 does not 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 can 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.
    type 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 user name 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 user name 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 type 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.

    metadataArchive

    {
      "anchor": {
        "uri": "string",
        "instanceId": "string"
      },
      "entities": [
        {
          "creationTimeStamp": "string",
          "modifiedTimeStamp": "string",
          "instanceId": "string",
          "name": "string",
          "type": "string",
          "uri": "string"
        }
      ],
      "relationships": [
        {
          "creationTimeStamp": "string",
          "modifiedTimeStamp": "string",
          "type": "string",
          "endpoint1Uri": "string",
          "endpoint2Uri": "string"
        }
      ],
      "version": 0
    }
    
    

    A metadata archive

    Properties
    Name Type Required Restrictions Description
    anchor object false none The anchor object for the archive. Any entity that does not override it uses this as an anchor.
    » uri string false none The resource URI of the anchor object.
    » instanceId string false none The unique identifier for the instance of the anchor object.
    entities [object] false none The entities being cataloged.
    » creationTimeStamp string false none The timestamp when the resource was created.
    » modifiedTimeStamp string false none The timestamp when the resource was last updated.
    » instanceId string false none The unique identifier of the resource.
    » name string false none The name of the resource.
    » type string false none The type of the resource.
    » uri string false none The resource URI of the resource being cataloged.
    relationships [object] false none The relationships between the entities being cataloged.
    » creationTimeStamp string false none The timestamp when the resource was created.
    » modifiedTimeStamp string false none The timestamp when the resource was last modified.
    » type string false none The type of relationship between the resources.
    » endpoint1Uri string false none The resource URI of the first object in the relationship.
    » endpoint2Uri string false none The resource URI of the second object in the relationship.
    version integer false none The version of the archive representation.

    Examples

    Github Examples

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

    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.

    This API is deprecated as of 2023.10 and will be removed in a future release. 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.

    List Data

    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.

    This List Data API enables users to manage lookup lists across products and solutions.

    Usage Notes

    Overview

    The List Data API enables the user to publish and query tabular data sets (lists) in a low-latency, key-value data store. The API includes the ability to create, read, update, and delete a list and control access through authorization rules.

    SAS products that integrate the capabilities of the List Data API refer to the functionality as Advanced Lists. These tabular data sets, called lists, can have multiple keys and values that can be shared among other SAS applications and workflows.

    IMPORTANT: In order to use the List Data API, you must provide, configure, and maintain your own Redis instance for the List Data service.

    For information about configuring the List Data service for Redis, see List Data Service.

    Security

    The List Data API follows the rules for SAS REST APIs and requires authentication for all operations. Authentication and authorization are explained in Security in SAS REST APIs.

    Access Control Lists

    The List Data service supports the use of Access Control Lists (ACL). Configuring your Redis instance to use an ACL is discussed in List Data Service. Table 1.1 defines the List Data operations, the related endpoints, the required commands, and the required command categories. All requests require at least the PING command, or a connection category. It is also recommended that users are able to read keys to which they have other command access.

    Table 1.1. Requirements for List Data API Operations

    Operation Endpoint Minimum Commands Minimum Categories
    Read list contents GET /lists/{listId}/contents SCAN, HGET, HGETALL Read
    Read list contents GET /lists/{listId}/privilegedContents SCAN, HGET, HGETALL Read
    Export list contents GET /lists/{listId}/contents/export SCAN, HGET, HGETALL Read
    Update list contents PUT /lists/{listId}/contents HSET Write
    Delete list contents PUT /lists/{listId}/contents ; op=delete DEL Write (or keyspace, but keyspace includes some more dangerous commands, such as keys)
    Delete ALL list contents POST /lists/{listId}/purgeJobs EVAL, EVALSHA, SCAN, DEL Scripting, Write, Read
    Update list contents state PUT /lists/{listId}/contents/state HSET Write
    Update list contents expiry PUT /lists/{listId}/contents/expiry HSET Write
    Delete list contents expiry POST /lists/{listId}/updateContentStateJobs HSET Write
    Update ALL List Contents State POST /lists/{listId}/updateContentStateJobs EVAL, EVALSHA, SCAN, HSET Scripting, Write, Read

    A user that attempts an operation in which they are authorized to perform in List Data but are not authorized to perform in Redis, receives a 403 Forbidden error. The failure and resultant Redis error message is logged.

    Authorizations can be granted to a specific folder by using SAS Environment Manager. You can grant permission to view an item through the SAS Environment Manager Folder service by using:

    Convey permissions are rules that use the containerUri property to affect items inside a folder. A list inherits its authorization scheme from the folder in which it is placed. Convey permissions for a folder are used by all members of a folder. The default folder /SAS Content/Products/List Data provides public permissions. Before you can create a list, a folder must exist for the list location and the appropriate convey permissions must be added for users and groups. Table 1.1 identifies the folder permissions that are required to perform tasks that are associated with using the List Data API.

    Table 1.2. Required Folder Permissions for List Data API Tasks

    Create Read Update Delete Remove Secure
    Create a list definition x
    Add contents to a list x
    View a list definition x
    View a list's contents x
    Update a list's definition x
    Update a list's contents x
    Clear a list's contents x
    Delete a list x
    Move a list to another folder x
    Modify permissions for a folder x
    Privileged Tasks

    In order to protect sensitive information, the List Data API supports the ability to redact data for any column in a list. Only users with explicit permissions are able to view redacted data or modify the redaction policy for a list. To grant permission for a user or group to access privileged endpoints, an administrator is required to create list-specific rules via the SAS Viya Rules Editor. The endpoints and permissions are discussed below.

    Viewing Redacted Data

    A user or group is able to view unredacted data in a list only when a custom rule that grants Read permission exists for the endpoint '/listData/lists/{listId}/privilegedContents'. In this path, 'listId' is a specific list instance.

    Editing Data-Redaction Policies

    A user or group is able to update the data mask definition for a list column only when a custom rule that grants Update permission exists for the endpoint '/listData/lists/{listId}/privilegedEdit'. In this path, 'listId' is a specific list instance.

    Terminology

    column information

    an object that maps information about the source data (for example, column name, data type, and position) to the list's structure.

    data masking

    a restriction or redaction on the presentation of a column's value when retrieving a list's contents.

    import job

    a resource that contains information about an asynchronous job that loads a list's contents from a data file.

    immutable list

    a list whose contents cannot be changed.

    list

    a tabular set of data.

    list content

    the data that is imported to a list based on the list definition.

    list definition

    the properties that define the structure, functionality, and state of a tabular data set.

    list state

    the status of a list as either "deployed" or "developing".

    privileged authorization

    the ability to create, update, and delete the data mask on columns in the list-content records.

    purge job

    the process of removing the contents of a list but not the list or its associated jobs.

    redis connection

    the information fields (for example, address, database number, password, and enable TLS) for a Redis connection that are stored in SAS Environment Manager.

    Error Codes

    HTTP Status Code Error Code Description
    400 124721 The request body has an unexpected character.
    400 124722 The number of objects in the request body exceeds the maximum number of {maxNumObject}.
    400 124723 The request body has multiple validation errors.
    400 124724 The request body has an invalid value of "{value}" at index {index}.
    400 124727 The request body could not be parsed into JSON.
    400 124732 The file has an unexpected number of headers.
    400 124733 The file has an unexpected number of columns.
    400 124734 The file header "{headerName}" is invalid.
    400 124735 The column "{columnName}" on line number {lineNumber} has an invalid value.
    400 124736 The system could not parse line number {lineNumber}.
    400 124755 One or more validation errors were detected.
    400 124757 The value that is specified for the 'state' property is invalid.
    400 124758 No columns are defined.
    400 124759 Column positions cannot begin with 1.
    400 124760 The key position already exists.
    400 124761 The specified key position is invalid.
    400 124762 The column position already exists.
    400 124763 The column positions are not sequential.
    400 124764 No key position is specified.
    400 124765 The data type that is specified for the column is invalid.
    400 124766 The column name is missing.
    400 124767 The column name already exists.
    400 124768 The parameter "{parameterName}" is either missing or invalid.
    400 124769 The list name "{listName}" already exists.
    400 124770 The regular expression "{regex}" for the data mask failed to compile.
    400 124771 The list is immutable.
    400 124773 The request has an invalid delimiter.
    400 124774 The request parameters are invalid.
    400 124777 The property "{propertyName}" cannot be edited because the list has contents.
    400 124778 The request body could not be read.
    400 124779 The request failed because the specified list resource is immutable and has contents.
    400 124781 The specified job does not belong to the specified list.
    400 124782 The size of the uploaded file exceeds the maximum size of {maxSize} bytes.
    400 124784 The import file must be of the type 'text/csv'.
    400 124785 The request body format is invalid.
    400 124786 The data mask property "{property}" is missing.
    400 124788 The value for the key column "{columnName}" at index {index} is missing.
    403 124790 You are not authorized to submit this request.
    404 124729 The parent folder URI is not valid.
    404 124772 The specified list does not exist.
    404 124780 The specified job does not exist.
    409 124720 The list resource is being used by another request.
    409 124775 The list is deployed.
    409 124789 The list is currently being used by an external entity.
    500 124730 An unexpected error occurred when the file was opened.
    500 124731 An unexpected error occurred when the file was read.
    500 124738 The data mask could not be applied to the list's contents due to an internal server error.
    500 124739 The folder member was not created due to an error.
    500 124740 The request failed due to an unexpected database error.
    500 124742 The request failed due to an unexpected data store error.
    500 124748 The request failed to get the object "{objectName}" from context due to an unexpected error.
    500 124749 The request failed due to an unexpected internal error.
    500 124783 An unexpected error occurred when the file was saved.
    500 124787 An operation that uses the microservice "{serviceName}" failed.

    Operations

    Root

    This endpoint is associated with the operations for the root resource of the List Data API.

    Code samples

    # You can also use wget
    curl -X GET http://mock-listData.apifirst.unx.sas.com/listData/ \
      -H 'Authorization: Bearer <access-token-goes-here>' \
      -H 'Accept: application/json'
    
    
    
    const headers = {
      'Accept':'application/json'
    };
    
    fetch('http://mock-listData.apifirst.unx.sas.com/listData/',
    {
      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('http://mock-listData.apifirst.unx.sas.com/listData/', 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", "http://mock-listData.apifirst.unx.sas.com/listData/", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    

    GET /

    Returns a list of links to the top-level collections and actions that are provided by the List Data API.

    Example responses

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

    {
      "version": 1,
      "links": [
        {
          "method": "GET",
          "rel": "lists",
          "href": "/listData/lists",
          "uri": "/listData/lists",
          "type": "application/vnd.sas.collection",
          "itemType": "application/vnd.sas.listdata.list"
        },
        {
          "method": "POST",
          "rel": "createList",
          "href": "/listData/lists",
          "uri": "/listData/lists",
          "type": "application/vnd.sas.listdata.list"
        }
      ]
    }
    
    {
      "version": 1,
      "links": [
        {
          "method": "GET",
          "rel": "lists",
          "href": "/listData/lists",
          "uri": "/listData/lists",
          "type": "application/vnd.sas.collection",
          "itemType": "application/vnd.sas.listdata.list"
        },
        {
          "method": "POST",
          "rel": "createList",
          "href": "/listData/lists",
          "uri": "/listData/lists",
          "type": "application/vnd.sas.listdata.list"
        }
      ]
    }
    

    Here is an example of an error response when the specified media type is not supported.

    {
      "httpStatusCode": 406,
      "version": 2,
      "message": "Not Acceptable",
      "details": [
        "application/vnd.sas.api+json;version=1",
        "application/vnd.sas.api+json",
        "application/json",
        "path: /listData/",
        "correlator: 8a3337b3-a390-4912-91bf-049b52823bef"
      ]
    }
    

    Here is an example of an error response when the request could not be fulfilled because of an unexpected server error.

    {
      "httpStatusCode": 500,
      "version": 2,
      "id": "04840005-74d3-458b-bbe1-1209d3a739ac",
      "errorCode": 123456789,
      "details": [
        "displayable details of server error"
      ],
      "remediation": "The remediation action to fix an Internal Server Error.",
      "errors": [
        {
          "optional nested errors": "..."
        }
      ],
      "links": [
        {
          "href": "...",
          "method": "...",
          "rel": "...",
          "uri": "..."
        }
      ]
    }
    
    Status Meaning Description Schema
    200 OK The request succeeded. api
    406 Not Acceptable The specified media type is not supported. errorCommon
    500 Internal Server Error The request could not be fulfilled because of an unexpected server error. errorResponse
    Response Headers
    Status Header Type Format Description
    200 Content-Type string The media type for the body of the request or response.

    List Definition

    These endpoints are associated with a list's definition.

    Create a list

    Code samples

    # You can also use wget
    curl -X POST http://mock-listData.apifirst.unx.sas.com/listData/lists \
      -H 'Authorization: Bearer <access-token-goes-here>' \
      -H 'Content-Type: application/json' \
      -H 'Accept: application/vnd.sas.listdata.list+json'
    
    
    const inputBody = '{
      "name": "list-a",
      "description": "The A-list users",
      "state": "developing",
      "label": "marketing",
      "columns": [
        {
          "name": "userId",
          "dataType": "string",
          "position": 1,
          "isKey": true,
          "keyPosition": 1
        },
        {
          "name": "firstName",
          "dataType": "string",
          "position": 2,
          "isKey": false,
          "keyPosition": 0
        },
        {
          "name": "lastName",
          "dataType": "string",
          "position": 2,
          "isKey": false,
          "keyPosition": 0
        },
        {
          "name": "salary",
          "dataType": "number",
          "position": 3,
          "isKey": false,
          "keyPosition": 0,
          "dataMask": {
            "name": "MaskStart",
            "regex": ".(....$)|.",
            "replace": "*$1",
            "example": "****1234"
          }
        }
      ],
      "defaultExpiry": 10000,
      "hasExpiry": true
    }';
    const headers = {
      'Content-Type':'application/json',
      'Accept':'application/vnd.sas.listdata.list+json'
    };
    
    fetch('http://mock-listData.apifirst.unx.sas.com/listData/lists',
    {
      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.listdata.list+json'
    }
    
    r = requests.post('http://mock-listData.apifirst.unx.sas.com/listData/lists', 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.listdata.list+json"},
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("POST", "http://mock-listData.apifirst.unx.sas.com/listData/lists", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    

    POST /lists

    Creates a new list definition.

    When you create a new list, you define the properties of a new tabular data set, but the list initially has no contents. List contents are loaded and managed by using other endpoints that are available with the List Data API.

    A list's properties describe the structure, functionality, and state of a list. A list's contents, which are the list's data, is a sub-resource of the list.

    The structure of a list represents the data that you will import as the list contents. The list data description is represented by column information objects. The column objects map information about the source data (for example, column name, data type, and position) to the list's structure.

    When you create the list's structure, you need to identify at least one column as a key. This column is used to construct a lookup key for the record, which is used to retrieve the record from the contents data store. You can create complex lookup keys by identifying more than one column as a key.

    You must add lists to a folder. A list inherits the permissions of the folder of which it is a member. The default folder '/SAS Content/Products/List Data' provides public permissions. You can move lists to different folders and manage authorizations for a folder by using SAS Environment Manager.

    A list can be immutable, which means a client has only a single opportunity to load contents. Once an immutable list has contents, you cannot update the list. You can only delete it.

    The state of a list can be either deployed or developing. You cannot delete a deployed list.

    A list can have an expiry that is associated only with the list's rows. This expiry value is a UNIX timestamp, which enables consumers of list data to choose whether to ignore expired list items. No action is taken by the service once the expiry is reached.

    The 'defaultExpiry' property is the time, in seconds, after which newly added rows are considered expired. When rows are added, an expiry property is also added, which is equal to the current UNIX Epoch time plus the default expiry value. Enforcement of the expiry is left to the consumer, and no action is taken by the service when the expiration time is reached.

    You can define a list that supports storing multiple records by using the same key value. This means that when a client retrieves a value by using a lookup key, more than one record could be returned. You need to identify this type of list when you create a new list. Once created, you cannot convert this list type to a standard list type.

    Body parameter

    Here is an example of a response to a request to create a list.

    {
      "name": "list-a",
      "description": "The A-list users",
      "state": "developing",
      "label": "marketing",
      "columns": [
        {
          "name": "userId",
          "dataType": "string",
          "position": 1,
          "isKey": true,
          "keyPosition": 1
        },
        {
          "name": "firstName",
          "dataType": "string",
          "position": 2,
          "isKey": false,
          "keyPosition": 0
        },
        {
          "name": "lastName",
          "dataType": "string",
          "position": 2,
          "isKey": false,
          "keyPosition": 0
        },
        {
          "name": "salary",
          "dataType": "number",
          "position": 3,
          "isKey": false,
          "keyPosition": 0,
          "dataMask": {
            "name": "MaskStart",
            "regex": ".(....$)|.",
            "replace": "*$1",
            "example": "****1234"
          }
        }
      ],
      "defaultExpiry": 10000,
      "hasExpiry": true
    }
    
    Parameters
    Name In Type Required Description
    parentFolderUri query string false The URI for the parent folder to which a list is added. For more information about folders, see Folders.
    body body listResource true none
    Detailed descriptions

    parentFolderUri: The URI for the parent folder to which a list is added. For more information about folders, see Folders.

    Example responses

    Here is an example of a response to a request to get a list.

    {
      "id": "3659ea38-2618-4474-aeac-0bf6cfd3c322",
      "version": 1,
      "creationTimeStamp": "2022-03-01T20:18:32Z",
      "modifiedTimeStamp": "2022-03-01T20:18:32Z",
      "createdBy": "appUser1",
      "modifiedBy": "appUser1",
      "name": "list-a",
      "description": "The A-list users",
      "state": "developing",
      "columns": [
        {
          "name": "userId",
          "dataType": "string",
          "position": 1,
          "isKey": true,
          "keyPosition": 1
        },
        {
          "name": "firstName",
          "dataType": "string",
          "position": 2,
          "isKey": false,
          "keyPosition": 0
        },
        {
          "name": "lastName",
          "dataType": "string",
          "position": 3,
          "isKey": false,
          "keyPosition": 0
        },
        {
          "name": "salary",
          "dataType": "number",
          "position": 4,
          "isKey": false,
          "keyPosition": 0,
          "dataMask": {
            "name": "MaskStart",
            "regex": ".(....$)|.",
            "replace": "*$1",
            "example": "****1234"
          }
        }
      ],
      "label": "corporate marketing",
      "links": [
        {
          "href": "...",
          "method": "...",
          "rel": "...",
          "uri": "..."
        }
      ]
    }
    
    {
      "id": "3659ea38-2618-4474-aeac-0bf6cfd3c322",
      "version": 1,
      "creationTimeStamp": "2022-03-01T20:18:32Z",
      "modifiedTimeStamp": "2022-03-01T20:18:32Z",
      "createdBy": "appUser1",
      "modifiedBy": "appUser1",
      "name": "list-a",
      "description": "The A-list users",
      "state": "developing",
      "columns": [
        {
          "name": "userId",
          "dataType": "string",
          "position": 1,
          "isKey": true,
          "keyPosition": 1
        },
        {
          "name": "firstName",
          "dataType": "string",
          "position": 2,
          "isKey": false,
          "keyPosition": 0
        },
        {
          "name": "lastName",
          "dataType": "string",
          "position": 3,
          "isKey": false,
          "keyPosition": 0
        },
        {
          "name": "salary",
          "dataType": "number",
          "position": 4,
          "isKey": false,
          "keyPosition": 0,
          "dataMask": {
            "name": "MaskStart",
            "regex": ".(....$)|.",
            "replace": "*$1",
            "example": "****1234"
          }
        }
      ],
      "label": "corporate marketing",
      "links": [
        {
          "href": "...",
          "method": "...",
          "rel": "...",
          "uri": "..."
        }
      ]
    }
    

    Here is an example of an error response when the request was invalid.

    {
      "httpStatusCode": 400,
      "version": 2,
      "id": "04840005-74d3-458b-bbe1-1209d3a739ac",
      "errorCode": 123456789,
      "details": [
        "bad request reason"
      ],
      "remediation": "The remediation action to fix a Bad Request error.",
      "errors": [
        {
          "optional nested errors": "..."
        }
      ],
      "links": [
        {
          "href": "...",
          "method": "...",
          "rel": "...",
          "uri": "..."
        }
      ]
    }
    

    Here is an example of an error response when the user did not have the necessary permissions.

    {
      "httpStatusCode": 403,
      "version": 2,
      "id": "04840005-74d3-458b-bbe1-1209d3a739ac",
      "errorCode": 123456789,
      "details": [
        "forbidden"
      ],
      "remediation": "The remediation action to fix a Forbidden error.",
      "errors": [],
      "links": [
        {
          "href": "...",
          "method": "...",
          "rel": "...",
          "uri": "..."
        }
      ]
    }
    

    Here is an example of an error response when the requested media type is not supported.

    {
      "httpStatusCode": 415,
      "version": 2,
      "message": "Unsupported Media Type",
      "details": [
        "application/vnd.sas.listdata.list+json",
        "application/vnd.sas.listdata.list+json;version=1",
        "application/json",
        "path: /listData/lists",
        "correlator: 6362355c-9cfa-4929-b19b-56a07a9b37e9"
      ]
    }
    

    Here is an example of an error response when the request could not be fulfilled because of an unexpected server error.

    {
      "httpStatusCode": 500,
      "version": 2,
      "id": "04840005-74d3-458b-bbe1-1209d3a739ac",
      "errorCode": 123456789,
      "details": [
        "displayable details of server error"
      ],
      "remediation": "The remediation action to fix an Internal Server Error.",
      "errors": [
        {
          "optional nested errors": "..."
        }
      ],
      "links": [
        {
          "href": "...",
          "method": "...",
          "rel": "...",
          "uri": "..."
        }
      ]
    }
    
    Responses
    Status Meaning Description Schema
    201 Created A list was created. listResource
    400 Bad Request The request was invalid. errorResponse
    403 Forbidden The user did not have the necessary permissions. errorResponse
    415 Unsupported Media Type The requested media type is not supported. errorCommon
    500 Internal Server Error The request could not be fulfilled because of an unexpected server error. errorResponse
    Response Headers
    Status Header Type Format Description
    201 Content-Type string The media type for the body of the request or response.
    201 Location string uri The URI of the list.
    201 If-Match string date-time An ETag in the format of W/"the-last-updated-timestamp-in-UNIX-nanosecond-time".

    Get a collection of lists

    Code samples

    # You can also use wget
    curl -X GET http://mock-listData.apifirst.unx.sas.com/listData/lists \
      -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-listData.apifirst.unx.sas.com/listData/lists',
    {
      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-listData.apifirst.unx.sas.com/listData/lists', 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-listData.apifirst.unx.sas.com/listData/lists", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    

    GET /lists

    Returns a collection of lists.

    Parameters
    Name In Type Required Description
    start query integer false A zero-based offset of the first item to return. The default value is '0'.
    limit query integer false The maximum number of items to return. The default value is '20'.
    filter query string(filter-criteria) false The filter criteria for returned items. See Filtering in REST APIs.
    sortBy query string(sort-criteria) false A sort of the returned items. See Sorting in REST APIs.
    folderId query string false A universally unique identifier for a folder. The maximum number of lists that can be returned from a folder is 100000.

    Example responses

    Here is an example response to a request to get a collection of lists.

    {
      "version": 2,
      "accept": "application/vnd.sas.listdata.list",
      "count": 253,
      "start": 0,
      "limit": 2,
      "name": "listResource",
      "items": [
        {
          "id": "9ec45a61-774c-488e-99a0-03dfde70b966",
          "version": 1,
          "creationTimeStamp": "2023-02-14T15:57:54.041Z",
          "modifiedTimeStamp": "2023-02-14T17:29:57.210Z",
          "createdBy": "sasadm",
          "modifiedBy": "sasadm",
          "name": "userlist1",
          "description": "desc",
          "state": "developing",
          "isImmutable": false,
          "hasExpiry": false,
          "label": "string",
          "columns": [
            {
              "name": "userId",
              "dataType": "string",
              "position": 1,
              "isKey": true,
              "keyPosition": 1,
              "dataMask": {
                "name": "Mask Start",
                "example": "****1234",
                "regex": ".(....$)|.",
                "replace": "*$1"
              }
            },
            {
              "name": "firstName",
              "dataType": "string",
              "position": 2,
              "isKey": false,
              "keyPosition": 0
            },
            {
              "name": "lastName",
              "dataType": "string",
              "position": 3,
              "isKey": false,
              "keyPosition": 0
            },
            {
              "name": "salary",
              "dataType": "number",
              "position": 4,
              "isKey": false,
              "keyPosition": 0
            }
          ],
          "links": [
            {
              "method": "GET",
              "rel": "up",
              "href": "/listData/lists",
              "uri": "/listData/lists",
              "type": "application/vnd.sas.collection",
              "itemType": "application/vnd.sas.listdata.list"
            },
            {
              "method": "GET",
              "rel": "self",
              "href": "/listData/lists/9ec45a61-774c-488e-99a0-03dfde70b966",
              "uri": "/listData/lists/9ec45a61-774c-488e-99a0-03dfde70b966",
              "type": "application/vnd.sas.listdata.list"
            },
            {
              "method": "PUT",
              "rel": "update",
              "href": "/listData/lists/9ec45a61-774c-488e-99a0-03dfde70b966",
              "uri": "/listData/lists/9ec45a61-774c-488e-99a0-03dfde70b966",
              "type": "application/vnd.sas.listdata.list",
              "responseType": "application/vnd.sas.listdata.list"
            },
            {
              "method": "GET",
              "rel": "state",
              "href": "/listData/lists/9ec45a61-774c-488e-99a0-03dfde70b966/state",
              "uri": "/listData/lists/9ec45a61-774c-488e-99a0-03dfde70b966/state",
              "type": "text/plain"
            },
            {
              "method": "GET",
              "rel": "contents",
              "href": "/listData/lists/9ec45a61-774c-488e-99a0-03dfde70b966/contents",
              "uri": "/listData/lists/9ec45a61-774c-488e-99a0-03dfde70b966/contents",
              "type": "application/vnd.sas.collection",
              "itemType": "application/json"
            },
            {
              "method": "GET",
              "rel": "contentsDataset",
              "href": "/listData/lists/9ec45a61-774c-488e-99a0-03dfde70b966/contents",
              "uri": "/listData/lists/9ec45a61-774c-488e-99a0-03dfde70b966/contents",
              "type": "application/vnd.sas.listdata.dataset"
            },
            {
              "method": "PUT",
              "rel": "updateContents",
              "href": "/listData/lists/9ec45a61-774c-488e-99a0-03dfde70b966/contents",
              "uri": "/listData/lists/9ec45a61-774c-488e-99a0-03dfde70b966/contents",
              "type": "application/vnd.sas.collection",
              "responseType": "application/vnd.sas.listdata.list",
              "itemType": "application/json"
            },
            {
              "method": "POST",
              "rel": "importContents",
              "href": "/listData/lists/9ec45a61-774c-488e-99a0-03dfde70b966/importJobs",
              "uri": "/listData/lists/9ec45a61-774c-488e-99a0-03dfde70b966/importJobs",
              "type": "multipart/form-data",
              "responseType": "application/vnd.sas.listdata.importjob"
            },
            {
              "method": "POST",
              "rel": "purgeContents",
              "href": "/listData/lists/9ec45a61-774c-488e-99a0-03dfde70b966/purgeJobs",
              "uri": "/listData/lists/9ec45a61-774c-488e-99a0-03dfde70b966/purgeJobs",
              "responseType": "application/vnd.sas.listdata.purgejob"
            },
            {
              "method": "DELETE",
              "rel": "delete",
              "href": "/listData/lists/9ec45a61-774c-488e-99a0-03dfde70b966",
              "uri": "/listData/lists/9ec45a61-774c-488e-99a0-03dfde70b966"
            },
            {
              "method": "GET",
              "rel": "alternate",
              "href": "/listData/lists/9ec45a61-774c-488e-99a0-03dfde70b966",
              "uri": "/listData/lists/9ec45a61-774c-488e-99a0-03dfde70b966",
              "type": "application/vnd.sas.summary"
            },
            {
              "method": "GET",
              "rel": "privilegedContents",
              "href": "/listData/lists/9ec45a61-774c-488e-99a0-03dfde70b966/privilegedContents",
              "uri": "/listData/lists/9ec45a61-774c-488e-99a0-03dfde70b966/privilegedContents",
              "type": "application/vnd.sas.listdata.list"
            },
            {
              "method": "PUT",
              "rel": "privilegedEdit",
              "href": "/listData/lists/9ec45a61-774c-488e-99a0-03dfde70b966/privilegedEdit",
              "uri": "/listData/lists/9ec45a61-774c-488e-99a0-03dfde70b966/privilegedEdit",
              "type": "application/vnd.sas.listdata.list",
              "responseType": "application/vnd.sas.listdata.list"
            }
          ]
        },
        {
          "id": "d4367763-5c04-40e1-9abd-fde1796bc83c",
          "version": 1,
          "creationTimeStamp": "2023-02-14T17:01:38.695Z",
          "modifiedTimeStamp": "2023-02-14T19:52:46.714Z",
          "createdBy": "sasadm",
          "modifiedBy": "anonymous",
          "name": "userlist2",
          "description": "desc",
          "state": "developing",
          "isImmutable": false,
          "hasExpiry": true,
          "label": "string",
          "columns": [
            {
              "name": "userId",
              "dataType": "string",
              "position": 1,
              "isKey": true,
              "keyPosition": 1,
              "dataMask": {
                "name": "Mask Start",
                "example": "****1234",
                "regex": ".(....$)|.",
                "replace": "*$1"
              }
            },
            {
              "name": "firstName",
              "dataType": "string",
              "position": 2,
              "isKey": false,
              "keyPosition": 0
            },
            {
              "name": "lastName",
              "dataType": "string",
              "position": 3,
              "isKey": false,
              "keyPosition": 0
            },
            {
              "name": "salary",
              "dataType": "number",
              "position": 4,
              "isKey": false,
              "keyPosition": 0
            }
          ],
          "links": [
            {
              "method": "GET",
              "rel": "up",
              "href": "/listData/lists",
              "uri": "/listData/lists",
              "type": "application/vnd.sas.collection",
              "itemType": "application/vnd.sas.listdata.list"
            },
            {
              "method": "GET",
              "rel": "self",
              "href": "/listData/lists/d4367763-5c04-40e1-9abd-fde1796bc83c",
              "uri": "/listData/lists/d4367763-5c04-40e1-9abd-fde1796bc83c",
              "type": "application/vnd.sas.listdata.list"
            },
            {
              "method": "PUT",
              "rel": "update",
              "href": "/listData/lists/d4367763-5c04-40e1-9abd-fde1796bc83c",
              "uri": "/listData/lists/d4367763-5c04-40e1-9abd-fde1796bc83c",
              "type": "application/vnd.sas.listdata.list",
              "responseType": "application/vnd.sas.listdata.list"
            },
            {
              "method": "GET",
              "rel": "state",
              "href": "/listData/lists/d4367763-5c04-40e1-9abd-fde1796bc83c/state",
              "uri": "/listData/lists/d4367763-5c04-40e1-9abd-fde1796bc83c/state",
              "type": "text/plain"
            },
            {
              "method": "GET",
              "rel": "contents",
              "href": "/listData/lists/d4367763-5c04-40e1-9abd-fde1796bc83c/contents",
              "uri": "/listData/lists/d4367763-5c04-40e1-9abd-fde1796bc83c/contents",
              "type": "application/vnd.sas.collection",
              "itemType": "application/json"
            },
            {
              "method": "GET",
              "rel": "contentsDataset",
              "href": "/listData/lists/d4367763-5c04-40e1-9abd-fde1796bc83c/contents",
              "uri": "/listData/lists/d4367763-5c04-40e1-9abd-fde1796bc83c/contents",
              "type": "application/vnd.sas.listdata.dataset"
            },
            {
              "method": "PUT",
              "rel": "updateContents",
              "href": "/listData/lists/d4367763-5c04-40e1-9abd-fde1796bc83c/contents",
              "uri": "/listData/lists/d4367763-5c04-40e1-9abd-fde1796bc83c/contents",
              "type": "application/vnd.sas.collection",
              "responseType": "application/vnd.sas.listdata.list",
              "itemType": "application/json"
            },
            {
              "method": "POST",
              "rel": "importContents",
              "href": "/listData/lists/d4367763-5c04-40e1-9abd-fde1796bc83c/importJobs",
              "uri": "/listData/lists/d4367763-5c04-40e1-9abd-fde1796bc83c/importJobs",
              "type": "multipart/form-data",
              "responseType": "application/vnd.sas.listdata.importjob"
            },
            {
              "method": "POST",
              "rel": "purgeContents",
              "href": "/listData/lists/d4367763-5c04-40e1-9abd-fde1796bc83c/purgeJobs",
              "uri": "/listData/lists/d4367763-5c04-40e1-9abd-fde1796bc83c/purgeJobs",
              "responseType": "application/vnd.sas.listdata.purgejob"
            },
            {
              "method": "DELETE",
              "rel": "delete",
              "href": "/listData/lists/d4367763-5c04-40e1-9abd-fde1796bc83c",
              "uri": "/listData/lists/d4367763-5c04-40e1-9abd-fde1796bc83c"
            },
            {
              "method": "GET",
              "rel": "alternate",
              "href": "/listData/lists/d4367763-5c04-40e1-9abd-fde1796bc83c",
              "uri": "/listData/lists/d4367763-5c04-40e1-9abd-fde1796bc83c",
              "type": "application/vnd.sas.summary"
            },
            {
              "method": "GET",
              "rel": "privilegedContents",
              "href": "/listData/lists/d4367763-5c04-40e1-9abd-fde1796bc83c/privilegedContents",
              "uri": "/listData/lists/d4367763-5c04-40e1-9abd-fde1796bc83c/privilegedContents",
              "type": "application/vnd.sas.listdata.list"
            },
            {
              "method": "PUT",
              "rel": "privilegedEdit",
              "href": "/listData/lists/d4367763-5c04-40e1-9abd-fde1796bc83c/privilegedEdit",
              "uri": "/listData/lists/d4367763-5c04-40e1-9abd-fde1796bc83c/privilegedEdit",
              "type": "application/vnd.sas.listdata.list",
              "responseType": "application/vnd.sas.listdata.list"
            }
          ]
        }
      ]
    }
    
    {
      "version": 2,
      "accept": "application/vnd.sas.listdata.list",
      "count": 253,
      "start": 0,
      "limit": 2,
      "name": "listResource",
      "items": [
        {
          "id": "9ec45a61-774c-488e-99a0-03dfde70b966",
          "version": 1,
          "creationTimeStamp": "2023-02-14T15:57:54.041Z",
          "modifiedTimeStamp": "2023-02-14T17:29:57.210Z",
          "createdBy": "sasadm",
          "modifiedBy": "sasadm",
          "name": "userlist1",
          "description": "desc",
          "state": "developing",
          "isImmutable": false,
          "hasExpiry": false,
          "label": "string",
          "columns": [
            {
              "name": "userId",
              "dataType": "string",
              "position": 1,
              "isKey": true,
              "keyPosition": 1,
              "dataMask": {
                "name": "Mask Start",
                "example": "****1234",
                "regex": ".(....$)|.",
                "replace": "*$1"
              }
            },
            {
              "name": "firstName",
              "dataType": "string",
              "position": 2,
              "isKey": false,
              "keyPosition": 0
            },
            {
              "name": "lastName",
              "dataType": "string",
              "position": 3,
              "isKey": false,
              "keyPosition": 0
            },
            {
              "name": "salary",
              "dataType": "number",
              "position": 4,
              "isKey": false,
              "keyPosition": 0
            }
          ],
          "links": [
            {
              "method": "GET",
              "rel": "up",
              "href": "/listData/lists",
              "uri": "/listData/lists",
              "type": "application/vnd.sas.collection",
              "itemType": "application/vnd.sas.listdata.list"
            },
            {
              "method": "GET",
              "rel": "self",
              "href": "/listData/lists/9ec45a61-774c-488e-99a0-03dfde70b966",
              "uri": "/listData/lists/9ec45a61-774c-488e-99a0-03dfde70b966",
              "type": "application/vnd.sas.listdata.list"
            },
            {
              "method": "PUT",
              "rel": "update",
              "href": "/listData/lists/9ec45a61-774c-488e-99a0-03dfde70b966",
              "uri": "/listData/lists/9ec45a61-774c-488e-99a0-03dfde70b966",
              "type": "application/vnd.sas.listdata.list",
              "responseType": "application/vnd.sas.listdata.list"
            },
            {
              "method": "GET",
              "rel": "state",
              "href": "/listData/lists/9ec45a61-774c-488e-99a0-03dfde70b966/state",
              "uri": "/listData/lists/9ec45a61-774c-488e-99a0-03dfde70b966/state",
              "type": "text/plain"
            },
            {
              "method": "GET",
              "rel": "contents",
              "href": "/listData/lists/9ec45a61-774c-488e-99a0-03dfde70b966/contents",
              "uri": "/listData/lists/9ec45a61-774c-488e-99a0-03dfde70b966/contents",
              "type": "application/vnd.sas.collection",
              "itemType": "application/json"
            },
            {
              "method": "GET",
              "rel": "contentsDataset",
              "href": "/listData/lists/9ec45a61-774c-488e-99a0-03dfde70b966/contents",
              "uri": "/listData/lists/9ec45a61-774c-488e-99a0-03dfde70b966/contents",
              "type": "application/vnd.sas.listdata.dataset"
            },
            {
              "method": "PUT",
              "rel": "updateContents",
              "href": "/listData/lists/9ec45a61-774c-488e-99a0-03dfde70b966/contents",
              "uri": "/listData/lists/9ec45a61-774c-488e-99a0-03dfde70b966/contents",
              "type": "application/vnd.sas.collection",
              "responseType": "application/vnd.sas.listdata.list",
              "itemType": "application/json"
            },
            {
              "method": "POST",
              "rel": "importContents",
              "href": "/listData/lists/9ec45a61-774c-488e-99a0-03dfde70b966/importJobs",
              "uri": "/listData/lists/9ec45a61-774c-488e-99a0-03dfde70b966/importJobs",
              "type": "multipart/form-data",
              "responseType": "application/vnd.sas.listdata.importjob"
            },
            {
              "method": "POST",
              "rel": "purgeContents",
              "href": "/listData/lists/9ec45a61-774c-488e-99a0-03dfde70b966/purgeJobs",
              "uri": "/listData/lists/9ec45a61-774c-488e-99a0-03dfde70b966/purgeJobs",
              "responseType": "application/vnd.sas.listdata.purgejob"
            },
            {
              "method": "DELETE",
              "rel": "delete",
              "href": "/listData/lists/9ec45a61-774c-488e-99a0-03dfde70b966",
              "uri": "/listData/lists/9ec45a61-774c-488e-99a0-03dfde70b966"
            },
            {
              "method": "GET",
              "rel": "alternate",
              "href": "/listData/lists/9ec45a61-774c-488e-99a0-03dfde70b966",
              "uri": "/listData/lists/9ec45a61-774c-488e-99a0-03dfde70b966",
              "type": "application/vnd.sas.summary"
            },
            {
              "method": "GET",
              "rel": "privilegedContents",
              "href": "/listData/lists/9ec45a61-774c-488e-99a0-03dfde70b966/privilegedContents",
              "uri": "/listData/lists/9ec45a61-774c-488e-99a0-03dfde70b966/privilegedContents",
              "type": "application/vnd.sas.listdata.list"
            },
            {
              "method": "PUT",
              "rel": "privilegedEdit",
              "href": "/listData/lists/9ec45a61-774c-488e-99a0-03dfde70b966/privilegedEdit",
              "uri": "/listData/lists/9ec45a61-774c-488e-99a0-03dfde70b966/privilegedEdit",
              "type": "application/vnd.sas.listdata.list",
              "responseType": "application/vnd.sas.listdata.list"
            }
          ]
        },
        {
          "id": "d4367763-5c04-40e1-9abd-fde1796bc83c",
          "version": 1,
          "creationTimeStamp": "2023-02-14T17:01:38.695Z",
          "modifiedTimeStamp": "2023-02-14T19:52:46.714Z",
          "createdBy": "sasadm",
          "modifiedBy": "anonymous",
          "name": "userlist2",
          "description": "desc",
          "state": "developing",
          "isImmutable": false,
          "hasExpiry": true,
          "label": "string",
          "columns": [
            {
              "name": "userId",
              "dataType": "string",
              "position": 1,
              "isKey": true,
              "keyPosition": 1,
              "dataMask": {
                "name": "Mask Start",
                "example": "****1234",
                "regex": ".(....$)|.",
                "replace": "*$1"
              }
            },
            {
              "name": "firstName",
              "dataType": "string",
              "position": 2,
              "isKey": false,
              "keyPosition": 0
            },
            {
              "name": "lastName",
              "dataType": "string",
              "position": 3,
              "isKey": false,
              "keyPosition": 0
            },
            {
              "name": "salary",
              "dataType": "number",
              "position": 4,
              "isKey": false,
              "keyPosition": 0
            }
          ],
          "links": [
            {
              "method": "GET",
              "rel": "up",
              "href": "/listData/lists",
              "uri": "/listData/lists",
              "type": "application/vnd.sas.collection",
              "itemType": "application/vnd.sas.listdata.list"
            },
            {
              "method": "GET",
              "rel": "self",
              "href": "/listData/lists/d4367763-5c04-40e1-9abd-fde1796bc83c",
              "uri": "/listData/lists/d4367763-5c04-40e1-9abd-fde1796bc83c",
              "type": "application/vnd.sas.listdata.list"
            },
            {
              "method": "PUT",
              "rel": "update",
              "href": "/listData/lists/d4367763-5c04-40e1-9abd-fde1796bc83c",
              "uri": "/listData/lists/d4367763-5c04-40e1-9abd-fde1796bc83c",
              "type": "application/vnd.sas.listdata.list",
              "responseType": "application/vnd.sas.listdata.list"
            },
            {
              "method": "GET",
              "rel": "state",
              "href": "/listData/lists/d4367763-5c04-40e1-9abd-fde1796bc83c/state",
              "uri": "/listData/lists/d4367763-5c04-40e1-9abd-fde1796bc83c/state",
              "type": "text/plain"
            },
            {
              "method": "GET",
              "rel": "contents",
              "href": "/listData/lists/d4367763-5c04-40e1-9abd-fde1796bc83c/contents",
              "uri": "/listData/lists/d4367763-5c04-40e1-9abd-fde1796bc83c/contents",
              "type": "application/vnd.sas.collection",
              "itemType": "application/json"
            },
            {
              "method": "GET",
              "rel": "contentsDataset",
              "href": "/listData/lists/d4367763-5c04-40e1-9abd-fde1796bc83c/contents",
              "uri": "/listData/lists/d4367763-5c04-40e1-9abd-fde1796bc83c/contents",
              "type": "application/vnd.sas.listdata.dataset"
            },
            {
              "method": "PUT",
              "rel": "updateContents",
              "href": "/listData/lists/d4367763-5c04-40e1-9abd-fde1796bc83c/contents",
              "uri": "/listData/lists/d4367763-5c04-40e1-9abd-fde1796bc83c/contents",
              "type": "application/vnd.sas.collection",
              "responseType": "application/vnd.sas.listdata.list",
              "itemType": "application/json"
            },
            {
              "method": "POST",
              "rel": "importContents",
              "href": "/listData/lists/d4367763-5c04-40e1-9abd-fde1796bc83c/importJobs",
              "uri": "/listData/lists/d4367763-5c04-40e1-9abd-fde1796bc83c/importJobs",
              "type": "multipart/form-data",
              "responseType": "application/vnd.sas.listdata.importjob"
            },
            {
              "method": "POST",
              "rel": "purgeContents",
              "href": "/listData/lists/d4367763-5c04-40e1-9abd-fde1796bc83c/purgeJobs",
              "uri": "/listData/lists/d4367763-5c04-40e1-9abd-fde1796bc83c/purgeJobs",
              "responseType": "application/vnd.sas.listdata.purgejob"
            },
            {
              "method": "DELETE",
              "rel": "delete",
              "href": "/listData/lists/d4367763-5c04-40e1-9abd-fde1796bc83c",
              "uri": "/listData/lists/d4367763-5c04-40e1-9abd-fde1796bc83c"
            },
            {
              "method": "GET",
              "rel": "alternate",
              "href": "/listData/lists/d4367763-5c04-40e1-9abd-fde1796bc83c",
              "uri": "/listData/lists/d4367763-5c04-40e1-9abd-fde1796bc83c",
              "type": "application/vnd.sas.summary"
            },
            {
              "method": "GET",
              "rel": "privilegedContents",
              "href": "/listData/lists/d4367763-5c04-40e1-9abd-fde1796bc83c/privilegedContents",
              "uri": "/listData/lists/d4367763-5c04-40e1-9abd-fde1796bc83c/privilegedContents",
              "type": "application/vnd.sas.listdata.list"
            },
            {
              "method": "PUT",
              "rel": "privilegedEdit",
              "href": "/listData/lists/d4367763-5c04-40e1-9abd-fde1796bc83c/privilegedEdit",
              "uri": "/listData/lists/d4367763-5c04-40e1-9abd-fde1796bc83c/privilegedEdit",
              "type": "application/vnd.sas.listdata.list",
              "responseType": "application/vnd.sas.listdata.list"
            }
          ]
        }
      ]
    }
    

    Here is an example of an error response when the request was invalid.

    {
      "httpStatusCode": 400,
      "version": 2,
      "id": "04840005-74d3-458b-bbe1-1209d3a739ac",
      "errorCode": 123456789,
      "details": [
        "bad request reason"
      ],
      "remediation": "The remediation action to fix a Bad Request error.",
      "errors": [
        {
          "optional nested errors": "..."
        }
      ],
      "links": [
        {
          "href": "...",
          "method": "...",
          "rel": "...",
          "uri": "..."
        }
      ]
    }
    

    Here is an example of an error response when the request could not be fulfilled because of an unexpected server error.

    {
      "httpStatusCode": 500,
      "version": 2,
      "id": "04840005-74d3-458b-bbe1-1209d3a739ac",
      "errorCode": 123456789,
      "details": [
        "displayable details of server error"
      ],
      "remediation": "The remediation action to fix an Internal Server Error.",
      "errors": [
        {
          "optional nested errors": "..."
        }
      ],
      "links": [
        {
          "href": "...",
          "method": "...",
          "rel": "...",
          "uri": "..."
        }
      ]
    }
    
    Responses
    Status Meaning Description Schema
    200 OK The request succeeded. listResourceCollection
    400 Bad Request The request was invalid. errorResponse
    500 Internal Server Error The request could not be fulfilled because of an unexpected server error. errorResponse
    Response Headers
    Status Header Type Format Description
    200 Content-Type string string The media type for the body of the request or response.

    Check that a list exists

    Code samples

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

    HEAD /lists/{listId}

    Checks for the existence of a list.

    A successful response (for example, 200 OK) indicates that the list exists. An unsuccessful response (for example, 404 Not Found) indicates that the list does not exist.

    Parameters
    Name In Type Required Description
    Accept header string false The desired response type.
    listId path string true A universally unique identifier for a list.
    Enumerated Values
    Parameter Value
    Accept application/json
    Accept application/vnd.sas.listdata.list+json
    Accept application/vnd.sas.listdata.list+json;version=1
    Accept application/vnd.sas.listdata.listdetails+json
    Accept application/vnd.sas.listdata.listdetails.consumers+json
    Accept application/vnd.sas.transfer.object+json
    Accept application/vnd.sas.summary+json

    Example responses

    Here is an example response to a request to get a collection of lists.

    {
      "version": 2,
      "accept": "application/vnd.sas.listdata.list+json",
      "count": 1,
      "start": 0,
      "limit": 10,
      "name": "lists",
      "items": [
        {
          "id": "3659ea38-2618-4474-aeac-0bf6cfd3c322",
          "name": "list-a",
          "creationTimeStamp": "2022-03-01T20:18:32Z",
          "...see listResource object...": "..."
        }
      ],
      "links": [
        {
          "href": "...",
          "method": "...",
          "rel": "...",
          "uri": "..."
        }
      ]
    }
    

    Here is an example of an error response when the user did not have the necessary permissions.

    {
      "httpStatusCode": 403,
      "version": 2,
      "id": "04840005-74d3-458b-bbe1-1209d3a739ac",
      "errorCode": 123456789,
      "details": [
        "forbidden"
      ],
      "remediation": "The remediation action to fix a Forbidden error.",
      "errors": [],
      "links": [
        {
          "href": "...",
          "method": "...",
          "rel": "...",
          "uri": "..."
        }
      ]
    }
    

    Here is an example of an error response when no item exists at the requested path.

    {
      "httpStatusCode": 404,
      "version": 2,
      "id": "04840005-74d3-458b-bbe1-1209d3a739ac",
      "errorCode": 123456789,
      "details": [
        "not found"
      ],
      "remediation": "The remediation action to fix a Not Found error.",
      "errors": [],
      "links": [
        {
          "href": "...",
          "method": "...",
          "rel": "...",
          "uri": "..."
        }
      ]
    }
    

    Here is an example of an error response when the request could not be fulfilled because of an unexpected server error.

    {
      "httpStatusCode": 500,
      "version": 2,
      "id": "04840005-74d3-458b-bbe1-1209d3a739ac",
      "errorCode": 123456789,
      "details": [
        "displayable details of server error"
      ],
      "remediation": "The remediation action to fix an Internal Server Error.",
      "errors": [
        {
          "optional nested errors": "..."
        }
      ],
      "links": [
        {
          "href": "...",
          "method": "...",
          "rel": "...",
          "uri": "..."
        }
      ]
    }
    
    Responses
    Status Meaning Description Schema
    200 OK The request succeeded. resourceCollection
    403 Forbidden The user did not have the necessary permissions. errorResponse
    404 Not Found No item exists at the requested path. errorResponse
    500 Internal Server Error The request could not be fulfilled because of an unexpected server error. errorResponse
    Response Headers
    Status Header Type Format Description
    200 Location string uri The URI of the list.

    Get a list

    Code samples

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

    GET /lists/{listId}

    Returns a list.

    Parameters
    Name In Type Required Description
    Accept header string false The desired response type.
    listId path string true A universally unique identifier for a list.
    Enumerated Values
    Parameter Value
    Accept application/json
    Accept application/vnd.sas.listdata.list+json
    Accept application/vnd.sas.listdata.list+json;version=1
    Accept application/vnd.sas.listdata.listdetails+json
    Accept application/vnd.sas.listdata.listdetails.consumers+json
    Accept application/vnd.sas.transfer.object+json
    Accept application/vnd.sas.summary+json

    Example responses

    Here is an example of a response to a request to get a list.

    {
      "id": "3659ea38-2618-4474-aeac-0bf6cfd3c322",
      "version": 1,
      "creationTimeStamp": "2022-03-01T20:18:32Z",
      "modifiedTimeStamp": "2022-03-01T20:18:32Z",
      "createdBy": "appUser1",
      "modifiedBy": "appUser1",
      "name": "list-a",
      "description": "The A-list users",
      "state": "developing",
      "columns": [
        {
          "name": "userId",
          "dataType": "string",
          "position": 1,
          "isKey": true,
          "keyPosition": 1
        },
        {
          "name": "firstName",
          "dataType": "string",
          "position": 2,
          "isKey": false,
          "keyPosition": 0
        },
        {
          "name": "lastName",
          "dataType": "string",
          "position": 3,
          "isKey": false,
          "keyPosition": 0
        },
        {
          "name": "salary",
          "dataType": "number",
          "position": 4,
          "isKey": false,
          "keyPosition": 0,
          "dataMask": {
            "name": "MaskStart",
            "regex": ".(....$)|.",
            "replace": "*$1",
            "example": "****1234"
          }
        }
      ],
      "label": "corporate marketing",
      "links": [
        {
          "href": "...",
          "method": "...",
          "rel": "...",
          "uri": "..."
        }
      ]
    }
    
    {
      "id": "3659ea38-2618-4474-aeac-0bf6cfd3c322",
      "version": 1,
      "creationTimeStamp": "2022-03-01T20:18:32Z",
      "modifiedTimeStamp": "2022-03-01T20:18:32Z",
      "createdBy": "appUser1",
      "modifiedBy": "appUser1",
      "name": "list-a",
      "description": "The A-list users",
      "state": "developing",
      "columns": [
        {
          "name": "userId",
          "dataType": "string",
          "position": 1,
          "isKey": true,
          "keyPosition": 1
        },
        {
          "name": "firstName",
          "dataType": "string",
          "position": 2,
          "isKey": false,
          "keyPosition": 0
        },
        {
          "name": "lastName",
          "dataType": "string",
          "position": 3,
          "isKey": false,
          "keyPosition": 0
        },
        {
          "name": "salary",
          "dataType": "number",
          "position": 4,
          "isKey": false,
          "keyPosition": 0,
          "dataMask": {
            "name": "MaskStart",
            "regex": ".(....$)|.",
            "replace": "*$1",
            "example": "****1234"
          }
        }
      ],
      "label": "corporate marketing",
      "links": [
        {
          "href": "...",
          "method": "...",
          "rel": "...",
          "uri": "..."
        }
      ]
    }
    

    Here is an example of a response to a request to get a list's details.

    {
      "id": "3659ea38-2618-4474-aeac-0bf6cfd3c322",
      "version": 1,
      "name": "list-a",
      "description": "The A-list users",
      "label": "corporate marketing",
      "parentFolder": "myFolder",
      "location": "/public/myFolder",
      "keyPrefix": "SAS|0|0|LIST|list-a",
      "links": [
        {
          "href": "...",
          "method": "...",
          "rel": "...",
          "uri": "..."
        }
      ]
    }
    

    Here is an example of a response to a request to get a list's details and consumer information.

    {
      "creationTimeStamp": "2022-10-03T01:54:50.073Z",
      "modifiedTimeStamp": "2022-10-03T21:58:29.809Z",
      "id": "4ae3a5a4-517e-48e2-a732-91190e3b7e83",
      "instanceType": "entity",
      "definitionId": "afc7ccba-7312-45b5-80fd-f33214efcc6f",
      "name": "masked list 32",
      "description": "masked sales data",
      "type": "advancedList",
      "anchor": "advancedList|/listData/lists/c08e5023-c682-4c35-a535-09b4e734f416",
      "attributes": {
        "analysisTimeStamp": "2022-10-03T01:54:50.003Z",
        "creator": "sasadm",
        "dateCreated": "2022-10-03T01:54:49.713Z",
        "dateModified": "2022-10-03T01:54:49.713Z",
        "editor": "sasadm",
        "source": "SAS"
      },
      "resourceId": "/listData/lists/c08e5023-c682-4c35-a535-09b4e734f416",
      "consumers": [
        {
          "id": "1abeae1a-abed-453b-a74c-8fe9743ed1c1",
          "definitionId": "9b9145ce-e141-4635-a203-78ed5651e028",
          "uri": "/catalog/instances/1abeae1a-abed-453b-a74c-8fe9743ed1c1",
          "endpointId": "9eb2d7ee-3165-446e-b3bc-1dbee1a6f2db",
          "endpointUri": "/catalog/instances/9eb2d7ee-3165-446e-b3bc-1dbee1a6f2db"
        },
        {
          "id": "bfe0efb3-56c6-4951-ab3b-fcb549503874",
          "definitionId": "4267b494-7d4c-47a0-8aba-c04c809fc9a6",
          "uri": "/catalog/instances/bfe0efb3-56c6-4951-ab3b-fcb549503874",
          "endpointId": "32db1a1b-5326-4a0e-bd35-9ec82000a5b7",
          "endpointUri": "/catalog/instances/32db1a1b-5326-4a0e-bd35-9ec82000a5b7"
        }
      ]
    }
    

    Here is an example of a response to a request to get a list summary.

    {
      "creationTimeStamp": "2023-02-14T17:29:57.210Z",
      "createdBy": "sasadm",
      "modifiedTimeStamp": "2023-02-14T17:29:57.210Z",
      "modifiedBy": "sasadm",
      "version": "2",
      "id": "9ec45a61-774c-488e-99a0-03dfde70b966",
      "name": "userlist1",
      "description": "desc",
      "type": "advancedList",
      "links": [
        {
          "method": "GET",
          "rel": "self",
          "href": "/listData/lists/9ec45a61-774c-488e-99a0-03dfde70b966",
          "uri": "/listData/lists/9ec45a61-774c-488e-99a0-03dfde70b966",
          "type": "application/vnd.sas.listdata.list"
        },
        {
          "method": "GET",
          "rel": "alternate",
          "href": "/listData/lists/9ec45a61-774c-488e-99a0-03dfde70b966",
          "uri": "/listData/lists/9ec45a61-774c-488e-99a0-03dfde70b966",
          "type": "application/vnd.sas.summary"
        }
      ]
    }
    

    Here is an example of a response to a request to get a transfer object, which is required by the Transfer service.

    null
    

    Here is an example of an error response when the user did not have the necessary permissions.

    {
      "httpStatusCode": 403,
      "version": 2,
      "id": "04840005-74d3-458b-bbe1-1209d3a739ac",
      "errorCode": 123456789,
      "details": [
        "forbidden"
      ],
      "remediation": "The remediation action to fix a Forbidden error.",
      "errors": [],
      "links": [
        {
          "href": "...",
          "method": "...",
          "rel": "...",
          "uri": "..."
        }
      ]
    }
    

    Here is an example of an error response when no item exists at the requested path.

    {
      "httpStatusCode": 404,
      "version": 2,
      "id": "04840005-74d3-458b-bbe1-1209d3a739ac",
      "errorCode": 123456789,
      "details": [
        "not found"
      ],
      "remediation": "The remediation action to fix a Not Found error.",
      "errors": [],
      "links": [
        {
          "href": "...",
          "method": "...",
          "rel": "...",
          "uri": "..."
        }
      ]
    }
    

    Here is an example of an error response when the request could not be fulfilled because of an unexpected server error.

    {
      "httpStatusCode": 500,
      "version": 2,
      "id": "04840005-74d3-458b-bbe1-1209d3a739ac",
      "errorCode": 123456789,
      "details": [
        "displayable details of server error"
      ],
      "remediation": "The remediation action to fix an Internal Server Error.",
      "errors": [
        {
          "optional nested errors": "..."
        }
      ],
      "links": [
        {
          "href": "...",
          "method": "...",
          "rel": "...",
          "uri": "..."
        }
      ]
    }
    
    Responses
    Status Meaning Description Schema
    200 OK The request succeeded. transferObject
    403 Forbidden The user did not have the necessary permissions. errorResponse
    404 Not Found No item exists at the requested path. errorResponse
    500 Internal Server Error The request could not be fulfilled because of an unexpected server error. errorResponse
    Response Headers
    Status Header Type Format Description
    200 Content-Type string string The media type for the body of the request or response.

    Update a list's properties

    Code samples

    # You can also use wget
    curl -X PUT http://mock-listData.apifirst.unx.sas.com/listData/lists/{listId} \
      -H 'Authorization: Bearer <access-token-goes-here>' \
      -H 'Content-Type: application/vnd.sas.listdata.list+json' \
      -H 'Accept: application/vnd.sas.listdata.list+json'
    
    
    const inputBody = '{
      "id": "3659ea38-2618-4474-aeac-0bf6cfd3c322",
      "version": 1,
      "creationTimeStamp": "2022-03-01T20:18:32Z",
      "modifiedTimeStamp": "2022-03-01T20:18:32Z",
      "createdBy": "appUser1",
      "modifiedBy": "appUser1",
      "name": "list-a",
      "description": "The A-list users",
      "state": "developing",
      "columns": [
        {
          "name": "userId",
          "dataType": "string",
          "position": 1,
          "isKey": true,
          "keyPosition": 1
        },
        {
          "name": "firstName",
          "dataType": "string",
          "position": 2,
          "isKey": false,
          "keyPosition": 0
        },
        {
          "name": "lastName",
          "dataType": "string",
          "position": 3,
          "isKey": false,
          "keyPosition": 0
        },
        {
          "name": "salary",
          "dataType": "number",
          "position": 4,
          "isKey": false,
          "keyPosition": 0,
          "dataMask": {
            "name": "MaskStart",
            "regex": ".(....$)|.",
            "replace": "*$1",
            "example": "****1234"
          }
        }
      ],
      "label": "corporate marketing",
      "links": [
        {
          "href": "...",
          "method": "...",
          "rel": "...",
          "uri": "..."
        }
      ]
    }';
    const headers = {
      'Content-Type':'application/vnd.sas.listdata.list+json',
      'Accept':'application/vnd.sas.listdata.list+json'
    };
    
    fetch('http://mock-listData.apifirst.unx.sas.com/listData/lists/{listId}',
    {
      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.listdata.list+json',
      'Accept': 'application/vnd.sas.listdata.list+json'
    }
    
    r = requests.put('http://mock-listData.apifirst.unx.sas.com/listData/lists/{listId}', headers = headers)
    
    print(r.json())
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Content-Type": []string{"application/vnd.sas.listdata.list+json"},
            "Accept": []string{"application/vnd.sas.listdata.list+json"},
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("PUT", "http://mock-listData.apifirst.unx.sas.com/listData/lists/{listId}", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    

    PUT /lists/{listId}

    Updates a list's properties.

    In some situations, you cannot edit properties that are not marked as Read-Only.

    Restricted Updates When a List Contains Contents

    Once a list has contents, you cannot update the following properties: * 'name' * 'isImmutable' * 'columns' * 'ColumnInfo' objects in 'columns' - 'name' - 'dataType' - 'position' - 'isKey' - 'keyPosition' - 'dataMask'

    Administrative Editing Privileges

    From the list above, only the 'dataMask' property for the 'ColumnInfo' object can be modified after a list has contents. A user with privileged authorization can create, update, and delete the 'dataMask' property for the 'ColumnInfo' object.

    See the endpoint /lists/{listId}/privilegedEdit for more details.

    Body parameter

    Here is an example of a response to a request to get a list.

    {
      "id": "3659ea38-2618-4474-aeac-0bf6cfd3c322",
      "version": 1,
      "creationTimeStamp": "2022-03-01T20:18:32Z",
      "modifiedTimeStamp": "2022-03-01T20:18:32Z",
      "createdBy": "appUser1",
      "modifiedBy": "appUser1",
      "name": "list-a",
      "description": "The A-list users",
      "state": "developing",
      "columns": [
        {
          "name": "userId",
          "dataType": "string",
          "position": 1,
          "isKey": true,
          "keyPosition": 1
        },
        {
          "name": "firstName",
          "dataType": "string",
          "position": 2,
          "isKey": false,
          "keyPosition": 0
        },
        {
          "name": "lastName",
          "dataType": "string",
          "position": 3,
          "isKey": false,
          "keyPosition": 0
        },
        {
          "name": "salary",
          "dataType": "number",
          "position": 4,
          "isKey": false,
          "keyPosition": 0,
          "dataMask": {
            "name": "MaskStart",
            "regex": ".(....$)|.",
            "replace": "*$1",
            "example": "****1234"
          }
        }
      ],
      "label": "corporate marketing",
      "links": [
        {
          "href": "...",
          "method": "...",
          "rel": "...",
          "uri": "..."
        }
      ]
    }
    
    Parameters
    Name In Type Required Description
    body body listResource false none
    listId path string true A universally unique identifier for a list.

    Example responses

    Here is an example of a response to a request to get a list.

    {
      "id": "3659ea38-2618-4474-aeac-0bf6cfd3c322",
      "version": 1,
      "creationTimeStamp": "2022-03-01T20:18:32Z",
      "modifiedTimeStamp": "2022-03-01T20:18:32Z",
      "createdBy": "appUser1",
      "modifiedBy": "appUser1",
      "name": "list-a",
      "description": "The A-list users",
      "state": "developing",
      "columns": [
        {
          "name": "userId",
          "dataType": "string",
          "position": 1,
          "isKey": true,
          "keyPosition": 1
        },
        {
          "name": "firstName",
          "dataType": "string",
          "position": 2,
          "isKey": false,
          "keyPosition": 0
        },
        {
          "name": "lastName",
          "dataType": "string",
          "position": 3,
          "isKey": false,
          "keyPosition": 0
        },
        {
          "name": "salary",
          "dataType": "number",
          "position": 4,
          "isKey": false,
          "keyPosition": 0,
          "dataMask": {
            "name": "MaskStart",
            "regex": ".(....$)|.",
            "replace": "*$1",
            "example": "****1234"
          }
        }
      ],
      "label": "corporate marketing",
      "links": [
        {
          "href": "...",
          "method": "...",
          "rel": "...",
          "uri": "..."
        }
      ]
    }
    
    {
      "id": "3659ea38-2618-4474-aeac-0bf6cfd3c322",
      "version": 1,
      "creationTimeStamp": "2022-03-01T20:18:32Z",
      "modifiedTimeStamp": "2022-03-01T20:18:32Z",
      "createdBy": "appUser1",
      "modifiedBy": "appUser1",
      "name": "list-a",
      "description": "The A-list users",
      "state": "developing",
      "columns": [
        {
          "name": "userId",
          "dataType": "string",
          "position": 1,
          "isKey": true,
          "keyPosition": 1
        },
        {
          "name": "firstName",
          "dataType": "string",
          "position": 2,
          "isKey": false,
          "keyPosition": 0
        },
        {
          "name": "lastName",
          "dataType": "string",
          "position": 3,
          "isKey": false,
          "keyPosition": 0
        },
        {
          "name": "salary",
          "dataType": "number",
          "position": 4,
          "isKey": false,
          "keyPosition": 0,
          "dataMask": {
            "name": "MaskStart",
            "regex": ".(....$)|.",
            "replace": "*$1",
            "example": "****1234"
          }
        }
      ],
      "label": "corporate marketing",
      "links": [
        {
          "href": "...",
          "method": "...",
          "rel": "...",
          "uri": "..."
        }
      ]
    }
    

    Here is an example of an error response when the request was invalid.

    {
      "httpStatusCode": 400,
      "version": 2,
      "id": "04840005-74d3-458b-bbe1-1209d3a739ac",
      "errorCode": 123456789,
      "details": [
        "bad request reason"
      ],
      "remediation": "The remediation action to fix a Bad Request error.",
      "errors": [
        {
          "optional nested errors": "..."
        }
      ],
      "links": [
        {
          "href": "...",
          "method": "...",
          "rel": "...",
          "uri": "..."
        }
      ]
    }
    

    Here is an example of an error response when the user did not have the necessary permissions.

    {
      "httpStatusCode": 403,
      "version": 2,
      "id": "04840005-74d3-458b-bbe1-1209d3a739ac",
      "errorCode": 123456789,
      "details": [
        "forbidden"
      ],
      "remediation": "The remediation action to fix a Forbidden error.",
      "errors": [],
      "links": [
        {
          "href": "...",
          "method": "...",
          "rel": "...",
          "uri": "..."
        }
      ]
    }
    

    Here is an example of an error response when no item exists at the requested path.

    {
      "httpStatusCode": 404,
      "version": 2,
      "id": "04840005-74d3-458b-bbe1-1209d3a739ac",
      "errorCode": 123456789,
      "details": [
        "not found"
      ],
      "remediation": "The remediation action to fix a Not Found error.",
      "errors": [],
      "links": [
        {
          "href": "...",
          "method": "...",
          "rel": "...",
          "uri": "..."
        }
      ]
    }
    

    Here is an example of an error response when the request could not be fulfilled because of an unexpected server error.

    {
      "httpStatusCode": 500,
      "version": 2,
      "id": "04840005-74d3-458b-bbe1-1209d3a739ac",
      "errorCode": 123456789,
      "details": [
        "displayable details of server error"
      ],
      "remediation": "The remediation action to fix an Internal Server Error.",
      "errors": [
        {
          "optional nested errors": "..."
        }
      ],
      "links": [
        {
          "href": "...",
          "method": "...",
          "rel": "...",
          "uri": "..."
        }
      ]
    }
    
    Responses
    Status Meaning Description Schema
    200 OK The request succeeded. listResource
    400 Bad Request The request was invalid. errorResponse
    403 Forbidden The user did not have the necessary permissions. errorResponse
    404 Not Found No item exists at the requested path. errorResponse
    500 Internal Server Error The request could not be fulfilled because of an unexpected server error. errorResponse
    Response Headers
    Status Header Type Format Description
    200 Content-Type string string The media type for the body of the request or response.
    200 Location string uri The URI of the list.
    200 If-Match string date-time An ETag in the format of W/"the-last-updated-timestamp-in-UNIX-nanosecond-time".

    Delete a list

    Code samples

    # You can also use wget
    curl -X DELETE http://mock-listData.apifirst.unx.sas.com/listData/lists/{listId} \
      -H 'Authorization: Bearer <access-token-goes-here>' \
      -H 'Accept: application/vnd.sas.error+json'
    
    
    
    const headers = {
      'Accept':'application/vnd.sas.error+json'
    };
    
    fetch('http://mock-listData.apifirst.unx.sas.com/listData/lists/{listId}',
    {
      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('http://mock-listData.apifirst.unx.sas.com/listData/lists/{listId}', 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", "http://mock-listData.apifirst.unx.sas.com/listData/lists/{listId}", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    

    DELETE /lists/{listId}

    Removes a list from the system.

    When you delete a list, the list's definition and any import or purge jobs that are associated with the list are removed.

    IMPORTANT: Deleting a list does not remove the list's contents. If required, you should remove the list's contents before you delete the list. To clear the list's contents, you must create a purge job. See the /lists/{listId}/purgeJobs endpoint for details. This two-step process for clearing and deleting a list is due to the non-deterministic time it could take to clear the contents of a list.

    You only can delete a list when its 'state' property is set to 'developing' and the list is not part of a relationship that is registered in the Catalog service.

    A list's deletion fails if the list has any associated import or purge jobs that are running. If you believe that an import or purge job is incorrectly marked as running, you can force a list to delete. Doing so does not stop import or purge jobs that are running. You cannot force a list to delete when the 'state' property is set to 'deployed' or the list is involved in a relationship.

    Parameters
    Name In Type Required Description
    listId path string true A universally unique identifier for a list.
    force query boolean false An indicator for whether to force a list deletion when associated jobs are running. A forced deletion cannot occur when the list's 'state' property is set to 'deployed' or the list is involved in a relationship.

    Example responses

    Here is an example of an error response when the request could not be completed due to a conflict with an existing resource.

    {
      "httpStatusCode": 409,
      "version": 2,
      "id": "04840005-74d3-458b-bbe1-1209d3a739ac",
      "errorCode": 123456789,
      "details": [
        "conflict reason"
      ],
      "remediation": "The remediation action to fix a Conflict error.",
      "errors": [
        {
          "optional nested errors": "..."
        }
      ],
      "links": [
        {
          "href": "...",
          "method": "...",
          "rel": "...",
          "uri": "..."
        }
      ]
    }
    

    Here is an example of an error response when the request could not be fulfilled because of an unexpected server error.

    {
      "httpStatusCode": 500,
      "version": 2,
      "id": "04840005-74d3-458b-bbe1-1209d3a739ac",
      "errorCode": 123456789,
      "details": [
        "displayable details of server error"
      ],
      "remediation": "The remediation action to fix an Internal Server Error.",
      "errors": [
        {
          "optional nested errors": "..."
        }
      ],
      "links": [
        {
          "href": "...",
          "method": "...",
          "rel": "...",
          "uri": "..."
        }
      ]
    }
    
    Responses
    Status Meaning Description Schema
    204 No Content The list was deleted. None
    409 Conflict The request could not be completed due to a conflict with an existing resource. errorResponse
    500 Internal Server Error The request could not be fulfilled because of an unexpected server error. errorResponse

    Delete a list (privileged)

    Code samples

    # You can also use wget
    curl -X DELETE http://mock-listData.apifirst.unx.sas.com/listData/lists/{listId}/privilegedDelete \
      -H 'Authorization: Bearer <access-token-goes-here>' \
      -H 'Accept: application/vnd.sas.error+json'
    
    
    
    const headers = {
      'Accept':'application/vnd.sas.error+json'
    };
    
    fetch('http://mock-listData.apifirst.unx.sas.com/listData/lists/{listId}/privilegedDelete',
    {
      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('http://mock-listData.apifirst.unx.sas.com/listData/lists/{listId}/privilegedDelete', 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", "http://mock-listData.apifirst.unx.sas.com/listData/lists/{listId}/privilegedDelete", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    

    DELETE /lists/{listId}/privilegedDelete

    Removes a list from the system.

    When you delete a list, the list's definition and any import or purge jobs that are associated with the list are removed.

    IMPORTANT: Deleting a list does not remove the list's contents. If required, you should remove the list's contents before you delete the list. To clear the list's contents, you must create a purge job. See the /lists/{listId}/purgeJobs endpoint for details. This two-step process for clearing and deleting a list is due to the non-deterministic time it could take to clear the contents of a list.

    There is an exception to the two-step process for clearing and deleting a list. When you delete an immutable list ('isImmutable' is set to 'true'), the contents and list are removed in a single synchronous call. This is due to the restriction that you cannot create a purge job for an immutable list. It is recommended that very large lists are not immutable.

    You only can delete a list when its 'state' property is set to 'developing' and the list is not part of a relationship that is registered in the Catalog service.

    A list's deletion fails if the list has any associated import or purge jobs that are running. If you believe that an import or purge job is incorrectly marked as running, you can force a list to delete. Doing so does not stop import or purge jobs that are running. You cannot force a list to delete when the 'state' property is set to 'deployed' or the list is involved in a relationship.

    Parameters
    Name In Type Required Description
    listId path string true A universally unique identifier for a list.
    force query boolean false An indicator for whether to force a list deletion when associated jobs are running. A forced deletion cannot occur when the list's 'state' property is set to 'deployed' or the list is involved in a relationship.

    Example responses

    Here is an example of an error response when the request could not be completed due to a conflict with an existing resource.

    {
      "httpStatusCode": 409,
      "version": 2,
      "id": "04840005-74d3-458b-bbe1-1209d3a739ac",
      "errorCode": 123456789,
      "details": [
        "conflict reason"
      ],
      "remediation": "The remediation action to fix a Conflict error.",
      "errors": [
        {
          "optional nested errors": "..."
        }
      ],
      "links": [
        {
          "href": "...",
          "method": "...",
          "rel": "...",
          "uri": "..."
        }
      ]
    }
    

    Here is an example of an error response when the request could not be fulfilled because of an unexpected server error.

    {
      "httpStatusCode": 500,
      "version": 2,
      "id": "04840005-74d3-458b-bbe1-1209d3a739ac",
      "errorCode": 123456789,
      "details": [
        "displayable details of server error"
      ],
      "remediation": "The remediation action to fix an Internal Server Error.",
      "errors": [
        {
          "optional nested errors": "..."
        }
      ],
      "links": [
        {
          "href": "...",
          "method": "...",
          "rel": "...",
          "uri": "..."
        }
      ]
    }
    
    Responses
    Status Meaning Description Schema
    204 No Content The list was deleted. None
    409 Conflict The request could not be completed due to a conflict with an existing resource. errorResponse
    500 Internal Server Error The request could not be fulfilled because of an unexpected server error. errorResponse

    Update a list's properties (privileged)

    Code samples

    # You can also use wget
    curl -X PUT http://mock-listData.apifirst.unx.sas.com/listData/lists/{listId}/privilegedEdit \
      -H 'Authorization: Bearer <access-token-goes-here>' \
      -H 'Content-Type: application/vnd.sas.listdata.list+json' \
      -H 'Accept: application/vnd.sas.listdata.list+json'
    
    
    const inputBody = '{
      "id": "3659ea38-2618-4474-aeac-0bf6cfd3c322",
      "version": 1,
      "creationTimeStamp": "2022-03-01T20:18:32Z",
      "modifiedTimeStamp": "2022-03-01T20:18:32Z",
      "createdBy": "appUser1",
      "modifiedBy": "appUser1",
      "name": "list-a",
      "description": "The A-list users",
      "state": "developing",
      "columns": [
        {
          "name": "userId",
          "dataType": "string",
          "position": 1,
          "isKey": true,
          "keyPosition": 1
        },
        {
          "name": "firstName",
          "dataType": "string",
          "position": 2,
          "isKey": false,
          "keyPosition": 0
        },
        {
          "name": "lastName",
          "dataType": "string",
          "position": 3,
          "isKey": false,
          "keyPosition": 0
        },
        {
          "name": "salary",
          "dataType": "number",
          "position": 4,
          "isKey": false,
          "keyPosition": 0,
          "dataMask": {
            "name": "MaskStart",
            "regex": ".(....$)|.",
            "replace": "*$1",
            "example": "****1234"
          }
        }
      ],
      "label": "corporate marketing",
      "links": [
        {
          "href": "...",
          "method": "...",
          "rel": "...",
          "uri": "..."
        }
      ]
    }';
    const headers = {
      'Content-Type':'application/vnd.sas.listdata.list+json',
      'Accept':'application/vnd.sas.listdata.list+json'
    };
    
    fetch('http://mock-listData.apifirst.unx.sas.com/listData/lists/{listId}/privilegedEdit',
    {
      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.listdata.list+json',
      'Accept': 'application/vnd.sas.listdata.list+json'
    }
    
    r = requests.put('http://mock-listData.apifirst.unx.sas.com/listData/lists/{listId}/privilegedEdit', headers = headers)
    
    print(r.json())
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Content-Type": []string{"application/vnd.sas.listdata.list+json"},
            "Accept": []string{"application/vnd.sas.listdata.list+json"},
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("PUT", "http://mock-listData.apifirst.unx.sas.com/listData/lists/{listId}/privilegedEdit", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    

    PUT /lists/{listId}/privilegedEdit

    Updates a list's properties by a user who has privileged authorization.

    This operation enables you to perform standard updates to a list's properties and privileged updates, such as changing the data mask on columns in the list-content records.

    In some situations, you cannot edit properties that are not marked as Read-Only.

    Restricted Updates When a List Contains Content

    Once a list has contents, you cannot update the following properties: * 'name' * 'isImmutable' * 'columns' * 'ColumnInfo' objects in 'columns' - 'name' - 'dataType' - 'position' - 'isKey' - 'keyPosition' - 'dataMask'

    Administrative Editing Privileges

    From the list above, only the 'dataMask' property for the 'ColumnInfo' object can be modified after a list has contents. A user with privileged authorization can create, update, and delete the 'dataMask' property for the 'ColumnInfo' object.

    To enable a user to have access this endpoint, an authorization rule must be created for the URI /lists/{listId}/privilegedEdit that allows updates.

    Body parameter

    Here is an example of a response to a request to get a list.

    {
      "id": "3659ea38-2618-4474-aeac-0bf6cfd3c322",
      "version": 1,
      "creationTimeStamp": "2022-03-01T20:18:32Z",
      "modifiedTimeStamp": "2022-03-01T20:18:32Z",
      "createdBy": "appUser1",
      "modifiedBy": "appUser1",
      "name": "list-a",
      "description": "The A-list users",
      "state": "developing",
      "columns": [
        {
          "name": "userId",
          "dataType": "string",
          "position": 1,
          "isKey": true,
          "keyPosition": 1
        },
        {
          "name": "firstName",
          "dataType": "string",
          "position": 2,
          "isKey": false,
          "keyPosition": 0
        },
        {
          "name": "lastName",
          "dataType": "string",
          "position": 3,
          "isKey": false,
          "keyPosition": 0
        },
        {
          "name": "salary",
          "dataType": "number",
          "position": 4,
          "isKey": false,
          "keyPosition": 0,
          "dataMask": {
            "name": "MaskStart",
            "regex": ".(....$)|.",
            "replace": "*$1",
            "example": "****1234"
          }
        }
      ],
      "label": "corporate marketing",
      "links": [
        {
          "href": "...",
          "method": "...",
          "rel": "...",
          "uri": "..."
        }
      ]
    }
    
    Parameters
    Name In Type Required Description
    body body listResource false none
    listId path string true A universally unique identifier for a list.

    Example responses

    Here is an example of a response to a request to get a list.

    {
      "id": "3659ea38-2618-4474-aeac-0bf6cfd3c322",
      "version": 1,
      "creationTimeStamp": "2022-03-01T20:18:32Z",
      "modifiedTimeStamp": "2022-03-01T20:18:32Z",
      "createdBy": "appUser1",
      "modifiedBy": "appUser1",
      "name": "list-a",
      "description": "The A-list users",
      "state": "developing",
      "columns": [
        {
          "name": "userId",
          "dataType": "string",
          "position": 1,
          "isKey": true,
          "keyPosition": 1
        },
        {
          "name": "firstName",
          "dataType": "string",
          "position": 2,
          "isKey": false,
          "keyPosition": 0
        },
        {
          "name": "lastName",
          "dataType": "string",
          "position": 3,
          "isKey": false,
          "keyPosition": 0
        },
        {
          "name": "salary",
          "dataType": "number",
          "position": 4,
          "isKey": false,
          "keyPosition": 0,
          "dataMask": {
            "name": "MaskStart",
            "regex": ".(....$)|.",
            "replace": "*$1",
            "example": "****1234"
          }
        }
      ],
      "label": "corporate marketing",
      "links": [
        {
          "href": "...",
          "method": "...",
          "rel": "...",
          "uri": "..."
        }
      ]
    }
    
    {
      "id": "3659ea38-2618-4474-aeac-0bf6cfd3c322",
      "version": 1,
      "creationTimeStamp": "2022-03-01T20:18:32Z",
      "modifiedTimeStamp": "2022-03-01T20:18:32Z",
      "createdBy": "appUser1",
      "modifiedBy": "appUser1",
      "name": "list-a",
      "description": "The A-list users",
      "state": "developing",
      "columns": [
        {
          "name": "userId",
          "dataType": "string",
          "position": 1,
          "isKey": true,
          "keyPosition": 1
        },
        {
          "name": "firstName",
          "dataType": "string",
          "position": 2,
          "isKey": false,
          "keyPosition": 0
        },
        {
          "name": "lastName",
          "dataType": "string",
          "position": 3,
          "isKey": false,
          "keyPosition": 0
        },
        {
          "name": "salary",
          "dataType": "number",
          "position": 4,
          "isKey": false,
          "keyPosition": 0,
          "dataMask": {
            "name": "MaskStart",
            "regex": ".(....$)|.",
            "replace": "*$1",
            "example": "****1234"
          }
        }
      ],
      "label": "corporate marketing",
      "links": [
        {
          "href": "...",
          "method": "...",
          "rel": "...",
          "uri": "..."
        }
      ]
    }
    

    Here is an example of an error response when the request was invalid.

    {
      "httpStatusCode": 400,
      "version": 2,
      "id": "04840005-74d3-458b-bbe1-1209d3a739ac",
      "errorCode": 123456789,
      "details": [
        "bad request reason"
      ],
      "remediation": "The remediation action to fix a Bad Request error.",
      "errors": [
        {
          "optional nested errors": "..."
        }
      ],
      "links": [
        {
          "href": "...",
          "method": "...",
          "rel": "...",
          "uri": "..."
        }
      ]
    }
    

    Here is an example of an error response when the user did not have the necessary permissions.

    {
      "httpStatusCode": 403,
      "version": 2,
      "id": "04840005-74d3-458b-bbe1-1209d3a739ac",
      "errorCode": 123456789,
      "details": [
        "forbidden"
      ],
      "remediation": "The remediation action to fix a Forbidden error.",
      "errors": [],
      "links": [
        {
          "href": "...",
          "method": "...",
          "rel": "...",
          "uri": "..."
        }
      ]
    }
    

    Here is an example of an error response when no item exists at the requested path.

    {
      "httpStatusCode": 404,
      "version": 2,
      "id": "04840005-74d3-458b-bbe1-1209d3a739ac",
      "errorCode": 123456789,
      "details": [
        "not found"
      ],
      "remediation": "The remediation action to fix a Not Found error.",
      "errors": [],
      "links": [
        {
          "href": "...",
          "method": "...",
          "rel": "...",
          "uri": "..."
        }
      ]
    }
    

    Here is an example of an error response when the request could not be fulfilled because of an unexpected server error.

    {
      "httpStatusCode": 500,
      "version": 2,
      "id": "04840005-74d3-458b-bbe1-1209d3a739ac",
      "errorCode": 123456789,
      "details": [
        "displayable details of server error"
      ],
      "remediation": "The remediation action to fix an Internal Server Error.",
      "errors": [
        {
          "optional nested errors": "..."
        }
      ],
      "links": [
        {
          "href": "...",
          "method": "...",
          "rel": "...",
          "uri": "..."
        }
      ]
    }
    
    Responses
    Status Meaning Description Schema
    200 OK The request succeeded. listResource
    400 Bad Request The request was invalid. errorResponse
    403 Forbidden The user did not have the necessary permissions. errorResponse
    404 Not Found No item exists at the requested path. errorResponse
    500 Internal Server Error The request could not be fulfilled because of an unexpected server error. errorResponse
    Response Headers
    Status Header Type Format Description
    200 Content-Type string string The media type for the body of the request or response.
    200 Location string uri The URI of the list.
    200 If-Match string date-time An ETag in the format of W/"the-last-updated-timestamp-in-UNIX-nanosecond-time".

    Get a collection of lists from the specified folder

    Code samples

    # You can also use wget
    curl -X GET http://mock-listData.apifirst.unx.sas.com/listData/folders/{folderId}/lists \
      -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-listData.apifirst.unx.sas.com/listData/folders/{folderId}/lists',
    {
      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-listData.apifirst.unx.sas.com/listData/folders/{folderId}/lists', 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-listData.apifirst.unx.sas.com/listData/folders/{folderId}/lists", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    

    GET /folders/{folderId}/lists

    Returns a collection of lists from the specified folder. The maximum number of lists that can be returned from a folder is 100000.

    Parameters
    Name In Type Required Description
    folderId path string true A universally unique identifier for a folder. The maximum number of lists that can be returned from a folder is 100000.
    start query integer false A zero-based offset of the first item to return. The default value is '0'.
    limit query integer false The maximum number of items to return. The default value is '20'.
    filter query string(filter-criteria) false The filter criteria for returned items. See Filtering in REST APIs.
    sortBy query string(sort-criteria) false A sort of the returned items. See Sorting in REST APIs.

    Example responses

    Here is an example response to a request to get a collection of lists.

    {
      "version": 2,
      "accept": "application/vnd.sas.listdata.list",
      "count": 253,
      "start": 0,
      "limit": 2,
      "name": "listResource",
      "items": [
        {
          "id": "9ec45a61-774c-488e-99a0-03dfde70b966",
          "version": 1,
          "creationTimeStamp": "2023-02-14T15:57:54.041Z",
          "modifiedTimeStamp": "2023-02-14T17:29:57.210Z",
          "createdBy": "sasadm",
          "modifiedBy": "sasadm",
          "name": "userlist1",
          "description": "desc",
          "state": "developing",
          "isImmutable": false,
          "hasExpiry": false,
          "label": "string",
          "columns": [
            {
              "name": "userId",
              "dataType": "string",
              "position": 1,
              "isKey": true,
              "keyPosition": 1,
              "dataMask": {
                "name": "Mask Start",
                "example": "****1234",
                "regex": ".(....$)|.",
                "replace": "*$1"
              }
            },
            {
              "name": "firstName",
              "dataType": "string",
              "position": 2,
              "isKey": false,
              "keyPosition": 0
            },
            {
              "name": "lastName",
              "dataType": "string",
              "position": 3,
              "isKey": false,
              "keyPosition": 0
            },
            {
              "name": "salary",
              "dataType": "number",
              "position": 4,
              "isKey": false,
              "keyPosition": 0
            }
          ],
          "links": [
            {
              "method": "GET",
              "rel": "up",
              "href": "/listData/lists",
              "uri": "/listData/lists",
              "type": "application/vnd.sas.collection",
              "itemType": "application/vnd.sas.listdata.list"
            },
            {
              "method": "GET",
              "rel": "self",
              "href": "/listData/lists/9ec45a61-774c-488e-99a0-03dfde70b966",
              "uri": "/listData/lists/9ec45a61-774c-488e-99a0-03dfde70b966",
              "type": "application/vnd.sas.listdata.list"
            },
            {
              "method": "PUT",
              "rel": "update",
              "href": "/listData/lists/9ec45a61-774c-488e-99a0-03dfde70b966",
              "uri": "/listData/lists/9ec45a61-774c-488e-99a0-03dfde70b966",
              "type": "application/vnd.sas.listdata.list",
              "responseType": "application/vnd.sas.listdata.list"
            },
            {
              "method": "GET",
              "rel": "state",
              "href": "/listData/lists/9ec45a61-774c-488e-99a0-03dfde70b966/state",
              "uri": "/listData/lists/9ec45a61-774c-488e-99a0-03dfde70b966/state",
              "type": "text/plain"
            },
            {
              "method": "GET",
              "rel": "contents",
              "href": "/listData/lists/9ec45a61-774c-488e-99a0-03dfde70b966/contents",
              "uri": "/listData/lists/9ec45a61-774c-488e-99a0-03dfde70b966/contents",
              "type": "application/vnd.sas.collection",
              "itemType": "application/json"
            },
            {
              "method": "GET",
              "rel": "contentsDataset",
              "href": "/listData/lists/9ec45a61-774c-488e-99a0-03dfde70b966/contents",
              "uri": "/listData/lists/9ec45a61-774c-488e-99a0-03dfde70b966/contents",
              "type": "application/vnd.sas.listdata.dataset"
            },
            {
              "method": "PUT",
              "rel": "updateContents",
              "href": "/listData/lists/9ec45a61-774c-488e-99a0-03dfde70b966/contents",
              "uri": "/listData/lists/9ec45a61-774c-488e-99a0-03dfde70b966/contents",
              "type": "application/vnd.sas.collection",
              "responseType": "application/vnd.sas.listdata.list",
              "itemType": "application/json"
            },
            {
              "method": "POST",
              "rel": "importContents",
              "href": "/listData/lists/9ec45a61-774c-488e-99a0-03dfde70b966/importJobs",
              "uri": "/listData/lists/9ec45a61-774c-488e-99a0-03dfde70b966/importJobs",
              "type": "multipart/form-data",
              "responseType": "application/vnd.sas.listdata.importjob"
            },
            {
              "method": "POST",
              "rel": "purgeContents",
              "href": "/listData/lists/9ec45a61-774c-488e-99a0-03dfde70b966/purgeJobs",
              "uri": "/listData/lists/9ec45a61-774c-488e-99a0-03dfde70b966/purgeJobs",
              "responseType": "application/vnd.sas.listdata.purgejob"
            },
            {
              "method": "DELETE",
              "rel": "delete",
              "href": "/listData/lists/9ec45a61-774c-488e-99a0-03dfde70b966",
              "uri": "/listData/lists/9ec45a61-774c-488e-99a0-03dfde70b966"
            },
            {
              "method": "GET",
              "rel": "alternate",
              "href": "/listData/lists/9ec45a61-774c-488e-99a0-03dfde70b966",
              "uri": "/listData/lists/9ec45a61-774c-488e-99a0-03dfde70b966",
              "type": "application/vnd.sas.summary"
            },
            {
              "method": "GET",
              "rel": "privilegedContents",
              "href": "/listData/lists/9ec45a61-774c-488e-99a0-03dfde70b966/privilegedContents",
              "uri": "/listData/lists/9ec45a61-774c-488e-99a0-03dfde70b966/privilegedContents",
              "type": "application/vnd.sas.listdata.list"
            },
            {
              "method": "PUT",
              "rel": "privilegedEdit",
              "href": "/listData/lists/9ec45a61-774c-488e-99a0-03dfde70b966/privilegedEdit",
              "uri": "/listData/lists/9ec45a61-774c-488e-99a0-03dfde70b966/privilegedEdit",
              "type": "application/vnd.sas.listdata.list",
              "responseType": "application/vnd.sas.listdata.list"
            }
          ]
        },
        {
          "id": "d4367763-5c04-40e1-9abd-fde1796bc83c",
          "version": 1,
          "creationTimeStamp": "2023-02-14T17:01:38.695Z",
          "modifiedTimeStamp": "2023-02-14T19:52:46.714Z",
          "createdBy": "sasadm",
          "modifiedBy": "anonymous",
          "name": "userlist2",
          "description": "desc",
          "state": "developing",
          "isImmutable": false,
          "hasExpiry": true,
          "label": "string",
          "columns": [
            {
              "name": "userId",
              "dataType": "string",
              "position": 1,
              "isKey": true,
              "keyPosition": 1,
              "dataMask": {
                "name": "Mask Start",
                "example": "****1234",
                "regex": ".(....$)|.",
                "replace": "*$1"
              }
            },
            {
              "name": "firstName",
              "dataType": "string",
              "position": 2,
              "isKey": false,
              "keyPosition": 0
            },
            {
              "name": "lastName",
              "dataType": "string",
              "position": 3,
              "isKey": false,
              "keyPosition": 0
            },
            {
              "name": "salary",
              "dataType": "number",
              "position": 4,
              "isKey": false,
              "keyPosition": 0
            }
          ],
          "links": [
            {
              "method": "GET",
              "rel": "up",
              "href": "/listData/lists",
              "uri": "/listData/lists",
              "type": "application/vnd.sas.collection",
              "itemType": "application/vnd.sas.listdata.list"
            },
            {
              "method": "GET",
              "rel": "self",
              "href": "/listData/lists/d4367763-5c04-40e1-9abd-fde1796bc83c",
              "uri": "/listData/lists/d4367763-5c04-40e1-9abd-fde1796bc83c",
              "type": "application/vnd.sas.listdata.list"
            },
            {
              "method": "PUT",
              "rel": "update",
              "href": "/listData/lists/d4367763-5c04-40e1-9abd-fde1796bc83c",
              "uri": "/listData/lists/d4367763-5c04-40e1-9abd-fde1796bc83c",
              "type": "application/vnd.sas.listdata.list",
              "responseType": "application/vnd.sas.listdata.list"
            },
            {
              "method": "GET",
              "rel": "state",
              "href": "/listData/lists/d4367763-5c04-40e1-9abd-fde1796bc83c/state",
              "uri": "/listData/lists/d4367763-5c04-40e1-9abd-fde1796bc83c/state",
              "type": "text/plain"
            },
            {
              "method": "GET",
              "rel": "contents",
              "href": "/listData/lists/d4367763-5c04-40e1-9abd-fde1796bc83c/contents",
              "uri": "/listData/lists/d4367763-5c04-40e1-9abd-fde1796bc83c/contents",
              "type": "application/vnd.sas.collection",
              "itemType": "application/json"
            },
            {
              "method": "GET",
              "rel": "contentsDataset",
              "href": "/listData/lists/d4367763-5c04-40e1-9abd-fde1796bc83c/contents",
              "uri": "/listData/lists/d4367763-5c04-40e1-9abd-fde1796bc83c/contents",
              "type": "application/vnd.sas.listdata.dataset"
            },
            {
              "method": "PUT",
              "rel": "updateContents",
              "href": "/listData/lists/d4367763-5c04-40e1-9abd-fde1796bc83c/contents",
              "uri": "/listData/lists/d4367763-5c04-40e1-9abd-fde1796bc83c/contents",
              "type": "application/vnd.sas.collection",
              "responseType": "application/vnd.sas.listdata.list",
              "itemType": "application/json"
            },
            {
              "method": "POST",
              "rel": "importContents",
              "href": "/listData/lists/d4367763-5c04-40e1-9abd-fde1796bc83c/importJobs",
              "uri": "/listData/lists/d4367763-5c04-40e1-9abd-fde1796bc83c/importJobs",
              "type": "multipart/form-data",
              "responseType": "application/vnd.sas.listdata.importjob"
            },
            {
              "method": "POST",
              "rel": "purgeContents",
              "href": "/listData/lists/d4367763-5c04-40e1-9abd-fde1796bc83c/purgeJobs",
              "uri": "/listData/lists/d4367763-5c04-40e1-9abd-fde1796bc83c/purgeJobs",
              "responseType": "application/vnd.sas.listdata.purgejob"
            },
            {
              "method": "DELETE",
              "rel": "delete",
              "href": "/listData/lists/d4367763-5c04-40e1-9abd-fde1796bc83c",
              "uri": "/listData/lists/d4367763-5c04-40e1-9abd-fde1796bc83c"
            },
            {
              "method": "GET",
              "rel": "alternate",
              "href": "/listData/lists/d4367763-5c04-40e1-9abd-fde1796bc83c",
              "uri": "/listData/lists/d4367763-5c04-40e1-9abd-fde1796bc83c",
              "type": "application/vnd.sas.summary"
            },
            {
              "method": "GET",
              "rel": "privilegedContents",
              "href": "/listData/lists/d4367763-5c04-40e1-9abd-fde1796bc83c/privilegedContents",
              "uri": "/listData/lists/d4367763-5c04-40e1-9abd-fde1796bc83c/privilegedContents",
              "type": "application/vnd.sas.listdata.list"
            },
            {
              "method": "PUT",
              "rel": "privilegedEdit",
              "href": "/listData/lists/d4367763-5c04-40e1-9abd-fde1796bc83c/privilegedEdit",
              "uri": "/listData/lists/d4367763-5c04-40e1-9abd-fde1796bc83c/privilegedEdit",
              "type": "application/vnd.sas.listdata.list",
              "responseType": "application/vnd.sas.listdata.list"
            }
          ]
        }
      ]
    }
    
    {
      "version": 2,
      "accept": "application/vnd.sas.listdata.list",
      "count": 253,
      "start": 0,
      "limit": 2,
      "name": "listResource",
      "items": [
        {
          "id": "9ec45a61-774c-488e-99a0-03dfde70b966",
          "version": 1,
          "creationTimeStamp": "2023-02-14T15:57:54.041Z",
          "modifiedTimeStamp": "2023-02-14T17:29:57.210Z",
          "createdBy": "sasadm",
          "modifiedBy": "sasadm",
          "name": "userlist1",
          "description": "desc",
          "state": "developing",
          "isImmutable": false,
          "hasExpiry": false,
          "label": "string",
          "columns": [
            {
              "name": "userId",
              "dataType": "string",
              "position": 1,
              "isKey": true,
              "keyPosition": 1,
              "dataMask": {
                "name": "Mask Start",
                "example": "****1234",
                "regex": ".(....$)|.",
                "replace": "*$1"
              }
            },
            {
              "name": "firstName",
              "dataType": "string",
              "position": 2,
              "isKey": false,
              "keyPosition": 0
            },
            {
              "name": "lastName",
              "dataType": "string",
              "position": 3,
              "isKey": false,
              "keyPosition": 0
            },
            {
              "name": "salary",
              "dataType": "number",
              "position": 4,
              "isKey": false,
              "keyPosition": 0
            }
          ],
          "links": [
            {
              "method": "GET",
              "rel": "up",
              "href": "/listData/lists",
              "uri": "/listData/lists",
              "type": "application/vnd.sas.collection",
              "itemType": "application/vnd.sas.listdata.list"
            },
            {
              "method": "GET",
              "rel": "self",
              "href": "/listData/lists/9ec45a61-774c-488e-99a0-03dfde70b966",
              "uri": "/listData/lists/9ec45a61-774c-488e-99a0-03dfde70b966",
              "type": "application/vnd.sas.listdata.list"
            },
            {
              "method": "PUT",
              "rel": "update",
              "href": "/listData/lists/9ec45a61-774c-488e-99a0-03dfde70b966",
              "uri": "/listData/lists/9ec45a61-774c-488e-99a0-03dfde70b966",
              "type": "application/vnd.sas.listdata.list",
              "responseType": "application/vnd.sas.listdata.list"
            },
            {
              "method": "GET",
              "rel": "state",
              "href": "/listData/lists/9ec45a61-774c-488e-99a0-03dfde70b966/state",
              "uri": "/listData/lists/9ec45a61-774c-488e-99a0-03dfde70b966/state",
              "type": "text/plain"
            },
            {
              "method": "GET",
              "rel": "contents",
              "href": "/listData/lists/9ec45a61-774c-488e-99a0-03dfde70b966/contents",
              "uri": "/listData/lists/9ec45a61-774c-488e-99a0-03dfde70b966/contents",
              "type": "application/vnd.sas.collection",
              "itemType": "application/json"
            },
            {
              "method": "GET",
              "rel": "contentsDataset",
              "href": "/listData/lists/9ec45a61-774c-488e-99a0-03dfde70b966/contents",
              "uri": "/listData/lists/9ec45a61-774c-488e-99a0-03dfde70b966/contents",
              "type": "application/vnd.sas.listdata.dataset"
            },
            {
              "method": "PUT",
              "rel": "updateContents",
              "href": "/listData/lists/9ec45a61-774c-488e-99a0-03dfde70b966/contents",
              "uri": "/listData/lists/9ec45a61-774c-488e-99a0-03dfde70b966/contents",
              "type": "application/vnd.sas.collection",
              "responseType": "application/vnd.sas.listdata.list",
              "itemType": "application/json"
            },
            {
              "method": "POST",
              "rel": "importContents",
              "href": "/listData/lists/9ec45a61-774c-488e-99a0-03dfde70b966/importJobs",
              "uri": "/listData/lists/9ec45a61-774c-488e-99a0-03dfde70b966/importJobs",
              "type": "multipart/form-data",
              "responseType": "application/vnd.sas.listdata.importjob"
            },
            {
              "method": "POST",
              "rel": "purgeContents",
              "href": "/listData/lists/9ec45a61-774c-488e-99a0-03dfde70b966/purgeJobs",
              "uri": "/listData/lists/9ec45a61-774c-488e-99a0-03dfde70b966/purgeJobs",
              "responseType": "application/vnd.sas.listdata.purgejob"
            },
            {
              "method": "DELETE",
              "rel": "delete",
              "href": "/listData/lists/9ec45a61-774c-488e-99a0-03dfde70b966",
              "uri": "/listData/lists/9ec45a61-774c-488e-99a0-03dfde70b966"
            },
            {
              "method": "GET",
              "rel": "alternate",
              "href": "/listData/lists/9ec45a61-774c-488e-99a0-03dfde70b966",
              "uri": "/listData/lists/9ec45a61-774c-488e-99a0-03dfde70b966",
              "type": "application/vnd.sas.summary"
            },
            {
              "method": "GET",
              "rel": "privilegedContents",
              "href": "/listData/lists/9ec45a61-774c-488e-99a0-03dfde70b966/privilegedContents",
              "uri": "/listData/lists/9ec45a61-774c-488e-99a0-03dfde70b966/privilegedContents",
              "type": "application/vnd.sas.listdata.list"
            },
            {
              "method": "PUT",
              "rel": "privilegedEdit",
              "href": "/listData/lists/9ec45a61-774c-488e-99a0-03dfde70b966/privilegedEdit",
              "uri": "/listData/lists/9ec45a61-774c-488e-99a0-03dfde70b966/privilegedEdit",
              "type": "application/vnd.sas.listdata.list",
              "responseType": "application/vnd.sas.listdata.list"
            }
          ]
        },
        {
          "id": "d4367763-5c04-40e1-9abd-fde1796bc83c",
          "version": 1,
          "creationTimeStamp": "2023-02-14T17:01:38.695Z",
          "modifiedTimeStamp": "2023-02-14T19:52:46.714Z",
          "createdBy": "sasadm",
          "modifiedBy": "anonymous",
          "name": "userlist2",
          "description": "desc",
          "state": "developing",
          "isImmutable": false,
          "hasExpiry": true,
          "label": "string",
          "columns": [
            {
              "name": "userId",
              "dataType": "string",
              "position": 1,
              "isKey": true,
              "keyPosition": 1,
              "dataMask": {
                "name": "Mask Start",
                "example": "****1234",
                "regex": ".(....$)|.",
                "replace": "*$1"
              }
            },
            {
              "name": "firstName",
              "dataType": "string",
              "position": 2,
              "isKey": false,
              "keyPosition": 0
            },
            {
              "name": "lastName",
              "dataType": "string",
              "position": 3,
              "isKey": false,
              "keyPosition": 0
            },
            {
              "name": "salary",
              "dataType": "number",
              "position": 4,
              "isKey": false,
              "keyPosition": 0
            }
          ],
          "links": [
            {
              "method": "GET",
              "rel": "up",
              "href": "/listData/lists",
              "uri": "/listData/lists",
              "type": "application/vnd.sas.collection",
              "itemType": "application/vnd.sas.listdata.list"
            },
            {
              "method": "GET",
              "rel": "self",
              "href": "/listData/lists/d4367763-5c04-40e1-9abd-fde1796bc83c",
              "uri": "/listData/lists/d4367763-5c04-40e1-9abd-fde1796bc83c",
              "type": "application/vnd.sas.listdata.list"
            },
            {
              "method": "PUT",
              "rel": "update",
              "href": "/listData/lists/d4367763-5c04-40e1-9abd-fde1796bc83c",
              "uri": "/listData/lists/d4367763-5c04-40e1-9abd-fde1796bc83c",
              "type": "application/vnd.sas.listdata.list",
              "responseType": "application/vnd.sas.listdata.list"
            },
            {
              "method": "GET",
              "rel": "state",
              "href": "/listData/lists/d4367763-5c04-40e1-9abd-fde1796bc83c/state",
              "uri": "/listData/lists/d4367763-5c04-40e1-9abd-fde1796bc83c/state",
              "type": "text/plain"
            },
            {
              "method": "GET",
              "rel": "contents",
              "href": "/listData/lists/d4367763-5c04-40e1-9abd-fde1796bc83c/contents",
              "uri": "/listData/lists/d4367763-5c04-40e1-9abd-fde1796bc83c/contents",
              "type": "application/vnd.sas.collection",
              "itemType": "application/json"
            },
            {
              "method": "GET",
              "rel": "contentsDataset",
              "href": "/listData/lists/d4367763-5c04-40e1-9abd-fde1796bc83c/contents",
              "uri": "/listData/lists/d4367763-5c04-40e1-9abd-fde1796bc83c/contents",
              "type": "application/vnd.sas.listdata.dataset"
            },
            {
              "method": "PUT",
              "rel": "updateContents",
              "href": "/listData/lists/d4367763-5c04-40e1-9abd-fde1796bc83c/contents",
              "uri": "/listData/lists/d4367763-5c04-40e1-9abd-fde1796bc83c/contents",
              "type": "application/vnd.sas.collection",
              "responseType": "application/vnd.sas.listdata.list",
              "itemType": "application/json"
            },
            {
              "method": "POST",
              "rel": "importContents",
              "href": "/listData/lists/d4367763-5c04-40e1-9abd-fde1796bc83c/importJobs",
              "uri": "/listData/lists/d4367763-5c04-40e1-9abd-fde1796bc83c/importJobs",
              "type": "multipart/form-data",
              "responseType": "application/vnd.sas.listdata.importjob"
            },
            {
              "method": "POST",
              "rel": "purgeContents",
              "href": "/listData/lists/d4367763-5c04-40e1-9abd-fde1796bc83c/purgeJobs",
              "uri": "/listData/lists/d4367763-5c04-40e1-9abd-fde1796bc83c/purgeJobs",
              "responseType": "application/vnd.sas.listdata.purgejob"
            },
            {
              "method": "DELETE",
              "rel": "delete",
              "href": "/listData/lists/d4367763-5c04-40e1-9abd-fde1796bc83c",
              "uri": "/listData/lists/d4367763-5c04-40e1-9abd-fde1796bc83c"
            },
            {
              "method": "GET",
              "rel": "alternate",
              "href": "/listData/lists/d4367763-5c04-40e1-9abd-fde1796bc83c",
              "uri": "/listData/lists/d4367763-5c04-40e1-9abd-fde1796bc83c",
              "type": "application/vnd.sas.summary"
            },
            {
              "method": "GET",
              "rel": "privilegedContents",
              "href": "/listData/lists/d4367763-5c04-40e1-9abd-fde1796bc83c/privilegedContents",
              "uri": "/listData/lists/d4367763-5c04-40e1-9abd-fde1796bc83c/privilegedContents",
              "type": "application/vnd.sas.listdata.list"
            },
            {
              "method": "PUT",
              "rel": "privilegedEdit",
              "href": "/listData/lists/d4367763-5c04-40e1-9abd-fde1796bc83c/privilegedEdit",
              "uri": "/listData/lists/d4367763-5c04-40e1-9abd-fde1796bc83c/privilegedEdit",
              "type": "application/vnd.sas.listdata.list",
              "responseType": "application/vnd.sas.listdata.list"
            }
          ]
        }
      ]
    }
    

    Here is an example of an error response when the request was invalid.

    {
      "httpStatusCode": 400,
      "version": 2,
      "id": "04840005-74d3-458b-bbe1-1209d3a739ac",
      "errorCode": 123456789,
      "details": [
        "bad request reason"
      ],
      "remediation": "The remediation action to fix a Bad Request error.",
      "errors": [
        {
          "optional nested errors": "..."
        }
      ],
      "links": [
        {
          "href": "...",
          "method": "...",
          "rel": "...",
          "uri": "..."
        }
      ]
    }
    

    Here is an example of an error response when the request could not be fulfilled because of an unexpected server error.

    {
      "httpStatusCode": 500,
      "version": 2,
      "id": "04840005-74d3-458b-bbe1-1209d3a739ac",
      "errorCode": 123456789,
      "details": [
        "displayable details of server error"
      ],
      "remediation": "The remediation action to fix an Internal Server Error.",
      "errors": [
        {
          "optional nested errors": "..."
        }
      ],
      "links": [
        {
          "href": "...",
          "method": "...",
          "rel": "...",
          "uri": "..."
        }
      ]
    }
    
    Responses
    Status Meaning Description Schema
    200 OK The request succeeded. listResourceCollection
    400 Bad Request The request was invalid. errorResponse
    500 Internal Server Error The request could not be fulfilled because of an unexpected server error. errorResponse
    Response Headers
    Status Header Type Format Description
    200 Content-Type string string The media type for the body of the request or response.

    List State and Contents

    These endpoints are associated with a list's state and contents.

    Get the state of a list

    Code samples

    # You can also use wget
    curl -X GET http://mock-listData.apifirst.unx.sas.com/listData/lists/{listId}/state \
      -H 'Authorization: Bearer <access-token-goes-here>' \
      -H 'Accept: text/plain'
    
    
    
    const headers = {
      'Accept':'text/plain'
    };
    
    fetch('http://mock-listData.apifirst.unx.sas.com/listData/lists/{listId}/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-listData.apifirst.unx.sas.com/listData/lists/{listId}/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-listData.apifirst.unx.sas.com/listData/lists/{listId}/state", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    

    GET /lists/{listId}/state

    Returns a value of 'deployed' or 'developing' for the list's 'state' property. A deployed list cannot be deleted.

    Parameters
    Name In Type Required Description
    listId path string true A universally unique identifier for a list.

    Example responses

    The request succeeded.

    "developing"
    

    Here is an example of an error response when the user did not have the necessary permissions.

    {
      "httpStatusCode": 403,
      "version": 2,
      "id": "04840005-74d3-458b-bbe1-1209d3a739ac",
      "errorCode": 123456789,
      "details": [
        "forbidden"
      ],
      "remediation": "The remediation action to fix a Forbidden error.",
      "errors": [],
      "links": [
        {
          "href": "...",
          "method": "...",
          "rel": "...",
          "uri": "..."
        }
      ]
    }
    

    Here is an example of an error response when no item exists at the requested path.

    {
      "httpStatusCode": 404,
      "version": 2,
      "id": "04840005-74d3-458b-bbe1-1209d3a739ac",
      "errorCode": 123456789,
      "details": [
        "not found"
      ],
      "remediation": "The remediation action to fix a Not Found error.",
      "errors": [],
      "links": [
        {
          "href": "...",
          "method": "...",
          "rel": "...",
          "uri": "..."
        }
      ]
    }
    

    Here is an example of an error response when the request could not be fulfilled because of an unexpected server error.

    {
      "httpStatusCode": 500,
      "version": 2,
      "id": "04840005-74d3-458b-bbe1-1209d3a739ac",
      "errorCode": 123456789,
      "details": [
        "displayable details of server error"
      ],
      "remediation": "The remediation action to fix an Internal Server Error.",
      "errors": [
        {
          "optional nested errors": "..."
        }
      ],
      "links": [
        {
          "href": "...",
          "method": "...",
          "rel": "...",
          "uri": "..."
        }
      ]
    }
    
    Responses
    Status Meaning Description Schema
    200 OK The request succeeded. string
    403 Forbidden The user did not have the necessary permissions. errorResponse
    404 Not Found No item exists at the requested path. errorResponse
    500 Internal Server Error The request could not be fulfilled because of an unexpected server error. errorResponse
    Response Headers
    Status Header Type Format Description
    200 Content-Type string string The media type for the body of the request or response.

    Update the state of a list

    Code samples

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

    PUT /lists/{listId}/state

    Updates the list's 'state' property value as either 'deployed' or 'developing'.

    Parameters
    Name In Type Required Description
    value query string true A valid value for the 'state' property, which is either 'deployed' or 'developing'. A deployed list cannot be deleted.
    listId path string true A universally unique identifier for a list.

    Example responses

    Here is an example of a response to a request to get a list.

    {
      "id": "3659ea38-2618-4474-aeac-0bf6cfd3c322",
      "version": 1,
      "creationTimeStamp": "2022-03-01T20:18:32Z",
      "modifiedTimeStamp": "2022-03-01T20:18:32Z",
      "createdBy": "appUser1",
      "modifiedBy": "appUser1",
      "name": "list-a",
      "description": "The A-list users",
      "state": "developing",
      "columns": [
        {
          "name": "userId",
          "dataType": "string",
          "position": 1,
          "isKey": true,
          "keyPosition": 1
        },
        {
          "name": "firstName",
          "dataType": "string",
          "position": 2,
          "isKey": false,
          "keyPosition": 0
        },
        {
          "name": "lastName",
          "dataType": "string",
          "position": 3,
          "isKey": false,
          "keyPosition": 0
        },
        {
          "name": "salary",
          "dataType": "number",
          "position": 4,
          "isKey": false,
          "keyPosition": 0,
          "dataMask": {
            "name": "MaskStart",
            "regex": ".(....$)|.",
            "replace": "*$1",
            "example": "****1234"
          }
        }
      ],
      "label": "corporate marketing",
      "links": [
        {
          "href": "...",
          "method": "...",
          "rel": "...",
          "uri": "..."
        }
      ]
    }
    
    {
      "id": "3659ea38-2618-4474-aeac-0bf6cfd3c322",
      "version": 1,
      "creationTimeStamp": "2022-03-01T20:18:32Z",
      "modifiedTimeStamp": "2022-03-01T20:18:32Z",
      "createdBy": "appUser1",
      "modifiedBy": "appUser1",
      "name": "list-a",
      "description": "The A-list users",
      "state": "developing",
      "columns": [
        {
          "name": "userId",
          "dataType": "string",
          "position": 1,
          "isKey": true,
          "keyPosition": 1
        },
        {
          "name": "firstName",
          "dataType": "string",
          "position": 2,
          "isKey": false,
          "keyPosition": 0
        },
        {
          "name": "lastName",
          "dataType": "string",
          "position": 3,
          "isKey": false,
          "keyPosition": 0
        },
        {
          "name": "salary",
          "dataType": "number",
          "position": 4,
          "isKey": false,
          "keyPosition": 0,
          "dataMask": {
            "name": "MaskStart",
            "regex": ".(....$)|.",
            "replace": "*$1",
            "example": "****1234"
          }
        }
      ],
      "label": "corporate marketing",
      "links": [
        {
          "href": "...",
          "method": "...",
          "rel": "...",
          "uri": "..."
        }
      ]
    }
    

    Here is an example of an error response when the request was invalid.

    {
      "httpStatusCode": 400,
      "version": 2,
      "id": "04840005-74d3-458b-bbe1-1209d3a739ac",
      "errorCode": 123456789,
      "details": [
        "bad request reason"
      ],
      "remediation": "The remediation action to fix a Bad Request error.",
      "errors": [
        {
          "optional nested errors": "..."
        }
      ],
      "links": [
        {
          "href": "...",
          "method": "...",
          "rel": "...",
          "uri": "..."
        }
      ]
    }
    

    Here is an example of an error response when the user did not have the necessary permissions.

    {
      "httpStatusCode": 403,
      "version": 2,
      "id": "04840005-74d3-458b-bbe1-1209d3a739ac",
      "errorCode": 123456789,
      "details": [
        "forbidden"
      ],
      "remediation": "The remediation action to fix a Forbidden error.",
      "errors": [],
      "links": [
        {
          "href": "...",
          "method": "...",
          "rel": "...",
          "uri": "..."
        }
      ]
    }
    

    Here is an example of an error response when no item exists at the requested path.

    {
      "httpStatusCode": 404,
      "version": 2,
      "id": "04840005-74d3-458b-bbe1-1209d3a739ac",
      "errorCode": 123456789,
      "details": [
        "not found"
      ],
      "remediation": "The remediation action to fix a Not Found error.",
      "errors": [],
      "links": [
        {
          "href": "...",
          "method": "...",
          "rel": "...",
          "uri": "..."
        }
      ]
    }
    

    Here is an example of an error response when the request could not be fulfilled because of an unexpected server error.

    {
      "httpStatusCode": 500,
      "version": 2,
      "id": "04840005-74d3-458b-bbe1-1209d3a739ac",
      "errorCode": 123456789,
      "details": [
        "displayable details of server error"
      ],
      "remediation": "The remediation action to fix an Internal Server Error.",
      "errors": [
        {
          "optional nested errors": "..."
        }
      ],
      "links": [
        {
          "href": "...",
          "method": "...",
          "rel": "...",
          "uri": "..."
        }
      ]
    }
    
    Responses
    Status Meaning Description Schema
    200 OK The request succeeded. listResource
    400 Bad Request The request was invalid. errorResponse
    403 Forbidden The user did not have the necessary permissions. errorResponse
    404 Not Found No item exists at the requested path. errorResponse
    500 Internal Server Error The request could not be fulfilled because of an unexpected server error. errorResponse
    Response Headers
    Status Header Type Format Description
    200 Content-Type string string The media type for the body of the request or response.

    Check that a list has contents

    Code samples

    # You can also use wget
    curl -X HEAD http://mock-listData.apifirst.unx.sas.com/listData/lists/{listId}/contents \
      -H 'Authorization: Bearer <access-token-goes-here>' \
      -H 'Accept: application/vnd.sas.error+json'
    
    
    
    const headers = {
      'Accept':'application/vnd.sas.error+json'
    };
    
    fetch('http://mock-listData.apifirst.unx.sas.com/listData/lists/{listId}/contents',
    {
      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('http://mock-listData.apifirst.unx.sas.com/listData/lists/{listId}/contents', 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", "http://mock-listData.apifirst.unx.sas.com/listData/lists/{listId}/contents", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    

    HEAD /lists/{listId}/contents

    Checks the existence of a list's contents.

    A successful response (for example, 200 OK) indicates that the list has contents. An unsuccessful response (for example, 404 Not Found) indicates that the list does not have contents.

    Parameters
    Name In Type Required Description
    listId path string true A universally unique identifier for a list.

    Example responses

    Here is an example of an error response when the user did not have the necessary permissions.

    {
      "httpStatusCode": 403,
      "version": 2,
      "id": "04840005-74d3-458b-bbe1-1209d3a739ac",
      "errorCode": 123456789,
      "details": [
        "forbidden"
      ],
      "remediation": "The remediation action to fix a Forbidden error.",
      "errors": [],
      "links": [
        {
          "href": "...",
          "method": "...",
          "rel": "...",
          "uri": "..."
        }
      ]
    }
    

    Here is an example of an error response when no item exists at the requested path.

    {
      "httpStatusCode": 404,
      "version": 2,
      "id": "04840005-74d3-458b-bbe1-1209d3a739ac",
      "errorCode": 123456789,
      "details": [
        "not found"
      ],
      "remediation": "The remediation action to fix a Not Found error.",
      "errors": [],
      "links": [
        {
          "href": "...",
          "method": "...",
          "rel": "...",
          "uri": "..."
        }
      ]
    }
    

    Here is an example of an error response when the request could not be fulfilled because of an unexpected server error.

    {
      "httpStatusCode": 500,
      "version": 2,
      "id": "04840005-74d3-458b-bbe1-1209d3a739ac",
      "errorCode": 123456789,
      "details": [
        "displayable details of server error"
      ],
      "remediation": "The remediation action to fix an Internal Server Error.",
      "errors": [
        {
          "optional nested errors": "..."
        }
      ],
      "links": [
        {
          "href": "...",
          "method": "...",
          "rel": "...",
          "uri": "..."
        }
      ]
    }
    
    Responses
    Status Meaning Description Schema
    200 OK The request succeeded. None
    403 Forbidden The user did not have the necessary permissions. errorResponse
    404 Not Found No item exists at the requested path. errorResponse
    500 Internal Server Error The request could not be fulfilled because of an unexpected server error. errorResponse
    Response Headers
    Status Header Type Format Description
    200 Content-Type string string The media type for the body of the request or response.

    Get a list's contents

    Code samples

    # You can also use wget
    curl -X GET http://mock-listData.apifirst.unx.sas.com/listData/lists/{listId}/contents \
      -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-listData.apifirst.unx.sas.com/listData/lists/{listId}/contents',
    {
      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-listData.apifirst.unx.sas.com/listData/lists/{listId}/contents', 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-listData.apifirst.unx.sas.com/listData/lists/{listId}/contents", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    

    GET /lists/{listId}/contents

    Returns a collection of the list's contents.

    The operation supports filtering of the contents based on values for columns that are marked as key columns (for example, 'isKey' set to 'true'). Only the following filtering functions are supported:

    See Filtering in REST APIs for more information about filtering collections.

    If a list includes data masking for any column, the value for that column is redacted.

    Parameters
    Name In Type Required Description
    start query integer false A zero-based offset of the first item to return. The default value is '0'.
    limit query integer false The maximum number of items to return. The default value is '20'.
    filter query string(filter-criteria) false The filter criteria for returned items. See Filtering in REST APIs.
    listId path string true A universally unique identifier for a list.

    Example responses

    Here is an example of a response to a request to get a list's contents.

    {
      "name": "listContents",
      "version": 2,
      "accept": "application/json",
      "start": 0,
      "limit": 10,
      "count": 2,
      "items": [
        {
          "x": "1",
          "y": "1"
        },
        {
          "x": "2",
          "y": "2"
        }
      ],
      "links": [
        {
          "href": "...",
          "method": "...",
          "rel": "...",
          "uri": "..."
        }
      ]
    }
    

    Here is an example of a response to a request to get the contents of a list as a data set.

    {
      "name": "list-a",
      "listId": "3659ea38-2618-4474-aeac-0bf6cfd3c322",
      "version": 1,
      "createdBy": "userA",
      "creationTimeStamp": "2022-02-25T20:35:44Z",
      "modifiedBy": "userA",
      "modifiedTimeStamp": "2022-02-25T20:35:44Z",
      "columnCount": 4,
      "columns": [
        {
          "name": "userId",
          "dataType": "string",
          "position": 1,
          "isKey": true,
          "keyPosition": 1
        },
        {
          "name": "firstName",
          "dataType": "string",
          "position": 2,
          "isKey": false,
          "keyPosition": 0
        },
        {
          "name": "lastName",
          "dataType": "string",
          "position": 3,
          "isKey": false,
          "keyPosition": 0
        },
        {
          "name": "salary",
          "dataType": "number",
          "position": 4,
          "isKey": false,
          "keyPosition": 0,
          "dataMask": {
            "name": "hide-all",
            "regex": ".",
            "replace": "*",
            "example": "*****"
          }
        }
      ],
      "rowCount": 3,
      "rows": [
        [
          "58b2a1a2",
          "Aron",
          "Denesik",
          745072
        ],
        [
          "6e107010",
          "Chery",
          "Kunze",
          935262
        ],
        [
          "38c0e0c7",
          "Letha",
          "Goldner",
          672002
        ]
      ]
    }
    

    Here is an example of a response to a request to get a list's content details.

    {
      "name": "listContents",
      "version": 2,
      "accept": "application/json",
      "start": 0,
      "limit": 10,
      "count": 2,
      "items": [
        {
          "state": "deployed",
          "expiry": "1685974424",
          "values": {
            "x": "1",
            "y": "1"
          }
        },
        {
          "state": "developing",
          "expiry": "1685974424",
          "values": {
            "x": "2",
            "y": "2"
          }
        }
      ],
      "links": [
        {
          "href": "...",
          "method": "...",
          "rel": "...",
          "uri": "..."
        }
      ]
    }
    

    Here is an example of a response to a request to get a list's contents.

    {
      "name": "listContents",
      "version": 2,
      "accept": "application/json",
      "start": 0,
      "limit": 10,
      "count": 2,
      "items": [
        {
          "x": "1",
          "y": "1"
        },
        {
          "x": "2",
          "y": "2"
        }
      ],
      "links": [
        {
          "href": "...",
          "method": "...",
          "rel": "...",
          "uri": "..."
        }
      ]
    }
    

    Here is an example of an error response when the request was invalid.

    {
      "httpStatusCode": 400,
      "version": 2,
      "id": "04840005-74d3-458b-bbe1-1209d3a739ac",
      "errorCode": 123456789,
      "details": [
        "bad request reason"
      ],
      "remediation": "The remediation action to fix a Bad Request error.",
      "errors": [
        {
          "optional nested errors": "..."
        }
      ],
      "links": [
        {
          "href": "...",
          "method": "...",
          "rel": "...",
          "uri": "..."
        }
      ]
    }
    

    Here is an example of an error response when the user did not have the necessary permissions.

    {
      "httpStatusCode": 403,
      "version": 2,
      "id": "04840005-74d3-458b-bbe1-1209d3a739ac",
      "errorCode": 123456789,
      "details": [
        "forbidden"
      ],
      "remediation": "The remediation action to fix a Forbidden error.",
      "errors": [],
      "links": [
        {
          "href": "...",
          "method": "...",
          "rel": "...",
          "uri": "..."
        }
      ]
    }
    

    Here is an example of an error response when no item exists at the requested path.

    {
      "httpStatusCode": 404,
      "version": 2,
      "id": "04840005-74d3-458b-bbe1-1209d3a739ac",
      "errorCode": 123456789,
      "details": [
        "not found"
      ],
      "remediation": "The remediation action to fix a Not Found error.",
      "errors": [],
      "links": [
        {
          "href": "...",
          "method": "...",
          "rel": "...",
          "uri": "..."
        }
      ]
    }
    

    Here is an example of an error response when the request could not be fulfilled because of an unexpected server error.

    {
      "httpStatusCode": 500,
      "version": 2,
      "id": "04840005-74d3-458b-bbe1-1209d3a739ac",
      "errorCode": 123456789,
      "details": [
        "displayable details of server error"
      ],
      "remediation": "The remediation action to fix an Internal Server Error.",
      "errors": [
        {
          "optional nested errors": "..."
        }
      ],
      "links": [
        {
          "href": "...",
          "method": "...",
          "rel": "...",
          "uri": "..."
        }
      ]
    }
    
    Responses
    Status Meaning Description Schema
    200 OK The request succeeded. resourceCollection
    400 Bad Request The request was invalid. errorResponse
    403 Forbidden The user did not have the necessary permissions. errorResponse
    404 Not Found No item exists at the requested path. errorResponse
    500 Internal Server Error The request could not be fulfilled because of an unexpected server error. errorResponse
    Response Headers
    Status Header Type Format Description
    200 Content-Type string string The media type for the body of the request or response.

    Update a list's contents

    Code samples

    # You can also use wget
    curl -X PUT http://mock-listData.apifirst.unx.sas.com/listData/lists/{listId}/contents \
      -H 'Authorization: Bearer <access-token-goes-here>' \
      -H 'Content-Type: application/vnd.sas.collection+json' \
      -H 'Accept: application/vnd.sas.listdata.list+json'
    
    
    const inputBody = '{
      "items": [
        {
          "userId": "58b2a1a2",
          "firstName": "Aron",
          "lastName": "Denesik",
          "salary": 745072
        },
        {
          "userId": "6e107010",
          "firstName": "Chery",
          "lastName": "Kunze",
          "salary": 935262
        },
        {
          "userId": "38c0e0c7",
          "firstName": "Letha",
          "lastName": "Goldner",
          "salary": 672002
        },
        {
          "userId": "4cef6486",
          "firstName": "Jeane",
          "lastName": "Kutch",
          "salary": 380766
        },
        {
          "userId": "61f7592f",
          "firstName": "Beth",
          "lastName": "West",
          "salary": 994209
        }
      ]
    }';
    const headers = {
      'Content-Type':'application/vnd.sas.collection+json',
      'Accept':'application/vnd.sas.listdata.list+json'
    };
    
    fetch('http://mock-listData.apifirst.unx.sas.com/listData/lists/{listId}/contents',
    {
      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.collection+json',
      'Accept': 'application/vnd.sas.listdata.list+json'
    }
    
    r = requests.put('http://mock-listData.apifirst.unx.sas.com/listData/lists/{listId}/contents', 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.listdata.list+json"},
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("PUT", "http://mock-listData.apifirst.unx.sas.com/listData/lists/{listId}/contents", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    

    PUT /lists/{listId}/contents

    Update the contents of a list synchronously via a JSON request body. An update can include the removal of list records.

    A request body to update a list's contents must contain a collection of data record objects with key-value pairs that match the column definitions. To insert a record, all key and data column values are required. To update a record, all key column values are required and only the data column values that are provided are updated. To delete a record, all key column values are required.

    Body parameter

    Here is an example of a request body to synchronously add records to a list's contents.

    {
      "items": [
        {
          "userId": "58b2a1a2",
          "firstName": "Aron",
          "lastName": "Denesik",
          "salary": 745072
        },
        {
          "userId": "6e107010",
          "firstName": "Chery",
          "lastName": "Kunze",
          "salary": 935262
        },
        {
          "userId": "38c0e0c7",
          "firstName": "Letha",
          "lastName": "Goldner",
          "salary": 672002
        },
        {
          "userId": "4cef6486",
          "firstName": "Jeane",
          "lastName": "Kutch",
          "salary": 380766
        },
        {
          "userId": "61f7592f",
          "firstName": "Beth",
          "lastName": "West",
          "salary": 994209
        }
      ]
    }
    
    Parameters
    Name In Type Required Description
    listId path string true A universally unique identifier for a list.
    op query string false The operation type for the PUT method. Supported operations are 'upsert', which updates or inserts records, and 'delete', which deletes existing records.
    body body resourceCollection false none

    Example responses

    Here is an example of a response to a request to get a list.

    {
      "id": "3659ea38-2618-4474-aeac-0bf6cfd3c322",
      "version": 1,
      "creationTimeStamp": "2022-03-01T20:18:32Z",
      "modifiedTimeStamp": "2022-03-01T20:18:32Z",
      "createdBy": "appUser1",
      "modifiedBy": "appUser1",
      "name": "list-a",
      "description": "The A-list users",
      "state": "developing",
      "columns": [
        {
          "name": "userId",
          "dataType": "string",
          "position": 1,
          "isKey": true,
          "keyPosition": 1
        },
        {
          "name": "firstName",
          "dataType": "string",
          "position": 2,
          "isKey": false,
          "keyPosition": 0
        },
        {
          "name": "lastName",
          "dataType": "string",
          "position": 3,
          "isKey": false,
          "keyPosition": 0
        },
        {
          "name": "salary",
          "dataType": "number",
          "position": 4,
          "isKey": false,
          "keyPosition": 0,
          "dataMask": {
            "name": "MaskStart",
            "regex": ".(....$)|.",
            "replace": "*$1",
            "example": "****1234"
          }
        }
      ],
      "label": "corporate marketing",
      "links": [
        {
          "href": "...",
          "method": "...",
          "rel": "...",
          "uri": "..."
        }
      ]
    }
    
    {
      "id": "3659ea38-2618-4474-aeac-0bf6cfd3c322",
      "version": 1,
      "creationTimeStamp": "2022-03-01T20:18:32Z",
      "modifiedTimeStamp": "2022-03-01T20:18:32Z",
      "createdBy": "appUser1",
      "modifiedBy": "appUser1",
      "name": "list-a",
      "description": "The A-list users",
      "state": "developing",
      "columns": [
        {
          "name": "userId",
          "dataType": "string",
          "position": 1,
          "isKey": true,
          "keyPosition": 1
        },
        {
          "name": "firstName",
          "dataType": "string",
          "position": 2,
          "isKey": false,
          "keyPosition": 0
        },
        {
          "name": "lastName",
          "dataType": "string",
          "position": 3,
          "isKey": false,
          "keyPosition": 0
        },
        {
          "name": "salary",
          "dataType": "number",
          "position": 4,
          "isKey": false,
          "keyPosition": 0,
          "dataMask": {
            "name": "MaskStart",
            "regex": ".(....$)|.",
            "replace": "*$1",
            "example": "****1234"
          }
        }
      ],
      "label": "corporate marketing",
      "links": [
        {
          "href": "...",
          "method": "...",
          "rel": "...",
          "uri": "..."
        }
      ]
    }
    

    Here is an example of an error response when the request was invalid.

    {
      "httpStatusCode": 400,
      "version": 2,
      "id": "04840005-74d3-458b-bbe1-1209d3a739ac",
      "errorCode": 123456789,
      "details": [
        "bad request reason"
      ],
      "remediation": "The remediation action to fix a Bad Request error.",
      "errors": [
        {
          "optional nested errors": "..."
        }
      ],
      "links": [
        {
          "href": "...",
          "method": "...",
          "rel": "...",
          "uri": "..."
        }
      ]
    }
    

    Here is an example of an error response when the user did not have the necessary permissions.

    {
      "httpStatusCode": 403,
      "version": 2,
      "id": "04840005-74d3-458b-bbe1-1209d3a739ac",
      "errorCode": 123456789,
      "details": [
        "forbidden"
      ],
      "remediation": "The remediation action to fix a Forbidden error.",
      "errors": [],
      "links": [
        {
          "href": "...",
          "method": "...",
          "rel": "...",
          "uri": "..."
        }
      ]
    }
    

    Here is an example of an error response when no item exists at the requested path.

    {
      "httpStatusCode": 404,
      "version": 2,
      "id": "04840005-74d3-458b-bbe1-1209d3a739ac",
      "errorCode": 123456789,
      "details": [
        "not found"
      ],
      "remediation": "The remediation action to fix a Not Found error.",
      "errors": [],
      "links": [
        {
          "href": "...",
          "method": "...",
          "rel": "...",
          "uri": "..."
        }
      ]
    }
    

    Here is an example of an error response when the request could not be completed due to a conflict with an existing resource.

    {
      "httpStatusCode": 409,
      "version": 2,
      "id": "04840005-74d3-458b-bbe1-1209d3a739ac",
      "errorCode": 123456789,
      "details": [
        "conflict reason"
      ],
      "remediation": "The remediation action to fix a Conflict error.",
      "errors": [
        {
          "optional nested errors": "..."
        }
      ],
      "links": [
        {
          "href": "...",
          "method": "...",
          "rel": "...",
          "uri": "..."
        }
      ]
    }
    

    Here is an example of an error response when the request could not be fulfilled because of an unexpected server error.

    {
      "httpStatusCode": 500,
      "version": 2,
      "id": "04840005-74d3-458b-bbe1-1209d3a739ac",
      "errorCode": 123456789,
      "details": [
        "displayable details of server error"
      ],
      "remediation": "The remediation action to fix an Internal Server Error.",
      "errors": [
        {
          "optional nested errors": "..."
        }
      ],
      "links": [
        {
          "href": "...",
          "method": "...",
          "rel": "...",
          "uri": "..."
        }
      ]
    }
    
    Responses
    Status Meaning Description Schema
    200 OK The request succeeded. listResource
    400 Bad Request The request was invalid. errorResponse
    403 Forbidden The user did not have the necessary permissions. errorResponse
    404 Not Found No item exists at the requested path. errorResponse
    409 Conflict The request could not be completed due to a conflict with an existing resource. errorResponse
    500 Internal Server Error The request could not be fulfilled because of an unexpected server error. errorResponse
    Response Headers
    Status Header Type Format Description
    200 Content-Type string string The media type for the body of the request or response.
    200 Location string uri The URI of the list.
    200 If-Match string date-time An ETag in the format of W/"the-last-updated-timestamp-in-UNIX-nanosecond-time".

    Get a list's unmasked contents

    Code samples

    # You can also use wget
    curl -X GET http://mock-listData.apifirst.unx.sas.com/listData/lists/{listId}/privilegedContents \
      -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-listData.apifirst.unx.sas.com/listData/lists/{listId}/privilegedContents',
    {
      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-listData.apifirst.unx.sas.com/listData/lists/{listId}/privilegedContents', 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-listData.apifirst.unx.sas.com/listData/lists/{listId}/privilegedContents", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    

    GET /lists/{listId}/privilegedContents

    Returns a collection of the list's unmasked contents.

    When a list has columns with data masks, the standard method to return the list's contents is to redact the values for the masked columns. If you have Read-Only permission to this endpoint, you can return a list's contents with unmasked (non-redacted) values for the masked columns. Contact your administrator to create the appropriate authorization rule to view unmasked contents.

    This operation enables you to filter the contents based on values for columns that are marked as key columns (for example, 'isKey' set to 'true'). Only the following filtering functions are supported: - the functions startsWith, endsWith, contains, and eq. - the logical function and(e1,e2,\[,..,eN\]) for grouping filters. The function or() is not supported. - a single function per key column. The example and(startWith(key1,"ABC"),endsWith(key1,"123")) is not supported.

    See Filtering in REST APIs for more information about filtering collections.

    Parameters
    Name In Type Required Description
    limit query integer false The maximum number of items to return. The default value is '20'.
    filter query string(filter-criteria) false The filter criteria for returned items. See Filtering in REST APIs.
    listId path string true A universally unique identifier for a list.

    Example responses

    Here is an example of a response to a request to get a list's contents.

    {
      "name": "listContents",
      "version": 2,
      "accept": "application/json",
      "start": 0,
      "limit": 10,
      "count": 2,
      "items": [
        {
          "x": "1",
          "y": "1"
        },
        {
          "x": "2",
          "y": "2"
        }
      ],
      "links": [
        {
          "href": "...",
          "method": "...",
          "rel": "...",
          "uri": "..."
        }
      ]
    }
    

    Here is an example of a response to a request to get the contents of a list as a data set.

    {
      "name": "list-a",
      "listId": "3659ea38-2618-4474-aeac-0bf6cfd3c322",
      "version": 1,
      "createdBy": "userA",
      "creationTimeStamp": "2022-02-25T20:35:44Z",
      "modifiedBy": "userA",
      "modifiedTimeStamp": "2022-02-25T20:35:44Z",
      "columnCount": 4,
      "columns": [
        {
          "name": "userId",
          "dataType": "string",
          "position": 1,
          "isKey": true,
          "keyPosition": 1
        },
        {
          "name": "firstName",
          "dataType": "string",
          "position": 2,
          "isKey": false,
          "keyPosition": 0
        },
        {
          "name": "lastName",
          "dataType": "string",
          "position": 3,
          "isKey": false,
          "keyPosition": 0
        },
        {
          "name": "salary",
          "dataType": "number",
          "position": 4,
          "isKey": false,
          "keyPosition": 0,
          "dataMask": {
            "name": "hide-all",
            "regex": ".",
            "replace": "*",
            "example": "*****"
          }
        }
      ],
      "rowCount": 3,
      "rows": [
        [
          "58b2a1a2",
          "Aron",
          "Denesik",
          745072
        ],
        [
          "6e107010",
          "Chery",
          "Kunze",
          935262
        ],
        [
          "38c0e0c7",
          "Letha",
          "Goldner",
          672002
        ]
      ]
    }
    

    Here is an example of a response to a request to get a list's content details.

    {
      "name": "listContents",
      "version": 2,
      "accept": "application/json",
      "start": 0,
      "limit": 10,
      "count": 2,
      "items": [
        {
          "state": "deployed",
          "expiry": "1685974424",
          "values": {
            "x": "1",
            "y": "1"
          }
        },
        {
          "state": "developing",
          "expiry": "1685974424",
          "values": {
            "x": "2",
            "y": "2"
          }
        }
      ],
      "links": [
        {
          "href": "...",
          "method": "...",
          "rel": "...",
          "uri": "..."
        }
      ]
    }
    

    Here is an example of a response to a request to get a list's contents.

    {
      "name": "listContents",
      "version": 2,
      "accept": "application/json",
      "start": 0,
      "limit": 10,
      "count": 2,
      "items": [
        {
          "x": "1",
          "y": "1"
        },
        {
          "x": "2",
          "y": "2"
        }
      ],
      "links": [
        {
          "href": "...",
          "method": "...",
          "rel": "...",
          "uri": "..."
        }
      ]
    }
    

    Here is an example of an error response when the request was invalid.

    {
      "httpStatusCode": 400,
      "version": 2,
      "id": "04840005-74d3-458b-bbe1-1209d3a739ac",
      "errorCode": 123456789,
      "details": [
        "bad request reason"
      ],
      "remediation": "The remediation action to fix a Bad Request error.",
      "errors": [
        {
          "optional nested errors": "..."
        }
      ],
      "links": [
        {
          "href": "...",
          "method": "...",
          "rel": "...",
          "uri": "..."
        }
      ]
    }
    

    Here is an example of an error response when the user did not have the necessary permissions.

    {
      "httpStatusCode": 403,
      "version": 2,
      "id": "04840005-74d3-458b-bbe1-1209d3a739ac",
      "errorCode": 123456789,
      "details": [
        "forbidden"
      ],
      "remediation": "The remediation action to fix a Forbidden error.",
      "errors": [],
      "links": [
        {
          "href": "...",
          "method": "...",
          "rel": "...",
          "uri": "..."
        }
      ]
    }
    

    Here is an example of an error response when no item exists at the requested path.

    {
      "httpStatusCode": 404,
      "version": 2,
      "id": "04840005-74d3-458b-bbe1-1209d3a739ac",
      "errorCode": 123456789,
      "details": [
        "not found"
      ],
      "remediation": "The remediation action to fix a Not Found error.",
      "errors": [],
      "links": [
        {
          "href": "...",
          "method": "...",
          "rel": "...",
          "uri": "..."
        }
      ]
    }
    

    Here is an example of an error response when the request could not be fulfilled because of an unexpected server error.

    {
      "httpStatusCode": 500,
      "version": 2,
      "id": "04840005-74d3-458b-bbe1-1209d3a739ac",
      "errorCode": 123456789,
      "details": [
        "displayable details of server error"
      ],
      "remediation": "The remediation action to fix an Internal Server Error.",
      "errors": [
        {
          "optional nested errors": "..."
        }
      ],
      "links": [
        {
          "href": "...",
          "method": "...",
          "rel": "...",
          "uri": "..."
        }
      ]
    }
    
    Responses
    Status Meaning Description Schema
    200 OK The request succeeded. resourceCollection
    400 Bad Request The request was invalid. errorResponse
    403 Forbidden The user did not have the necessary permissions. errorResponse
    404 Not Found No item exists at the requested path. errorResponse
    500 Internal Server Error The request could not be fulfilled because of an unexpected server error. errorResponse
    Response Headers
    Status Header Type Format Description
    200 Content-Type string string The media type for the body of the request or response.

    Update the expiry of a list's rows

    Code samples

    # You can also use wget
    curl -X PUT http://mock-listData.apifirst.unx.sas.com/listData/lists/{listId}/contents/expiry \
      -H 'Authorization: Bearer <access-token-goes-here>' \
      -H 'Content-Type: application/vnd.sas.collection+json' \
      -H 'Accept: application/vnd.sas.listdata.list+json'
    
    
    const inputBody = '{
      "expiry": 1691052647,
      "exactExpiry": true,
      "items": [
        {
          "userId": "58b2a1a2",
          "firstName": "Aron",
          "lastName": "Denesik",
          "salary": 745072
        },
        {
          "userId": "6e107010",
          "firstName": "Chery",
          "lastName": "Kunze",
          "salary": 935262
        },
        {
          "userId": "38c0e0c7",
          "firstName": "Letha",
          "lastName": "Goldner",
          "salary": 672002
        },
        {
          "userId": "4cef6486",
          "firstName": "Jeane",
          "lastName": "Kutch",
          "salary": 380766
        },
        {
          "userId": "61f7592f",
          "firstName": "Beth",
          "lastName": "West",
          "salary": 994209
        }
      ]
    }';
    const headers = {
      'Content-Type':'application/vnd.sas.collection+json',
      'Accept':'application/vnd.sas.listdata.list+json'
    };
    
    fetch('http://mock-listData.apifirst.unx.sas.com/listData/lists/{listId}/contents/expiry',
    {
      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.collection+json',
      'Accept': 'application/vnd.sas.listdata.list+json'
    }
    
    r = requests.put('http://mock-listData.apifirst.unx.sas.com/listData/lists/{listId}/contents/expiry', 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.listdata.list+json"},
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("PUT", "http://mock-listData.apifirst.unx.sas.com/listData/lists/{listId}/contents/expiry", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    

    PUT /lists/{listId}/contents/expiry

    Updates the expiry property of a list's rows synchronously via a JSON request body.

    A request body to update the expiry of rows in a list must contain a collection of data record objects with keys that match the column definitions.

    The expiry value of a row is represented as a UNIX timestamp, which is the number of seconds since the UNIX epoch (January 1, 1970).

    If the value for the 'exactExpiry' property is 'true', the value provided is taken to be a UNIX timestamp and is used directly. Otherwise, it is used as an offset, which is the number of seconds after now that the rows should expire.

    Body parameter

    Here is an example of a request to synchronously update the expiry for list rows.

    {
      "expiry": 1691052647,
      "exactExpiry": true,
      "items": [
        {
          "userId": "58b2a1a2",
          "firstName": "Aron",
          "lastName": "Denesik",
          "salary": 745072
        },
        {
          "userId": "6e107010",
          "firstName": "Chery",
          "lastName": "Kunze",
          "salary": 935262
        },
        {
          "userId": "38c0e0c7",
          "firstName": "Letha",
          "lastName": "Goldner",
          "salary": 672002
        },
        {
          "userId": "4cef6486",
          "firstName": "Jeane",
          "lastName": "Kutch",
          "salary": 380766
        },
        {
          "userId": "61f7592f",
          "firstName": "Beth",
          "lastName": "West",
          "salary": 994209
        }
      ]
    }
    
    Parameters
    Name In Type Required Description
    body body object false none
    » items body [object] false none
    listId path string true A universally unique identifier for a list.

    Example responses

    Here is an example of a response to a request to get a list.

    {
      "id": "3659ea38-2618-4474-aeac-0bf6cfd3c322",
      "version": 1,
      "creationTimeStamp": "2022-03-01T20:18:32Z",
      "modifiedTimeStamp": "2022-03-01T20:18:32Z",
      "createdBy": "appUser1",
      "modifiedBy": "appUser1",
      "name": "list-a",
      "description": "The A-list users",
      "state": "developing",
      "columns": [
        {
          "name": "userId",
          "dataType": "string",
          "position": 1,
          "isKey": true,
          "keyPosition": 1
        },
        {
          "name": "firstName",
          "dataType": "string",
          "position": 2,
          "isKey": false,
          "keyPosition": 0
        },
        {
          "name": "lastName",
          "dataType": "string",
          "position": 3,
          "isKey": false,
          "keyPosition": 0
        },
        {
          "name": "salary",
          "dataType": "number",
          "position": 4,
          "isKey": false,
          "keyPosition": 0,
          "dataMask": {
            "name": "MaskStart",
            "regex": ".(....$)|.",
            "replace": "*$1",
            "example": "****1234"
          }
        }
      ],
      "label": "corporate marketing",
      "links": [
        {
          "href": "...",
          "method": "...",
          "rel": "...",
          "uri": "..."
        }
      ]
    }
    
    {
      "id": "3659ea38-2618-4474-aeac-0bf6cfd3c322",
      "version": 1,
      "creationTimeStamp": "2022-03-01T20:18:32Z",
      "modifiedTimeStamp": "2022-03-01T20:18:32Z",
      "createdBy": "appUser1",
      "modifiedBy": "appUser1",
      "name": "list-a",
      "description": "The A-list users",
      "state": "developing",
      "columns": [
        {
          "name": "userId",
          "dataType": "string",
          "position": 1,
          "isKey": true,
          "keyPosition": 1
        },
        {
          "name": "firstName",
          "dataType": "string",
          "position": 2,
          "isKey": false,
          "keyPosition": 0
        },
        {
          "name": "lastName",
          "dataType": "string",
          "position": 3,
          "isKey": false,
          "keyPosition": 0
        },
        {
          "name": "salary",
          "dataType": "number",
          "position": 4,
          "isKey": false,
          "keyPosition": 0,
          "dataMask": {
            "name": "MaskStart",
            "regex": ".(....$)|.",
            "replace": "*$1",
            "example": "****1234"
          }
        }
      ],
      "label": "corporate marketing",
      "links": [
        {
          "href": "...",
          "method": "...",
          "rel": "...",
          "uri": "..."
        }
      ]
    }
    

    Here is an example of an error response when the request was invalid.

    {
      "httpStatusCode": 400,
      "version": 2,
      "id": "04840005-74d3-458b-bbe1-1209d3a739ac",
      "errorCode": 123456789,
      "details": [
        "bad request reason"
      ],
      "remediation": "The remediation action to fix a Bad Request error.",
      "errors": [
        {
          "optional nested errors": "..."
        }
      ],
      "links": [
        {
          "href": "...",
          "method": "...",
          "rel": "...",
          "uri": "..."
        }
      ]
    }
    

    Here is an example of an error response when the user did not have the necessary permissions.

    {
      "httpStatusCode": 403,
      "version": 2,
      "id": "04840005-74d3-458b-bbe1-1209d3a739ac",
      "errorCode": 123456789,
      "details": [
        "forbidden"
      ],
      "remediation": "The remediation action to fix a Forbidden error.",
      "errors": [],
      "links": [
        {
          "href": "...",
          "method": "...",
          "rel": "...",
          "uri": "..."
        }
      ]
    }
    

    Here is an example of an error response when no item exists at the requested path.

    {
      "httpStatusCode": 404,
      "version": 2,
      "id": "04840005-74d3-458b-bbe1-1209d3a739ac",
      "errorCode": 123456789,
      "details": [
        "not found"
      ],
      "remediation": "The remediation action to fix a Not Found error.",
      "errors": [],
      "links": [
        {
          "href": "...",
          "method": "...",
          "rel": "...",
          "uri": "..."
        }
      ]
    }
    

    Here is an example of an error response when the request could not be completed due to a conflict with an existing resource.

    {
      "httpStatusCode": 409,
      "version": 2,
      "id": "04840005-74d3-458b-bbe1-1209d3a739ac",
      "errorCode": 123456789,
      "details": [
        "conflict reason"
      ],
      "remediation": "The remediation action to fix a Conflict error.",
      "errors": [
        {
          "optional nested errors": "..."
        }
      ],
      "links": [
        {
          "href": "...",
          "method": "...",
          "rel": "...",
          "uri": "..."
        }
      ]
    }
    

    Here is an example of an error response when the request could not be fulfilled because of an unexpected server error.

    {
      "httpStatusCode": 500,
      "version": 2,
      "id": "04840005-74d3-458b-bbe1-1209d3a739ac",
      "errorCode": 123456789,
      "details": [
        "displayable details of server error"
      ],
      "remediation": "The remediation action to fix an Internal Server Error.",
      "errors": [
        {
          "optional nested errors": "..."
        }
      ],
      "links": [
        {
          "href": "...",
          "method": "...",
          "rel": "...",
          "uri": "..."
        }
      ]
    }
    
    Responses
    Status Meaning Description Schema
    200 OK The request succeeded. listResource
    400 Bad Request The request was invalid. errorResponse
    403 Forbidden The user did not have the necessary permissions. errorResponse
    404 Not Found No item exists at the requested path. errorResponse
    409 Conflict The request could not be completed due to a conflict with an existing resource. errorResponse
    500 Internal Server Error The request could not be fulfilled because of an unexpected server error. errorResponse
    Response Headers
    Status Header Type Format Description
    200 Content-Type string string The media type for the body of the request or response.
    200 Location string uri The URI of the list.
    200 ETag string date-time An ETag in the format of W/"the-last-updated-timestamp-in-UNIX-nanosecond-time".

    Delete the expiry of a list's rows

    Code samples

    # You can also use wget
    curl -X POST http://mock-listData.apifirst.unx.sas.com/listData/lists/{listId}/contents/expiry/deletions \
      -H 'Authorization: Bearer <access-token-goes-here>' \
      -H 'Content-Type: application/vnd.sas.collection+json' \
      -H 'Accept: application/vnd.sas.listdata.list+json'
    
    
    const inputBody = '{
      "items": [
        {
          "userId": "58b2a1a2",
          "firstName": "Aron",
          "lastName": "Denesik",
          "salary": 745072
        },
        {
          "userId": "6e107010",
          "firstName": "Chery",
          "lastName": "Kunze",
          "salary": 935262
        },
        {
          "userId": "38c0e0c7",
          "firstName": "Letha",
          "lastName": "Goldner",
          "salary": 672002
        },
        {
          "userId": "4cef6486",
          "firstName": "Jeane",
          "lastName": "Kutch",
          "salary": 380766
        },
        {
          "userId": "61f7592f",
          "firstName": "Beth",
          "lastName": "West",
          "salary": 994209
        }
      ]
    }';
    const headers = {
      'Content-Type':'application/vnd.sas.collection+json',
      'Accept':'application/vnd.sas.listdata.list+json'
    };
    
    fetch('http://mock-listData.apifirst.unx.sas.com/listData/lists/{listId}/contents/expiry/deletions',
    {
      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.listdata.list+json'
    }
    
    r = requests.post('http://mock-listData.apifirst.unx.sas.com/listData/lists/{listId}/contents/expiry/deletions', 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.listdata.list+json"},
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("POST", "http://mock-listData.apifirst.unx.sas.com/listData/lists/{listId}/contents/expiry/deletions", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    

    POST /lists/{listId}/contents/expiry/deletions

    Deletes the expiry property of a list's rows synchronously via a JSON request body.

    A request body to delete the expiry of rows in a list must contain a collection of data record objects with keys that match the column definitions.

    Body parameter

    Here is an example of a request to synchronously delete the expiry for list rows.

    {
      "items": [
        {
          "userId": "58b2a1a2",
          "firstName": "Aron",
          "lastName": "Denesik",
          "salary": 745072
        },
        {
          "userId": "6e107010",
          "firstName": "Chery",
          "lastName": "Kunze",
          "salary": 935262
        },
        {
          "userId": "38c0e0c7",
          "firstName": "Letha",
          "lastName": "Goldner",
          "salary": 672002
        },
        {
          "userId": "4cef6486",
          "firstName": "Jeane",
          "lastName": "Kutch",
          "salary": 380766
        },
        {
          "userId": "61f7592f",
          "firstName": "Beth",
          "lastName": "West",
          "salary": 994209
        }
      ]
    }
    
    Parameters
    Name In Type Required Description
    body body object false none
    » items body [object] false none
    listId path string true A universally unique identifier for a list.

    Example responses

    Here is an example of a response to a request to get a list.

    {
      "id": "3659ea38-2618-4474-aeac-0bf6cfd3c322",
      "version": 1,
      "creationTimeStamp": "2022-03-01T20:18:32Z",
      "modifiedTimeStamp": "2022-03-01T20:18:32Z",
      "createdBy": "appUser1",
      "modifiedBy": "appUser1",
      "name": "list-a",
      "description": "The A-list users",
      "state": "developing",
      "columns": [
        {
          "name": "userId",
          "dataType": "string",
          "position": 1,
          "isKey": true,
          "keyPosition": 1
        },
        {
          "name": "firstName",
          "dataType": "string",
          "position": 2,
          "isKey": false,
          "keyPosition": 0
        },
        {
          "name": "lastName",
          "dataType": "string",
          "position": 3,
          "isKey": false,
          "keyPosition": 0
        },
        {
          "name": "salary",
          "dataType": "number",
          "position": 4,
          "isKey": false,
          "keyPosition": 0,
          "dataMask": {
            "name": "MaskStart",
            "regex": ".(....$)|.",
            "replace": "*$1",
            "example": "****1234"
          }
        }
      ],
      "label": "corporate marketing",
      "links": [
        {
          "href": "...",
          "method": "...",
          "rel": "...",
          "uri": "..."
        }
      ]
    }
    
    {
      "id": "3659ea38-2618-4474-aeac-0bf6cfd3c322",
      "version": 1,
      "creationTimeStamp": "2022-03-01T20:18:32Z",
      "modifiedTimeStamp": "2022-03-01T20:18:32Z",
      "createdBy": "appUser1",
      "modifiedBy": "appUser1",
      "name": "list-a",
      "description": "The A-list users",
      "state": "developing",
      "columns": [
        {
          "name": "userId",
          "dataType": "string",
          "position": 1,
          "isKey": true,
          "keyPosition": 1
        },
        {
          "name": "firstName",
          "dataType": "string",
          "position": 2,
          "isKey": false,
          "keyPosition": 0
        },
        {
          "name": "lastName",
          "dataType": "string",
          "position": 3,
          "isKey": false,
          "keyPosition": 0
        },
        {
          "name": "salary",
          "dataType": "number",
          "position": 4,
          "isKey": false,
          "keyPosition": 0,
          "dataMask": {
            "name": "MaskStart",
            "regex": ".(....$)|.",
            "replace": "*$1",
            "example": "****1234"
          }
        }
      ],
      "label": "corporate marketing",
      "links": [
        {
          "href": "...",
          "method": "...",
          "rel": "...",
          "uri": "..."
        }
      ]
    }
    

    Here is an example of an error response when the request was invalid.

    {
      "httpStatusCode": 400,
      "version": 2,
      "id": "04840005-74d3-458b-bbe1-1209d3a739ac",
      "errorCode": 123456789,
      "details": [
        "bad request reason"
      ],
      "remediation": "The remediation action to fix a Bad Request error.",
      "errors": [
        {
          "optional nested errors": "..."
        }
      ],
      "links": [
        {
          "href": "...",
          "method": "...",
          "rel": "...",
          "uri": "..."
        }
      ]
    }
    

    Here is an example of an error response when the user did not have the necessary permissions.

    {
      "httpStatusCode": 403,
      "version": 2,
      "id": "04840005-74d3-458b-bbe1-1209d3a739ac",
      "errorCode": 123456789,
      "details": [
        "forbidden"
      ],
      "remediation": "The remediation action to fix a Forbidden error.",
      "errors": [],
      "links": [
        {
          "href": "...",
          "method": "...",
          "rel": "...",
          "uri": "..."
        }
      ]
    }
    

    Here is an example of an error response when no item exists at the requested path.

    {
      "httpStatusCode": 404,
      "version": 2,
      "id": "04840005-74d3-458b-bbe1-1209d3a739ac",
      "errorCode": 123456789,
      "details": [
        "not found"
      ],
      "remediation": "The remediation action to fix a Not Found error.",
      "errors": [],
      "links": [
        {
          "href": "...",
          "method": "...",
          "rel": "...",
          "uri": "..."
        }
      ]
    }
    

    Here is an example of an error response when the request could not be completed due to a conflict with an existing resource.

    {
      "httpStatusCode": 409,
      "version": 2,
      "id": "04840005-74d3-458b-bbe1-1209d3a739ac",
      "errorCode": 123456789,
      "details": [
        "conflict reason"
      ],
      "remediation": "The remediation action to fix a Conflict error.",
      "errors": [
        {
          "optional nested errors": "..."
        }
      ],
      "links": [
        {
          "href": "...",
          "method": "...",
          "rel": "...",
          "uri": "..."
        }
      ]
    }
    

    Here is an example of an error response when the request could not be fulfilled because of an unexpected server error.

    {
      "httpStatusCode": 500,
      "version": 2,
      "id": "04840005-74d3-458b-bbe1-1209d3a739ac",
      "errorCode": 123456789,
      "details": [
        "displayable details of server error"
      ],
      "remediation": "The remediation action to fix an Internal Server Error.",
      "errors": [
        {
          "optional nested errors": "..."
        }
      ],
      "links": [
        {
          "href": "...",
          "method": "...",
          "rel": "...",
          "uri": "..."
        }
      ]
    }
    
    Responses
    Status Meaning Description Schema
    200 OK The request succeeded. listResource
    400 Bad Request The request was invalid. errorResponse
    403 Forbidden The user did not have the necessary permissions. errorResponse
    404 Not Found No item exists at the requested path. errorResponse
    409 Conflict The request could not be completed due to a conflict with an existing resource. errorResponse
    500 Internal Server Error The request could not be fulfilled because of an unexpected server error. errorResponse
    Response Headers
    Status Header Type Format Description
    200 Content-Type string string The media type for the body of the request or response.
    200 Location string uri The URI of the list.
    200 ETag string date-time An ETag in the format of W/"the-last-updated-timestamp-in-UNIX-nanosecond-time".

    Export a list's contents to a CSV file

    Code samples

    # You can also use wget
    curl -X GET http://mock-listData.apifirst.unx.sas.com/listData/lists/{listId}/contents/export \
      -H 'Authorization: Bearer <access-token-goes-here>' \
      -H 'Accept: application/vnd.sas.error+json'
    
    
    
    const headers = {
      'Accept':'application/vnd.sas.error+json'
    };
    
    fetch('http://mock-listData.apifirst.unx.sas.com/listData/lists/{listId}/contents/export',
    {
      method: 'GET',
    
      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.get('http://mock-listData.apifirst.unx.sas.com/listData/lists/{listId}/contents/export', 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("GET", "http://mock-listData.apifirst.unx.sas.com/listData/lists/{listId}/contents/export", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    

    GET /lists/{listId}/contents/export

    Returns the contents of a list to a CSV file.

    The structure of the exported CSV file should match the expected structure for the imported list content.

    Parameters
    Name In Type Required Description
    listId path string true A universally unique identifier for a list.

    Example responses

    Here is an example of an error response when the request was invalid.

    {
      "httpStatusCode": 400,
      "version": 2,
      "id": "04840005-74d3-458b-bbe1-1209d3a739ac",
      "errorCode": 123456789,
      "details": [
        "bad request reason"
      ],
      "remediation": "The remediation action to fix a Bad Request error.",
      "errors": [
        {
          "optional nested errors": "..."
        }
      ],
      "links": [
        {
          "href": "...",
          "method": "...",
          "rel": "...",
          "uri": "..."
        }
      ]
    }
    

    Here is an example of an error response when the user did not have the necessary permissions.

    {
      "httpStatusCode": 403,
      "version": 2,
      "id": "04840005-74d3-458b-bbe1-1209d3a739ac",
      "errorCode": 123456789,
      "details": [
        "forbidden"
      ],
      "remediation": "The remediation action to fix a Forbidden error.",
      "errors": [],
      "links": [
        {
          "href": "...",
          "method": "...",
          "rel": "...",
          "uri": "..."
        }
      ]
    }
    

    Here is an example of an error response when no item exists at the requested path.

    {
      "httpStatusCode": 404,
      "version": 2,
      "id": "04840005-74d3-458b-bbe1-1209d3a739ac",
      "errorCode": 123456789,
      "details": [
        "not found"
      ],
      "remediation": "The remediation action to fix a Not Found error.",
      "errors": [],
      "links": [
        {
          "href": "...",
          "method": "...",
          "rel": "...",
          "uri": "..."
        }
      ]
    }
    

    Here is an example of an error response when the request could not be completed due to a conflict with an existing resource.

    {
      "httpStatusCode": 409,
      "version": 2,
      "id": "04840005-74d3-458b-bbe1-1209d3a739ac",
      "errorCode": 123456789,
      "details": [
        "conflict reason"
      ],
      "remediation": "The remediation action to fix a Conflict error.",
      "errors": [
        {
          "optional nested errors": "..."
        }
      ],
      "links": [
        {
          "href": "...",
          "method": "...",
          "rel": "...",
          "uri": "..."
        }
      ]
    }
    

    Here is an example of an error response when the request could not be fulfilled because of an unexpected server error.

    {
      "httpStatusCode": 500,
      "version": 2,
      "id": "04840005-74d3-458b-bbe1-1209d3a739ac",
      "errorCode": 123456789,
      "details": [
        "displayable details of server error"
      ],
      "remediation": "The remediation action to fix an Internal Server Error.",
      "errors": [
        {
          "optional nested errors": "..."
        }
      ],
      "links": [
        {
          "href": "...",
          "method": "...",
          "rel": "...",
          "uri": "..."
        }
      ]
    }
    
    Responses
    Status Meaning Description Schema
    200 OK The request succeeded. None
    400 Bad Request The request was invalid. errorResponse
    403 Forbidden The user did not have the necessary permissions. errorResponse
    404 Not Found No item exists at the requested path. errorResponse
    409 Conflict The request could not be completed due to a conflict with an existing resource. errorResponse
    500 Internal Server Error The request could not be fulfilled because of an unexpected server error. errorResponse
    Response Headers
    Status Header Type Format Description
    200 Content-Type string string The media type for the body of the request or response.
    200 Location string uri The URI of the list.
    200 ETag string date-time An ETag in the format of W/"the-last-updated-timestamp-in-UNIX-nanosecond-time".

    List Relations

    This endpoint is associated with a list's relationships with other objects that are managed by the Catalog service.

    Get list consumers

    Code samples

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

    GET /lists/{listId}/consumers

    Gets the consumers of a list.

    Parameters
    Name In Type Required Description
    listId path string true A universally unique identifier for a list."

    Example responses

    Here is an example of a response to a request to get a list's consumers.

    {
      "consumerCount": 3,
      "consumers": [
        {
          "relationshipId": "00eda357-74bf-4ff3-b8ce-791b282ba4b2,",
          "relationshipUri": "/catalog/instances/00eda357-74bf-4ff3-b8ce-791b282ba4b2,",
          "relationshipDefinitionId": "c525acd7-5c99-4929-ae1e-f75733034b8c,",
          "consumerId": "04ecad55-b9c1-4d63-8cfa-f72782798b0c,",
          "consumerUri": "/catalog/instances/04ecad55-b9c1-4d63-8cfa-f72782798b0c"
        },
        {
          "relationshipId": "5832f54b-4117-4793-81f7-3c4a507528d1,",
          "relationshipUri": "/catalog/instances/5832f54b-4117-4793-81f7-3c4a507528d1,",
          "relationshipDefinitionId": "c525acd7-5c99-4929-ae1e-f75733034b8c,",
          "consumerId": "9de13858-6bed-49e4-aae7-7298e819a4cb,",
          "consumerUri": "/catalog/instances/9de13858-6bed-49e4-aae7-7298e819a4cb"
        },
        {
          "relationshipId": "51eedf3f-7306-4956-af99-5d05fa6fdd37",
          "relationshipUri": "/catalog/instances/51eedf3f-7306-4956-af99-5d05fa6fdd37",
          "relationshipDefinitionId": "2eb6ed06-25b3-467b-b92e-6f18e9dd0627",
          "consumerId": "01991936-cec2-42e7-8b73-a0c3d777631f,",
          "consumerUri": "/catalog/instances/01991936-cec2-42e7-8b73-a0c3d777631f"
        }
      ],
      "links": [
        {
          "method": "GET,",
          "rel": "self,",
          "href": "/listData/lists/2c22d72a-b30b-453a-aa05-c9a77f0a7747/consumers",
          "uri": "/listData/lists/2c22d72a-b30b-453a-aa05-c9a77f0a7747/consumers",
          "responseType": "application/vnd.sas.listdata.consumers+json"
        }
      ]
    }
    
    {
      "consumerCount": 3,
      "consumers": [
        {
          "relationshipId": "00eda357-74bf-4ff3-b8ce-791b282ba4b2,",
          "relationshipUri": "/catalog/instances/00eda357-74bf-4ff3-b8ce-791b282ba4b2,",
          "relationshipDefinitionId": "c525acd7-5c99-4929-ae1e-f75733034b8c,",
          "consumerId": "04ecad55-b9c1-4d63-8cfa-f72782798b0c,",
          "consumerUri": "/catalog/instances/04ecad55-b9c1-4d63-8cfa-f72782798b0c"
        },
        {
          "relationshipId": "5832f54b-4117-4793-81f7-3c4a507528d1,",
          "relationshipUri": "/catalog/instances/5832f54b-4117-4793-81f7-3c4a507528d1,",
          "relationshipDefinitionId": "c525acd7-5c99-4929-ae1e-f75733034b8c,",
          "consumerId": "9de13858-6bed-49e4-aae7-7298e819a4cb,",
          "consumerUri": "/catalog/instances/9de13858-6bed-49e4-aae7-7298e819a4cb"
        },
        {
          "relationshipId": "51eedf3f-7306-4956-af99-5d05fa6fdd37",
          "relationshipUri": "/catalog/instances/51eedf3f-7306-4956-af99-5d05fa6fdd37",
          "relationshipDefinitionId": "2eb6ed06-25b3-467b-b92e-6f18e9dd0627",
          "consumerId": "01991936-cec2-42e7-8b73-a0c3d777631f,",
          "consumerUri": "/catalog/instances/01991936-cec2-42e7-8b73-a0c3d777631f"
        }
      ],
      "links": [
        {
          "method": "GET,",
          "rel": "self,",
          "href": "/listData/lists/2c22d72a-b30b-453a-aa05-c9a77f0a7747/consumers",
          "uri": "/listData/lists/2c22d72a-b30b-453a-aa05-c9a77f0a7747/consumers",
          "responseType": "application/vnd.sas.listdata.consumers+json"
        }
      ]
    }
    

    Here is an example of an error response when the user did not have the necessary permissions.

    {
      "httpStatusCode": 403,
      "version": 2,
      "id": "04840005-74d3-458b-bbe1-1209d3a739ac",
      "errorCode": 123456789,
      "details": [
        "forbidden"
      ],
      "remediation": "The remediation action to fix a Forbidden error.",
      "errors": [],
      "links": [
        {
          "href": "...",
          "method": "...",
          "rel": "...",
          "uri": "..."
        }
      ]
    }
    

    Here is an example of an error response when no item exists at the requested path.

    {
      "httpStatusCode": 404,
      "version": 2,
      "id": "04840005-74d3-458b-bbe1-1209d3a739ac",
      "errorCode": 123456789,
      "details": [
        "not found"
      ],
      "remediation": "The remediation action to fix a Not Found error.",
      "errors": [],
      "links": [
        {
          "href": "...",
          "method": "...",
          "rel": "...",
          "uri": "..."
        }
      ]
    }
    

    Here is an example of an error response when the request could not be fulfilled because of an unexpected server error.

    {
      "httpStatusCode": 500,
      "version": 2,
      "id": "04840005-74d3-458b-bbe1-1209d3a739ac",
      "errorCode": 123456789,
      "details": [
        "displayable details of server error"
      ],
      "remediation": "The remediation action to fix an Internal Server Error.",
      "errors": [
        {
          "optional nested errors": "..."
        }
      ],
      "links": [
        {
          "href": "...",
          "method": "...",
          "rel": "...",
          "uri": "..."
        }
      ]
    }
    
    Responses
    Status Meaning Description Schema
    200 OK The request succeeded. listConsumerList
    403 Forbidden The user did not have the necessary permissions. errorResponse
    404 Not Found No item exists at the requested path. errorResponse
    500 Internal Server Error The request could not be fulfilled because of an unexpected server error. errorResponse
    Response Headers
    Status Header Type Format Description
    200 Content-Type string string The media type for the body of the request or response.

    Asynchronous Content Loading

    These endpoints are associated with the asynchronous loading of a list's contents.

    Create an import job

    Code samples

    # You can also use wget
    curl -X POST http://mock-listData.apifirst.unx.sas.com/listData/lists/{listId}/importJobs \
      -H 'Authorization: Bearer <access-token-goes-here>' \
      -H 'Content-Type: multipart/form-data' \
      -H 'Accept: application/vnd.sas.listdata.importjob+json'
    
    
    const inputBody = '{
      "dataFile": "data.csv",
      "delimiter": ","
    }';
    const headers = {
      'Content-Type':'multipart/form-data',
      'Accept':'application/vnd.sas.listdata.importjob+json'
    };
    
    fetch('http://mock-listData.apifirst.unx.sas.com/listData/lists/{listId}/importJobs',
    {
      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.listdata.importjob+json'
    }
    
    r = requests.post('http://mock-listData.apifirst.unx.sas.com/listData/lists/{listId}/importJobs', 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.listdata.importjob+json"},
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("POST", "http://mock-listData.apifirst.unx.sas.com/listData/lists/{listId}/importJobs", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    

    POST /lists/{listId}/importJobs

    Updates a list's contents asynchronously by uploading a file.

    You can create a new import job only if no other import jobs or purge jobs are running on the list.

    The Character Separated Values (CSV) data file must contain a header record as the first row. The header record must contain the name of the columns. An import job uploads the contents of a data file if the file that contains a header includes matching names and positions as defined in the list's 'columns' property. A column value can be empty if the column value is not a part of a key value or the column data type is not a number.

    The List Data API verifies that all the records are in the required format before it loads them into the data store. Because a large number of records could contain errors, there is a threshold of the number of errors that can occur before the validation is terminated. No records are loaded if there are validation errors.

    Body parameter

    dataFile: data.csv
    delimiter: ","
    
    
    Parameters
    Name In Type Required Description
    body body object true none
    » dataFile body string(binary) false A file that contains records (data) that are added to a list's contents.
    » delimiter body string false The character delimiter that is used in the CSV data file. The character delimiter is typically a comma. Newline characters (for example,
    listId path string true A universally unique identifier for a list.
    Detailed descriptions

    » delimiter: The character delimiter that is used in the CSV data file. The character delimiter is typically a comma. Newline characters (for example, or \r) cannot be used as a delimiter.

    Example responses

    Here is an example of a response to a request to create an import job.

    {
      "id": "b791e348-984e-439d-bff4-5b4163d897af",
      "version": 1,
      "state": "completed",
      "fileName": "data.csv",
      "sha256Sum": "69091e2c774812266d577dc83472a2ab81687efde1e276feb0aaa77d637df11c",
      "creationTimeStamp": "2022-05-31T14:31:57.000Z",
      "createdBy": "userA",
      "completedTimeStamp": "2022-05-31T14:32:57.000Z",
      "listId": "3659ea38-2618-4474-aeac-0bf6cfd3c322",
      "totalErrors": 1,
      "results": {
        "recordCount": 100
      },
      "errors": [
        {
          "message": "string",
          "id": "string",
          "errorCode": 0,
          "httpStatusCode": 0,
          "details": [
            "string"
          ],
          "remediation": "string",
          "version": 2
        }
      ],
      "links": [
        {
          "href": "...",
          "method": "...",
          "rel": "...",
          "uri": "..."
        }
      ]
    }
    
    {
      "id": "b791e348-984e-439d-bff4-5b4163d897af",
      "version": 1,
      "state": "completed",
      "fileName": "data.csv",
      "sha256Sum": "69091e2c774812266d577dc83472a2ab81687efde1e276feb0aaa77d637df11c",
      "creationTimeStamp": "2022-05-31T14:31:57.000Z",
      "createdBy": "userA",
      "completedTimeStamp": "2022-05-31T14:32:57.000Z",
      "listId": "3659ea38-2618-4474-aeac-0bf6cfd3c322",
      "totalErrors": 1,
      "results": {
        "recordCount": 100
      },
      "errors": [
        {
          "message": "string",
          "id": "string",
          "errorCode": 0,
          "httpStatusCode": 0,
          "details": [
            "string"
          ],
          "remediation": "string",
          "version": 2
        }
      ],
      "links": [
        {
          "href": "...",
          "method": "...",
          "rel": "...",
          "uri": "..."
        }
      ]
    }
    

    Here is an example of an error response when the request was invalid.

    {
      "httpStatusCode": 400,
      "version": 2,
      "id": "04840005-74d3-458b-bbe1-1209d3a739ac",
      "errorCode": 123456789,
      "details": [
        "bad request reason"
      ],
      "remediation": "The remediation action to fix a Bad Request error.",
      "errors": [
        {
          "optional nested errors": "..."
        }
      ],
      "links": [
        {
          "href": "...",
          "method": "...",
          "rel": "...",
          "uri": "..."
        }
      ]
    }
    

    Here is an example of an error response when the user did not have the necessary permissions.

    {
      "httpStatusCode": 403,
      "version": 2,
      "id": "04840005-74d3-458b-bbe1-1209d3a739ac",
      "errorCode": 123456789,
      "details": [
        "forbidden"
      ],
      "remediation": "The remediation action to fix a Forbidden error.",
      "errors": [],
      "links": [
        {
          "href": "...",
          "method": "...",
          "rel": "...",
          "uri": "..."
        }
      ]
    }
    

    Here is an example of an error response when no item exists at the requested path.

    {
      "httpStatusCode": 404,
      "version": 2,
      "id": "04840005-74d3-458b-bbe1-1209d3a739ac",
      "errorCode": 123456789,
      "details": [
        "not found"
      ],
      "remediation": "The remediation action to fix a Not Found error.",
      "errors": [],
      "links": [
        {
          "href": "...",
          "method": "...",
          "rel": "...",
          "uri": "..."
        }
      ]
    }
    

    Here is an example of an error response when the request could not be completed due to a conflict with an existing resource.

    {
      "httpStatusCode": 409,
      "version": 2,
      "id": "04840005-74d3-458b-bbe1-1209d3a739ac",
      "errorCode": 123456789,
      "details": [
        "conflict reason"
      ],
      "remediation": "The remediation action to fix a Conflict error.",
      "errors": [
        {
          "optional nested errors": "..."
        }
      ],
      "links": [
        {
          "href": "...",
          "method": "...",
          "rel": "...",
          "uri": "..."
        }
      ]
    }
    

    Here is an example of an error response when the request could not be fulfilled because of an unexpected server error.

    {
      "httpStatusCode": 500,
      "version": 2,
      "id": "04840005-74d3-458b-bbe1-1209d3a739ac",
      "errorCode": 123456789,
      "details": [
        "displayable details of server error"
      ],
      "remediation": "The remediation action to fix an Internal Server Error.",
      "errors": [
        {
          "optional nested errors": "..."
        }
      ],
      "links": [
        {
          "href": "...",
          "method": "...",
          "rel": "...",
          "uri": "..."
        }
      ]
    }
    
    Responses
    Status Meaning Description Schema
    202 Accepted The request has been accepted for processing, but the processing has not been completed. importJob
    400 Bad Request The request was invalid. errorResponse
    403 Forbidden The user did not have the necessary permissions. errorResponse
    404 Not Found No item exists at the requested path. errorResponse
    409 Conflict The request could not be completed due to a conflict with an existing resource. errorResponse
    500 Internal Server Error The request could not be fulfilled because of an unexpected server error. errorResponse
    Response Headers
    Status Header Type Format Description
    202 Content-Type string string The media type for the body of the request or response.

    Get a collection of import jobs

    Code samples

    # You can also use wget
    curl -X GET http://mock-listData.apifirst.unx.sas.com/listData/lists/{listId}/importJobs \
      -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-listData.apifirst.unx.sas.com/listData/lists/{listId}/importJobs',
    {
      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-listData.apifirst.unx.sas.com/listData/lists/{listId}/importJobs', 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-listData.apifirst.unx.sas.com/listData/lists/{listId}/importJobs", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    

    GET /lists/{listId}/importJobs

    Returns a collection of import jobs for a specific list.

    Parameters
    Name In Type Required Description
    start query integer false A zero-based offset of the first item to return. The default value is '0'.
    limit query integer false The maximum number of items to return. The default value is '20'.
    filter query string(filter-criteria) false The filter criteria for returned items. See Filtering in REST APIs.
    sortBy query string(sort-criteria) false A sort of the returned items. See Sorting in REST APIs.
    listId path string true A universally unique identifier for a list.

    Example responses

    Here is an example response to a request to get a collection of import jobs.

    {
      "version": 2,
      "accept": "application/vnd.sas.listdata.importjob+json",
      "count": 1,
      "start": 0,
      "limit": 10,
      "name": "importJobs",
      "items": [
        {
          "id": "importJobId",
          "state": "running",
          "...": "see Import Job Schema"
        }
      ],
      "links": [
        {
          "href": "...",
          "method": "...",
          "rel": "...",
          "uri": "..."
        }
      ]
    }
    
    {
      "version": 2,
      "accept": "application/vnd.sas.listdata.importjob+json",
      "count": 1,
      "start": 0,
      "limit": 10,
      "name": "importJobs",
      "items": [
        {
          "id": "importJobId",
          "state": "running",
          "...": "see Import Job Schema"
        }
      ],
      "links": [
        {
          "href": "...",
          "method": "...",
          "rel": "...",
          "uri": "..."
        }
      ]
    }
    

    Here is an example of an error response when the request was invalid.

    {
      "httpStatusCode": 400,
      "version": 2,
      "id": "04840005-74d3-458b-bbe1-1209d3a739ac",
      "errorCode": 123456789,
      "details": [
        "bad request reason"
      ],
      "remediation": "The remediation action to fix a Bad Request error.",
      "errors": [
        {
          "optional nested errors": "..."
        }
      ],
      "links": [
        {
          "href": "...",
          "method": "...",
          "rel": "...",
          "uri": "..."
        }
      ]
    }
    

    Here is an example of an error response when the user did not have the necessary permissions.

    {
      "httpStatusCode": 403,
      "version": 2,
      "id": "04840005-74d3-458b-bbe1-1209d3a739ac",
      "errorCode": 123456789,
      "details": [
        "forbidden"
      ],
      "remediation": "The remediation action to fix a Forbidden error.",
      "errors": [],
      "links": [
        {
          "href": "...",
          "method": "...",
          "rel": "...",
          "uri": "..."
        }
      ]
    }
    

    Here is an example of an error response when no item exists at the requested path.

    {
      "httpStatusCode": 404,
      "version": 2,
      "id": "04840005-74d3-458b-bbe1-1209d3a739ac",
      "errorCode": 123456789,
      "details": [
        "not found"
      ],
      "remediation": "The remediation action to fix a Not Found error.",
      "errors": [],
      "links": [
        {
          "href": "...",
          "method": "...",
          "rel": "...",
          "uri": "..."
        }
      ]
    }
    

    Here is an example of an error response when the request could not be fulfilled because of an unexpected server error.

    {
      "httpStatusCode": 500,
      "version": 2,
      "id": "04840005-74d3-458b-bbe1-1209d3a739ac",
      "errorCode": 123456789,
      "details": [
        "displayable details of server error"
      ],
      "remediation": "The remediation action to fix an Internal Server Error.",
      "errors": [
        {
          "optional nested errors": "..."
        }
      ],
      "links": [
        {
          "href": "...",
          "method": "...",
          "rel": "...",
          "uri": "..."
        }
      ]
    }
    
    Responses
    Status Meaning Description Schema
    200 OK The request succeeded. resourceCollection
    400 Bad Request The request was invalid. errorResponse
    403 Forbidden The user did not have the necessary permissions. errorResponse
    404 Not Found No item exists at the requested path. errorResponse
    500 Internal Server Error The request could not be fulfilled because of an unexpected server error. errorResponse
    Response Headers
    Status Header Type Format Description
    200 Content-Type string string The media type for the body of the request or response.

    Get an import job

    Code samples

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

    GET /lists/{listId}/importJobs/{jobId}

    Gets an import job resource to asynchronously load a list's contents.

    When an import job is in progress, its state is 'running'. When an import job completes, its state is 'completed' or 'failed'.

    Parameters
    Name In Type Required Description
    listId path string true A universally unique identifier for a list.
    jobId path string true A universally unique identifier for an import job.

    Example responses

    Here is an example of a response to a request to create an import job.

    {
      "id": "b791e348-984e-439d-bff4-5b4163d897af",
      "version": 1,
      "state": "completed",
      "fileName": "data.csv",
      "sha256Sum": "69091e2c774812266d577dc83472a2ab81687efde1e276feb0aaa77d637df11c",
      "creationTimeStamp": "2022-05-31T14:31:57.000Z",
      "createdBy": "userA",
      "completedTimeStamp": "2022-05-31T14:32:57.000Z",
      "listId": "3659ea38-2618-4474-aeac-0bf6cfd3c322",
      "totalErrors": 1,
      "results": {
        "recordCount": 100
      },
      "errors": [
        {
          "message": "string",
          "id": "string",
          "errorCode": 0,
          "httpStatusCode": 0,
          "details": [
            "string"
          ],
          "remediation": "string",
          "version": 2
        }
      ],
      "links": [
        {
          "href": "...",
          "method": "...",
          "rel": "...",
          "uri": "..."
        }
      ]
    }
    
    {
      "id": "b791e348-984e-439d-bff4-5b4163d897af",
      "version": 1,
      "state": "completed",
      "fileName": "data.csv",
      "sha256Sum": "69091e2c774812266d577dc83472a2ab81687efde1e276feb0aaa77d637df11c",
      "creationTimeStamp": "2022-05-31T14:31:57.000Z",
      "createdBy": "userA",
      "completedTimeStamp": "2022-05-31T14:32:57.000Z",
      "listId": "3659ea38-2618-4474-aeac-0bf6cfd3c322",
      "totalErrors": 1,
      "results": {
        "recordCount": 100
      },
      "errors": [
        {
          "message": "string",
          "id": "string",
          "errorCode": 0,
          "httpStatusCode": 0,
          "details": [
            "string"
          ],
          "remediation": "string",
          "version": 2
        }
      ],
      "links": [
        {
          "href": "...",
          "method": "...",
          "rel": "...",
          "uri": "..."
        }
      ]
    }
    

    Here is an example of an error response when the request was invalid.

    {
      "httpStatusCode": 400,
      "version": 2,
      "id": "04840005-74d3-458b-bbe1-1209d3a739ac",
      "errorCode": 123456789,
      "details": [
        "bad request reason"
      ],
      "remediation": "The remediation action to fix a Bad Request error.",
      "errors": [
        {
          "optional nested errors": "..."
        }
      ],
      "links": [
        {
          "href": "...",
          "method": "...",
          "rel": "...",
          "uri": "..."
        }
      ]
    }
    

    Here is an example of an error response when the user did not have the necessary permissions.

    {
      "httpStatusCode": 403,
      "version": 2,
      "id": "04840005-74d3-458b-bbe1-1209d3a739ac",
      "errorCode": 123456789,
      "details": [
        "forbidden"
      ],
      "remediation": "The remediation action to fix a Forbidden error.",
      "errors": [],
      "links": [
        {
          "href": "...",
          "method": "...",
          "rel": "...",
          "uri": "..."
        }
      ]
    }
    

    Here is an example of an error response when no item exists at the requested path.

    {
      "httpStatusCode": 404,
      "version": 2,
      "id": "04840005-74d3-458b-bbe1-1209d3a739ac",
      "errorCode": 123456789,
      "details": [
        "not found"
      ],
      "remediation": "The remediation action to fix a Not Found error.",
      "errors": [],
      "links": [
        {
          "href": "...",
          "method": "...",
          "rel": "...",
          "uri": "..."
        }
      ]
    }
    

    Here is an example of an error response when the request could not be fulfilled because of an unexpected server error.

    {
      "httpStatusCode": 500,
      "version": 2,
      "id": "04840005-74d3-458b-bbe1-1209d3a739ac",
      "errorCode": 123456789,
      "details": [
        "displayable details of server error"
      ],
      "remediation": "The remediation action to fix an Internal Server Error.",
      "errors": [
        {
          "optional nested errors": "..."
        }
      ],
      "links": [
        {
          "href": "...",
          "method": "...",
          "rel": "...",
          "uri": "..."
        }
      ]
    }
    
    Responses
    Status Meaning Description Schema
    200 OK The request succeeded. importJob
    400 Bad Request The request was invalid. errorResponse
    403 Forbidden The user did not have the necessary permissions. errorResponse
    404 Not Found No item exists at the requested path. errorResponse
    500 Internal Server Error The request could not be fulfilled because of an unexpected server error. errorResponse
    Response Headers
    Status Header Type Format Description
    200 Content-Type string string The media type for the body of the request or response.

    Clear List Contents

    These endpoints are associated with clearing and removing all of a list's contents.

    Create a purge job

    Code samples

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

    POST /lists/{listId}/purgeJobs

    Removes the list's contents.

    A purge job does not remove the list or associated jobs. The list's contents are empty if the purge job is successful.

    You can create a new purge job only if there are no other import jobs or purge jobs running on that list.

    You cannot create a purge job for an immutable list. To reload an immutable list, you must delete the list and then re-create it.

    Parameters
    Name In Type Required Description
    listId path string true A universally unique identifier for a purge job.

    Example responses

    Here is an example of a response to a request to create a purge job.

    {
      "id": "b791e348-984e-439d-bff4-5b4163d897af",
      "version": 1,
      "state": "completed",
      "creationTimeStamp": "2022-05-31T14:31:57.000Z",
      "createdBy": "userA",
      "completedTimeStamp": "2022-05-31T14:32:57.000Z",
      "listId": "3659ea38-2618-4474-aeac-0bf6cfd3c322",
      "totalErrors": 1,
      "results": {
        "recordCount": 100
      },
      "errors": [
        {
          "message": "string",
          "id": "string",
          "errorCode": 0,
          "httpStatusCode": 0,
          "details": [
            "string"
          ],
          "remediation": "string",
          "version": 2
        }
      ],
      "links": [
        {
          "href": "...",
          "method": "...",
          "rel": "...",
          "uri": "..."
        }
      ]
    }
    
    {
      "id": "b791e348-984e-439d-bff4-5b4163d897af",
      "version": 1,
      "state": "completed",
      "creationTimeStamp": "2022-05-31T14:31:57.000Z",
      "createdBy": "userA",
      "completedTimeStamp": "2022-05-31T14:32:57.000Z",
      "listId": "3659ea38-2618-4474-aeac-0bf6cfd3c322",
      "totalErrors": 1,
      "results": {
        "recordCount": 100
      },
      "errors": [
        {
          "message": "string",
          "id": "string",
          "errorCode": 0,
          "httpStatusCode": 0,
          "details": [
            "string"
          ],
          "remediation": "string",
          "version": 2
        }
      ],
      "links": [
        {
          "href": "...",
          "method": "...",
          "rel": "...",
          "uri": "..."
        }
      ]
    }
    

    Here is an example of an error response when the request was invalid.

    {
      "httpStatusCode": 400,
      "version": 2,
      "id": "04840005-74d3-458b-bbe1-1209d3a739ac",
      "errorCode": 123456789,
      "details": [
        "bad request reason"
      ],
      "remediation": "The remediation action to fix a Bad Request error.",
      "errors": [
        {
          "optional nested errors": "..."
        }
      ],
      "links": [
        {
          "href": "...",
          "method": "...",
          "rel": "...",
          "uri": "..."
        }
      ]
    }
    

    Here is an example of an error response when the user did not have the necessary permissions.

    {
      "httpStatusCode": 403,
      "version": 2,
      "id": "04840005-74d3-458b-bbe1-1209d3a739ac",
      "errorCode": 123456789,
      "details": [
        "forbidden"
      ],
      "remediation": "The remediation action to fix a Forbidden error.",
      "errors": [],
      "links": [
        {
          "href": "...",
          "method": "...",
          "rel": "...",
          "uri": "..."
        }
      ]
    }
    

    Here is an example of an error response when no item exists at the requested path.

    {
      "httpStatusCode": 404,
      "version": 2,
      "id": "04840005-74d3-458b-bbe1-1209d3a739ac",
      "errorCode": 123456789,
      "details": [
        "not found"
      ],
      "remediation": "The remediation action to fix a Not Found error.",
      "errors": [],
      "links": [
        {
          "href": "...",
          "method": "...",
          "rel": "...",
          "uri": "..."
        }
      ]
    }
    

    Here is an example of an error response when the request could not be completed due to a conflict with an existing resource.

    {
      "httpStatusCode": 409,
      "version": 2,
      "id": "04840005-74d3-458b-bbe1-1209d3a739ac",
      "errorCode": 123456789,
      "details": [
        "conflict reason"
      ],
      "remediation": "The remediation action to fix a Conflict error.",
      "errors": [
        {
          "optional nested errors": "..."
        }
      ],
      "links": [
        {
          "href": "...",
          "method": "...",
          "rel": "...",
          "uri": "..."
        }
      ]
    }
    

    Here is an example of an error response when the request could not be fulfilled because of an unexpected server error.

    {
      "httpStatusCode": 500,
      "version": 2,
      "id": "04840005-74d3-458b-bbe1-1209d3a739ac",
      "errorCode": 123456789,
      "details": [
        "displayable details of server error"
      ],
      "remediation": "The remediation action to fix an Internal Server Error.",
      "errors": [
        {
          "optional nested errors": "..."
        }
      ],
      "links": [
        {
          "href": "...",
          "method": "...",
          "rel": "...",
          "uri": "..."
        }
      ]
    }
    
    Responses
    Status Meaning Description Schema
    202 Accepted The request has been accepted for processing, but the processing has not been completed. purgeJob
    400 Bad Request The request was invalid. errorResponse
    403 Forbidden The user did not have the necessary permissions. errorResponse
    404 Not Found No item exists at the requested path. errorResponse
    409 Conflict The request could not be completed due to a conflict with an existing resource. errorResponse
    500 Internal Server Error The request could not be fulfilled because of an unexpected server error. errorResponse
    Response Headers
    Status Header Type Format Description
    202 Content-Type string string The media type for the body of the request or response.

    Get a collection of purge jobs

    Code samples

    # You can also use wget
    curl -X GET http://mock-listData.apifirst.unx.sas.com/listData/lists/{listId}/purgeJobs \
      -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-listData.apifirst.unx.sas.com/listData/lists/{listId}/purgeJobs',
    {
      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-listData.apifirst.unx.sas.com/listData/lists/{listId}/purgeJobs', 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-listData.apifirst.unx.sas.com/listData/lists/{listId}/purgeJobs", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    

    GET /lists/{listId}/purgeJobs

    Returns a collection of purge jobs for a specific list. A purge job removes the list's contents.

    Parameters
    Name In Type Required Description
    start query integer false A zero-based offset of the first item to return. The default value is '0'.
    limit query integer false The maximum number of items to return. The default value is '20'.
    filter query string(filter-criteria) false The filter criteria for returned items. See Filtering in REST APIs.
    sortBy query string(sort-criteria) false A sort of the returned items. See Sorting in REST APIs.
    listId path string true A universally unique identifier for a purge job.

    Example responses

    Here is an example response to a request to get a collection of purge jobs.

    {
      "version": 2,
      "accept": "application/vnd.sas.listdata.purgejob+json",
      "count": 1,
      "start": 0,
      "limit": 10,
      "name": "purgeJobs",
      "items": [
        {
          "id": "purgeJobId",
          "state": "running",
          "...": "see Purge Job Schema"
        }
      ],
      "links": [
        {
          "href": "...",
          "method": "...",
          "rel": "...",
          "uri": "..."
        }
      ]
    }
    

    Here is an example response to a request to get a collection of import jobs.

    {
      "version": 2,
      "accept": "application/vnd.sas.listdata.importjob+json",
      "count": 1,
      "start": 0,
      "limit": 10,
      "name": "importJobs",
      "items": [
        {
          "id": "importJobId",
          "state": "running",
          "...": "see Import Job Schema"
        }
      ],
      "links": [
        {
          "href": "...",
          "method": "...",
          "rel": "...",
          "uri": "..."
        }
      ]
    }
    

    Here is an example of an error response when the request was invalid.

    {
      "httpStatusCode": 400,
      "version": 2,
      "id": "04840005-74d3-458b-bbe1-1209d3a739ac",
      "errorCode": 123456789,
      "details": [
        "bad request reason"
      ],
      "remediation": "The remediation action to fix a Bad Request error.",
      "errors": [
        {
          "optional nested errors": "..."
        }
      ],
      "links": [
        {
          "href": "...",
          "method": "...",
          "rel": "...",
          "uri": "..."
        }
      ]
    }
    

    Here is an example of an error response when the user did not have the necessary permissions.

    {
      "httpStatusCode": 403,
      "version": 2,
      "id": "04840005-74d3-458b-bbe1-1209d3a739ac",
      "errorCode": 123456789,
      "details": [
        "forbidden"
      ],
      "remediation": "The remediation action to fix a Forbidden error.",
      "errors": [],
      "links": [
        {
          "href": "...",
          "method": "...",
          "rel": "...",
          "uri": "..."
        }
      ]
    }
    

    Here is an example of an error response when no item exists at the requested path.

    {
      "httpStatusCode": 404,
      "version": 2,
      "id": "04840005-74d3-458b-bbe1-1209d3a739ac",
      "errorCode": 123456789,
      "details": [
        "not found"
      ],
      "remediation": "The remediation action to fix a Not Found error.",
      "errors": [],
      "links": [
        {
          "href": "...",
          "method": "...",
          "rel": "...",
          "uri": "..."
        }
      ]
    }
    

    Here is an example of an error response when the request could not be fulfilled because of an unexpected server error.

    {
      "httpStatusCode": 500,
      "version": 2,
      "id": "04840005-74d3-458b-bbe1-1209d3a739ac",
      "errorCode": 123456789,
      "details": [
        "displayable details of server error"
      ],
      "remediation": "The remediation action to fix an Internal Server Error.",
      "errors": [
        {
          "optional nested errors": "..."
        }
      ],
      "links": [
        {
          "href": "...",
          "method": "...",
          "rel": "...",
          "uri": "..."
        }
      ]
    }
    
    Responses
    Status Meaning Description Schema
    200 OK The request succeeded. resourceCollection
    400 Bad Request The request was invalid. errorResponse
    403 Forbidden The user did not have the necessary permissions. errorResponse
    404 Not Found No item exists at the requested path. errorResponse
    500 Internal Server Error The request could not be fulfilled because of an unexpected server error. errorResponse
    Response Headers
    Status Header Type Format Description
    200 Content-Type string string The media type for the body of the request or response.

    Get a purge job

    Code samples

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

    GET /lists/{listId}/purgeJobs/{jobId}

    Returns a purge job for a specific list. A purge job removes the list's contents.

    Parameters
    Name In Type Required Description
    listId path string true A universally unique identifier for a list.
    jobId path string true A universally unique identifier for a purge job.

    Example responses

    Here is an example of a response to a request to create a purge job.

    {
      "id": "b791e348-984e-439d-bff4-5b4163d897af",
      "version": 1,
      "state": "completed",
      "creationTimeStamp": "2022-05-31T14:31:57.000Z",
      "createdBy": "userA",
      "completedTimeStamp": "2022-05-31T14:32:57.000Z",
      "listId": "3659ea38-2618-4474-aeac-0bf6cfd3c322",
      "totalErrors": 1,
      "results": {
        "recordCount": 100
      },
      "errors": [
        {
          "message": "string",
          "id": "string",
          "errorCode": 0,
          "httpStatusCode": 0,
          "details": [
            "string"
          ],
          "remediation": "string",
          "version": 2
        }
      ],
      "links": [
        {
          "href": "...",
          "method": "...",
          "rel": "...",
          "uri": "..."
        }
      ]
    }
    
    {
      "id": "b791e348-984e-439d-bff4-5b4163d897af",
      "version": 1,
      "state": "completed",
      "creationTimeStamp": "2022-05-31T14:31:57.000Z",
      "createdBy": "userA",
      "completedTimeStamp": "2022-05-31T14:32:57.000Z",
      "listId": "3659ea38-2618-4474-aeac-0bf6cfd3c322",
      "totalErrors": 1,
      "results": {
        "recordCount": 100
      },
      "errors": [
        {
          "message": "string",
          "id": "string",
          "errorCode": 0,
          "httpStatusCode": 0,
          "details": [
            "string"
          ],
          "remediation": "string",
          "version": 2
        }
      ],
      "links": [
        {
          "href": "...",
          "method": "...",
          "rel": "...",
          "uri": "..."
        }
      ]
    }
    

    Here is an example of an error response when the request was invalid.

    {
      "httpStatusCode": 400,
      "version": 2,
      "id": "04840005-74d3-458b-bbe1-1209d3a739ac",
      "errorCode": 123456789,
      "details": [
        "bad request reason"
      ],
      "remediation": "The remediation action to fix a Bad Request error.",
      "errors": [
        {
          "optional nested errors": "..."
        }
      ],
      "links": [
        {
          "href": "...",
          "method": "...",
          "rel": "...",
          "uri": "..."
        }
      ]
    }
    

    Here is an example of an error response when the user did not have the necessary permissions.

    {
      "httpStatusCode": 403,
      "version": 2,
      "id": "04840005-74d3-458b-bbe1-1209d3a739ac",
      "errorCode": 123456789,
      "details": [
        "forbidden"
      ],
      "remediation": "The remediation action to fix a Forbidden error.",
      "errors": [],
      "links": [
        {
          "href": "...",
          "method": "...",
          "rel": "...",
          "uri": "..."
        }
      ]
    }
    

    Here is an example of an error response when no item exists at the requested path.

    {
      "httpStatusCode": 404,
      "version": 2,
      "id": "04840005-74d3-458b-bbe1-1209d3a739ac",
      "errorCode": 123456789,
      "details": [
        "not found"
      ],
      "remediation": "The remediation action to fix a Not Found error.",
      "errors": [],
      "links": [
        {
          "href": "...",
          "method": "...",
          "rel": "...",
          "uri": "..."
        }
      ]
    }
    

    Here is an example of an error response when the request could not be fulfilled because of an unexpected server error.

    {
      "httpStatusCode": 500,
      "version": 2,
      "id": "04840005-74d3-458b-bbe1-1209d3a739ac",
      "errorCode": 123456789,
      "details": [
        "displayable details of server error"
      ],
      "remediation": "The remediation action to fix an Internal Server Error.",
      "errors": [
        {
          "optional nested errors": "..."
        }
      ],
      "links": [
        {
          "href": "...",
          "method": "...",
          "rel": "...",
          "uri": "..."
        }
      ]
    }
    
    Responses
    Status Meaning Description Schema
    200 OK The request succeeded. purgeJob
    400 Bad Request The request was invalid. errorResponse
    403 Forbidden The user did not have the necessary permissions. errorResponse
    404 Not Found No item exists at the requested path. errorResponse
    500 Internal Server Error The request could not be fulfilled because of an unexpected server error. errorResponse
    Response Headers
    Status Header Type Format Description
    200 Content-Type string string The media type for the body of the request or response.

    Update List Content State

    These endpoints are associated with updating the deployed state of a list's rows.

    Update the state of a list's rows

    Code samples

    # You can also use wget
    curl -X PUT http://mock-listData.apifirst.unx.sas.com/listData/lists/{listId}/contents/state \
      -H 'Authorization: Bearer <access-token-goes-here>' \
      -H 'Content-Type: application/vnd.sas.collection+json' \
      -H 'Accept: application/vnd.sas.listdata.list+json'
    
    
    const inputBody = '{
      "state": "deployed",
      "expiry": 10000,
      "exactExpiry": false,
      "items": [
        {
          "userId": "58b2a1a2",
          "firstName": "Aron",
          "lastName": "Denesik",
          "salary": 745072
        },
        {
          "userId": "6e107010",
          "firstName": "Chery",
          "lastName": "Kunze",
          "salary": 935262
        },
        {
          "userId": "38c0e0c7",
          "firstName": "Letha",
          "lastName": "Goldner",
          "salary": 672002
        },
        {
          "userId": "4cef6486",
          "firstName": "Jeane",
          "lastName": "Kutch",
          "salary": 380766
        },
        {
          "userId": "61f7592f",
          "firstName": "Beth",
          "lastName": "West",
          "salary": 994209
        }
      ]
    }';
    const headers = {
      'Content-Type':'application/vnd.sas.collection+json',
      'Accept':'application/vnd.sas.listdata.list+json'
    };
    
    fetch('http://mock-listData.apifirst.unx.sas.com/listData/lists/{listId}/contents/state',
    {
      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.collection+json',
      'Accept': 'application/vnd.sas.listdata.list+json'
    }
    
    r = requests.put('http://mock-listData.apifirst.unx.sas.com/listData/lists/{listId}/contents/state', 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.listdata.list+json"},
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("PUT", "http://mock-listData.apifirst.unx.sas.com/listData/lists/{listId}/contents/state", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    

    PUT /lists/{listId}/contents/state

    Updates the state of a list's rows synchronously via a JSON request body.

    Optionally, you can update the expiry of the selected rows. When rows are deployed using this parameter, their expiries are also updated, even if the rows were already deployed.

    The expiry value of a row is represented as a UNIX timestamp, which is the number of seconds since the UNIX epoch (January 1, 1970).

    If the value for the 'exactExpiry' property is 'true', the value provided is taken to be a UNIX timestamp and is used directly. Otherwise, it is used as an offset, which is the number of seconds after now that the rows should expire.

    A request body to update the state of rows in a list must contain a collection of data record objects with keys that match the column definitions.

    The desired state (developing or deployed) must be specified in the body of the request.

    Body parameter

    Here is an example of a request to synchronously update the state of specific list rows.

    {
      "state": "deployed",
      "expiry": 10000,
      "exactExpiry": false,
      "items": [
        {
          "userId": "58b2a1a2",
          "firstName": "Aron",
          "lastName": "Denesik",
          "salary": 745072
        },
        {
          "userId": "6e107010",
          "firstName": "Chery",
          "lastName": "Kunze",
          "salary": 935262
        },
        {
          "userId": "38c0e0c7",
          "firstName": "Letha",
          "lastName": "Goldner",
          "salary": 672002
        },
        {
          "userId": "4cef6486",
          "firstName": "Jeane",
          "lastName": "Kutch",
          "salary": 380766
        },
        {
          "userId": "61f7592f",
          "firstName": "Beth",
          "lastName": "West",
          "salary": 994209
        }
      ]
    }
    
    Parameters
    Name In Type Required Description
    body body object false none
    » items body [object] false none
    listId path string true A universally unique identifier for a list.

    Example responses

    Here is an example of a response to a request to get a list.

    {
      "id": "3659ea38-2618-4474-aeac-0bf6cfd3c322",
      "version": 1,
      "creationTimeStamp": "2022-03-01T20:18:32Z",
      "modifiedTimeStamp": "2022-03-01T20:18:32Z",
      "createdBy": "appUser1",
      "modifiedBy": "appUser1",
      "name": "list-a",
      "description": "The A-list users",
      "state": "developing",
      "columns": [
        {
          "name": "userId",
          "dataType": "string",
          "position": 1,
          "isKey": true,
          "keyPosition": 1
        },
        {
          "name": "firstName",
          "dataType": "string",
          "position": 2,
          "isKey": false,
          "keyPosition": 0
        },
        {
          "name": "lastName",
          "dataType": "string",
          "position": 3,
          "isKey": false,
          "keyPosition": 0
        },
        {
          "name": "salary",
          "dataType": "number",
          "position": 4,
          "isKey": false,
          "keyPosition": 0,
          "dataMask": {
            "name": "MaskStart",
            "regex": ".(....$)|.",
            "replace": "*$1",
            "example": "****1234"
          }
        }
      ],
      "label": "corporate marketing",
      "links": [
        {
          "href": "...",
          "method": "...",
          "rel": "...",
          "uri": "..."
        }
      ]
    }
    
    {
      "id": "3659ea38-2618-4474-aeac-0bf6cfd3c322",
      "version": 1,
      "creationTimeStamp": "2022-03-01T20:18:32Z",
      "modifiedTimeStamp": "2022-03-01T20:18:32Z",
      "createdBy": "appUser1",
      "modifiedBy": "appUser1",
      "name": "list-a",
      "description": "The A-list users",
      "state": "developing",
      "columns": [
        {
          "name": "userId",
          "dataType": "string",
          "position": 1,
          "isKey": true,
          "keyPosition": 1
        },
        {
          "name": "firstName",
          "dataType": "string",
          "position": 2,
          "isKey": false,
          "keyPosition": 0
        },
        {
          "name": "lastName",
          "dataType": "string",
          "position": 3,
          "isKey": false,
          "keyPosition": 0
        },
        {
          "name": "salary",
          "dataType": "number",
          "position": 4,
          "isKey": false,
          "keyPosition": 0,
          "dataMask": {
            "name": "MaskStart",
            "regex": ".(....$)|.",
            "replace": "*$1",
            "example": "****1234"
          }
        }
      ],
      "label": "corporate marketing",
      "links": [
        {
          "href": "...",
          "method": "...",
          "rel": "...",
          "uri": "..."
        }
      ]
    }
    

    Here is an example of an error response when the request was invalid.

    {
      "httpStatusCode": 400,
      "version": 2,
      "id": "04840005-74d3-458b-bbe1-1209d3a739ac",
      "errorCode": 123456789,
      "details": [
        "bad request reason"
      ],
      "remediation": "The remediation action to fix a Bad Request error.",
      "errors": [
        {
          "optional nested errors": "..."
        }
      ],
      "links": [
        {
          "href": "...",
          "method": "...",
          "rel": "...",
          "uri": "..."
        }
      ]
    }
    

    Here is an example of an error response when the user did not have the necessary permissions.

    {
      "httpStatusCode": 403,
      "version": 2,
      "id": "04840005-74d3-458b-bbe1-1209d3a739ac",
      "errorCode": 123456789,
      "details": [
        "forbidden"
      ],
      "remediation": "The remediation action to fix a Forbidden error.",
      "errors": [],
      "links": [
        {
          "href": "...",
          "method": "...",
          "rel": "...",
          "uri": "..."
        }
      ]
    }
    

    Here is an example of an error response when no item exists at the requested path.

    {
      "httpStatusCode": 404,
      "version": 2,
      "id": "04840005-74d3-458b-bbe1-1209d3a739ac",
      "errorCode": 123456789,
      "details": [
        "not found"
      ],
      "remediation": "The remediation action to fix a Not Found error.",
      "errors": [],
      "links": [
        {
          "href": "...",
          "method": "...",
          "rel": "...",
          "uri": "..."
        }
      ]
    }
    

    Here is an example of an error response when the request could not be completed due to a conflict with an existing resource.

    {
      "httpStatusCode": 409,
      "version": 2,
      "id": "04840005-74d3-458b-bbe1-1209d3a739ac",
      "errorCode": 123456789,
      "details": [
        "conflict reason"
      ],
      "remediation": "The remediation action to fix a Conflict error.",
      "errors": [
        {
          "optional nested errors": "..."
        }
      ],
      "links": [
        {
          "href": "...",
          "method": "...",
          "rel": "...",
          "uri": "..."
        }
      ]
    }
    

    Here is an example of an error response when the request could not be fulfilled because of an unexpected server error.

    {
      "httpStatusCode": 500,
      "version": 2,
      "id": "04840005-74d3-458b-bbe1-1209d3a739ac",
      "errorCode": 123456789,
      "details": [
        "displayable details of server error"
      ],
      "remediation": "The remediation action to fix an Internal Server Error.",
      "errors": [
        {
          "optional nested errors": "..."
        }
      ],
      "links": [
        {
          "href": "...",
          "method": "...",
          "rel": "...",
          "uri": "..."
        }
      ]
    }
    
    Responses
    Status Meaning Description Schema
    200 OK The request succeeded. listResource
    400 Bad Request The request was invalid. errorResponse
    403 Forbidden The user did not have the necessary permissions. errorResponse
    404 Not Found No item exists at the requested path. errorResponse
    409 Conflict The request could not be completed due to a conflict with an existing resource. errorResponse
    500 Internal Server Error The request could not be fulfilled because of an unexpected server error. errorResponse
    Response Headers
    Status Header Type Format Description
    200 Content-Type string string The media type for the body of the request or response.
    200 Location string uri The URI of the list.
    200 ETag string An ETag in the format of W/"the-last-updated-timestamp-in-UNIX-nanosecond-time".

    Get a collection of update content state jobs

    Code samples

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

    GET /lists/{listId}/updateContentStateJobs

    Returns a collection of update content state jobs for a specific list. An update content state job updates the state for each row in a list.

    Parameters
    Name In Type Required Description
    start query integer false A zero-based offset of the first item to return. The default value is '0'.
    limit query integer false The maximum number of items to return. The default value is '20'.
    filter query string(filter-criteria) false The filter criteria for returned items. See Filtering in REST APIs.
    sortBy query string(sort-criteria) false A sort of the returned items. See Sorting in REST APIs.
    listId path string true A universally unique identifier for a purge job.

    Example responses

    Here is an example response to a request to get a collection of update content state jobs.

    {
      "version": 2,
      "accept": "application/vnd.sas.listdata.updatecontentstatejob+json",
      "count": 1,
      "start": 0,
      "limit": 10,
      "name": "updateContentStateJobs",
      "items": [
        {
          "id": "updateContentStateJobId",
          "state": "running",
          "...": "see Update Content State Job Schema"
        }
      ],
      "links": [
        {
          "href": "...",
          "method": "...",
          "rel": "...",
          "uri": "..."
        }
      ]
    }
    
    {
      "version": 2,
      "accept": "application/vnd.sas.listdata.updatecontentstatejob+json",
      "count": 1,
      "start": 0,
      "limit": 10,
      "name": "updateContentStateJobs",
      "items": [
        {
          "id": "updateContentStateJobId",
          "state": "running",
          "...": "see Update Content State Job Schema"
        }
      ],
      "links": [
        {
          "href": "...",
          "method": "...",
          "rel": "...",
          "uri": "..."
        }
      ]
    }
    

    Here is an example of an error response when the request was invalid.

    {
      "httpStatusCode": 400,
      "version": 2,
      "id": "04840005-74d3-458b-bbe1-1209d3a739ac",
      "errorCode": 123456789,
      "details": [
        "bad request reason"
      ],
      "remediation": "The remediation action to fix a Bad Request error.",
      "errors": [
        {
          "optional nested errors": "..."
        }
      ],
      "links": [
        {
          "href": "...",
          "method": "...",
          "rel": "...",
          "uri": "..."
        }
      ]
    }
    

    Here is an example of an error response when the user did not have the necessary permissions.

    {
      "httpStatusCode": 403,
      "version": 2,
      "id": "04840005-74d3-458b-bbe1-1209d3a739ac",
      "errorCode": 123456789,
      "details": [
        "forbidden"
      ],
      "remediation": "The remediation action to fix a Forbidden error.",
      "errors": [],
      "links": [
        {
          "href": "...",
          "method": "...",
          "rel": "...",
          "uri": "..."
        }
      ]
    }
    

    Here is an example of an error response when no item exists at the requested path.

    {
      "httpStatusCode": 404,
      "version": 2,
      "id": "04840005-74d3-458b-bbe1-1209d3a739ac",
      "errorCode": 123456789,
      "details": [
        "not found"
      ],
      "remediation": "The remediation action to fix a Not Found error.",
      "errors": [],
      "links": [
        {
          "href": "...",
          "method": "...",
          "rel": "...",
          "uri": "..."
        }
      ]
    }
    

    Here is an example of an error response when the request could not be fulfilled because of an unexpected server error.

    {
      "httpStatusCode": 500,
      "version": 2,
      "id": "04840005-74d3-458b-bbe1-1209d3a739ac",
      "errorCode": 123456789,
      "details": [
        "displayable details of server error"
      ],
      "remediation": "The remediation action to fix an Internal Server Error.",
      "errors": [
        {
          "optional nested errors": "..."
        }
      ],
      "links": [
        {
          "href": "...",
          "method": "...",
          "rel": "...",
          "uri": "..."
        }
      ]
    }
    
    Responses
    Status Meaning Description Schema
    200 OK The request succeeded. resourceCollection
    400 Bad Request The request was invalid. errorResponse
    403 Forbidden The user did not have the necessary permissions. errorResponse
    404 Not Found No item exists at the requested path. errorResponse
    500 Internal Server Error The request could not be fulfilled because of an unexpected server error. errorResponse
    Response Headers
    Status Header Type Format Description
    200 Content-Type string string The media type for the body of the request or response.

    Create an update content state job

    Code samples

    # You can also use wget
    curl -X POST http://mock-listData.apifirst.unx.sas.com/listData/lists/{listId}/updateContentStateJobs \
      -H 'Authorization: Bearer <access-token-goes-here>' \
      -H 'Content-Type: application/vnd.sas.listdata.updatecontentstatejob+json' \
      -H 'Accept: application/vnd.sas.listdata.updatecontentstatejob+json'
    
    
    const inputBody = '{
      "state": "deployed",
      "expiry": 10000,
      "exactExpiry": false
    }';
    const headers = {
      'Content-Type':'application/vnd.sas.listdata.updatecontentstatejob+json',
      'Accept':'application/vnd.sas.listdata.updatecontentstatejob+json'
    };
    
    fetch('http://mock-listData.apifirst.unx.sas.com/listData/lists/{listId}/updateContentStateJobs',
    {
      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.listdata.updatecontentstatejob+json',
      'Accept': 'application/vnd.sas.listdata.updatecontentstatejob+json'
    }
    
    r = requests.post('http://mock-listData.apifirst.unx.sas.com/listData/lists/{listId}/updateContentStateJobs', headers = headers)
    
    print(r.json())
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Content-Type": []string{"application/vnd.sas.listdata.updatecontentstatejob+json"},
            "Accept": []string{"application/vnd.sas.listdata.updatecontentstatejob+json"},
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("POST", "http://mock-listData.apifirst.unx.sas.com/listData/lists/{listId}/updateContentStateJobs", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    

    POST /lists/{listId}/updateContentStateJobs

    Updates the state for every row in a list.

    Optionally, you can update the expiry of the selected rows when they are being deployed, if they were previously in developing. If an expiry is listed but the action is to move to developing, no expiries are changed.

    The expiry value of a row is represented as a UNIX timestamp, which is the number of seconds since the UNIX epoch (January 1, 1970).

    If the value for the 'exactExpiry' property is 'true', the value provided is taken to be a UNIX timestamp and is used directly. Otherwise, it is used as an offset, which is the number of seconds after now that the rows should expire.

    You can create a new update content state job only if there are no other jobs running on that list.

    You cannot create an update content state job for an immutable list.

    You must specify in the request body whether the rows are to be moved to deployed or moved to developing.

    Body parameter

    Here is an example of a request to asynchronously update the state of list rows.

    {
      "state": "deployed",
      "expiry": 10000,
      "exactExpiry": false
    }
    
    Parameters
    Name In Type Required Description
    body body object false none
    » items body [object] false none
    listId path string true A universally unique identifier for a purge job.

    Example responses

    Here is an example of a response to a request to update the content state job.

    {
      "id": "b791e348-984e-439d-bff4-5b4163d897af",
      "version": 1,
      "state": "completed",
      "creationTimeStamp": "2022-05-31T14:31:57.000Z",
      "createdBy": "userA",
      "completedTimeStamp": "2022-05-31T14:32:57.000Z",
      "listId": "3659ea38-2618-4474-aeac-0bf6cfd3c322",
      "totalErrors": 1,
      "results": {
        "recordCount": 100
      },
      "errors": [
        {
          "message": "string",
          "id": "string",
          "errorCode": 0,
          "httpStatusCode": 0,
          "details": [
            "string"
          ],
          "remediation": "string",
          "version": 2
        }
      ],
      "links": [
        {
          "href": "...",
          "method": "...",
          "rel": "...",
          "uri": "..."
        }
      ]
    }
    
    {
      "id": "b791e348-984e-439d-bff4-5b4163d897af",
      "version": 1,
      "state": "completed",
      "creationTimeStamp": "2022-05-31T14:31:57.000Z",
      "createdBy": "userA",
      "completedTimeStamp": "2022-05-31T14:32:57.000Z",
      "listId": "3659ea38-2618-4474-aeac-0bf6cfd3c322",
      "totalErrors": 1,
      "results": {
        "recordCount": 100
      },
      "errors": [
        {
          "message": "string",
          "id": "string",
          "errorCode": 0,
          "httpStatusCode": 0,
          "details": [
            "string"
          ],
          "remediation": "string",
          "version": 2
        }
      ],
      "links": [
        {
          "href": "...",
          "method": "...",
          "rel": "...",
          "uri": "..."
        }
      ]
    }
    

    Here is an example of an error response when the request was invalid.

    {
      "httpStatusCode": 400,
      "version": 2,
      "id": "04840005-74d3-458b-bbe1-1209d3a739ac",
      "errorCode": 123456789,
      "details": [
        "bad request reason"
      ],
      "remediation": "The remediation action to fix a Bad Request error.",
      "errors": [
        {
          "optional nested errors": "..."
        }
      ],
      "links": [
        {
          "href": "...",
          "method": "...",
          "rel": "...",
          "uri": "..."
        }
      ]
    }
    

    Here is an example of an error response when the user did not have the necessary permissions.

    {
      "httpStatusCode": 403,
      "version": 2,
      "id": "04840005-74d3-458b-bbe1-1209d3a739ac",
      "errorCode": 123456789,
      "details": [
        "forbidden"
      ],
      "remediation": "The remediation action to fix a Forbidden error.",
      "errors": [],
      "links": [
        {
          "href": "...",
          "method": "...",
          "rel": "...",
          "uri": "..."
        }
      ]
    }
    

    Here is an example of an error response when no item exists at the requested path.

    {
      "httpStatusCode": 404,
      "version": 2,
      "id": "04840005-74d3-458b-bbe1-1209d3a739ac",
      "errorCode": 123456789,
      "details": [
        "not found"
      ],
      "remediation": "The remediation action to fix a Not Found error.",
      "errors": [],
      "links": [
        {
          "href": "...",
          "method": "...",
          "rel": "...",
          "uri": "..."
        }
      ]
    }
    

    Here is an example of an error response when the request could not be completed due to a conflict with an existing resource.

    {
      "httpStatusCode": 409,
      "version": 2,
      "id": "04840005-74d3-458b-bbe1-1209d3a739ac",
      "errorCode": 123456789,
      "details": [
        "conflict reason"
      ],
      "remediation": "The remediation action to fix a Conflict error.",
      "errors": [
        {
          "optional nested errors": "..."
        }
      ],
      "links": [
        {
          "href": "...",
          "method": "...",
          "rel": "...",
          "uri": "..."
        }
      ]
    }
    

    Here is an example of an error response when the request could not be fulfilled because of an unexpected server error.

    {
      "httpStatusCode": 500,
      "version": 2,
      "id": "04840005-74d3-458b-bbe1-1209d3a739ac",
      "errorCode": 123456789,
      "details": [
        "displayable details of server error"
      ],
      "remediation": "The remediation action to fix an Internal Server Error.",
      "errors": [
        {
          "optional nested errors": "..."
        }
      ],
      "links": [
        {
          "href": "...",
          "method": "...",
          "rel": "...",
          "uri": "..."
        }
      ]
    }
    
    Responses
    Status Meaning Description Schema
    202 Accepted The request has been accepted for processing, but the processing has not been completed. updateContentStateJob
    400 Bad Request The request was invalid. errorResponse
    403 Forbidden The user did not have the necessary permissions. errorResponse
    404 Not Found No item exists at the requested path. errorResponse
    409 Conflict The request could not be completed due to a conflict with an existing resource. errorResponse
    500 Internal Server Error The request could not be fulfilled because of an unexpected server error. errorResponse
    Response Headers
    Status Header Type Format Description
    202 Content-Type string string The media type for the body of the request or response.

    Get an update content state job

    Code samples

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

    GET /lists/{listId}/updateContentStateJobs/{jobId}

    Returns an update content state job for a specific list. An update content state job updates the state of every row in a list.

    Parameters
    Name In Type Required Description
    listId path string true A universally unique identifier for a list.
    jobId path string true A universally unique identifier for an update content state job.

    Example responses

    Here is an example of a response to a request to update the content state job.

    {
      "id": "b791e348-984e-439d-bff4-5b4163d897af",
      "version": 1,
      "state": "completed",
      "creationTimeStamp": "2022-05-31T14:31:57.000Z",
      "createdBy": "userA",
      "completedTimeStamp": "2022-05-31T14:32:57.000Z",
      "listId": "3659ea38-2618-4474-aeac-0bf6cfd3c322",
      "totalErrors": 1,
      "results": {
        "recordCount": 100
      },
      "errors": [
        {
          "message": "string",
          "id": "string",
          "errorCode": 0,
          "httpStatusCode": 0,
          "details": [
            "string"
          ],
          "remediation": "string",
          "version": 2
        }
      ],
      "links": [
        {
          "href": "...",
          "method": "...",
          "rel": "...",
          "uri": "..."
        }
      ]
    }
    
    {
      "id": "b791e348-984e-439d-bff4-5b4163d897af",
      "version": 1,
      "state": "completed",
      "creationTimeStamp": "2022-05-31T14:31:57.000Z",
      "createdBy": "userA",
      "completedTimeStamp": "2022-05-31T14:32:57.000Z",
      "listId": "3659ea38-2618-4474-aeac-0bf6cfd3c322",
      "totalErrors": 1,
      "results": {
        "recordCount": 100
      },
      "errors": [
        {
          "message": "string",
          "id": "string",
          "errorCode": 0,
          "httpStatusCode": 0,
          "details": [
            "string"
          ],
          "remediation": "string",
          "version": 2
        }
      ],
      "links": [
        {
          "href": "...",
          "method": "...",
          "rel": "...",
          "uri": "..."
        }
      ]
    }
    

    Here is an example of an error response when the request was invalid.

    {
      "httpStatusCode": 400,
      "version": 2,
      "id": "04840005-74d3-458b-bbe1-1209d3a739ac",
      "errorCode": 123456789,
      "details": [
        "bad request reason"
      ],
      "remediation": "The remediation action to fix a Bad Request error.",
      "errors": [
        {
          "optional nested errors": "..."
        }
      ],
      "links": [
        {
          "href": "...",
          "method": "...",
          "rel": "...",
          "uri": "..."
        }
      ]
    }
    

    Here is an example of an error response when the user did not have the necessary permissions.

    {
      "httpStatusCode": 403,
      "version": 2,
      "id": "04840005-74d3-458b-bbe1-1209d3a739ac",
      "errorCode": 123456789,
      "details": [
        "forbidden"
      ],
      "remediation": "The remediation action to fix a Forbidden error.",
      "errors": [],
      "links": [
        {
          "href": "...",
          "method": "...",
          "rel": "...",
          "uri": "..."
        }
      ]
    }
    

    Here is an example of an error response when no item exists at the requested path.

    {
      "httpStatusCode": 404,
      "version": 2,
      "id": "04840005-74d3-458b-bbe1-1209d3a739ac",
      "errorCode": 123456789,
      "details": [
        "not found"
      ],
      "remediation": "The remediation action to fix a Not Found error.",
      "errors": [],
      "links": [
        {
          "href": "...",
          "method": "...",
          "rel": "...",
          "uri": "..."
        }
      ]
    }
    

    Here is an example of an error response when the request could not be fulfilled because of an unexpected server error.

    {
      "httpStatusCode": 500,
      "version": 2,
      "id": "04840005-74d3-458b-bbe1-1209d3a739ac",
      "errorCode": 123456789,
      "details": [
        "displayable details of server error"
      ],
      "remediation": "The remediation action to fix an Internal Server Error.",
      "errors": [
        {
          "optional nested errors": "..."
        }
      ],
      "links": [
        {
          "href": "...",
          "method": "...",
          "rel": "...",
          "uri": "..."
        }
      ]
    }
    
    Responses
    Status Meaning Description Schema
    200 OK The request succeeded. updateContentStateJob
    400 Bad Request The request was invalid. errorResponse
    403 Forbidden The user did not have the necessary permissions. errorResponse
    404 Not Found No item exists at the requested path. errorResponse
    500 Internal Server Error The request could not be fulfilled because of an unexpected server error. errorResponse
    Response Headers
    Status Header Type Format Description
    200 Content-Type string string The media type for the body of the request or response.

    Schemas

    resourceCollection

    {
      "name": "string",
      "start": 0,
      "limit": 10,
      "count": 2,
      "accept": "application/json",
      "items": [
        {
          "x": "1",
          "y": "1"
        },
        {
          "x": "2",
          "y": "2"
        }
      ],
      "links": [
        {
          "method": "string",
          "rel": "string",
          "uri": "string",
          "href": "string",
          "title": "string",
          "type": "string",
          "itemType": "string",
          "responseType": "string",
          "responseItemType": "string"
        }
      ],
      "version": 0
    }
    
    

    Resource Collection

    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 can be requested for the collection.
    count integer(int64) false none If populated, the number of items in the collection.
    accept string false none A space-delimited list of media types from which an Accept header might be constructed.
    items [any] false none The items on this page of the collection. Each item in this list is of a type that is listed as acceptable.
    » object object false none A resource entry.
    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.

    listResourceVersionOne

    {
      "id": "3659ea38-2618-4474-aeac-0bf6cfd3c322",
      "version": 1,
      "name": "list-a",
      "state": "developing",
      "description": "",
      "createdBy": "userA",
      "modifiedBy": "user2",
      "creationTimeStamp": "2022-02-25T20:35:44Z",
      "modifiedTimeStamp": "2022-02-25T20:35:44Z",
      "isImmutable": false,
      "columns": [
        {
          "id": "uuid",
          "name": "userId",
          "dataType": "string",
          "isKey": true,
          "keyPosition": 1,
          "position": 1,
          "dataMask": {
            "name": "Mask Start",
            "regex": ".(....$)|.",
            "replace": "*$1",
            "example": "****1234"
          }
        }
      ],
      "defaultExpiry": 10000,
      "label": "string",
      "links": [
        {
          "method": "string",
          "rel": "string",
          "uri": "string",
          "href": "string",
          "title": "string",
          "type": "string",
          "itemType": "string",
          "responseType": "string",
          "responseItemType": "string"
        }
      ]
    }
    
    

    List Properties Version One

    Properties
    Name Type Required Restrictions Description
    id string false none A unique identifier for the list.
    version integer false none The version number for this media type's schema.
    name string true none The name of the list. The list name is not case-sensitive, must be unique within the system, and cannot be updated once it is created.
    state string true none An indicator for whether the list can be used by deployed artifacts. A list can be either deployed or developing. Only developing lists can be deleted.
    description string¦null false none A textual description of the list.
    createdBy string false none The name of the user that created the list.
    modifiedBy string false none The name of the user that made the last update to the list.
    creationTimeStamp string false none A timestamp for when the list was created, in the format of YYYY-MM-DDThh:mm:ss.sssZ.
    modifiedTimeStamp string false none A timestamp for when the list was last modified, in the format of YYYY-MM-DDThh:mm:ss.sssZ.
    isImmutable boolean false none An indicator for whether the list's contents can be altered after it is imported.
    columns [columnInfo] true none Columns are a collection of 'ColumnInfo' objects that define the structure of the list's content. 'ColumnInfo' objects map
    properties such as name, position, and data type to the imported source data (for example, a CSV file). Columns also mark which values are used to construct lookup keys. Key properties are flagged as such and are assigned a position for where their values are placed
    in the lookup key.

    The number of columns in the data source's header must match the number of columns (that is, the number of 'ColumnInfo' objects) that are defined for a list. The value for the 'ColumnInfo' position's object must be a sequential set of positions such as 1..N,
    where N is the number of columns in the header. For example, if the input data has a 3-column header, there must be a 'ColumnInfo' object for each position 1, 2, and 3.
    defaultExpiry number false none The value that sets the expiration of newly added rows.
    label string¦null false none A short textual label, which is appropriate for client UIs.
    links [link] false none The reference links that apply to this object.

    listResource

    {
      "id": "3659ea38-2618-4474-aeac-0bf6cfd3c322",
      "version": 2,
      "name": "list-a",
      "state": "developing",
      "description": "",
      "createdBy": "userA",
      "modifiedBy": "user2",
      "creationTimeStamp": "2022-02-25T20:35:44Z",
      "modifiedTimeStamp": "2022-02-25T20:35:44Z",
      "isImmutable": false,
      "columns": [
        {
          "id": "uuid",
          "name": "userId",
          "dataType": "string",
          "isKey": true,
          "keyPosition": 1,
          "position": 1,
          "dataMask": {
            "name": "Mask Start",
            "regex": ".(....$)|.",
            "replace": "*$1",
            "example": "****1234"
          }
        }
      ],
      "defaultExpiry": 10000,
      "label": "string",
      "links": [
        {
          "method": "string",
          "rel": "string",
          "uri": "string",
          "href": "string",
          "title": "string",
          "type": "string",
          "itemType": "string",
          "responseType": "string",
          "responseItemType": "string"
        }
      ]
    }
    
    

    List Properties

    Properties
    Name Type Required Restrictions Description
    id string false none A unique identifier for the list.
    version integer false none The version number for this media type's schema.
    name string true none The name of the list. The list name is not case-sensitive, must be unique within the system, and cannot be updated once it is created.
    state string true none An indicator for whether the list can be used by deployed artifacts. A list can be either deployed or developing. Only lists in developing can be deleted.
    description string¦null false none A textual description of the list.
    createdBy string false none The name of the user that created the list.
    modifiedBy string false none The name of the user that made the last update to the list.
    creationTimeStamp string false none A timestamp for when the list was created, in the format of YYYY-MM-DDThh:mm:ss.sssZ.
    modifiedTimeStamp string false none A timestamp for when the list was last modified, in the format of YYYY-MM-DDThh:mm:ss.sssZ.
    isImmutable boolean false none An indicator for whether the list's contents can be altered after it is imported.
    columns [columnInfo] true none Columns are a collection of 'ColumnInfo' objects that define the structure of the list's content. 'ColumnInfo' objects map
    properties such as name, position, and data type to the imported source data (for example, a CSV file). Columns also mark which values are used to construct lookup keys. Key properties are flagged as such and are assigned a position for where their values are placed
    in the lookup key.

    The number of columns in the data source's header must match the number of columns (that is, the number of 'ColumnInfo' objects) that are defined for a list. The value for the 'ColumnInfo' position's object must be a sequential set of positions such as 1..N,
    where N is the number of columns in the header. For example, if the input data has a 3-column header, there must be a 'ColumnInfo' object for each position 1, 2, and 3.
    defaultExpiry number false none The value that sets the expiration of newly added rows.
    label string¦null false none A short textual label, which is appropriate for client UIs.
    links [link] false none The reference links that apply to this object.

    listResourceCollection

    {
      "items": [
        {
          "x": "1",
          "y": "1"
        },
        {
          "x": "2",
          "y": "2"
        }
      ],
      "name": "string",
      "start": 0,
      "limit": 10,
      "count": 2,
      "accept": "application/json",
      "links": [
        {
          "method": "string",
          "rel": "string",
          "uri": "string",
          "href": "string",
          "title": "string",
          "type": "string",
          "itemType": "string",
          "responseType": "string",
          "responseItemType": "string"
        }
      ],
      "version": 0
    }
    
    

    List Resource Collection

    Properties
    Name Type Required Restrictions Description
    List Resource Collection resourceCollection false none This schema describes a collection of list resources.
    items [listResource] false none The items on this page of the collection. Each item in this list is of a type that is listed as acceptable.

    listDetails

    {
      "id": "3659ea38-2618-4474-aeac-0bf6cfd3c322",
      "version": 1,
      "name": "list-a",
      "description": "",
      "parentFolder": "myFolder",
      "location": "/public/myFolder",
      "keyPrefix": "SAS|0|0|LIST|myList",
      "links": [
        {
          "method": "string",
          "rel": "string",
          "uri": "string",
          "href": "string",
          "title": "string",
          "type": "string",
          "itemType": "string",
          "responseType": "string",
          "responseItemType": "string"
        }
      ]
    }
    
    

    List Details

    Properties
    Name Type Required Restrictions Description
    id string false none A unique identifier for the list.
    version integer false none The version number for this media type's schema.
    name string false none The name of the list. The list name is not case-sensitive, must be unique within the system, and cannot be updated once it is created.
    description string¦null false none A textual description of the list.
    parentFolder string false none The folder in which the list is stored.
    location string false none The full path to the folder in which the list is stored.
    keyPrefix string false none The Redis key prefix that is used to access elements of the list.
    links [link] false none The reference links that apply to this object.

    listConsumer

    {
      "relationshipId": "f59529c3-be3a-4f9e-9a23-d4443a30d3cf",
      "relationshipUri": "/catalog/instances/f59529c3-be3a-4f9e-9a23-d4443a30d3cf",
      "relationshipDefinitionId": "d56002e5-fd2e-437f-a45e-a1bf75e4a913",
      "consumerId": "3ce976dc-9e13-454f-a7e0-0505f2faaf0f",
      "consumerUri": "/catalog/instances/3ce976dc-9e13-454f-a7e0-0505f2faaf0f"
    }
    
    

    List Consumers

    Properties
    Name Type Required Restrictions Description
    relationshipId string false none The relationship instance ID that is managed by the Catalog service.
    relationshipUri string false none The URI to the relationship that is managed by the Catalog service.
    relationshipDefinitionId string false none The ID of the Catalog service definition of the relationship.
    consumerId string false none The ID of the consuming entity.
    consumerUri string false none The URI to a Catalog service instance of the consuming entity.

    listDetailsWithConsumers

    {
      "consumers": [
        {
          "relationshipId": "f59529c3-be3a-4f9e-9a23-d4443a30d3cf",
          "relationshipUri": "/catalog/instances/f59529c3-be3a-4f9e-9a23-d4443a30d3cf",
          "relationshipDefinitionId": "d56002e5-fd2e-437f-a45e-a1bf75e4a913",
          "consumerId": "3ce976dc-9e13-454f-a7e0-0505f2faaf0f",
          "consumerUri": "/catalog/instances/3ce976dc-9e13-454f-a7e0-0505f2faaf0f"
        }
      ],
      "id": "3659ea38-2618-4474-aeac-0bf6cfd3c322",
      "version": 1,
      "name": "list-a",
      "description": "",
      "parentFolder": "myFolder",
      "location": "/public/myFolder",
      "keyPrefix": "SAS|0|0|LIST|myList",
      "links": [
        {
          "method": "string",
          "rel": "string",
          "uri": "string",
          "href": "string",
          "title": "string",
          "type": "string",
          "itemType": "string",
          "responseType": "string",
          "responseItemType": "string"
        }
      ]
    }
    
    

    List Details with Consumers

    Properties
    Name Type Required Restrictions Description
    List Details with Consumers listDetails false none This schema defines the list details with consumers
    consumers [listConsumer] false none [This schema defines the list consumer details.]

    listConsumerList

    {
      "consumerCount": 10,
      "consumers": [
        {
          "relationshipId": "f59529c3-be3a-4f9e-9a23-d4443a30d3cf",
          "relationshipUri": "/catalog/instances/f59529c3-be3a-4f9e-9a23-d4443a30d3cf",
          "relationshipDefinitionId": "d56002e5-fd2e-437f-a45e-a1bf75e4a913",
          "consumerId": "3ce976dc-9e13-454f-a7e0-0505f2faaf0f",
          "consumerUri": "/catalog/instances/3ce976dc-9e13-454f-a7e0-0505f2faaf0f"
        }
      ]
    }
    
    

    List Resource Consumer List

    Properties
    Name Type Required Restrictions Description
    consumerCount integer false none The number of consumers.
    consumers [listConsumer] false none A list of list resource consumers.

    summary

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

    Summary Details

    Properties
    Name Type Required Restrictions Description
    creationTimeStamp string(date-time) false none none
    createdBy string false none none
    modifiedTimeStamp string(date-time) false none none
    modifiedBy string false none none
    version string false none none
    id string false none none
    name string false none none
    description string false none none
    type string false none none
    typeDefName string false none none
    iconUri string false none none
    links [link] false none [This schema defines a link to a related operation or resource.]

    transferObject

    null
    
    

    Transfer Object

    Properties
    Name Type Required Restrictions Description
    Transfer Object any false none This schema defines the transfer object schema that is required by the Transfer service.

    columnInfo

    {
      "id": "uuid",
      "name": "userId",
      "dataType": "string",
      "isKey": true,
      "keyPosition": 1,
      "position": 1,
      "dataMask": {
        "name": "Mask Start",
        "regex": ".(....$)|.",
        "replace": "*$1",
        "example": "****1234"
      }
    }
    
    

    Column Information

    Properties
    Name Type Required Restrictions Description
    id string false none A unique identifier for a column.
    name string true none The name of the column in the input data files header.
    dataType string true none "The type of input data for the column. Valid values are 'number', 'string', 'datetime', 'currency' or 'currency_code'.""
    isKey boolean false none An indicator that the column's value is used to create the key value for the key-value data store.
    keyPosition integer false none A 1-based position index that specifies where a column's value is located in the record's key value. A '0' means not a key. Only positive values are valid. For all the key columns, the key positions must be contiguous and without duplicates. If 'isKey' is set to 'false', then 'keyPosition' is automatically set to '0' and user input for this value is ignored.
    position integer true none The location of the column values in the delimited entry from the input data. Location is used when importing, storing, and retrieving values from the input data and the key-value data store. For the header 'userId,name,salary', the position of 'userId' is '1'.
    dataMask dataMask false none This schema defines the data mask for a column's value when retrieving a list's contents.
    Enumerated Values
    Property Value
    dataType number
    dataType string
    dataType datetime
    dataType currency
    dataType currency_code

    dataMask

    {
      "name": "Mask Start",
      "regex": ".(....$)|.",
      "replace": "*$1",
      "example": "****1234"
    }
    
    

    Data Mask

    Properties
    Name Type Required Restrictions Description
    name string true none The name of the data-masking action for previewing the list data.
    regex string true none The regular expression for the data mask where members of the group are displayed.
    replace string true none The replace expression for the groups that result from the 'regex' property. Only characters in 'regex' groups (for example, $1) are displayed. All other characters are masked.
    example string true none An example of the expected output of a redacted record.

    importJob

    {
      "id": "b791e348-984e-439d-bff4-5b4163d897af",
      "version": 1,
      "state": "running",
      "fileName": "data.csv",
      "sha256Sum": "69091e2c774812266d577dc83472a2ab81687efde1e276feb0aaa77d637df11c",
      "creationTimeStamp": "2022-05-31T14:31:57.000Z",
      "createdBy": "userA",
      "completedTimeStamp": "2022-05-31T14:31:57.000Z",
      "listId": "3659ea38-2618-4474-aeac-0bf6cfd3c322",
      "totalErrors": 1001,
      "results": {
        "recordCount": 100
      },
      "errors": [
        {
          "message": "string",
          "id": "string",
          "errorCode": 0,
          "httpStatusCode": 0,
          "details": [
            "string"
          ],
          "remediation": "string",
          "version": 2
        }
      ],
      "links": [
        {
          "method": "string",
          "rel": "string",
          "uri": "string",
          "href": "string",
          "title": "string",
          "type": "string",
          "itemType": "string",
          "responseType": "string",
          "responseItemType": "string"
        }
      ]
    }
    
    

    Import Job

    Properties
    Name Type Required Restrictions Description
    id string false none A universally unique identifier for an import job.
    version integer false none The version number for this media type's schema.
    state string false none The job's state. The state can be either 'running', 'completed', or 'failed'.
    fileName string false none The name of the file that contains the records to import.
    sha256Sum string false none The SHA256 hash of the file contents that is used to import the records.
    creationTimeStamp string false none A timestamp for when the job was created, in the format of YYYY-MM-DDThh:mm:ss.sssZ.
    createdBy string false none The ID of the user (the ID of the user object) who created the import job.
    completedTimeStamp string false none A timestamp for when the job was last modified, in the format of YYYY-MM-DDThh:mm:ss.sssZ.
    listId string false none The unique identifier of the list for which the import job was created.
    totalErrors integer false none The total number of errors that occurred during the import job's validation process. Descriptive error objects are returned in the 'errors' array. However, there is a threshold to the number of error objects that are returned.
    results object false none The result that is shown only when a job completes.
    » recordCount integer false none The number of records that are imported as part of the import job.
    errors [errorLeafNodeResponse] false none For a job that fails, an array of error types that occurred during validation. There is a threshold to the number of errors that are returned.
    links [link] false none The link relations that apply to the job.

    listDataSet

    {
      "listId": "3659ea38-2618-4474-aeac-0bf6cfd3c322",
      "name": "list-a",
      "version": 1,
      "createdBy": "userA",
      "creationTimeStamp": "2022-02-25T20:35:44Z",
      "modifiedBy": "userA",
      "modifiedTimeStamp": "2022-02-25T20:35:44Z",
      "columnCount": 0,
      "columns": [
        {
          "name": "userId",
          "dataType": "string",
          "position": 1,
          "isKey": true,
          "keyPosition": 1
        },
        {
          "name": "firstName",
          "dataType": "string",
          "position": 2,
          "isKey": false,
          "keyPosition": 0
        },
        {
          "name": "lastName",
          "dataType": "string",
          "position": 3,
          "isKey": false,
          "keyPosition": 0
        },
        {
          "name": "salary",
          "datatype": "number",
          "position": 4,
          "isKey": false,
          "keyPosition": 0,
          "dataMask": {
            "name": "hide-all",
            "regex": ".",
            "replace": "*",
            "example": "*****"
          }
        }
      ],
      "rowCount": 3,
      "rows": [
        [
          "58b2a1a2",
          "Aron",
          "Denesik",
          745072
        ],
        [
          "6e107010",
          "Chery",
          "Kunze",
          935262
        ],
        [
          "38c0e0c7",
          "Letha",
          "Goldner",
          672002
        ]
      ]
    }
    
    

    List Data Set

    Properties
    Name Type Required Restrictions Description
    listId string false none A universally unique identifier for a list.
    name string false none The name of the collection.
    version integer false none The version number for this media type's schema.
    createdBy string false none The user that created the list.
    creationTimeStamp string false none A timestamp for when the list was created, in the format of YYYY-MM-DDThh:mm:ss.sssZ.
    modifiedBy string false none The user that made the last update to the list.
    modifiedTimeStamp string false none A timestamp for when the list was last updated, in the format of YYYY-MM-DDThh:mm:ss.sssZ.
    columnCount integer false none The number of columns in the data.
    columns [object] false none The metadata about the columns of the data.
    » name string false none The name of the column in the input data file's header.
    » dataType string false none The type of input data for the column. Valid values are 'number', 'string', 'datetime', 'currency' or 'currency_code'."
    » position integer false none The location of the column values in the delimited entry from the input data. Location is used when you import, store, and retrieve values from the input data and the key-value data store. For the header, 'userId,name,salary', the position of 'userId' is '1'.
    » isKey boolean false none An indicator to use the column's value to create the key value for the key-value data store.
    » keyPosition integer false none A 1-based position index that specifies where a column's value is located in the record's key value. A '0' means not a key. Only positive values are valid. For all the key columns, the key positions must be contiguous and without duplicates. If 'isKey' is set to 'false', then 'keyPosition' is automatically set to '0' and user input for this value is ignored.
    » dataMask object false none A restriction or redaction on the presentation of a column's value when you retrieve a list's contents. See the DataMask Schema for more information.
    »» name string false none none
    »» regex string false none none
    »» replace string false none none
    »» example string false none none
    rowCount integer false none The total number of rows in the data.
    rows array false none A collection of objects that contains arrays of heterogeneous data from the list.
    Enumerated Values
    Property Value
    dataType number
    dataType string
    dataType datetime
    dataType currency
    dataType currency_code

    listDataSetDetailsVersionOne

    {
      "name": "string",
      "start": 0,
      "limit": 10,
      "count": 2,
      "accept": "application/json",
      "items": [
        {
          "deployed": "deployed",
          "expiry": "1685974424",
          "values": {
            "x": "1",
            "y": "1"
          }
        },
        {
          "deployed": "developing",
          "expiry": "1685974424",
          "values": {
            "x": "2",
            "y": "2"
          }
        }
      ],
      "links": [
        {
          "method": "string",
          "rel": "string",
          "uri": "string",
          "href": "string",
          "title": "string",
          "type": "string",
          "itemType": "string",
          "responseType": "string",
          "responseItemType": "string"
        }
      ],
      "version": 0
    }
    
    

    List Data Set Details Version One

    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 can be requested for the collection.
    count integer(int64) false none If populated, the number of items in the collection.
    accept string false none A space-delimited list of media types from which an Accept header might be constructed.
    items [any] false none The items on this page of the collection. Each item in this list is of a type that is listed as acceptable.
    » object object false none A resource entry.
    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 1.

    listDataSetDetails

    {
      "name": "string",
      "start": 0,
      "limit": 10,
      "count": 2,
      "accept": "application/json",
      "items": [
        {
          "state": "deployed",
          "expiry": "1685974424",
          "values": {
            "x": "1",
            "y": "1"
          }
        },
        {
          "state": "developing",
          "expiry": "1685974424",
          "values": {
            "x": "2",
            "y": "2"
          }
        }
      ],
      "links": [
        {
          "method": "string",
          "rel": "string",
          "uri": "string",
          "href": "string",
          "title": "string",
          "type": "string",
          "itemType": "string",
          "responseType": "string",
          "responseItemType": "string"
        }
      ],
      "version": 0
    }
    
    

    List Data Set Details

    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 can be requested for the collection.
    count integer(int64) false none If populated, the number of items in the collection.
    accept string false none A space-delimited list of media types from which an Accept header might be constructed.
    items [any] false none The items on this page of the collection. Each item in this list is of a type that is listed as acceptable.
    » object object false none A resource entry.
    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.

    purgeJob

    {
      "id": "c796b3cd301e",
      "version": 1,
      "state": "running",
      "listId": "3659ea38-2618-4474-aeac-0bf6cfd3c322",
      "creationTimeStamp": "2022-05-31T14:31:57.000Z",
      "createdBy": "userA",
      "completedTimeStamp": "2022-05-31T14:31:57.000Z",
      "results": {
        "recordCount": 100
      },
      "errors": [
        {
          "message": "string",
          "id": "string",
          "errorCode": 0,
          "httpStatusCode": 0,
          "details": [
            "string"
          ],
          "remediation": "string",
          "version": 2
        }
      ],
      "links": [
        {
          "method": "string",
          "rel": "string",
          "uri": "string",
          "href": "string",
          "title": "string",
          "type": "string",
          "itemType": "string",
          "responseType": "string",
          "responseItemType": "string"
        }
      ]
    }
    
    

    Purge Job

    Properties
    Name Type Required Restrictions Description
    id string false none A universally unique identifier for a purge job.
    version integer false none The version number for this media type's schema.
    state string false none The job's state. Values are 'running','completed', and 'failed'.
    listId string false none The unique identifier of the list for which the purge job was created.
    creationTimeStamp string false none A timestamp for when the job was created, in the format of YYYY-MM-DDThh:mm:ss.sssZ.
    createdBy string false none The ID of the user (the ID of the user object) who created the job.
    completedTimeStamp string false none A timestamp for when the job was completed, in the format of YYYY-MM-DDThh:mm:ss.sssZ.
    results object false none none
    » recordCount integer false none The number of records that are removed as part of the job.
    errors [errorLeafNodeResponse] false none A description of the error condition for a failed job.
    links [link] false none The links that apply to the error.

    updateContentStateJob

    {
      "id": "c796b3cd301e",
      "version": 1,
      "state": "running",
      "listId": "3659ea38-2618-4474-aeac-0bf6cfd3c322",
      "creationTimeStamp": "2022-05-31T14:31:57.000Z",
      "createdBy": "userA",
      "completedTimeStamp": "2022-05-31T14:31:57.000Z",
      "results": {
        "recordCount": 100
      },
      "errors": [
        {
          "message": "string",
          "id": "string",
          "errorCode": 0,
          "httpStatusCode": 0,
          "details": [
            "string"
          ],
          "remediation": "string",
          "version": 2
        }
      ],
      "links": [
        {
          "method": "string",
          "rel": "string",
          "uri": "string",
          "href": "string",
          "title": "string",
          "type": "string",
          "itemType": "string",
          "responseType": "string",
          "responseItemType": "string"
        }
      ]
    }
    
    

    Update Content State Job

    Properties
    Name Type Required Restrictions Description
    id string false none A universally unique identifier for an update content state job.
    version integer false none The version number for this media type's schema.
    state string false none The job's state. Values are 'running','completed', and 'failed'.
    listId string false none The unique identifier of the list for which the update content state job was created.
    creationTimeStamp string false none A timestamp for when the job was created, in the format of YYYY-MM-DDThh:mm:ss.sssZ.
    createdBy string false none The ID of the user (the ID of the user object) who created the job.
    completedTimeStamp string false none A timestamp for when the job was completed, in the format of YYYY-MM-DDThh:mm:ss.sssZ.
    results object false none none
    » recordCount integer false none The number of records that are updated as part of the job.
    errors [errorLeafNodeResponse] false none A description of the error condition for a failed job.
    links [link] false none The links that apply to the error.

    errorCommon

    {
      "version": 2,
      "httpStatusCode": 406,
      "message": "Not Acceptable",
      "details": [
        "application/vnd.sas.api+json;version=1",
        "application/vnd.sas.api+json",
        "application/json",
        "path: /listData/",
        "correlator: ae54a062-33d2-4b6a-a9af-97348a160947"
      ]
    }
    
    

    Error Common

    Properties
    Name Type Required Restrictions Description
    version integer false none The version number of the error representation. This representation is version 2.
    httpStatusCode integer false none The HTTP status code for the error.
    message string false none The error message.
    details [string] false none A list of strings with details.

    errorResponse

    {
      "id": "string",
      "errorCode": 0,
      "remediation": "string",
      "errors": [
        {
          "id": "string",
          "errorCode": 0,
          "remediation": "string",
          "links": [
            {
              "method": "string",
              "rel": "string",
              "uri": "string",
              "href": "string",
              "title": "string",
              "type": "string",
              "itemType": "string",
              "responseType": "string",
              "responseItemType": "string"
            }
          ],
          "version": 2,
          "httpStatusCode": 406,
          "message": "Not Acceptable",
          "details": [
            "application/vnd.sas.api+json;version=1",
            "application/vnd.sas.api+json",
            "application/json",
            "path: /listData/",
            "correlator: ae54a062-33d2-4b6a-a9af-97348a160947"
          ]
        }
      ],
      "links": [
        {
          "method": "string",
          "rel": "string",
          "uri": "string",
          "href": "string",
          "title": "string",
          "type": "string",
          "itemType": "string",
          "responseType": "string",
          "responseItemType": "string"
        }
      ],
      "version": 2,
      "httpStatusCode": 406,
      "message": "Not Acceptable",
      "details": [
        "application/vnd.sas.api+json;version=1",
        "application/vnd.sas.api+json",
        "application/json",
        "path: /listData/",
        "correlator: ae54a062-33d2-4b6a-a9af-97348a160947"
      ]
    }
    
    

    Error

    Properties
    Name Type Required Restrictions Description
    Error errorCommon false none This schema defines the representation of an error with additional errors.
    id string false none The string ID for the error.
    errorCode integer false none The numeric ID for the error.
    remediation string false none A message that describes how to resolve the error.
    errors [errorResponseItem] false none Additional errors that occurred.
    links [link] false none The links that apply to the error.

    errorResponseItem

    {
      "id": "string",
      "errorCode": 0,
      "remediation": "string",
      "links": [
        {
          "method": "string",
          "rel": "string",
          "uri": "string",
          "href": "string",
          "title": "string",
          "type": "string",
          "itemType": "string",
          "responseType": "string",
          "responseItemType": "string"
        }
      ],
      "version": 2,
      "httpStatusCode": 406,
      "message": "Not Acceptable",
      "details": [
        "application/vnd.sas.api+json;version=1",
        "application/vnd.sas.api+json",
        "application/json",
        "path: /listData/",
        "correlator: ae54a062-33d2-4b6a-a9af-97348a160947"
      ]
    }
    
    

    Error Item

    Properties
    Name Type Required Restrictions Description
    Error Item errorCommon false none This schema defines the representation of an error.
    id string false none The string ID for the error.
    errorCode integer false none The numeric ID for the error.
    remediation string false none A message that describes how to resolve the error.
    links [link] false none The links that apply to the error.

    errorLeafNodeResponse

    {
      "message": "string",
      "id": "string",
      "errorCode": 0,
      "httpStatusCode": 0,
      "details": [
        "string"
      ],
      "remediation": "string",
      "version": 2
    }
    
    

    Error Single Level

    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 false 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.
    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 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.
    title string false none The title for the link.
    type string false none The media type that is consumed or produced.
    itemType string false none If this link is to a container, the value is the media type or the 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": 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 false none The version number of the API representation. This is version 1.
    links [link] false none The API's top-level links.

    Examples

    Github Examples

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