NAV Navbar
Home icon
SAS Visual Investigator REST APIs
shell javascript python go
  • Visual Investigator REST API
  • Visual Investigator REST API

    Data Hub

    Base URLs:

    Terms of service Email: SAS Developers Web: SAS Developers License: SAS Institute Inc.

    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 Data Hub API provides access to information that is managed by SAS Visual Investigator. This API facilitates describing data that resides in either internal writable databases or external customer-controlled read-only databases. Once the data definitions are provided as entity types, the data becomes accessible within SAS Visual Investigator. This API also provides mechanisms for fetching individual entity records that were defined by the entity type definitions.

    Usage Notes

    Overview

    The SAS Visual Investigator Data Hub REST API provides a set of REST endpoints that serve as an abstraction layer for defining and accessing data used throughout SAS Visual Investigator.

    The following types of operations are supported:

    Organization

    The primary data structure in the system is the entity type, that is mapped to a database table that is loaded from a data store. Entity types contain a list of fields that are analogous to database columns. In some cases a field is associated with a reference list that provides a list of valid selections for the field.

    Associations between different entity types can be modeled using relationship types or transaction types. Boolean expressions are used to describe how pairs of entity types are connected.

    Overview of Endpoints

    The endpoints that are provided by the Visual Investigator Data Hub REST API can be separated into three categories:

    1. Entity Metadata

    Entity metadata is the abstract definition of classes of entities that are associated with database tables. Entity type definitions include database columns, and data types as well as other related information such localized labels and icons. The primary class for managing entity metadata is the "Entity Type". Entity types map one-to-one with an SQL database table that is either managed internally or stored externally in a read-only database that is controlled outside of the Visual Investigator environment.

    Entity types that are associated with one another can be represented using transaction types and relationships types.

    Reference lists are used to create controls in the user interface where the user has a specific list of values that can be applied to a field for an entity.

    The following endpoints are available:

    /admin/storedObjects - Manage entity types
    /admin/relationships - Manage relationship types
    /admin/transactions - Manage transaction types
    /admin/referenceLists - Manage Reference Lists

    2. Services

    Visual Investigator interfaces with external systems such as relational databases. The information needed to connect to these systems is defined in a data store.

    The following endpoints are available:

    /admin/dataStores - Manage information about external SQL databases

    3. Data Retrieval

    To access the data defined in the Entity Metadata section, use the documents and relationship links endpoints. Documents map one-to-one with rows in an SQL database table. For internal entity types, documents can be created, read, modified, and deleted. For external entity types, documents can only be created.

    /documents - Query and manage documents associated with an entity type
    /links - Query and manage relationship links associated with a relationship type and multiple entity types

    Security

    All endpoints require a valid OAuth token to be passed as a header parameter. For example: Authorization: Bearer eyJhbGciOiJSUzI1NiIsIcCI6MTUzN7fk

    New OAuth tokens can be fetched by issuing the following request: ``` POST http://./SASLogon/oauth/token Accept-Encoding: gzip,deflate Content-Type: application/x-www-form-urlencoded Authorization: Basic c2FzLmVjOg==

    grant_type=password&username=&password= ```

    Note that Basic authentication is required with user name “sas.ec” and no password. This value is Base64 encoded to create the Authorization header entry. In the example above this is: Authorization: Basic c2FzLmVjOg==

    Also note that as of v4 of the Data Hub REST API, the authenticating user or client's username and password are sent in the body of the request. This is a change from all previous versions of the API (which correspond to SAS Visual Investigator 10.8 and earlier) in which the username and password were sent as query parameters.

    Beginning with v4 (which corresponds to SAS Visual Investigator 2022.1.3), the SASLogon/oauth/token authentication endpoint does not accept the username and password in query parameters.

    Terminology

    data store

    the connection information that is used to establish communication with an external database. A data store includes a database type such as MySQL or DB2, a host name, a user name, password and other required details about the connection.

    document

    an instance of an object that is described by an entity type. A single document includes appropriate values for its fields that were either fetched from a database or provided by user input.

    entity type

    the metadata that defines a class of documents. This definition includes a list of fields, language-specific labels, icons, and other relevant information. For example, a "Customer" entity type might include "first name", "last name", and "phone number" fields. An entity type provides the metadata definition that is required for creating specific instances of a document.

    field

    a unit of information that is associated with a document. Fields are analogous to columns in a SQL database table. Each field has a name and a data type as a well as a label that is used for displaying the value in the user interface.

    label

    entity types and fields have friendly text names that are localized for displaying the item in the user interface with the appropriate language.

    reference list

    a list of choices that the user can select as the value for a field. Common examples might include "Size" (small, medium, large) or "Color" (red, green, blue).

    relationship link

    an instance of a relationship type. A relationship link defines a connection between a specific document and one or more other documents.

    relationship type

    metadata that defines a class of relationship links. The relationship type includes information such as the type and cardinality of the entities at both ends of the relationship connection. Relationship types can also specify an associated list of fields that provide additional detail.

    transaction

    an instance of a transaction type. A transaction defines an action that was performed between two documents at a specific point in time. Possible examples might include a financial transfer from one account to another or a record of a phone call between one person and another.

    transaction type

    metadata that defines a class of transactions. This definition includes a "from" entity type, a "to" entity type, a date-time field, as well as on optional list of additional fields.

    Error Codes

    Commonly used HTTP status codes

    HTTP status code Description Usage
    200 OK The operation was successful.
    400 Bad Request The request failed to pass a validation rule.
    401 Unauthorized The request must contain a valid OAuth 2.0 token from the SASLogon service.
    403 Forbidden The user associated with the OAuth 2.0 token does not have the required privileges.
    404 Not Found The request references an item that does not exist.
    500 Internal Server Error An error occurred internally or while calling another service.

    Operations

    AsyncJobs

    End point to create asynchronous jobs.

    Create jobs to be executed on the server asynchronously

    Code samples

    # You can also use wget
    curl -X POST https://example.com/svi-datahub/admin/asyncJobs?new=string \
      -H 'Authorization: Bearer <access-token-goes-here>' \
      -H 'Content-Type: application/json' \
      -H 'Accept: application/json'
    
    
    const inputBody = '{
      "version": 0,
      "id": "string",
      "name": "string",
      "description": "string",
      "tags": [
        "string"
      ],
      "status": "pending",
      "message": "string",
      "startedAt": "2023-08-08T10:33:54.614Z",
      "endedAt": "2023-08-08T10:33:54.614Z",
      "parameters": {
        "additionalProp1": "string",
        "additionalProp2": "string",
        "additionalProp3": "string"
      },
      "tasks": [
        {
          "version": 0,
          "id": "string",
          "name": "string",
          "description": "string",
          "tags": [
            "string"
          ],
          "status": "pending",
          "message": "string",
          "startedAt": "2023-08-08T10:33:54.614Z",
          "endedAt": "2023-08-08T10:33:54.614Z",
          "parameters": {
            "additionalProp1": "string",
            "additionalProp2": "string",
            "additionalProp3": "string"
          },
          "subTasks": [
            "string"
          ]
        }
      ]
    }';
    const headers = {
      'Content-Type':'application/json',
      'Accept':'application/json'
    };
    
    fetch('https://example.com/svi-datahub/admin/asyncJobs?new=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/json',
      'Accept': 'application/json'
    }
    
    r = requests.post('https://example.com/svi-datahub/admin/asyncJobs', params={
      'new': 'string'
    }, 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/svi-datahub/admin/asyncJobs", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    

    POST /admin/asyncJobs

    Create a job be executed asynchronously on the server. Currently jobs can be created to index or re-index data in Visual Investigator.

    Body parameter

    The general format for an indexing job request or response

    {
      "version": 0,
      "id": "string",
      "name": "string",
      "description": "string",
      "tags": [
        "string"
      ],
      "status": "pending",
      "message": "string",
      "startedAt": "2023-08-08T10:33:54.614Z",
      "endedAt": "2023-08-08T10:33:54.614Z",
      "parameters": {
        "additionalProp1": "string",
        "additionalProp2": "string",
        "additionalProp3": "string"
      },
      "tasks": [
        {
          "version": 0,
          "id": "string",
          "name": "string",
          "description": "string",
          "tags": [
            "string"
          ],
          "status": "pending",
          "message": "string",
          "startedAt": "2023-08-08T10:33:54.614Z",
          "endedAt": "2023-08-08T10:33:54.614Z",
          "parameters": {
            "additionalProp1": "string",
            "additionalProp2": "string",
            "additionalProp3": "string"
          },
          "subTasks": [
            "string"
          ]
        }
      ]
    }
    
    Parameters
    Name In Type Required Description
    new query string true A parameter indicating of newer parameters are being used in the job definition
    body body job true Details of the job to be created

    Example responses

    The general format for an indexing job request or response

    {
      "version": 0,
      "id": "string",
      "name": "string",
      "description": "string",
      "tags": [
        "string"
      ],
      "status": "pending",
      "message": "string",
      "startedAt": "2023-08-08T10:33:54.614Z",
      "endedAt": "2023-08-08T10:33:54.614Z",
      "parameters": {
        "additionalProp1": "string",
        "additionalProp2": "string",
        "additionalProp3": "string"
      },
      "tasks": [
        {
          "version": 0,
          "id": "string",
          "name": "string",
          "description": "string",
          "tags": [
            "string"
          ],
          "status": "pending",
          "message": "string",
          "startedAt": "2023-08-08T10:33:54.614Z",
          "endedAt": "2023-08-08T10:33:54.614Z",
          "parameters": {
            "additionalProp1": "string",
            "additionalProp2": "string",
            "additionalProp3": "string"
          },
          "subTasks": [
            "string"
          ]
        }
      ]
    }
    

    400 Response

    {
      "message": "There was an error processing your request.",
      "id": "DH9999",
      "errorCode": 9999,
      "httpStatusCode": 400,
      "details": [
        "See the log for additional details."
      ],
      "remediation": "Please resolve the error and then resubmit the request."
    }
    
    Responses
    Status Meaning Description Schema
    201 Created Created job
    400 Bad Request Bad Request sasError
    Response Headers
    Status Header Type Format Description
    201 Last-Modified string date-time Last modified timestamp for the job
    201 Location string Not used - all job status monitoring is done through Features service end points

    Data Stores

    Contains the operations related to data store configurations.

    Fetch a data store by name

    Code samples

    # You can also use wget
    curl -X GET https://example.com/svi-datahub/admin/dataStores?name=string \
      -H 'Authorization: Bearer <access-token-goes-here>' \
      -H 'Accept: application/json'
    
    
    
    const headers = {
      'Accept':'application/json'
    };
    
    fetch('https://example.com/svi-datahub/admin/dataStores?name=string',
    {
      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/svi-datahub/admin/dataStores', params={
      'name': 'string'
    }, 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/svi-datahub/admin/dataStores", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    

    GET /admin/dataStores

    Retrieves a data store that matches a specific name. The user name and password for the data store (required for the Create operation) are not returned in the response.

    Parameters
    Name In Type Required Description
    name query string true The name of the data store.

    Example responses

    200 Response

    {
      "id": 103000,
      "createdBy": "videmo",
      "createdAt": "2018-08-29T12:51:58.254Z",
      "lastUpdatedBy": "videmo",
      "lastUpdatedAt": "2018-08-29T12:51:58.254Z",
      "name": "MyOracleDatabase",
      "type": "RELATIONAL",
      "defaultSchemaName": "MySchema",
      "version": 0,
      "connectionType": "oracle",
      "host": "example.com",
      "port": "15658",
      "username": "MyUserName",
      "reindexRequired": false,
      "isCasDistributedDataLoadSupported": true,
      "password": "*****",
      "databaseNameOrServiceName": "MyOracleServiceName",
      "schema": "MY_SCHEMA",
      "initialSize": 1,
      "handle": "MyOracleDatabasenRXFB",
      "urlAppendedParameters": "FailoverPreconnect=false;JavaDoubleToString=false",
      "advancedProperties": {
        "ConnectionRetryCount": "5",
        "ConnectionRetryDelay": "1",
        "EnableBulkLoad": "1"
      }
    }
    

    404 Response

    {
      "message": "There was an error processing your request.",
      "id": "DH9999",
      "errorCode": 9999,
      "httpStatusCode": 400,
      "details": [
        "See the log for additional details."
      ],
      "remediation": "Please resolve the error and then resubmit the request."
    }
    
    Responses
    Status Meaning Description Schema
    200 OK The request succeeded. The requested data store object is returned. dataStore
    404 Not Found Invalid data store name. sasError

    Create a data store

    Code samples

    # You can also use wget
    curl -X POST https://example.com/svi-datahub/admin/dataStores \
      -H 'Authorization: Bearer <access-token-goes-here>' \
      -H 'Content-Type: application/json' \
      -H 'Accept: application/json'
    
    
    const inputBody = '{
      "description": "Example of a Data Store object.",
      "value": {
        "id": 103000,
        "createdBy": "videmo",
        "createdAt": "2018-08-29T12:51:58.254Z",
        "lastUpdatedBy": "videmo",
        "lastUpdatedAt": "2018-08-29T12:51:58.254Z",
        "name": "MyOracleDatabase",
        "type": "RELATIONAL",
        "defaultSchemaName": "MySchema",
        "version": 0,
        "connectionType": "oracle",
        "host": "example.com",
        "port": "15658",
        "username": "MyUserName",
        "reindexRequired": false,
        "isCasDistributedDataLoadSupported": true,
        "password": "*****",
        "databaseNameOrServiceName": "MyOracleServiceName",
        "schema": "MY_SCHEMA",
        "initialSize": 1,
        "handle": "MyOracleDatabasenRXFB",
        "urlAppendedParameters": "FailoverPreconnect=false;JavaDoubleToString=false",
        "advancedProperties": {
          "ConnectionRetryCount": "5",
          "ConnectionRetryDelay": "1",
          "EnableBulkLoad": "1"
        }
      },
      "x-widdershins-oldRef": "#/components/examples/dataStoreExample"
    }';
    const headers = {
      'Content-Type':'application/json',
      'Accept':'application/json'
    };
    
    fetch('https://example.com/svi-datahub/admin/dataStores',
    {
      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/svi-datahub/admin/dataStores', 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/svi-datahub/admin/dataStores", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    

    POST /admin/dataStores

    Creates a new data store. Prior to version 10.5.1 of SAS Visual Investigator, this process could take from 30-60 seconds to complete. The "handle" property must be generated by the client. The string must be unique and contain no special characters. The "username" and "password" properties are required.

    Body parameter

    {
      "description": "Example of a Data Store object.",
      "value": {
        "id": 103000,
        "createdBy": "videmo",
        "createdAt": "2018-08-29T12:51:58.254Z",
        "lastUpdatedBy": "videmo",
        "lastUpdatedAt": "2018-08-29T12:51:58.254Z",
        "name": "MyOracleDatabase",
        "type": "RELATIONAL",
        "defaultSchemaName": "MySchema",
        "version": 0,
        "connectionType": "oracle",
        "host": "example.com",
        "port": "15658",
        "username": "MyUserName",
        "reindexRequired": false,
        "isCasDistributedDataLoadSupported": true,
        "password": "*****",
        "databaseNameOrServiceName": "MyOracleServiceName",
        "schema": "MY_SCHEMA",
        "initialSize": 1,
        "handle": "MyOracleDatabasenRXFB",
        "urlAppendedParameters": "FailoverPreconnect=false;JavaDoubleToString=false",
        "advancedProperties": {
          "ConnectionRetryCount": "5",
          "ConnectionRetryDelay": "1",
          "EnableBulkLoad": "1"
        }
      },
      "x-widdershins-oldRef": "#/components/examples/dataStoreExample"
    }
    
    Parameters
    Name In Type Required Description
    body body dataStore true The definition of the data store object to be inserted.

    Example responses

    201 Response

    {
      "id": 103000,
      "createdBy": "videmo",
      "createdAt": "2018-08-29T12:51:58.254Z",
      "lastUpdatedBy": "videmo",
      "lastUpdatedAt": "2018-08-29T12:51:58.254Z",
      "name": "MyOracleDatabase",
      "type": "RELATIONAL",
      "defaultSchemaName": "MySchema",
      "version": 0,
      "connectionType": "oracle",
      "host": "example.com",
      "port": "15658",
      "username": "MyUserName",
      "reindexRequired": false,
      "isCasDistributedDataLoadSupported": true,
      "password": "*****",
      "databaseNameOrServiceName": "MyOracleServiceName",
      "schema": "MY_SCHEMA",
      "initialSize": 1,
      "handle": "MyOracleDatabasenRXFB",
      "urlAppendedParameters": "FailoverPreconnect=false;JavaDoubleToString=false",
      "advancedProperties": {
        "ConnectionRetryCount": "5",
        "ConnectionRetryDelay": "1",
        "EnableBulkLoad": "1"
      }
    }
    

    400 Response

    {
      "message": "There was an error processing your request.",
      "id": "DH9999",
      "errorCode": 9999,
      "httpStatusCode": 400,
      "details": [
        "See the log for additional details."
      ],
      "remediation": "Please resolve the error and then resubmit the request."
    }
    
    Responses
    Status Meaning Description Schema
    201 Created A data store was created. dataStore
    400 Bad Request Invalid data store definition. sasError

    Repair a data store

    Code samples

    # You can also use wget
    curl -X PUT https://example.com/svi-datahub/admin/dataStores/repair/{dataStoreName} \
      -H 'Authorization: Bearer <access-token-goes-here>' \
      -H 'Content-Type: application/json' \
      -H 'Accept: text/plain'
    
    
    const inputBody = '{
      "description": "Example of a Data Store object.",
      "value": {
        "id": 103000,
        "createdBy": "videmo",
        "createdAt": "2018-08-29T12:51:58.254Z",
        "lastUpdatedBy": "videmo",
        "lastUpdatedAt": "2018-08-29T12:51:58.254Z",
        "name": "MyOracleDatabase",
        "type": "RELATIONAL",
        "defaultSchemaName": "MySchema",
        "version": 0,
        "connectionType": "oracle",
        "host": "example.com",
        "port": "15658",
        "username": "MyUserName",
        "reindexRequired": false,
        "isCasDistributedDataLoadSupported": true,
        "password": "*****",
        "databaseNameOrServiceName": "MyOracleServiceName",
        "schema": "MY_SCHEMA",
        "initialSize": 1,
        "handle": "MyOracleDatabasenRXFB",
        "urlAppendedParameters": "FailoverPreconnect=false;JavaDoubleToString=false",
        "advancedProperties": {
          "ConnectionRetryCount": "5",
          "ConnectionRetryDelay": "1",
          "EnableBulkLoad": "1"
        }
      },
      "x-widdershins-oldRef": "#/components/examples/dataStoreExample"
    }';
    const headers = {
      'Content-Type':'application/json',
      'Accept':'text/plain'
    };
    
    fetch('https://example.com/svi-datahub/admin/dataStores/repair/{dataStoreName}',
    {
      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': 'text/plain'
    }
    
    r = requests.put('https://example.com/svi-datahub/admin/dataStores/repair/{dataStoreName}', headers = headers)
    
    print(r.json())
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Content-Type": []string{"application/json"},
            "Accept": []string{"text/plain"},
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("PUT", "https://example.com/svi-datahub/admin/dataStores/repair/{dataStoreName}", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    

    PUT /admin/dataStores/repair/{dataStoreName}

    Repairs a data store. At times, data store information can get into a bad state. For example, during a release migration when data store metadata is being moved and a failure occurs. In these situations, use this endpoint along with the full data store content with the user name and password. Data Hub attempts to repair the state of the data store.

    Body parameter

    {
      "description": "Example of a Data Store object.",
      "value": {
        "id": 103000,
        "createdBy": "videmo",
        "createdAt": "2018-08-29T12:51:58.254Z",
        "lastUpdatedBy": "videmo",
        "lastUpdatedAt": "2018-08-29T12:51:58.254Z",
        "name": "MyOracleDatabase",
        "type": "RELATIONAL",
        "defaultSchemaName": "MySchema",
        "version": 0,
        "connectionType": "oracle",
        "host": "example.com",
        "port": "15658",
        "username": "MyUserName",
        "reindexRequired": false,
        "isCasDistributedDataLoadSupported": true,
        "password": "*****",
        "databaseNameOrServiceName": "MyOracleServiceName",
        "schema": "MY_SCHEMA",
        "initialSize": 1,
        "handle": "MyOracleDatabasenRXFB",
        "urlAppendedParameters": "FailoverPreconnect=false;JavaDoubleToString=false",
        "advancedProperties": {
          "ConnectionRetryCount": "5",
          "ConnectionRetryDelay": "1",
          "EnableBulkLoad": "1"
        }
      },
      "x-widdershins-oldRef": "#/components/examples/dataStoreExample"
    }
    
    Parameters
    Name In Type Required Description
    dataStoreName path string true The name of the data store.
    body body dataStore true The data store object that to be repaired.

    Example responses

    200 Response

    "The data store 'oracle_store' with ID '2' was successfully repaired."
    

    400 Response

    {
      "message": "There was an error processing your request.",
      "id": "DH9999",
      "errorCode": 9999,
      "httpStatusCode": 400,
      "details": [
        "See the log for additional details."
      ],
      "remediation": "Please resolve the error and then resubmit the request."
    }
    

    412 Response

    {
      "message": "There was an error processing your request.",
      "id": "DH9999",
      "errorCode": 9999,
      "httpStatusCode": 400,
      "details": [
        "See the log for additional details."
      ],
      "remediation": "Please resolve the error and then resubmit the request."
    }
    
    {
      "message": "There was an error processing your request.",
      "id": "DH9999",
      "errorCode": 9999,
      "httpStatusCode": 400,
      "details": [
        "See the log for additional details."
      ],
      "remediation": "Please resolve the error and then resubmit the request."
    }
    

    428 Response

    {
      "message": "There was an error processing your request.",
      "id": "DH9999",
      "errorCode": 9999,
      "httpStatusCode": 400,
      "details": [
        "See the log for additional details."
      ],
      "remediation": "Please resolve the error and then resubmit the request."
    }
    
    {
      "message": "There was an error processing your request.",
      "id": "DH9999",
      "errorCode": 9999,
      "httpStatusCode": 400,
      "details": [
        "See the log for additional details."
      ],
      "remediation": "Please resolve the error and then resubmit the request."
    }
    
    Responses
    Status Meaning Description Schema
    200 OK The request succeeded. The data store was repaired. string
    400 Bad Request Invalid data store definition. sasError
    412 Precondition Failed The data store in the request body is out of date. sasError
    428 Precondition Required The data store in the request body did not contain a version. sasError

    Fetch all data stores

    Code samples

    # You can also use wget
    curl -X GET https://example.com/svi-datahub/admin/dataStores/all?includeInternal=false \
      -H 'Authorization: Bearer <access-token-goes-here>' \
      -H 'Accept: application/json'
    
    
    
    const headers = {
      'Accept':'application/json'
    };
    
    fetch('https://example.com/svi-datahub/admin/dataStores/all?includeInternal=false',
    {
      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/svi-datahub/admin/dataStores/all', params={
      'includeInternal': 'false'
    }, 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/svi-datahub/admin/dataStores/all", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    

    GET /admin/dataStores/all

    Retrieves a list of all available data stores.

    Parameters
    Name In Type Required Description
    includeInternal query string true Specifies whether to include internal data stores. Internal data stores are used by Data Hub or other components of SAS Visual Investigator.

    Example responses

    200 Response

    [
      {
        "id": 103000,
        "createdBy": "videmo",
        "createdAt": "2018-08-29T12:51:58.254Z",
        "lastUpdatedBy": "videmo",
        "lastUpdatedAt": "2018-08-29T12:51:58.254Z",
        "name": "MyOracleDatabase",
        "type": "RELATIONAL",
        "defaultSchemaName": "MySchema",
        "version": 0,
        "connectionType": "oracle",
        "host": "example.com",
        "port": "15658",
        "username": "MyUserName",
        "reindexRequired": false,
        "isCasDistributedDataLoadSupported": true,
        "password": "*****",
        "databaseNameOrServiceName": "MyOracleServiceName",
        "schema": "MY_SCHEMA",
        "initialSize": 1,
        "handle": "MyOracleDatabasenRXFB",
        "urlAppendedParameters": "FailoverPreconnect=false;JavaDoubleToString=false",
        "advancedProperties": {
          "ConnectionRetryCount": "5",
          "ConnectionRetryDelay": "1",
          "EnableBulkLoad": "1"
        }
      }
    ]
    
    Responses
    Status Meaning Description Schema
    200 OK The request succeeded. An array of data stores is returned. Inline
    Response Schema

    Status Code 200

    Name Type Required Restrictions Description
    anonymous [allOf] false none [Information that is used for connecting to a database such as Oracle or SQL Server.]
    » Data Store dataStore false none Information that is used for connecting to a database such as Oracle or SQL Server.

    allOf

    Name Type Required Restrictions Description
    »» anonymous auditableObject false none Reserved for internal use. An abstract object for handling audit information.
    »»» id integer false none The primary key that uniquely identifies this metadata object.
    »»» createdBy string false none The user ID that created this metadata object.
    »»» createdAt string(date-time) false none The timestamp that indicates when this metadata object was created.
    »»» lastUpdatedBy string false none The user ID that most recently modified this metadata object.
    »»» lastUpdatedAt string(date-time) false none The timestamp that indicates when this metadata object was last modified.

    and

    Name Type Required Restrictions Description
    »» anonymous object false none none
    »»» name string false none The name of the data store.
    »»» type string false none The type of the data store.
    »»» defaultSchemaName string false none The default schema name to be used for the data store.
    »»» version integer false none The internal version number for this data store.
    »»» connectionType string false none The type of database the system.
    »»» host string false none The host name for the database server.
    »»» port string false none The TCP/IP port number for connecting to the database server.
    »»» username string false none The user name for connecting to the database server.
    »»» password string false none The password for connecting to the database server.
    »»» databaseNameOrServiceName string false none The name of the database to which to connect.
    »»» schema string false none The name of the target schema within the database.
    »»» reindexRequired boolean false none Specifies whether all entity, relationship, and transaction types need to be reindexed after making an update to the data store.
    »»» isCasDistributedDataLoadSupported boolean false none Specifies whether the data store supports the CAS "Distributed Data Load" feature.
    »»» initialSize integer false none The initial starting size for the database connection pool.
    »»» maxIdle integer false none The maximum number of idle connections that are allowed in the connection pool.
    »»» minIdle integer false none The minimum number of idle connections that are allowed in the connection pool.
    »»» maxActive integer false none The maximum number of active connections that are allowed in the connection pool.
    »»» handle string false none A string that is used to group key/value pairs that belong to a single data store (analogous to a folder). When creating a data store, this value must be unique. No other data store can have the same "handle" value. It is the responsibility of the client to determine a unique value.
    »»» urlAppendedParameters string false none Additional JDBC connection parameters that are appended to the end of the connection string.
    »»» advancedProperties sasProperties false none Additional properties that are needed by other modules while interacting with this data store. For example, when loading data into CAS, etc.
    »»»» version integer false none The version number of the API representation. This is version 1.
    »»»» properties [sasProperty] false none A list of name/value pairs.
    »»»»» SAS Property sasProperty false none A pair that consists of a string name and a string value. This is based on http://{SAS API Portal}/reference/schema/property/v1/property.json.
    »»»»»» name string false none The property name.
    »»»»»» value string false none The property value.
    »»»» links [object] false none Links to associated resources and operations. APIs might provide links for the link relations self',update(to replace the attributes),patch` (to update some attributes), or others.
    »»» assignedTimeZone string false none The default timezone for timestamp values that are stored in the database.
    Enumerated Values
    Property Value
    type RELATIONAL
    connectionType internal_postgres
    connectionType postgres
    connectionType db2
    connectionType MySQL
    connectionType oracle
    connectionType SQL Server
    connectionType teradata

    Get headers for user name and password for a data store

    Code samples

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

    HEAD /admin/dataStores/{dataStoreId}/credentials

    Retrieves headers for the data store user name and password. Other metadata about the data store is not included in the response. This endpoint requires the "svi.administration.datastore_credentials" capability. Be careful about who is given this capability. This endpoint is designed to be used by other SAS services that need the data store credentials.

    Parameters
    Name In Type Required Description
    dataStoreId path integer true The ID of the data store.
    Responses
    Status Meaning Description Schema
    200 OK The request succeeded. The requested data store credential object is returned. The password is Base64-encoded. None
    404 Not Found Invalid data store ID. None

    Fetch user name and password for a data store

    Code samples

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

    GET /admin/dataStores/{dataStoreId}/credentials

    Retrieves the data store user name and password. Other metadata about the data store is not included in the response. This endpoint requires the "svi.administration.datastore_credentials" capability. Be careful about who is given this capability. This endpoint is designed to be used by other SAS services that need the data store credentials.

    Parameters
    Name In Type Required Description
    dataStoreId path integer true The ID of the data store.

    Example responses

    200 Response

    {
      "username": "testUser",
      "password": "dGVzdFBhc3N3b3JkMTIz"
    }
    

    404 Response

    {
      "message": "There was an error processing your request.",
      "id": "DH9999",
      "errorCode": 9999,
      "httpStatusCode": 400,
      "details": [
        "See the log for additional details."
      ],
      "remediation": "Please resolve the error and then resubmit the request."
    }
    
    Responses
    Status Meaning Description Schema
    200 OK The request succeeded. The requested data store credential object is returned. The password is Base64-encoded. dataStoreCredentials
    404 Not Found Invalid data store ID. sasError

    Test the connection to the data store that is in the request body

    Code samples

    # You can also use wget
    curl -X POST https://example.com/svi-datahub/admin/dataStores/connectionTest \
      -H 'Authorization: Bearer <access-token-goes-here>' \
      -H 'Content-Type: application/json' \
      -H 'Accept: application/json'
    
    
    const inputBody = '{
      "description": "Example of a Data Store object.",
      "value": {
        "id": 103000,
        "createdBy": "videmo",
        "createdAt": "2018-08-29T12:51:58.254Z",
        "lastUpdatedBy": "videmo",
        "lastUpdatedAt": "2018-08-29T12:51:58.254Z",
        "name": "MyOracleDatabase",
        "type": "RELATIONAL",
        "defaultSchemaName": "MySchema",
        "version": 0,
        "connectionType": "oracle",
        "host": "example.com",
        "port": "15658",
        "username": "MyUserName",
        "reindexRequired": false,
        "isCasDistributedDataLoadSupported": true,
        "password": "*****",
        "databaseNameOrServiceName": "MyOracleServiceName",
        "schema": "MY_SCHEMA",
        "initialSize": 1,
        "handle": "MyOracleDatabasenRXFB",
        "urlAppendedParameters": "FailoverPreconnect=false;JavaDoubleToString=false",
        "advancedProperties": {
          "ConnectionRetryCount": "5",
          "ConnectionRetryDelay": "1",
          "EnableBulkLoad": "1"
        }
      },
      "x-widdershins-oldRef": "#/components/examples/dataStoreExample"
    }';
    const headers = {
      'Content-Type':'application/json',
      'Accept':'application/json'
    };
    
    fetch('https://example.com/svi-datahub/admin/dataStores/connectionTest',
    {
      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/svi-datahub/admin/dataStores/connectionTest', 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/svi-datahub/admin/dataStores/connectionTest", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    

    POST /admin/dataStores/connectionTest

    Attempts to connect to the data store that is specified in the request body. This endpoint requires the "svi.administration.core_metadata" capability.

    Body parameter

    {
      "description": "Example of a Data Store object.",
      "value": {
        "id": 103000,
        "createdBy": "videmo",
        "createdAt": "2018-08-29T12:51:58.254Z",
        "lastUpdatedBy": "videmo",
        "lastUpdatedAt": "2018-08-29T12:51:58.254Z",
        "name": "MyOracleDatabase",
        "type": "RELATIONAL",
        "defaultSchemaName": "MySchema",
        "version": 0,
        "connectionType": "oracle",
        "host": "example.com",
        "port": "15658",
        "username": "MyUserName",
        "reindexRequired": false,
        "isCasDistributedDataLoadSupported": true,
        "password": "*****",
        "databaseNameOrServiceName": "MyOracleServiceName",
        "schema": "MY_SCHEMA",
        "initialSize": 1,
        "handle": "MyOracleDatabasenRXFB",
        "urlAppendedParameters": "FailoverPreconnect=false;JavaDoubleToString=false",
        "advancedProperties": {
          "ConnectionRetryCount": "5",
          "ConnectionRetryDelay": "1",
          "EnableBulkLoad": "1"
        }
      },
      "x-widdershins-oldRef": "#/components/examples/dataStoreExample"
    }
    
    Parameters
    Name In Type Required Description
    body body dataStore true The data store object that is used to test the connection.

    Example responses

    400 Response

    {
      "message": "There was an error processing your request.",
      "id": "DH9999",
      "errorCode": 9999,
      "httpStatusCode": 400,
      "details": [
        "See the log for additional details."
      ],
      "remediation": "Please resolve the error and then resubmit the request."
    }
    
    Responses
    Status Meaning Description Schema
    204 No Content The connection attempt was successful or connection testing has been disabled via the configuration settings. None
    400 Bad Request Bad request. The possible causes are an invalid database type, an invalid database name, a missing host or port, or the inability to establish a socket connection. The error message and logs should clarify the issue. sasError

    Get the default data store

    Code samples

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

    GET /admin/dataStores/default

    Retrieves the default data store. This endpoint requires the "svi.administration.core_metadata" capability.

    Example responses

    200 Response

    {
      "id": 103000,
      "createdBy": "videmo",
      "createdAt": "2018-08-29T12:51:58.254Z",
      "lastUpdatedBy": "videmo",
      "lastUpdatedAt": "2018-08-29T12:51:58.254Z",
      "name": "MyOracleDatabase",
      "type": "RELATIONAL",
      "defaultSchemaName": "MySchema",
      "version": 0,
      "connectionType": "oracle",
      "host": "example.com",
      "port": "15658",
      "username": "MyUserName",
      "reindexRequired": false,
      "isCasDistributedDataLoadSupported": true,
      "password": "*****",
      "databaseNameOrServiceName": "MyOracleServiceName",
      "schema": "MY_SCHEMA",
      "initialSize": 1,
      "handle": "MyOracleDatabasenRXFB",
      "urlAppendedParameters": "FailoverPreconnect=false;JavaDoubleToString=false",
      "advancedProperties": {
        "ConnectionRetryCount": "5",
        "ConnectionRetryDelay": "1",
        "EnableBulkLoad": "1"
      }
    }
    
    Responses
    Status Meaning Description Schema
    200 OK Request succeeded. The default data store object is returned. dataStore

    Gets a list of supported database types

    Code samples

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

    GET /admin/dataStores/supportedDatabaseTypes

    Retrieves a list of supported database types. This endpoint requires the "svi.administration.core_metadata" capability.

    Parameters
    Name In Type Required Description
    includeAll query boolean false By default, this operation returns only manageable types. These are the types that you can add/modify/delete in the SAS Visual Investigator Administration user interface. To force all the types to be returned, set this property to true.
    Detailed descriptions

    includeAll: By default, this operation returns only manageable types. These are the types that you can add/modify/delete in the SAS Visual Investigator Administration user interface. To force all the types to be returned, set this property to true.

    Example responses

    200 Response

    [
      {
        "type": "postgres",
        "requiredFields": [
          "name",
          "host",
          "port",
          "username",
          "password",
          "databaseName",
          "schema",
          "handle",
          "version"
        ]
      },
      {
        "type": "oracle",
        "requiredFields": [
          "name",
          "host",
          "port",
          "username",
          "password",
          "databaseName",
          "schema",
          "handle",
          "version"
        ]
      },
      {
        "type": "teradata",
        "requiredFields": [
          "name",
          "host",
          "port",
          "username",
          "password",
          "databaseName",
          "handle",
          "version"
        ]
      },
      {
        "type": "db2",
        "requiredFields": [
          "name",
          "host",
          "port",
          "username",
          "password",
          "databaseName",
          "schema",
          "handle",
          "version"
        ]
      },
      {
        "type": "MySQL",
        "requiredFields": [
          "name",
          "host",
          "port",
          "username",
          "password",
          "schema",
          "handle",
          "version"
        ]
      },
      {
        "type": "SQL Server",
        "requiredFields": [
          "name",
          "host",
          "port",
          "username",
          "password",
          "databaseName",
          "schema",
          "handle",
          "version"
        ]
      }
    ]
    
    Responses
    Status Meaning Description Schema
    200 OK The request succeeded. A list of supported database types is returned. Inline
    Response Schema

    Status Code 200

    Name Type Required Restrictions Description
    anonymous [dataStoreSupportedType] false none [A supported database for a data store.]
    » Data Store Supported Type dataStoreSupportedType false none A supported database for a data store.
    »» type string false none The type of database.
    »» requiredFields [string] false none The required fields for the data store with the database type.
    »» defaultAdditionalFields object false none A map of additional default fields for the data store with the database type.
    »»» additionalProperties object false none none
    »»»» fieldKey string false none none
    »»»» fieldValue string false none none

    Get headers for a data store by ID

    Code samples

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

    HEAD /admin/dataStores/{dataStoreId}

    Retrieves headers for a data store that matches the specified data store ID. The user name and password for the data store (required for the Create operation) are not returned in the response. This endpoint requires the "svi.administration.core_metadata" capability.

    Parameters
    Name In Type Required Description
    dataStoreId path integer true The ID of the data store.
    Responses
    Status Meaning Description Schema
    200 OK The request succeeded. The data store with the specified ID is returned. If no data store exists with that ID, null is returned. None

    Get a data store by ID

    Code samples

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

    GET /admin/dataStores/{dataStoreId}

    Retrieves a data store that matches the specified data store ID. The user name and password for the data store (required for the Create operation) are not returned in the response. This endpoint requires the "svi.administration.core_metadata" capability.

    Parameters
    Name In Type Required Description
    dataStoreId path integer true The ID of the data store.

    Example responses

    200 Response

    {
      "id": 103000,
      "createdBy": "videmo",
      "createdAt": "2018-08-29T12:51:58.254Z",
      "lastUpdatedBy": "videmo",
      "lastUpdatedAt": "2018-08-29T12:51:58.254Z",
      "name": "MyOracleDatabase",
      "type": "RELATIONAL",
      "defaultSchemaName": "MySchema",
      "version": 0,
      "connectionType": "oracle",
      "host": "example.com",
      "port": "15658",
      "username": "MyUserName",
      "reindexRequired": false,
      "isCasDistributedDataLoadSupported": true,
      "password": "*****",
      "databaseNameOrServiceName": "MyOracleServiceName",
      "schema": "MY_SCHEMA",
      "initialSize": 1,
      "handle": "MyOracleDatabasenRXFB",
      "urlAppendedParameters": "FailoverPreconnect=false;JavaDoubleToString=false",
      "advancedProperties": {
        "ConnectionRetryCount": "5",
        "ConnectionRetryDelay": "1",
        "EnableBulkLoad": "1"
      }
    }
    
    Responses
    Status Meaning Description Schema
    200 OK The request succeeded. The data store with the specified ID is returned. If no data store exists with that ID, null is returned. dataStore

    Delete a data store by ID

    Code samples

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

    DELETE /admin/dataStores/{dataStoreId}

    Deletes the data store that matches the specified data store ID. This endpoint requires the "svi.administration.core_metadata" capability.

    Parameters
    Name In Type Required Description
    dataStoreId path integer true The ID of the data store.
    Responses
    Status Meaning Description Schema
    204 No Content The data store was deleted or there was no data store with the specified ID. None

    Update a data store by ID

    Code samples

    # You can also use wget
    curl -X PUT https://example.com/svi-datahub/admin/dataStores/{dataStoreId} \
      -H 'Authorization: Bearer <access-token-goes-here>' \
      -H 'Content-Type: application/json' \
      -H 'Accept: application/json'
    
    
    const inputBody = '{
      "description": "Example of a Data Store object.",
      "value": {
        "id": 103000,
        "createdBy": "videmo",
        "createdAt": "2018-08-29T12:51:58.254Z",
        "lastUpdatedBy": "videmo",
        "lastUpdatedAt": "2018-08-29T12:51:58.254Z",
        "name": "MyOracleDatabase",
        "type": "RELATIONAL",
        "defaultSchemaName": "MySchema",
        "version": 0,
        "connectionType": "oracle",
        "host": "example.com",
        "port": "15658",
        "username": "MyUserName",
        "reindexRequired": false,
        "isCasDistributedDataLoadSupported": true,
        "password": "*****",
        "databaseNameOrServiceName": "MyOracleServiceName",
        "schema": "MY_SCHEMA",
        "initialSize": 1,
        "handle": "MyOracleDatabasenRXFB",
        "urlAppendedParameters": "FailoverPreconnect=false;JavaDoubleToString=false",
        "advancedProperties": {
          "ConnectionRetryCount": "5",
          "ConnectionRetryDelay": "1",
          "EnableBulkLoad": "1"
        }
      },
      "x-widdershins-oldRef": "#/components/examples/dataStoreExample"
    }';
    const headers = {
      'Content-Type':'application/json',
      'Accept':'application/json'
    };
    
    fetch('https://example.com/svi-datahub/admin/dataStores/{dataStoreId}',
    {
      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/svi-datahub/admin/dataStores/{dataStoreId}', 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/svi-datahub/admin/dataStores/{dataStoreId}", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    

    PUT /admin/dataStores/{dataStoreId}

    Updates the data store with the specified ID to the data store definition that is contained in the request body. This endpoint requires the "svi.administration.core_metadata" capability.

    Body parameter

    {
      "description": "Example of a Data Store object.",
      "value": {
        "id": 103000,
        "createdBy": "videmo",
        "createdAt": "2018-08-29T12:51:58.254Z",
        "lastUpdatedBy": "videmo",
        "lastUpdatedAt": "2018-08-29T12:51:58.254Z",
        "name": "MyOracleDatabase",
        "type": "RELATIONAL",
        "defaultSchemaName": "MySchema",
        "version": 0,
        "connectionType": "oracle",
        "host": "example.com",
        "port": "15658",
        "username": "MyUserName",
        "reindexRequired": false,
        "isCasDistributedDataLoadSupported": true,
        "password": "*****",
        "databaseNameOrServiceName": "MyOracleServiceName",
        "schema": "MY_SCHEMA",
        "initialSize": 1,
        "handle": "MyOracleDatabasenRXFB",
        "urlAppendedParameters": "FailoverPreconnect=false;JavaDoubleToString=false",
        "advancedProperties": {
          "ConnectionRetryCount": "5",
          "ConnectionRetryDelay": "1",
          "EnableBulkLoad": "1"
        }
      },
      "x-widdershins-oldRef": "#/components/examples/dataStoreExample"
    }
    
    Parameters
    Name In Type Required Description
    dataStoreId path integer true The ID of the data store.
    body body dataStore true The data store object to update the existing data store.

    Example responses

    200 Response

    {
      "id": 103000,
      "createdBy": "videmo",
      "createdAt": "2018-08-29T12:51:58.254Z",
      "lastUpdatedBy": "videmo",
      "lastUpdatedAt": "2018-08-29T12:51:58.254Z",
      "name": "MyOracleDatabase",
      "type": "RELATIONAL",
      "defaultSchemaName": "MySchema",
      "version": 0,
      "connectionType": "oracle",
      "host": "example.com",
      "port": "15658",
      "username": "MyUserName",
      "reindexRequired": false,
      "isCasDistributedDataLoadSupported": true,
      "password": "*****",
      "databaseNameOrServiceName": "MyOracleServiceName",
      "schema": "MY_SCHEMA",
      "initialSize": 1,
      "handle": "MyOracleDatabasenRXFB",
      "urlAppendedParameters": "FailoverPreconnect=false;JavaDoubleToString=false",
      "advancedProperties": {
        "ConnectionRetryCount": "5",
        "ConnectionRetryDelay": "1",
        "EnableBulkLoad": "1"
      }
    }
    

    400 Response

    {
      "message": "There was an error processing your request.",
      "id": "DH9999",
      "errorCode": 9999,
      "httpStatusCode": 400,
      "details": [
        "See the log for additional details."
      ],
      "remediation": "Please resolve the error and then resubmit the request."
    }
    
    Responses
    Status Meaning Description Schema
    200 OK The request succeeded. The updated data store is returned. dataStore
    400 Bad Request The request was invalid. The error message should clarify the issue. Possible reasons include: - The data store credentials are null in the request body's data store definition. - The data store handle is changed in the request body (this is not allowed). - The name is changed in the request body (this is not allowed). - A property is missing in the request body's data store definition. sasError

    Get headers for all table names from a data store

    Code samples

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

    HEAD /admin/dataStores/{dataStoreId}/tables

    Returns headers for a list of all table names from the data store with the specified ID. This endpoint requires the "svi.administration.core_metadata" capability.

    Parameters
    Name In Type Required Description
    dataStoreId path integer true The ID of the data store from which to get the table names.
    Responses
    Status Meaning Description Schema
    200 OK The request succeeded. A list of the data store's table names is returned. None
    404 Not Found A data store with the specified ID was not found. None

    Get all table names from a data store

    Code samples

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

    GET /admin/dataStores/{dataStoreId}/tables

    Returns a list of all table names from the data store with the specified ID. This endpoint requires the "svi.administration.core_metadata" capability.

    Parameters
    Name In Type Required Description
    dataStoreId path integer true The ID of the data store from which to get the table names.

    Example responses

    200 Response

    [
      "table_name_1",
      "table_name_2",
      "table_name_3"
    ]
    

    404 Response

    {
      "message": "There was an error processing your request.",
      "id": "DH9999",
      "errorCode": 9999,
      "httpStatusCode": 400,
      "details": [
        "See the log for additional details."
      ],
      "remediation": "Please resolve the error and then resubmit the request."
    }
    
    Responses
    Status Meaning Description Schema
    200 OK The request succeeded. A list of the data store's table names is returned. Inline
    404 Not Found A data store with the specified ID was not found. sasError
    Response Schema

    Get headers for table metadata from a data store

    Code samples

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

    HEAD /admin/dataStores/{dataStoreId}/tables/{tableName}

    Returns headers for table metadata from a data store for the specified data store ID and table name. This endpoint requires the "svi.administration.core_metadata" capability.

    Parameters
    Name In Type Required Description
    dataStoreId path integer true The ID of the data store from which to get the table.
    tableName path string true The name of the table from which to get the metadata.
    Responses
    Status Meaning Description Schema
    200 OK The request succeeded. The metadata for the table is returned. None
    404 Not Found A data store with the specified ID was not found. None

    Get table metadata from a data store

    Code samples

    # You can also use wget
    curl -X GET https://example.com/svi-datahub/admin/dataStores/{dataStoreId}/tables/{tableName} \
      -H 'Authorization: Bearer <access-token-goes-here>' \
      -H 'Accept: application/json'
    
    
    
    const headers = {
      'Accept':'application/json'
    };
    
    fetch('https://example.com/svi-datahub/admin/dataStores/{dataStoreId}/tables/{tableName}',
    {
      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/svi-datahub/admin/dataStores/{dataStoreId}/tables/{tableName}', 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/svi-datahub/admin/dataStores/{dataStoreId}/tables/{tableName}", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    

    GET /admin/dataStores/{dataStoreId}/tables/{tableName}

    Returns table metadata from a data store for the specified data store ID and table name. This endpoint requires the "svi.administration.core_metadata" capability.

    Parameters
    Name In Type Required Description
    dataStoreId path integer true The ID of the data store from which to get the table.
    tableName path string true The name of the table from which to get the metadata.

    Example responses

    200 Response

    {
      "name": "person",
      "schema": "my_schema",
      "type": "TABLE",
      "databaseProductName": "PostgreSQL",
      "columns": [
        {
          "name": "birthday",
          "dataType": "TIMESTAMP",
          "required": false,
          "primaryKeyColumn": false,
          "ordinalPosition": 0,
          "primaryKeySeqNo": 0
        },
        {
          "name": "created_at_dttm",
          "dataType": "TIMESTAMP",
          "required": true,
          "primaryKeyColumn": false,
          "ordinalPosition": 1,
          "primaryKeySeqNo": 0
        },
        {
          "name": "created_by_user_id",
          "dataType": "STRING",
          "length": 255,
          "required": true,
          "primaryKeyColumn": false,
          "ordinalPosition": 2,
          "primaryKeySeqNo": 0
        },
        {
          "name": "first_name",
          "dataType": "STRING",
          "length": 15,
          "required": false,
          "primaryKeyColumn": false,
          "ordinalPosition": 3,
          "primaryKeySeqNo": 0
        },
        {
          "name": "id",
          "dataType": "STRING",
          "length": 36,
          "required": true,
          "primaryKeyColumn": true,
          "ordinalPosition": 5,
          "primaryKeySeqNo": 1
        },
        {
          "name": "last_name",
          "dataType": "STRING",
          "length": 15,
          "required": false,
          "primaryKeyColumn": false,
          "ordinalPosition": 6,
          "primaryKeySeqNo": 0
        },
        {
          "name": "last_updated_at_dttm",
          "dataType": "TIMESTAMP",
          "required": true,
          "primaryKeyColumn": false,
          "ordinalPosition": 7,
          "primaryKeySeqNo": 0
        },
        {
          "name": "last_updated_by_user_id",
          "dataType": "STRING",
          "length": 255,
          "required": true,
          "primaryKeyColumn": false,
          "ordinalPosition": 8,
          "primaryKeySeqNo": 0
        },
        {
          "name": "version",
          "dataType": "LONG",
          "required": true,
          "primaryKeyColumn": false,
          "ordinalPosition": 9,
          "primaryKeySeqNo": 0
        }
      ]
    }
    

    404 Response

    {
      "message": "There was an error processing your request.",
      "id": "DH9999",
      "errorCode": 9999,
      "httpStatusCode": 400,
      "details": [
        "See the log for additional details."
      ],
      "remediation": "Please resolve the error and then resubmit the request."
    }
    
    Responses
    Status Meaning Description Schema
    200 OK The request succeeded. The metadata for the table is returned. tableMetadata
    404 Not Found A data store with the specified ID was not found. sasError

    Documents

    Contains the operations related to documents.

    Create a new internal document

    Code samples

    # You can also use wget
    curl -X POST https://example.com/svi-datahub/documents \
      -H 'Authorization: Bearer <access-token-goes-here>' \
      -H 'Content-Type: application/json' \
      -H 'Accept: application/json'
    
    
    const inputBody = '{
      "description": "Example of an Enriched Document object.",
      "value": {
        "objectTypeName": "person",
        "objectTypeId": 100515,
        "objectTypeVersion": 4,
        "id": "2f21e644-089a-47d8-a503-bbdd4d8dac3d",
        "fieldValues": {
          "birthday": "2020-01-05T00:00:00Z",
          "created_at_dttm": "2020-04-13T19:17:47.84Z",
          "created_by_user_id": "viuser",
          "first_name": "John",
          "id": "2f21e644-089a-47d8-a503-bbdd4d8dac3d",
          "last_name": "Smith",
          "last_updated_at_dttm": "2020-04-13T19:31:37.097Z",
          "last_updated_by_user_id": "viuser",
          "version": 4
        },
        "createdAt": "2020-04-13T19:17:47.840Z",
        "lastUpdatedAt": "2020-04-13T19:31:37.097Z",
        "validFrom": "2020-01-05T00:00:00.000Z",
        "fieldRestrictions": {
          "person": {
            "ssn": {
              "masked": {
                "currentUserIsAuthorizedToReveal": true
              }
            }
          }
        },
        "sheets": [
          {
            "id": 201,
            "type": "WORKSHEET",
            "name": "Workspace-1",
            "version": 2,
            "created": "2020-04-13T19:27:08.105Z",
            "createdBy": "viuser",
            "lastModified": "2020-04-13T19:27:26.175Z",
            "lastModifiedBy": "viuser",
            "tabOrder": 0,
            "uxState": {
              "commonToolPane": {
                "expanded": true,
                "width": 340
              },
              "filterPanel": {
                "expanded": true,
                "width": 200
              }
            },
            "cells": [
              {
                "type": "LIVE",
                "id": 301,
                "row": 0,
                "position": 0,
                "height": 0,
                "width": 0,
                "version": 1,
                "documents": [
                  {
                    "type": "person",
                    "id": "2f21e644-089a-47d8-a503-bbdd4d8dac3d",
                    "uniqueId": "person#2f21e644-089a-47d8-a503-bbdd4d8dac3d"
                  },
                  {
                    "type": "person",
                    "id": "ba0f8afd-b6e0-4763-91a8-9c6810d0156b",
                    "uniqueId": "person#ba0f8afd-b6e0-4763-91a8-9c6810d0156b"
                  }
                ],
                "visualizationType": "Network",
                "resultsPerPage": 0,
                "networkData": {
                  "links": [],
                  "nodes": {
                    "person~2f21e644-089a-47d8-a503-bbdd4d8dac3d": {
                      "id": "person~2f21e644-089a-47d8-a503-bbdd4d8dac3d",
                      "transitionStart": {
                        "x": 667,
                        "y": 206.5
                      },
                      "type": "person",
                      "typeLabel": "Person",
                      "x": 711.99394815911,
                      "y": 220.234232742122
                    },
                    "person~ba0f8afd-b6e0-4763-91a8-9c6810d0156b": {
                      "id": "person~ba0f8afd-b6e0-4763-91a8-9c6810d0156b",
                      "transitionStart": {
                        "x": 339.81315560960843,
                        "y": 106.62745147130762
                      },
                      "type": "person",
                      "typeLabel": "Person",
                      "x": 621.6305200034983,
                      "y": 192.65113758282533
                    }
                  },
                  "numNodes": 2,
                  "options": {
                    "activeNodes": false,
                    "centralityType": null,
                    "displayableTransactionType": null,
                    "groupCtr": 1,
                    "layout": {
                      "charge": 25,
                      "linkDistance": 130,
                      "linkStrength": 0.4,
                      "velocityDecay": 0.45
                    },
                    "nodeCtr": 1,
                    "scale": 2.0766116941529233,
                    "showLegend": true,
                    "showLinkLabels": false,
                    "showNodeAnnotation": true,
                    "showNodeLabels": true,
                    "showTimeline": false,
                    "showTransactionDetails": false,
                    "showTransactionLinks": false,
                    "toolsPane": {
                      "activeTool": "Object Inspector",
                      "open": true
                    },
                    "transactionTypeIndex": 0,
                    "translate": [
                      -872.0999999999999,
                      -222.32031484257868
                    ]
                  }
                }
              }
            ]
          }
        ],
        "comments": [
          {
            "id": 1,
            "author": {
              "id": "viuser",
              "name": "Test viuser"
            },
            "createDate": "2020-04-13T19:18:05.087Z",
            "lastUpdatedAt": "2020-04-13T19:18:05.087Z",
            "lastUpdatedBy": "viuser",
            "detail": "Sample comment<br />"
          }
        ],
        "attachmentsCount": 2,
        "x-widdershins-oldRef": "#/components/examples/enrichedDocumentExample/value"
      },
      "x-widdershins-oldRef": "#/components/examples/enrichedDocumentExample"
    }';
    const headers = {
      'Content-Type':'application/json',
      'Accept':'application/json'
    };
    
    fetch('https://example.com/svi-datahub/documents',
    {
      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/svi-datahub/documents', 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/svi-datahub/documents", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    

    POST /documents

    Create a new internal document. If child documents are included in the request body, new child documents are also created.

    Body parameter

    {
      "description": "Example of an Enriched Document object.",
      "value": {
        "objectTypeName": "person",
        "objectTypeId": 100515,
        "objectTypeVersion": 4,
        "id": "2f21e644-089a-47d8-a503-bbdd4d8dac3d",
        "fieldValues": {
          "birthday": "2020-01-05T00:00:00Z",
          "created_at_dttm": "2020-04-13T19:17:47.84Z",
          "created_by_user_id": "viuser",
          "first_name": "John",
          "id": "2f21e644-089a-47d8-a503-bbdd4d8dac3d",
          "last_name": "Smith",
          "last_updated_at_dttm": "2020-04-13T19:31:37.097Z",
          "last_updated_by_user_id": "viuser",
          "version": 4
        },
        "createdAt": "2020-04-13T19:17:47.840Z",
        "lastUpdatedAt": "2020-04-13T19:31:37.097Z",
        "validFrom": "2020-01-05T00:00:00.000Z",
        "fieldRestrictions": {
          "person": {
            "ssn": {
              "masked": {
                "currentUserIsAuthorizedToReveal": true
              }
            }
          }
        },
        "sheets": [
          {
            "id": 201,
            "type": "WORKSHEET",
            "name": "Workspace-1",
            "version": 2,
            "created": "2020-04-13T19:27:08.105Z",
            "createdBy": "viuser",
            "lastModified": "2020-04-13T19:27:26.175Z",
            "lastModifiedBy": "viuser",
            "tabOrder": 0,
            "uxState": {
              "commonToolPane": {
                "expanded": true,
                "width": 340
              },
              "filterPanel": {
                "expanded": true,
                "width": 200
              }
            },
            "cells": [
              {
                "type": "LIVE",
                "id": 301,
                "row": 0,
                "position": 0,
                "height": 0,
                "width": 0,
                "version": 1,
                "documents": [
                  {
                    "type": "person",
                    "id": "2f21e644-089a-47d8-a503-bbdd4d8dac3d",
                    "uniqueId": "person#2f21e644-089a-47d8-a503-bbdd4d8dac3d"
                  },
                  {
                    "type": "person",
                    "id": "ba0f8afd-b6e0-4763-91a8-9c6810d0156b",
                    "uniqueId": "person#ba0f8afd-b6e0-4763-91a8-9c6810d0156b"
                  }
                ],
                "visualizationType": "Network",
                "resultsPerPage": 0,
                "networkData": {
                  "links": [],
                  "nodes": {
                    "person~2f21e644-089a-47d8-a503-bbdd4d8dac3d": {
                      "id": "person~2f21e644-089a-47d8-a503-bbdd4d8dac3d",
                      "transitionStart": {
                        "x": 667,
                        "y": 206.5
                      },
                      "type": "person",
                      "typeLabel": "Person",
                      "x": 711.99394815911,
                      "y": 220.234232742122
                    },
                    "person~ba0f8afd-b6e0-4763-91a8-9c6810d0156b": {
                      "id": "person~ba0f8afd-b6e0-4763-91a8-9c6810d0156b",
                      "transitionStart": {
                        "x": 339.81315560960843,
                        "y": 106.62745147130762
                      },
                      "type": "person",
                      "typeLabel": "Person",
                      "x": 621.6305200034983,
                      "y": 192.65113758282533
                    }
                  },
                  "numNodes": 2,
                  "options": {
                    "activeNodes": false,
                    "centralityType": null,
                    "displayableTransactionType": null,
                    "groupCtr": 1,
                    "layout": {
                      "charge": 25,
                      "linkDistance": 130,
                      "linkStrength": 0.4,
                      "velocityDecay": 0.45
                    },
                    "nodeCtr": 1,
                    "scale": 2.0766116941529233,
                    "showLegend": true,
                    "showLinkLabels": false,
                    "showNodeAnnotation": true,
                    "showNodeLabels": true,
                    "showTimeline": false,
                    "showTransactionDetails": false,
                    "showTransactionLinks": false,
                    "toolsPane": {
                      "activeTool": "Object Inspector",
                      "open": true
                    },
                    "transactionTypeIndex": 0,
                    "translate": [
                      -872.0999999999999,
                      -222.32031484257868
                    ]
                  }
                }
              }
            ]
          }
        ],
        "comments": [
          {
            "id": 1,
            "author": {
              "id": "viuser",
              "name": "Test viuser"
            },
            "createDate": "2020-04-13T19:18:05.087Z",
            "lastUpdatedAt": "2020-04-13T19:18:05.087Z",
            "lastUpdatedBy": "viuser",
            "detail": "Sample comment<br />"
          }
        ],
        "attachmentsCount": 2,
        "x-widdershins-oldRef": "#/components/examples/enrichedDocumentExample/value"
      },
      "x-widdershins-oldRef": "#/components/examples/enrichedDocumentExample"
    }
    
    Parameters
    Name In Type Required Description
    _operation query string false When this query parameter is set to CREATE_AND_LINK, the request body contains both an enriched document and a link. Both the enriched document and the link are created in one operation. In this case, the client can set the Accept header of this request to application/vnd.sas.investigation.data.masked.enriched.document.and.link+json. If it does, any masked data in the response will be replaced with dots. Otherwise, masked data in the response is omitted.
    body body enrichedDocument false The document to be created.
    Detailed descriptions

    _operation: When this query parameter is set to CREATE_AND_LINK, the request body contains both an enriched document and a link. Both the enriched document and the link are created in one operation. In this case, the client can set the Accept header of this request to application/vnd.sas.investigation.data.masked.enriched.document.and.link+json. If it does, any masked data in the response will be replaced with dots. Otherwise, masked data in the response is omitted.

    Enumerated Values
    Parameter Value
    _operation CREATE_AND_LINK

    Example responses

    Example of an Enriched Document object.

    {
      "objectTypeName": "person",
      "objectTypeId": 100515,
      "objectTypeVersion": 4,
      "id": "2f21e644-089a-47d8-a503-bbdd4d8dac3d",
      "fieldValues": {
        "birthday": "2020-01-05T00:00:00Z",
        "created_at_dttm": "2020-04-13T19:17:47.84Z",
        "created_by_user_id": "viuser",
        "first_name": "John",
        "id": "2f21e644-089a-47d8-a503-bbdd4d8dac3d",
        "last_name": "Smith",
        "last_updated_at_dttm": "2020-04-13T19:31:37.097Z",
        "last_updated_by_user_id": "viuser",
        "version": 4
      },
      "createdAt": "2020-04-13T19:17:47.840Z",
      "lastUpdatedAt": "2020-04-13T19:31:37.097Z",
      "validFrom": "2020-01-05T00:00:00.000Z",
      "fieldRestrictions": {
        "person": {
          "ssn": {
            "masked": {
              "currentUserIsAuthorizedToReveal": true
            }
          }
        }
      },
      "sheets": [
        {
          "id": 201,
          "type": "WORKSHEET",
          "name": "Workspace-1",
          "version": 2,
          "created": "2020-04-13T19:27:08.105Z",
          "createdBy": "viuser",
          "lastModified": "2020-04-13T19:27:26.175Z",
          "lastModifiedBy": "viuser",
          "tabOrder": 0,
          "uxState": {
            "commonToolPane": {
              "expanded": true,
              "width": 340
            },
            "filterPanel": {
              "expanded": true,
              "width": 200
            }
          },
          "cells": [
            {
              "type": "LIVE",
              "id": 301,
              "row": 0,
              "position": 0,
              "height": 0,
              "width": 0,
              "version": 1,
              "documents": [
                {
                  "type": "person",
                  "id": "2f21e644-089a-47d8-a503-bbdd4d8dac3d",
                  "uniqueId": "person#2f21e644-089a-47d8-a503-bbdd4d8dac3d"
                },
                {
                  "type": "person",
                  "id": "ba0f8afd-b6e0-4763-91a8-9c6810d0156b",
                  "uniqueId": "person#ba0f8afd-b6e0-4763-91a8-9c6810d0156b"
                }
              ],
              "visualizationType": "Network",
              "resultsPerPage": 0,
              "networkData": {
                "links": [],
                "nodes": {
                  "person~2f21e644-089a-47d8-a503-bbdd4d8dac3d": {
                    "id": "person~2f21e644-089a-47d8-a503-bbdd4d8dac3d",
                    "transitionStart": {
                      "x": 667,
                      "y": 206.5
                    },
                    "type": "person",
                    "typeLabel": "Person",
                    "x": 711.99394815911,
                    "y": 220.234232742122
                  },
                  "person~ba0f8afd-b6e0-4763-91a8-9c6810d0156b": {
                    "id": "person~ba0f8afd-b6e0-4763-91a8-9c6810d0156b",
                    "transitionStart": {
                      "x": 339.81315560960843,
                      "y": 106.62745147130762
                    },
                    "type": "person",
                    "typeLabel": "Person",
                    "x": 621.6305200034983,
                    "y": 192.65113758282533
                  }
                },
                "numNodes": 2,
                "options": {
                  "activeNodes": false,
                  "centralityType": null,
                  "displayableTransactionType": null,
                  "groupCtr": 1,
                  "layout": {
                    "charge": 25,
                    "linkDistance": 130,
                    "linkStrength": 0.4,
                    "velocityDecay": 0.45
                  },
                  "nodeCtr": 1,
                  "scale": 2.0766116941529233,
                  "showLegend": true,
                  "showLinkLabels": false,
                  "showNodeAnnotation": true,
                  "showNodeLabels": true,
                  "showTimeline": false,
                  "showTransactionDetails": false,
                  "showTransactionLinks": false,
                  "toolsPane": {
                    "activeTool": "Object Inspector",
                    "open": true
                  },
                  "transactionTypeIndex": 0,
                  "translate": [
                    -872.0999999999999,
                    -222.32031484257868
                  ]
                }
              }
            }
          ]
        }
      ],
      "comments": [
        {
          "id": 1,
          "author": {
            "id": "viuser",
            "name": "Test viuser"
          },
          "createDate": "2020-04-13T19:18:05.087Z",
          "lastUpdatedAt": "2020-04-13T19:18:05.087Z",
          "lastUpdatedBy": "viuser",
          "detail": "Sample comment<br />"
        }
      ],
      "attachmentsCount": 2
    }
    

    Example of a Document and Link Bundle

    {
      "document": {
        "objectTypeName": "person",
        "objectTypeId": 100515,
        "objectTypeVersion": 4,
        "id": "2f21e644-089a-47d8-a503-bbdd4d8dac3d",
        "fieldValues": {
          "birthday": "2020-01-05T00:00:00Z",
          "created_at_dttm": "2020-04-13T19:17:47.84Z",
          "created_by_user_id": "viuser",
          "first_name": "John",
          "id": "2f21e644-089a-47d8-a503-bbdd4d8dac3d",
          "last_name": "Smith",
          "last_updated_at_dttm": "2020-04-13T19:31:37.097Z",
          "last_updated_by_user_id": "viuser",
          "version": 4
        },
        "fieldRestrictions": {
          "person": {
            "ssn": {
              "masked": {
                "currentUserIsAuthorizedToReveal": true
              }
            }
          }
        },
        "createdAt": "2020-04-13T19:17:47.840Z",
        "lastUpdatedAt": "2020-04-13T19:31:37.097Z",
        "validFrom": "2020-01-05T00:00:00.000Z",
        "sheets": [
          {
            "id": 201,
            "type": "WORKSHEET",
            "name": "Workspace-1",
            "version": 2,
            "created": "2020-04-13T19:27:08.105Z",
            "createdBy": "viuser",
            "lastModified": "2020-04-13T19:27:26.175Z",
            "lastModifiedBy": "viuser",
            "tabOrder": 0,
            "uxState": {
              "commonToolPane": {
                "expanded": true,
                "width": 340
              },
              "filterPanel": {
                "expanded": true,
                "width": 200
              }
            },
            "cells": [
              {
                "type": "LIVE",
                "id": 301,
                "row": 0,
                "position": 0,
                "height": 0,
                "width": 0,
                "version": 1,
                "documents": [
                  {
                    "type": "person",
                    "id": "2f21e644-089a-47d8-a503-bbdd4d8dac3d",
                    "uniqueId": "person#2f21e644-089a-47d8-a503-bbdd4d8dac3d"
                  },
                  {
                    "type": "person",
                    "id": "ba0f8afd-b6e0-4763-91a8-9c6810d0156b",
                    "uniqueId": "person#ba0f8afd-b6e0-4763-91a8-9c6810d0156b"
                  }
                ],
                "visualizationType": "Network",
                "resultsPerPage": 0,
                "networkData": {
                  "links": [],
                  "nodes": {
                    "person~2f21e644-089a-47d8-a503-bbdd4d8dac3d": {
                      "id": "person~2f21e644-089a-47d8-a503-bbdd4d8dac3d",
                      "transitionStart": {
                        "x": 667,
                        "y": 206.5
                      },
                      "type": "person",
                      "typeLabel": "Person",
                      "x": 711.99394815911,
                      "y": 220.234232742122
                    },
                    "person~ba0f8afd-b6e0-4763-91a8-9c6810d0156b": {
                      "id": "person~ba0f8afd-b6e0-4763-91a8-9c6810d0156b",
                      "transitionStart": {
                        "x": 339.81315560960843,
                        "y": 106.62745147130762
                      },
                      "type": "person",
                      "typeLabel": "Person",
                      "x": 621.6305200034983,
                      "y": 192.65113758282533
                    }
                  },
                  "numNodes": 2,
                  "options": {
                    "activeNodes": false,
                    "centralityType": null,
                    "displayableTransactionType": null,
                    "groupCtr": 1,
                    "layout": {
                      "charge": 25,
                      "linkDistance": 130,
                      "linkStrength": 0.4,
                      "velocityDecay": 0.45
                    },
                    "nodeCtr": 1,
                    "scale": 2.0766116941529233,
                    "showLegend": true,
                    "showLinkLabels": false,
                    "showNodeAnnotation": true,
                    "showNodeLabels": true,
                    "showTimeline": false,
                    "showTransactionDetails": false,
                    "showTransactionLinks": false,
                    "toolsPane": {
                      "activeTool": "Object Inspector",
                      "open": true
                    },
                    "transactionTypeIndex": 0,
                    "translate": [
                      -872.0999999999999,
                      -222.32031484257868
                    ]
                  }
                }
              }
            ]
          }
        ],
        "comments": [
          {
            "id": 1,
            "author": {
              "id": "viuser",
              "name": "Test viuser"
            },
            "createDate": "2020-04-13T19:18:05.087Z",
            "lastUpdatedAt": "2020-04-13T19:18:05.087Z",
            "lastUpdatedBy": "viuser",
            "detail": "Sample comment<br />"
          }
        ],
        "attachmentsCount": 2
      },
      "documentLink": {
        "relationshipTypeName": "witnessed_by",
        "relationshipTypeVersion": 1,
        "relationshipTypeLabel": "Witnessed by",
        "id": "witnessed_by|_|intel_report|_|person|_|e5343e0e-3d68-11e8-b467-0ed5f89f718b",
        "createdAt": "2015-10-01T18:30:03.656Z",
        "lastUpdatedAt": "2015-10-01T18:30:03.656Z",
        "displayLabel": "Witnessed by",
        "fromObjectTypeName": "intel_report",
        "fromObjectTypeVersion": 3,
        "fromObjectId": "uuid_502",
        "fromObjectDisplayLabel": "John Smith",
        "toObjectTypeName": "person",
        "toObjectTypeVersion": 6,
        "toObjectId": "uuid_102",
        "toObjectDisplayLabel": "John Smith",
        "fieldValues": {
          "auto_generated_sk": "e5343e0e-3d68-11e8-b467-0ed5f89f718b",
          "created_at_dttm": "2015-10-01T18:30:03.656Z",
          "created_by_user_id": "unit_test",
          "intelReportId": "uuid_502",
          "last_updated_at_dttm": "2015-10-01T18:30:03.656Z",
          "last_updated_by_user_id": "unit_test",
          "personId": "uuid_102",
          "version": 1
        },
        "qualifiedTypeName": "intel_report__witnessed_by"
      }
    }
    

    201 Response

    400 Response

    {
      "message": "There was an error processing your request.",
      "id": "DH9999",
      "errorCode": 9999,
      "httpStatusCode": 400,
      "details": [
        "See the log for additional details."
      ],
      "remediation": "Please resolve the error and then resubmit the request."
    }
    
    Responses
    Status Meaning Description Schema
    201 Created The internal document was created. maskedDocumentAndLink
    400 Bad Request The request was invalid. sasError
    Response Headers
    Status Header Type Format Description
    201 Location string The URI of the newly created document.

    Get headers for a collection of documents by entity type

    Code samples

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

    HEAD /documents/{entityTypeName}

    Gets headers for a collection of documents for the specified entity type. To filter the collection of documents, submit a GET via POST request.

    Parameters
    Name In Type Required Description
    Accept-Item header string false The media type that the client accepts for items within the response collection.
    entityTypeName path string true The name of the entity type to which the document belongs.
    start query integer false The starting index of the first document in a page.
    limit query integer false The maximum number of documents to return in this page of results. The actual number of returned documents is fewer if the collection is exhausted.
    depth query string false The depth of child documents to return. The value can be either:
      includeDisplayLabel query boolean false Indicates whether to generate and include the display label in the document.
      Detailed descriptions

      limit: The maximum number of documents to return in this page of results. The actual number of returned documents is fewer if the collection is exhausted.

      depth: The depth of child documents to return. The value can be either:

      Enumerated Values
      Parameter Value
      Accept-Item application/json
      Accept-Item application/vnd.sas.investigation.data.enriched.document
      Accept-Item application/vnd.sas.investigation.data.enriched.document+json
      Accept-Item application/vnd.sas.investigation.data.masked.enriched.document
      Accept-Item application/vnd.sas.investigation.data.masked.enriched.document+json
      Accept-Item application/vnd.sas.investigation.data.minimally.masked.enriched.document
      Accept-Item application/vnd.sas.investigation.data.minimally.masked.enriched.document+json
      Responses
      Status Meaning Description Schema
      200 OK The request succeeded. None
      404 Not Found The entity type was not found. None
      415 Unsupported Media Type The endpoint cannot produce collection items of the type specified in the Accept-Item header. None

      Get a collection of documents by entity type

      Code samples

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

      GET /documents/{entityTypeName}

      Gets a collection of documents for the specified entity type. To filter the collection of documents, submit a GET via POST request.

      Parameters
      Name In Type Required Description
      Accept-Item header string false The media type that the client accepts for items within the response collection.
      entityTypeName path string true The name of the entity type to which the document belongs.
      start query integer false The starting index of the first document in a page.
      limit query integer false The maximum number of documents to return in this page of results. The actual number of returned documents is fewer if the collection is exhausted.
      depth query string false The depth of child documents to return. The value can be either:
        includeDisplayLabel query boolean false Indicates whether to generate and include the display label in the document.
        Detailed descriptions

        limit: The maximum number of documents to return in this page of results. The actual number of returned documents is fewer if the collection is exhausted.

        depth: The depth of child documents to return. The value can be either:

        Enumerated Values
        Parameter Value
        Accept-Item application/json
        Accept-Item application/vnd.sas.investigation.data.enriched.document
        Accept-Item application/vnd.sas.investigation.data.enriched.document+json
        Accept-Item application/vnd.sas.investigation.data.masked.enriched.document
        Accept-Item application/vnd.sas.investigation.data.masked.enriched.document+json
        Accept-Item application/vnd.sas.investigation.data.minimally.masked.enriched.document
        Accept-Item application/vnd.sas.investigation.data.minimally.masked.enriched.document+json

        Example responses

        Example of a collection of Enriched Documents.

        [
          {
            "objectTypeName": "person",
            "objectTypeId": 100515,
            "objectTypeVersion": 4,
            "id": "2f21e644-089a-47d8-a503-bbdd4d8dac3d",
            "fieldValues": {
              "birthday": "2020-01-05T00:00:00Z",
              "created_at_dttm": "2020-04-13T19:17:47.84Z",
              "created_by_user_id": "viuser",
              "first_name": "John",
              "id": "2f21e644-089a-47d8-a503-bbdd4d8dac3d",
              "last_name": "Smith",
              "last_updated_at_dttm": "2020-04-13T19:31:37.097Z",
              "last_updated_by_user_id": "viuser",
              "version": 4
            },
            "createdAt": "2020-04-13T19:17:47.840Z",
            "lastUpdatedAt": "2020-04-13T19:31:37.097Z",
            "validFrom": "2020-01-05T00:00:00.000Z",
            "fieldRestrictions": {
              "person": {
                "ssn": {
                  "masked": {
                    "currentUserIsAuthorizedToReveal": true
                  }
                }
              }
            },
            "sheets": [
              {
                "id": 201,
                "type": "WORKSHEET",
                "name": "Workspace-1",
                "version": 2,
                "created": "2020-04-13T19:27:08.105Z",
                "createdBy": "viuser",
                "lastModified": "2020-04-13T19:27:26.175Z",
                "lastModifiedBy": "viuser",
                "tabOrder": 0,
                "uxState": {
                  "commonToolPane": {
                    "expanded": true,
                    "width": 340
                  },
                  "filterPanel": {
                    "expanded": true,
                    "width": 200
                  }
                },
                "cells": [
                  {
                    "type": "LIVE",
                    "id": 301,
                    "row": 0,
                    "position": 0,
                    "height": 0,
                    "width": 0,
                    "version": 1,
                    "documents": [
                      {
                        "type": "person",
                        "id": "2f21e644-089a-47d8-a503-bbdd4d8dac3d",
                        "uniqueId": "person#2f21e644-089a-47d8-a503-bbdd4d8dac3d"
                      },
                      {
                        "type": "person",
                        "id": "ba0f8afd-b6e0-4763-91a8-9c6810d0156b",
                        "uniqueId": "person#ba0f8afd-b6e0-4763-91a8-9c6810d0156b"
                      }
                    ],
                    "visualizationType": "Network",
                    "resultsPerPage": 0,
                    "networkData": {
                      "links": [],
                      "nodes": {
                        "person~2f21e644-089a-47d8-a503-bbdd4d8dac3d": {
                          "id": "person~2f21e644-089a-47d8-a503-bbdd4d8dac3d",
                          "transitionStart": {
                            "x": 667,
                            "y": 206.5
                          },
                          "type": "person",
                          "typeLabel": "Person",
                          "x": 711.99394815911,
                          "y": 220.234232742122
                        },
                        "person~ba0f8afd-b6e0-4763-91a8-9c6810d0156b": {
                          "id": "person~ba0f8afd-b6e0-4763-91a8-9c6810d0156b",
                          "transitionStart": {
                            "x": 339.81315560960843,
                            "y": 106.62745147130762
                          },
                          "type": "person",
                          "typeLabel": "Person",
                          "x": 621.6305200034983,
                          "y": 192.65113758282533
                        }
                      },
                      "numNodes": 2,
                      "options": {
                        "activeNodes": false,
                        "centralityType": null,
                        "displayableTransactionType": null,
                        "groupCtr": 1,
                        "layout": {
                          "charge": 25,
                          "linkDistance": 130,
                          "linkStrength": 0.4,
                          "velocityDecay": 0.45
                        },
                        "nodeCtr": 1,
                        "scale": 2.0766116941529233,
                        "showLegend": true,
                        "showLinkLabels": false,
                        "showNodeAnnotation": true,
                        "showNodeLabels": true,
                        "showTimeline": false,
                        "showTransactionDetails": false,
                        "showTransactionLinks": false,
                        "toolsPane": {
                          "activeTool": "Object Inspector",
                          "open": true
                        },
                        "transactionTypeIndex": 0,
                        "translate": [
                          -872.0999999999999,
                          -222.32031484257868
                        ]
                      }
                    }
                  }
                ]
              }
            ],
            "comments": [
              {
                "id": 1,
                "author": {
                  "id": "viuser",
                  "name": "Test viuser"
                },
                "createDate": "2020-04-13T19:18:05.087Z",
                "lastUpdatedAt": "2020-04-13T19:18:05.087Z",
                "lastUpdatedBy": "viuser",
                "detail": "Sample comment<br />"
              }
            ],
            "attachmentsCount": 2
          }
        ]
        

        Example of a collection of Masked Enriched Documents.

        [
          {
            "objectTypeName": "person",
            "objectTypeId": 100515,
            "objectTypeVersion": 4,
            "id": "2f21e644-089a-47d8-a503-bbdd4d8dac3d",
            "fieldValues": {
              "birthday": "2020-01-05T00:00:00Z",
              "created_at_dttm": "2020-04-13T19:17:47.84Z",
              "created_by_user_id": "viuser",
              "first_name": "John",
              "id": "2f21e644-089a-47d8-a503-bbdd4d8dac3d",
              "last_name": "Smith",
              "ssn": "•••••••••",
              "last_updated_at_dttm": "2020-04-13T19:31:37.097Z",
              "last_updated_by_user_id": "viuser",
              "version": 4
            },
            "createdAt": "2020-04-13T19:17:47.840Z",
            "lastUpdatedAt": "2020-04-13T19:31:37.097Z",
            "validFrom": "2020-01-05T00:00:00.000Z",
            "fieldRestrictions": {
              "person": {
                "ssn": {
                  "masked": {
                    "currentUserIsAuthorizedToReveal": true
                  }
                }
              }
            },
            "sheets": [
              {
                "id": 201,
                "type": "WORKSHEET",
                "name": "Workspace-1",
                "version": 2,
                "created": "2020-04-13T19:27:08.105Z",
                "createdBy": "viuser",
                "lastModified": "2020-04-13T19:27:26.175Z",
                "lastModifiedBy": "viuser",
                "tabOrder": 0,
                "uxState": {
                  "commonToolPane": {
                    "expanded": true,
                    "width": 340
                  },
                  "filterPanel": {
                    "expanded": true,
                    "width": 200
                  }
                },
                "cells": [
                  {
                    "type": "LIVE",
                    "id": 301,
                    "row": 0,
                    "position": 0,
                    "height": 0,
                    "width": 0,
                    "version": 1,
                    "documents": [
                      {
                        "type": "person",
                        "id": "2f21e644-089a-47d8-a503-bbdd4d8dac3d",
                        "uniqueId": "person#2f21e644-089a-47d8-a503-bbdd4d8dac3d"
                      },
                      {
                        "type": "person",
                        "id": "ba0f8afd-b6e0-4763-91a8-9c6810d0156b",
                        "uniqueId": "person#ba0f8afd-b6e0-4763-91a8-9c6810d0156b"
                      }
                    ],
                    "visualizationType": "Network",
                    "resultsPerPage": 0,
                    "networkData": {
                      "links": [],
                      "nodes": {
                        "person~2f21e644-089a-47d8-a503-bbdd4d8dac3d": {
                          "id": "person~2f21e644-089a-47d8-a503-bbdd4d8dac3d",
                          "transitionStart": {
                            "x": 667,
                            "y": 206.5
                          },
                          "type": "person",
                          "typeLabel": "Person",
                          "x": 711.99394815911,
                          "y": 220.234232742122
                        },
                        "person~ba0f8afd-b6e0-4763-91a8-9c6810d0156b": {
                          "id": "person~ba0f8afd-b6e0-4763-91a8-9c6810d0156b",
                          "transitionStart": {
                            "x": 339.81315560960843,
                            "y": 106.62745147130762
                          },
                          "type": "person",
                          "typeLabel": "Person",
                          "x": 621.6305200034983,
                          "y": 192.65113758282533
                        }
                      },
                      "numNodes": 2,
                      "options": {
                        "activeNodes": false,
                        "centralityType": null,
                        "displayableTransactionType": null,
                        "groupCtr": 1,
                        "layout": {
                          "charge": 25,
                          "linkDistance": 130,
                          "linkStrength": 0.4,
                          "velocityDecay": 0.45
                        },
                        "nodeCtr": 1,
                        "scale": 2.0766116941529233,
                        "showLegend": true,
                        "showLinkLabels": false,
                        "showNodeAnnotation": true,
                        "showNodeLabels": true,
                        "showTimeline": false,
                        "showTransactionDetails": false,
                        "showTransactionLinks": false,
                        "toolsPane": {
                          "activeTool": "Object Inspector",
                          "open": true
                        },
                        "transactionTypeIndex": 0,
                        "translate": [
                          -872.0999999999999,
                          -222.32031484257868
                        ]
                      }
                    }
                  }
                ]
              }
            ],
            "comments": [
              {
                "id": 1,
                "author": {
                  "id": "viuser",
                  "name": "Test viuser"
                },
                "createDate": "2020-04-13T19:18:05.087Z",
                "lastUpdatedAt": "2020-04-13T19:18:05.087Z",
                "lastUpdatedBy": "viuser",
                "detail": "Sample comment<br />"
              }
            ],
            "attachmentsCount": 2
          }
        ]
        

        Example of a collection of Minimally-Masked Enriched Documents.

        [
          {
            "objectTypeName": "person",
            "objectTypeId": 100515,
            "objectTypeVersion": 4,
            "id": "2f21e644-089a-47d8-a503-bbdd4d8dac3d",
            "fieldValues": {
              "birthday": "2020-01-05T00:00:00Z",
              "created_at_dttm": "2020-04-13T19:17:47.84Z",
              "created_by_user_id": "viuser",
              "first_name": "John",
              "id": "2f21e644-089a-47d8-a503-bbdd4d8dac3d",
              "last_name": "Smith",
              "ssn": "123456789",
              "last_updated_at_dttm": "2020-04-13T19:31:37.097Z",
              "last_updated_by_user_id": "viuser",
              "version": 4
            },
            "createdAt": "2020-04-13T19:17:47.840Z",
            "lastUpdatedAt": "2020-04-13T19:31:37.097Z",
            "validFrom": "2020-01-05T00:00:00.000Z",
            "fieldRestrictions": {
              "person": {
                "ssn": {
                  "masked": {
                    "currentUserIsAuthorizedToReveal": true
                  }
                }
              }
            },
            "sheets": [
              {
                "id": 201,
                "type": "WORKSHEET",
                "name": "Workspace-1",
                "version": 2,
                "created": "2020-04-13T19:27:08.105Z",
                "createdBy": "viuser",
                "lastModified": "2020-04-13T19:27:26.175Z",
                "lastModifiedBy": "viuser",
                "tabOrder": 0,
                "uxState": {
                  "commonToolPane": {
                    "expanded": true,
                    "width": 340
                  },
                  "filterPanel": {
                    "expanded": true,
                    "width": 200
                  }
                },
                "cells": [
                  {
                    "type": "LIVE",
                    "id": 301,
                    "row": 0,
                    "position": 0,
                    "height": 0,
                    "width": 0,
                    "version": 1,
                    "documents": [
                      {
                        "type": "person",
                        "id": "2f21e644-089a-47d8-a503-bbdd4d8dac3d",
                        "uniqueId": "person#2f21e644-089a-47d8-a503-bbdd4d8dac3d"
                      },
                      {
                        "type": "person",
                        "id": "ba0f8afd-b6e0-4763-91a8-9c6810d0156b",
                        "uniqueId": "person#ba0f8afd-b6e0-4763-91a8-9c6810d0156b"
                      }
                    ],
                    "visualizationType": "Network",
                    "resultsPerPage": 0,
                    "networkData": {
                      "links": [],
                      "nodes": {
                        "person~2f21e644-089a-47d8-a503-bbdd4d8dac3d": {
                          "id": "person~2f21e644-089a-47d8-a503-bbdd4d8dac3d",
                          "transitionStart": {
                            "x": 667,
                            "y": 206.5
                          },
                          "type": "person",
                          "typeLabel": "Person",
                          "x": 711.99394815911,
                          "y": 220.234232742122
                        },
                        "person~ba0f8afd-b6e0-4763-91a8-9c6810d0156b": {
                          "id": "person~ba0f8afd-b6e0-4763-91a8-9c6810d0156b",
                          "transitionStart": {
                            "x": 339.81315560960843,
                            "y": 106.62745147130762
                          },
                          "type": "person",
                          "typeLabel": "Person",
                          "x": 621.6305200034983,
                          "y": 192.65113758282533
                        }
                      },
                      "numNodes": 2,
                      "options": {
                        "activeNodes": false,
                        "centralityType": null,
                        "displayableTransactionType": null,
                        "groupCtr": 1,
                        "layout": {
                          "charge": 25,
                          "linkDistance": 130,
                          "linkStrength": 0.4,
                          "velocityDecay": 0.45
                        },
                        "nodeCtr": 1,
                        "scale": 2.0766116941529233,
                        "showLegend": true,
                        "showLinkLabels": false,
                        "showNodeAnnotation": true,
                        "showNodeLabels": true,
                        "showTimeline": false,
                        "showTransactionDetails": false,
                        "showTransactionLinks": false,
                        "toolsPane": {
                          "activeTool": "Object Inspector",
                          "open": true
                        },
                        "transactionTypeIndex": 0,
                        "translate": [
                          -872.0999999999999,
                          -222.32031484257868
                        ]
                      }
                    }
                  }
                ]
              }
            ],
            "comments": [
              {
                "id": 1,
                "author": {
                  "id": "viuser",
                  "name": "Test viuser"
                },
                "createDate": "2020-04-13T19:18:05.087Z",
                "lastUpdatedAt": "2020-04-13T19:18:05.087Z",
                "lastUpdatedBy": "viuser",
                "detail": "Sample comment<br />"
              }
            ],
            "attachmentsCount": 2
          }
        ]
        

        404 Response

        {
          "message": "There was an error processing your request.",
          "id": "DH9999",
          "errorCode": 9999,
          "httpStatusCode": 400,
          "details": [
            "See the log for additional details."
          ],
          "remediation": "Please resolve the error and then resubmit the request."
        }
        

        415 Response

        {
          "message": "There was an error processing your request.",
          "id": "DH9999",
          "errorCode": 9999,
          "httpStatusCode": 400,
          "details": [
            "See the log for additional details."
          ],
          "remediation": "Please resolve the error and then resubmit the request."
        }
        
        Responses
        Status Meaning Description Schema
        200 OK The request succeeded. Inline
        404 Not Found The entity type was not found. sasError
        415 Unsupported Media Type The endpoint cannot produce collection items of the type specified in the Accept-Item header. sasError
        Response Schema
        Enumerated Values
        Property Value
        type WORKSHEET
        type NOTESHEET
        type LIVE
        type STATIC
        type IMAGE
        type TEXT
        fieldDataType REFERENCE_DATA
        fieldDataType USER_GROUP
        fieldDataType BOOLEAN
        fieldDataType STRING
        fieldDataType SMALLINT
        fieldDataType INTEGER
        fieldDataType LONG
        fieldDataType FLOAT
        fieldDataType DOUBLE
        fieldDataType NUMERIC
        fieldDataType DATE
        fieldDataType TIMESTAMP
        fieldDataType TIMESTAMP_WITH_TIME_ZONE
        fieldDataType JSON
        userSelectionStrategy USERS
        userSelectionStrategy GROUPS
        userSelectionStrategy USERS_AND_GROUPS

        Filter a collection of documents

        Code samples

        # You can also use wget
        curl -X POST https://example.com/svi-datahub/documents/{entityTypeName} \
          -H 'Authorization: Bearer <access-token-goes-here>' \
          -H 'Content-Type: application/vnd.sas.investigation.data.document.filter.request' \
          -H 'Accept: application/json' \
          -H 'Accept-Item: application/json'
        
        
        const inputBody = '{
          "filter": "string",
          "start": 0,
          "limit": 20,
          "depth": 0,
          "includeDisplayLabel": false,
          "sortBy": "first_name:ascending;last_name:descending"
        }';
        const headers = {
          'Content-Type':'application/vnd.sas.investigation.data.document.filter.request',
          'Accept':'application/json',
          'Accept-Item':'application/json'
        };
        
        fetch('https://example.com/svi-datahub/documents/{entityTypeName}',
        {
          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.investigation.data.document.filter.request',
          'Accept': 'application/json',
          'Accept-Item': 'application/json'
        }
        
        r = requests.post('https://example.com/svi-datahub/documents/{entityTypeName}', headers = headers)
        
        print(r.json())
        
        package main
        
        import (
               "bytes"
               "net/http"
        )
        
        func main() {
        
            headers := map[string][]string{
                "Content-Type": []string{"application/vnd.sas.investigation.data.document.filter.request"},
                "Accept": []string{"application/json"},
                "Accept-Item": []string{"application/json"},
            }
        
            data := bytes.NewBuffer([]byte{jsonReq})
            req, err := http.NewRequest("POST", "https://example.com/svi-datahub/documents/{entityTypeName}", data)
            req.Header = headers
        
            client := &http.Client{}
            resp, err := client.Do(req)
            // ...
        }
        

        POST /documents/{entityTypeName}

        Filters a collection of documents by document ID or by using a custom filter. The type of filtering determines the media types to specify in the Content-Type header. This endpoint is a GET via POST. The reasoning for why a POST is needed is specified for each type of request.

        The client can specify the type of document returned in the Accept-Item header for both types of requests. The options are:

        Enriched documents are the document plus sheets (i.e, workspaces) and comments. A regular document does not include the enrichment data. Getting enriched documents is potentially less efficient than getting a document. You should use "application/vnd.sas.investigation.data.document" unless the enrichment data is required.

        Specifying "application/json" in a header indicates that the client would like to use the default media type for that header. The default media types for this endpoint are:

        HTTP Header Value in header Value interpreted by server
        Content-Type application/json application/vnd.sas.investigation.data.document.filter.request+json
        Accept application/json application/vnd.sas.collection+json
        Accept-Item application/json application/vnd.sas.investigation.data.enriched.document+json

        Using the default value for the Content-Type header means that the user is making a Document Filter request. Document Filter requests are requests for collections of documents that use a custom filter.

        The default item type returned is an enriched document for legacy reasons.

        Custom filter (Document Filter Request)

        Filter a collection of documents given the type and a filter string. This is a GET via POST request. The endpoint uses this design to keep the values used for filtering (the value of the "filter" property) from being logged.

        This request must have the following header and value:

        HTTP Header HTTP Header value
        Content-Type application/vnd.sas.investigation.data.document.filter.request+json

        The body of the request will be a Document Filter Request. See the Document Filter Request model for more details.

        Microsoft SQL Server and Azure SQL Server have limitations on the number of parameters that can be used when querying databases. When using this endpoint to filter documents that are stored in an SQL Server data store, large and complex filter strings that contain over 2000 parameters might fail. To circumvent this limitation, split your filter expression into smaller expressions and make multiple requests to this endpoint. Then, combine the results as appropriate.

        Filter By ID (Document ID Request)

        Request specific documents by providing an entity type name and an array of document ID values. Use this request when many documents by ID need to be requested. There is a similar document endpoint that accepts multiple "id" query parameters, but it is limited by the maximum URI size allowed. This request overcomes that limitation by placing the list of IDs in the body of a POST request.

        Document ID Requests must have the following header and value:

        HTTP Header HTTP Header value
        Content-Type application/vnd.sas.investigation.data.document.id.request+json

        The body of the request will be a Document ID Request. See the Document ID Request model for more details.

        Body parameter

        Parameters
        Name In Type Required Description
        entityTypeName path string true The name of the entity type to which the document collection belongs.
        Accept-Item header string false When making a request to filter documents, specifies the media type of the items returned.
        body body documentFilterRequest false The parameters that are used for filtering, sorting, display labels, and the inclusion of child documents. There are two types of requests that can be made: request by ID or by using a custom filter. The default is using a custom filter. See the description for this endpoint for more details.
        Detailed descriptions

        body: The parameters that are used for filtering, sorting, display labels, and the inclusion of child documents. There are two types of requests that can be made: request by ID or by using a custom filter. The default is using a custom filter. See the description for this endpoint for more details.

        Enumerated Values
        Parameter Value
        Accept-Item application/json
        Accept-Item application/vnd.sas.investigation.data.enriched.document
        Accept-Item application/vnd.sas.investigation.data.enriched.document+json
        Accept-Item application/vnd.sas.investigation.data.masked.enriched.document
        Accept-Item application/vnd.sas.investigation.data.masked.enriched.document+json
        Accept-Item application/vnd.sas.investigation.data.document
        Accept-Item application/vnd.sas.investigation.data.document+json
        Accept-Item application/vnd.sas.investigation.data.masked.document
        Accept-Item application/vnd.sas.investigation.data.masked.document+json

        Example responses

        Example of a Resource Collection that contains Enriched Document objects.

        {
          "links": [
            {
              "method": "POST",
              "rel": "self",
              "href": "/documents/person",
              "uri": "/documents/person",
              "type": "application/vnd.sas.collection",
              "itemType": "application/vnd.sas.investigation.data.enriched.document",
              "body": {
                "start": 0,
                "limit": 10,
                "includeDisplayLabel": true,
                "depth": "0",
                "sortBy": "id",
                "filter": "eq(first_name, 'John')"
              }
            },
            {
              "method": "GET",
              "rel": "collection",
              "href": "/documents/person",
              "uri": "/documents/person",
              "type": "application/vnd.sas.collection"
            }
          ],
          "name": "documents",
          "accept": "application/vnd.sas.investigation.data.enriched.document+json",
          "start": 0,
          "count": 1,
          "items": [
            {
              "objectTypeName": "person",
              "objectTypeId": 100924,
              "objectTypeVersion": 6,
              "id": "uuid_100",
              "fieldValues": {
                "created_at_dttm": "2015-10-01T18:30:03.656Z",
                "created_by_user_id": "unit_test",
                "first_name": "John",
                "id": "uuid_100",
                "last_name": "Smith",
                "last_updated_at_dttm": "2015-10-01T18:30:03.656Z",
                "last_updated_by_user_id": "unit_test",
                "version": 1
              },
              "fieldRestrictions": {
                "person": {
                  "ssn": {
                    "masked": {
                      "currentUserIsAuthorizedToReveal": true
                    }
                  }
                }
              },
              "displayLabel": "John Smith",
              "createdAt": "2015-10-01T18:30:03.656Z",
              "lastUpdatedAt": "2015-10-01T18:30:03.656Z",
              "attachmentsCount": 0
            }
          ],
          "limit": 10,
          "version": 2
        }
        

        Example of a Resource Collection that contains Document objects.

        {
          "links": [],
          "name": "documents",
          "count": 1,
          "version": 2,
          "items": [
            {
              "objectTypeName": "person",
              "objectTypeId": 100515,
              "objectTypeVersion": 4,
              "id": "2f21e644-089a-47d8-a503-bbdd4d8dac3d",
              "fieldValues": {
                "birthday": "2020-01-05T00:00:00Z",
                "created_at_dttm": "2020-04-13T19:17:47.84Z",
                "created_by_user_id": "viuser",
                "first_name": "John",
                "id": "2f21e644-089a-47d8-a503-bbdd4d8dac3d",
                "last_name": "Smith",
                "last_updated_at_dttm": "2020-04-13T19:31:37.097Z",
                "last_updated_by_user_id": "viuser",
                "version": 4
              },
              "createdAt": "2020-04-13T19:17:47.840Z",
              "lastUpdatedAt": "2020-04-13T19:31:37.097Z",
              "validFrom": "2020-01-05T00:00:00.000Z"
            }
          ]
        }
        

        Example of a Resource Collection that contains Masked Enriched Document objects.

        {
          "links": [
            {
              "method": "POST",
              "rel": "self",
              "href": "/documents/person",
              "uri": "/documents/person",
              "type": "application/vnd.sas.collection",
              "itemType": "application/vnd.sas.investigation.data.enriched.document",
              "body": {
                "start": 0,
                "limit": 10,
                "includeDisplayLabel": true,
                "depth": "0",
                "sortBy": "id",
                "filter": "eq(first_name, 'John')"
              }
            },
            {
              "method": "GET",
              "rel": "collection",
              "href": "/documents/person",
              "uri": "/documents/person",
              "type": "application/vnd.sas.collection"
            }
          ],
          "name": "documents",
          "accept": "application/vnd.sas.investigation.data.enriched.document+json",
          "start": 0,
          "count": 1,
          "items": [
            {
              "objectTypeName": "person",
              "objectTypeId": 100924,
              "objectTypeVersion": 6,
              "id": "uuid_100",
              "fieldValues": {
                "created_at_dttm": "2015-10-01T18:30:03.656Z",
                "created_by_user_id": "unit_test",
                "first_name": "John",
                "id": "uuid_100",
                "last_name": "Smith",
                "ssn": "•••••••••",
                "last_updated_at_dttm": "2015-10-01T18:30:03.656Z",
                "last_updated_by_user_id": "unit_test",
                "version": 1
              },
              "fieldRestrictions": {
                "person": {
                  "ssn": {
                    "masked": {
                      "currentUserIsAuthorizedToReveal": true
                    }
                  }
                }
              },
              "displayLabel": "John Smith",
              "createdAt": "2015-10-01T18:30:03.656Z",
              "lastUpdatedAt": "2015-10-01T18:30:03.656Z",
              "attachmentsCount": 0
            }
          ],
          "limit": 10,
          "version": 2
        }
        

        Example of a Resource Collection that contains Masked Document objects.

        {
          "links": [],
          "name": "documents",
          "count": 1,
          "version": 2,
          "items": [
            {
              "objectTypeName": "person",
              "objectTypeId": 100515,
              "objectTypeVersion": 4,
              "id": "2f21e644-089a-47d8-a503-bbdd4d8dac3d",
              "fieldValues": {
                "birthday": "2020-01-05T00:00:00Z",
                "created_at_dttm": "2020-04-13T19:17:47.84Z",
                "created_by_user_id": "viuser",
                "first_name": "John",
                "id": "2f21e644-089a-47d8-a503-bbdd4d8dac3d",
                "last_name": "Smith",
                "ssn": "•••••••••",
                "last_updated_at_dttm": "2020-04-13T19:31:37.097Z",
                "last_updated_by_user_id": "viuser",
                "version": 4
              },
              "createdAt": "2020-04-13T19:17:47.840Z",
              "lastUpdatedAt": "2020-04-13T19:31:37.097Z",
              "validFrom": "2020-01-05T00:00:00.000Z"
            }
          ]
        }
        

        Example of a Resource Collection that contains Enriched Document objects.

        Example of a Resource Collection that contains Document objects.

        Example of a Resource Collection that contains Masked Enriched Document objects.

        Example of a Resource Collection that contains Masked Document objects.

        400 Response

        {
          "message": "There was an error processing your request.",
          "id": "DH9999",
          "errorCode": 9999,
          "httpStatusCode": 400,
          "details": [
            "See the log for additional details."
          ],
          "remediation": "Please resolve the error and then resubmit the request."
        }
        

        404 Response

        {
          "message": "There was an error processing your request.",
          "id": "DH9999",
          "errorCode": 9999,
          "httpStatusCode": 400,
          "details": [
            "See the log for additional details."
          ],
          "remediation": "Please resolve the error and then resubmit the request."
        }
        

        415 Response

        {
          "message": "There was an error processing your request.",
          "id": "DH9999",
          "errorCode": 9999,
          "httpStatusCode": 400,
          "details": [
            "See the log for additional details."
          ],
          "remediation": "Please resolve the error and then resubmit the request."
        }
        
        Responses
        Status Meaning Description Schema
        200 OK The request succeeded. Inline
        400 Bad Request The request was invalid. sasError
        404 Not Found The type of document was not found. sasError
        415 Unsupported Media Type An unsupported media type was provided. sasError
        Response Schema
        Enumerated Values
        Property Value
        type WORKSHEET
        type NOTESHEET
        type LIVE
        type STATIC
        type IMAGE
        type TEXT
        fieldDataType REFERENCE_DATA
        fieldDataType USER_GROUP
        fieldDataType BOOLEAN
        fieldDataType STRING
        fieldDataType SMALLINT
        fieldDataType INTEGER
        fieldDataType LONG
        fieldDataType FLOAT
        fieldDataType DOUBLE
        fieldDataType NUMERIC
        fieldDataType DATE
        fieldDataType TIMESTAMP
        fieldDataType TIMESTAMP_WITH_TIME_ZONE
        fieldDataType JSON
        userSelectionStrategy USERS
        userSelectionStrategy GROUPS
        userSelectionStrategy USERS_AND_GROUPS

        Get headers for a document by ID

        Code samples

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

        HEAD /documents/{entityTypeName}/{documentId}

        Gets headers for a document by ID. Both internal and external documents can be read.

        Parameters
        Name In Type Required Description
        entityTypeName path string true The name of the entity type to which the document belongs.
        documentId path string true The ID for the document.
        depth query string false The depth of child documents to return. Valid values are:
          includeDisplayLabel query boolean false Indicates whether to generate and include the display label in the document.
          Detailed descriptions

          depth: The depth of child documents to return. Valid values are:

          Responses
          Status Meaning Description Schema
          200 OK The request succeeded. None
          400 Bad Request The request was invalid. errorResponse
          404 Not Found The document was not found. None

          Get a document by ID

          Code samples

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

          GET /documents/{entityTypeName}/{documentId}

          Gets a document by ID. You can use a parameter to specify whether child documents are returned. Both internal and external documents can be read.

          Parameters
          Name In Type Required Description
          entityTypeName path string true The name of the entity type to which the document belongs.
          documentId path string true The ID for the document.
          depth query string false The depth of child documents to return. Valid values are:
            includeDisplayLabel query boolean false Indicates whether to generate and include the display label in the document.
            Detailed descriptions

            depth: The depth of child documents to return. Valid values are:

            Example responses

            200 Response

            {
              "objectTypeName": "person",
              "objectTypeId": 100515,
              "objectTypeVersion": 4,
              "id": "2f21e644-089a-47d8-a503-bbdd4d8dac3d",
              "fieldValues": {
                "birthday": "2020-01-05T00:00:00Z",
                "created_at_dttm": "2020-04-13T19:17:47.84Z",
                "created_by_user_id": "viuser",
                "first_name": "John",
                "id": "2f21e644-089a-47d8-a503-bbdd4d8dac3d",
                "last_name": "Smith",
                "last_updated_at_dttm": "2020-04-13T19:31:37.097Z",
                "last_updated_by_user_id": "viuser",
                "version": 4
              },
              "createdAt": "2020-04-13T19:17:47.840Z",
              "lastUpdatedAt": "2020-04-13T19:31:37.097Z",
              "validFrom": "2020-01-05T00:00:00.000Z",
              "fieldRestrictions": {
                "person": {
                  "ssn": {
                    "masked": {
                      "currentUserIsAuthorizedToReveal": true
                    }
                  }
                }
              },
              "sheets": [
                {
                  "id": 201,
                  "type": "WORKSHEET",
                  "name": "Workspace-1",
                  "version": 2,
                  "created": "2020-04-13T19:27:08.105Z",
                  "createdBy": "viuser",
                  "lastModified": "2020-04-13T19:27:26.175Z",
                  "lastModifiedBy": "viuser",
                  "tabOrder": 0,
                  "uxState": {
                    "commonToolPane": {
                      "expanded": true,
                      "width": 340
                    },
                    "filterPanel": {
                      "expanded": true,
                      "width": 200
                    }
                  },
                  "cells": [
                    {
                      "type": "LIVE",
                      "id": 301,
                      "row": 0,
                      "position": 0,
                      "height": 0,
                      "width": 0,
                      "version": 1,
                      "documents": [
                        {
                          "type": "person",
                          "id": "2f21e644-089a-47d8-a503-bbdd4d8dac3d",
                          "uniqueId": "person#2f21e644-089a-47d8-a503-bbdd4d8dac3d"
                        },
                        {
                          "type": "person",
                          "id": "ba0f8afd-b6e0-4763-91a8-9c6810d0156b",
                          "uniqueId": "person#ba0f8afd-b6e0-4763-91a8-9c6810d0156b"
                        }
                      ],
                      "visualizationType": "Network",
                      "resultsPerPage": 0,
                      "networkData": {
                        "links": [],
                        "nodes": {
                          "person~2f21e644-089a-47d8-a503-bbdd4d8dac3d": {
                            "id": "person~2f21e644-089a-47d8-a503-bbdd4d8dac3d",
                            "transitionStart": {
                              "x": 667,
                              "y": 206.5
                            },
                            "type": "person",
                            "typeLabel": "Person",
                            "x": 711.99394815911,
                            "y": 220.234232742122
                          },
                          "person~ba0f8afd-b6e0-4763-91a8-9c6810d0156b": {
                            "id": "person~ba0f8afd-b6e0-4763-91a8-9c6810d0156b",
                            "transitionStart": {
                              "x": 339.81315560960843,
                              "y": 106.62745147130762
                            },
                            "type": "person",
                            "typeLabel": "Person",
                            "x": 621.6305200034983,
                            "y": 192.65113758282533
                          }
                        },
                        "numNodes": 2,
                        "options": {
                          "activeNodes": false,
                          "centralityType": null,
                          "displayableTransactionType": null,
                          "groupCtr": 1,
                          "layout": {
                            "charge": 25,
                            "linkDistance": 130,
                            "linkStrength": 0.4,
                            "velocityDecay": 0.45
                          },
                          "nodeCtr": 1,
                          "scale": 2.0766116941529233,
                          "showLegend": true,
                          "showLinkLabels": false,
                          "showNodeAnnotation": true,
                          "showNodeLabels": true,
                          "showTimeline": false,
                          "showTransactionDetails": false,
                          "showTransactionLinks": false,
                          "toolsPane": {
                            "activeTool": "Object Inspector",
                            "open": true
                          },
                          "transactionTypeIndex": 0,
                          "translate": [
                            -872.0999999999999,
                            -222.32031484257868
                          ]
                        }
                      }
                    }
                  ]
                }
              ],
              "comments": [
                {
                  "id": 1,
                  "author": {
                    "id": "viuser",
                    "name": "Test viuser"
                  },
                  "createDate": "2020-04-13T19:18:05.087Z",
                  "lastUpdatedAt": "2020-04-13T19:18:05.087Z",
                  "lastUpdatedBy": "viuser",
                  "detail": "Sample comment<br />"
                }
              ],
              "attachmentsCount": 2
            }
            

            400 Response

            {
              "message": "There was an error processing your request.",
              "id": "DH9999",
              "errorCode": 9999,
              "httpStatusCode": 400,
              "details": [
                "See the log for additional details."
              ],
              "remediation": "Please resolve the error and then resubmit the request."
            }
            

            404 Response

            {
              "message": "There was an error processing your request.",
              "id": "DH9999",
              "errorCode": 9999,
              "httpStatusCode": 400,
              "details": [
                "See the log for additional details."
              ],
              "remediation": "Please resolve the error and then resubmit the request."
            }
            
            Responses
            Status Meaning Description Schema
            200 OK The request succeeded. minimallyMaskedEnrichedDocument
            400 Bad Request The request was invalid. sasError
            404 Not Found The document was not found. sasError

            Update an internal document

            Code samples

            # You can also use wget
            curl -X PUT https://example.com/svi-datahub/documents/{entityTypeName}/{documentId} \
              -H 'Authorization: Bearer <access-token-goes-here>' \
              -H 'Content-Type: application/json' \
              -H 'Accept: application/json' \
              -H 'Accept: application/json'
            
            
            const inputBody = '{
              "description": "Example of an Enriched Document object.",
              "value": {
                "objectTypeName": "person",
                "objectTypeId": 100515,
                "objectTypeVersion": 4,
                "id": "2f21e644-089a-47d8-a503-bbdd4d8dac3d",
                "fieldValues": {
                  "birthday": "2020-01-05T00:00:00Z",
                  "created_at_dttm": "2020-04-13T19:17:47.84Z",
                  "created_by_user_id": "viuser",
                  "first_name": "John",
                  "id": "2f21e644-089a-47d8-a503-bbdd4d8dac3d",
                  "last_name": "Smith",
                  "last_updated_at_dttm": "2020-04-13T19:31:37.097Z",
                  "last_updated_by_user_id": "viuser",
                  "version": 4
                },
                "createdAt": "2020-04-13T19:17:47.840Z",
                "lastUpdatedAt": "2020-04-13T19:31:37.097Z",
                "validFrom": "2020-01-05T00:00:00.000Z",
                "fieldRestrictions": {
                  "person": {
                    "ssn": {
                      "masked": {
                        "currentUserIsAuthorizedToReveal": true
                      }
                    }
                  }
                },
                "sheets": [
                  {
                    "id": 201,
                    "type": "WORKSHEET",
                    "name": "Workspace-1",
                    "version": 2,
                    "created": "2020-04-13T19:27:08.105Z",
                    "createdBy": "viuser",
                    "lastModified": "2020-04-13T19:27:26.175Z",
                    "lastModifiedBy": "viuser",
                    "tabOrder": 0,
                    "uxState": {
                      "commonToolPane": {
                        "expanded": true,
                        "width": 340
                      },
                      "filterPanel": {
                        "expanded": true,
                        "width": 200
                      }
                    },
                    "cells": [
                      {
                        "type": "LIVE",
                        "id": 301,
                        "row": 0,
                        "position": 0,
                        "height": 0,
                        "width": 0,
                        "version": 1,
                        "documents": [
                          {
                            "type": "person",
                            "id": "2f21e644-089a-47d8-a503-bbdd4d8dac3d",
                            "uniqueId": "person#2f21e644-089a-47d8-a503-bbdd4d8dac3d"
                          },
                          {
                            "type": "person",
                            "id": "ba0f8afd-b6e0-4763-91a8-9c6810d0156b",
                            "uniqueId": "person#ba0f8afd-b6e0-4763-91a8-9c6810d0156b"
                          }
                        ],
                        "visualizationType": "Network",
                        "resultsPerPage": 0,
                        "networkData": {
                          "links": [],
                          "nodes": {
                            "person~2f21e644-089a-47d8-a503-bbdd4d8dac3d": {
                              "id": "person~2f21e644-089a-47d8-a503-bbdd4d8dac3d",
                              "transitionStart": {
                                "x": 667,
                                "y": 206.5
                              },
                              "type": "person",
                              "typeLabel": "Person",
                              "x": 711.99394815911,
                              "y": 220.234232742122
                            },
                            "person~ba0f8afd-b6e0-4763-91a8-9c6810d0156b": {
                              "id": "person~ba0f8afd-b6e0-4763-91a8-9c6810d0156b",
                              "transitionStart": {
                                "x": 339.81315560960843,
                                "y": 106.62745147130762
                              },
                              "type": "person",
                              "typeLabel": "Person",
                              "x": 621.6305200034983,
                              "y": 192.65113758282533
                            }
                          },
                          "numNodes": 2,
                          "options": {
                            "activeNodes": false,
                            "centralityType": null,
                            "displayableTransactionType": null,
                            "groupCtr": 1,
                            "layout": {
                              "charge": 25,
                              "linkDistance": 130,
                              "linkStrength": 0.4,
                              "velocityDecay": 0.45
                            },
                            "nodeCtr": 1,
                            "scale": 2.0766116941529233,
                            "showLegend": true,
                            "showLinkLabels": false,
                            "showNodeAnnotation": true,
                            "showNodeLabels": true,
                            "showTimeline": false,
                            "showTransactionDetails": false,
                            "showTransactionLinks": false,
                            "toolsPane": {
                              "activeTool": "Object Inspector",
                              "open": true
                            },
                            "transactionTypeIndex": 0,
                            "translate": [
                              -872.0999999999999,
                              -222.32031484257868
                            ]
                          }
                        }
                      }
                    ]
                  }
                ],
                "comments": [
                  {
                    "id": 1,
                    "author": {
                      "id": "viuser",
                      "name": "Test viuser"
                    },
                    "createDate": "2020-04-13T19:18:05.087Z",
                    "lastUpdatedAt": "2020-04-13T19:18:05.087Z",
                    "lastUpdatedBy": "viuser",
                    "detail": "Sample comment<br />"
                  }
                ],
                "attachmentsCount": 2
              },
              "x-widdershins-oldRef": "#/components/examples/enrichedDocumentExample"
            }';
            const headers = {
              'Content-Type':'application/json',
              'Accept':'application/json',
              'Accept':'application/json'
            };
            
            fetch('https://example.com/svi-datahub/documents/{entityTypeName}/{documentId}',
            {
              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',
              'Accept': 'application/json'
            }
            
            r = requests.put('https://example.com/svi-datahub/documents/{entityTypeName}/{documentId}', 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"},
                    "Accept": []string{"application/json"},
                }
            
                data := bytes.NewBuffer([]byte{jsonReq})
                req, err := http.NewRequest("PUT", "https://example.com/svi-datahub/documents/{entityTypeName}/{documentId}", data)
                req.Header = headers
            
                client := &http.Client{}
                resp, err := client.Do(req)
                // ...
            }
            

            PUT /documents/{entityTypeName}/{documentId}

            Updates an internal document. This is an appropriate way to add child documents or worksheets to the document. The content of the request is the existing document. Updating external documents is not allowed.

            Body parameter

            {
              "description": "Example of an Enriched Document object.",
              "value": {
                "objectTypeName": "person",
                "objectTypeId": 100515,
                "objectTypeVersion": 4,
                "id": "2f21e644-089a-47d8-a503-bbdd4d8dac3d",
                "fieldValues": {
                  "birthday": "2020-01-05T00:00:00Z",
                  "created_at_dttm": "2020-04-13T19:17:47.84Z",
                  "created_by_user_id": "viuser",
                  "first_name": "John",
                  "id": "2f21e644-089a-47d8-a503-bbdd4d8dac3d",
                  "last_name": "Smith",
                  "last_updated_at_dttm": "2020-04-13T19:31:37.097Z",
                  "last_updated_by_user_id": "viuser",
                  "version": 4
                },
                "createdAt": "2020-04-13T19:17:47.840Z",
                "lastUpdatedAt": "2020-04-13T19:31:37.097Z",
                "validFrom": "2020-01-05T00:00:00.000Z",
                "fieldRestrictions": {
                  "person": {
                    "ssn": {
                      "masked": {
                        "currentUserIsAuthorizedToReveal": true
                      }
                    }
                  }
                },
                "sheets": [
                  {
                    "id": 201,
                    "type": "WORKSHEET",
                    "name": "Workspace-1",
                    "version": 2,
                    "created": "2020-04-13T19:27:08.105Z",
                    "createdBy": "viuser",
                    "lastModified": "2020-04-13T19:27:26.175Z",
                    "lastModifiedBy": "viuser",
                    "tabOrder": 0,
                    "uxState": {
                      "commonToolPane": {
                        "expanded": true,
                        "width": 340
                      },
                      "filterPanel": {
                        "expanded": true,
                        "width": 200
                      }
                    },
                    "cells": [
                      {
                        "type": "LIVE",
                        "id": 301,
                        "row": 0,
                        "position": 0,
                        "height": 0,
                        "width": 0,
                        "version": 1,
                        "documents": [
                          {
                            "type": "person",
                            "id": "2f21e644-089a-47d8-a503-bbdd4d8dac3d",
                            "uniqueId": "person#2f21e644-089a-47d8-a503-bbdd4d8dac3d"
                          },
                          {
                            "type": "person",
                            "id": "ba0f8afd-b6e0-4763-91a8-9c6810d0156b",
                            "uniqueId": "person#ba0f8afd-b6e0-4763-91a8-9c6810d0156b"
                          }
                        ],
                        "visualizationType": "Network",
                        "resultsPerPage": 0,
                        "networkData": {
                          "links": [],
                          "nodes": {
                            "person~2f21e644-089a-47d8-a503-bbdd4d8dac3d": {
                              "id": "person~2f21e644-089a-47d8-a503-bbdd4d8dac3d",
                              "transitionStart": {
                                "x": 667,
                                "y": 206.5
                              },
                              "type": "person",
                              "typeLabel": "Person",
                              "x": 711.99394815911,
                              "y": 220.234232742122
                            },
                            "person~ba0f8afd-b6e0-4763-91a8-9c6810d0156b": {
                              "id": "person~ba0f8afd-b6e0-4763-91a8-9c6810d0156b",
                              "transitionStart": {
                                "x": 339.81315560960843,
                                "y": 106.62745147130762
                              },
                              "type": "person",
                              "typeLabel": "Person",
                              "x": 621.6305200034983,
                              "y": 192.65113758282533
                            }
                          },
                          "numNodes": 2,
                          "options": {
                            "activeNodes": false,
                            "centralityType": null,
                            "displayableTransactionType": null,
                            "groupCtr": 1,
                            "layout": {
                              "charge": 25,
                              "linkDistance": 130,
                              "linkStrength": 0.4,
                              "velocityDecay": 0.45
                            },
                            "nodeCtr": 1,
                            "scale": 2.0766116941529233,
                            "showLegend": true,
                            "showLinkLabels": false,
                            "showNodeAnnotation": true,
                            "showNodeLabels": true,
                            "showTimeline": false,
                            "showTransactionDetails": false,
                            "showTransactionLinks": false,
                            "toolsPane": {
                              "activeTool": "Object Inspector",
                              "open": true
                            },
                            "transactionTypeIndex": 0,
                            "translate": [
                              -872.0999999999999,
                              -222.32031484257868
                            ]
                          }
                        }
                      }
                    ]
                  }
                ],
                "comments": [
                  {
                    "id": 1,
                    "author": {
                      "id": "viuser",
                      "name": "Test viuser"
                    },
                    "createDate": "2020-04-13T19:18:05.087Z",
                    "lastUpdatedAt": "2020-04-13T19:18:05.087Z",
                    "lastUpdatedBy": "viuser",
                    "detail": "Sample comment<br />"
                  }
                ],
                "attachmentsCount": 2
              },
              "x-widdershins-oldRef": "#/components/examples/enrichedDocumentExample"
            }
            
            Parameters
            Name In Type Required Description
            entityTypeName path string true The name of the entity type to which the document belongs.
            documentId path string true The ID for the document.
            Accept header string false For document fields that use data masking, it is important to avoid accidentally overwriting values in the database with masked values that have been loaded by the client. In general, masking dots should not be stored in the database. The "Accept" HTTP header can be used to control how masked fields are handled during updates. If this HTTP header is not provided or is set to "application/json", then masked field values that are set to null will be ignored. If the "Accept" header is set to "application/vnd.sas.investigation.data.masked.document+json" then masked fields that are set to the mask template (nine dots) will be ignored. The "Accept" header value should match the data masking approach that was used to fetch data before an update is performed.
            body body enrichedDocument false A modified version of an existing document.
            Detailed descriptions

            Accept: For document fields that use data masking, it is important to avoid accidentally overwriting values in the database with masked values that have been loaded by the client. In general, masking dots should not be stored in the database. The "Accept" HTTP header can be used to control how masked fields are handled during updates. If this HTTP header is not provided or is set to "application/json", then masked field values that are set to null will be ignored. If the "Accept" header is set to "application/vnd.sas.investigation.data.masked.document+json" then masked fields that are set to the mask template (nine dots) will be ignored. The "Accept" header value should match the data masking approach that was used to fetch data before an update is performed.

            Enumerated Values
            Parameter Value
            Accept application/json
            Accept application/vnd.sas.investigation.data.enriched.document+json
            Accept application/vnd.sas.investigation.data.masked.enriched.document+json

            Example responses

            200 Response

            {
              "objectTypeName": "person",
              "objectTypeId": 100515,
              "objectTypeVersion": 4,
              "id": "2f21e644-089a-47d8-a503-bbdd4d8dac3d",
              "fieldValues": {
                "birthday": "2020-01-05T00:00:00Z",
                "created_at_dttm": "2020-04-13T19:17:47.84Z",
                "created_by_user_id": "viuser",
                "first_name": "John",
                "id": "2f21e644-089a-47d8-a503-bbdd4d8dac3d",
                "last_name": "Smith",
                "last_updated_at_dttm": "2020-04-13T19:31:37.097Z",
                "last_updated_by_user_id": "viuser",
                "version": 4
              },
              "createdAt": "2020-04-13T19:17:47.840Z",
              "lastUpdatedAt": "2020-04-13T19:31:37.097Z",
              "validFrom": "2020-01-05T00:00:00.000Z",
              "fieldRestrictions": {
                "person": {
                  "ssn": {
                    "masked": {
                      "currentUserIsAuthorizedToReveal": true
                    }
                  }
                }
              },
              "sheets": [
                {
                  "id": 201,
                  "type": "WORKSHEET",
                  "name": "Workspace-1",
                  "version": 2,
                  "created": "2020-04-13T19:27:08.105Z",
                  "createdBy": "viuser",
                  "lastModified": "2020-04-13T19:27:26.175Z",
                  "lastModifiedBy": "viuser",
                  "tabOrder": 0,
                  "uxState": {
                    "commonToolPane": {
                      "expanded": true,
                      "width": 340
                    },
                    "filterPanel": {
                      "expanded": true,
                      "width": 200
                    }
                  },
                  "cells": [
                    {
                      "type": "LIVE",
                      "id": 301,
                      "row": 0,
                      "position": 0,
                      "height": 0,
                      "width": 0,
                      "version": 1,
                      "documents": [
                        {
                          "type": "person",
                          "id": "2f21e644-089a-47d8-a503-bbdd4d8dac3d",
                          "uniqueId": "person#2f21e644-089a-47d8-a503-bbdd4d8dac3d"
                        },
                        {
                          "type": "person",
                          "id": "ba0f8afd-b6e0-4763-91a8-9c6810d0156b",
                          "uniqueId": "person#ba0f8afd-b6e0-4763-91a8-9c6810d0156b"
                        }
                      ],
                      "visualizationType": "Network",
                      "resultsPerPage": 0,
                      "networkData": {
                        "links": [],
                        "nodes": {
                          "person~2f21e644-089a-47d8-a503-bbdd4d8dac3d": {
                            "id": "person~2f21e644-089a-47d8-a503-bbdd4d8dac3d",
                            "transitionStart": {
                              "x": 667,
                              "y": 206.5
                            },
                            "type": "person",
                            "typeLabel": "Person",
                            "x": 711.99394815911,
                            "y": 220.234232742122
                          },
                          "person~ba0f8afd-b6e0-4763-91a8-9c6810d0156b": {
                            "id": "person~ba0f8afd-b6e0-4763-91a8-9c6810d0156b",
                            "transitionStart": {
                              "x": 339.81315560960843,
                              "y": 106.62745147130762
                            },
                            "type": "person",
                            "typeLabel": "Person",
                            "x": 621.6305200034983,
                            "y": 192.65113758282533
                          }
                        },
                        "numNodes": 2,
                        "options": {
                          "activeNodes": false,
                          "centralityType": null,
                          "displayableTransactionType": null,
                          "groupCtr": 1,
                          "layout": {
                            "charge": 25,
                            "linkDistance": 130,
                            "linkStrength": 0.4,
                            "velocityDecay": 0.45
                          },
                          "nodeCtr": 1,
                          "scale": 2.0766116941529233,
                          "showLegend": true,
                          "showLinkLabels": false,
                          "showNodeAnnotation": true,
                          "showNodeLabels": true,
                          "showTimeline": false,
                          "showTransactionDetails": false,
                          "showTransactionLinks": false,
                          "toolsPane": {
                            "activeTool": "Object Inspector",
                            "open": true
                          },
                          "transactionTypeIndex": 0,
                          "translate": [
                            -872.0999999999999,
                            -222.32031484257868
                          ]
                        }
                      }
                    }
                  ]
                }
              ],
              "comments": [
                {
                  "id": 1,
                  "author": {
                    "id": "viuser",
                    "name": "Test viuser"
                  },
                  "createDate": "2020-04-13T19:18:05.087Z",
                  "lastUpdatedAt": "2020-04-13T19:18:05.087Z",
                  "lastUpdatedBy": "viuser",
                  "detail": "Sample comment<br />"
                }
              ],
              "attachmentsCount": 2
            }
            

            400 Response

            {
              "message": "There was an error processing your request.",
              "id": "DH9999",
              "errorCode": 9999,
              "httpStatusCode": 400,
              "details": [
                "See the log for additional details."
              ],
              "remediation": "Please resolve the error and then resubmit the request."
            }
            

            404 Response

            {
              "message": "There was an error processing your request.",
              "id": "DH9999",
              "errorCode": 9999,
              "httpStatusCode": 400,
              "details": [
                "See the log for additional details."
              ],
              "remediation": "Please resolve the error and then resubmit the request."
            }
            

            412 Response

            {
              "message": "There was an error processing your request.",
              "id": "DH9999",
              "errorCode": 9999,
              "httpStatusCode": 400,
              "details": [
                "See the log for additional details."
              ],
              "remediation": "Please resolve the error and then resubmit the request."
            }
            
            {
              "message": "There was an error processing your request.",
              "id": "DH9999",
              "errorCode": 9999,
              "httpStatusCode": 400,
              "details": [
                "See the log for additional details."
              ],
              "remediation": "Please resolve the error and then resubmit the request."
            }
            

            428 Response

            {
              "message": "There was an error processing your request.",
              "id": "DH9999",
              "errorCode": 9999,
              "httpStatusCode": 400,
              "details": [
                "See the log for additional details."
              ],
              "remediation": "Please resolve the error and then resubmit the request."
            }
            
            {
              "message": "There was an error processing your request.",
              "id": "DH9999",
              "errorCode": 9999,
              "httpStatusCode": 400,
              "details": [
                "See the log for additional details."
              ],
              "remediation": "Please resolve the error and then resubmit the request."
            }
            
            Responses
            Status Meaning Description Schema
            200 OK The request succeeded. maskedEnrichedDocument
            400 Bad Request The request was invalid. sasError
            404 Not Found The document was not found. sasError
            412 Precondition Failed The document in the request body was out of date. sasError
            428 Precondition Required The document in the request body did not contain a version. sasError

            Patch a document

            Code samples

            # You can also use wget
            curl -X PATCH https://example.com/svi-datahub/documents/{entityTypeName}/{documentId} \
              -H 'Authorization: Bearer <access-token-goes-here>' \
              -H 'Content-Type: application/json' \
              -H 'Accept: application/json' \
              -H 'If-Match: 0'
            
            
            const inputBody = '[
              {
                "path": "string",
                "op": "string",
                "value": null
              }
            ]';
            const headers = {
              'Content-Type':'application/json',
              'Accept':'application/json',
              'If-Match':'0'
            };
            
            fetch('https://example.com/svi-datahub/documents/{entityTypeName}/{documentId}',
            {
              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',
              'Accept': 'application/json',
              'If-Match': '0'
            }
            
            r = requests.patch('https://example.com/svi-datahub/documents/{entityTypeName}/{documentId}', 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"},
                    "If-Match": []string{"0"},
                }
            
                data := bytes.NewBuffer([]byte{jsonReq})
                req, err := http.NewRequest("PATCH", "https://example.com/svi-datahub/documents/{entityTypeName}/{documentId}", data)
                req.Header = headers
            
                client := &http.Client{}
                resp, err := client.Do(req)
                // ...
            }
            

            PATCH /documents/{entityTypeName}/{documentId}

            Applies a patch to a document. This enables a client to make changes to a document without needing to load the entire document. The request body contains a description of the changes to be made to the document, which is represented by a json-patch object. For more information about json-patch, refer to jsonpatch.com.

            Body parameter

            [
              {
                "path": "string",
                "op": "string",
                "value": null
              }
            ]
            
            Parameters
            Name In Type Required Description
            entityTypeName path string true The name of the entity type to which the document belongs.
            documentId path string true The ID for the document.
            If-Match header integer false The version of the document to update. This parameter is required for documents of entity types that have a version field configured. If a version field is configured, this value must match the most recent version of the document. If the value does not match the most recent version of the document, the patch operation fails. This helps prevent conflicting edits from being applied to a document.
            body body jsonPatch false A json-patch specification of changes to make to the document. Copy and move operations cannot use a masked field value as their source. Test operations cannot reference masked field values.
            Detailed descriptions

            If-Match: The version of the document to update. This parameter is required for documents of entity types that have a version field configured. If a version field is configured, this value must match the most recent version of the document. If the value does not match the most recent version of the document, the patch operation fails. This helps prevent conflicting edits from being applied to a document.

            body: A json-patch specification of changes to make to the document. Copy and move operations cannot use a masked field value as their source. Test operations cannot reference masked field values.

            Example responses

            200 Response

            {
              "objectTypeName": "person",
              "objectTypeId": 100515,
              "objectTypeVersion": 4,
              "id": "2f21e644-089a-47d8-a503-bbdd4d8dac3d",
              "fieldValues": {
                "birthday": "2020-01-05T00:00:00Z",
                "created_at_dttm": "2020-04-13T19:17:47.84Z",
                "created_by_user_id": "viuser",
                "first_name": "John",
                "id": "2f21e644-089a-47d8-a503-bbdd4d8dac3d",
                "last_name": "Smith",
                "last_updated_at_dttm": "2020-04-13T19:31:37.097Z",
                "last_updated_by_user_id": "viuser",
                "version": 4
              },
              "createdAt": "2020-04-13T19:17:47.840Z",
              "lastUpdatedAt": "2020-04-13T19:31:37.097Z",
              "validFrom": "2020-01-05T00:00:00.000Z",
              "fieldRestrictions": {
                "person": {
                  "ssn": {
                    "masked": {
                      "currentUserIsAuthorizedToReveal": true
                    }
                  }
                }
              },
              "sheets": [
                {
                  "id": 201,
                  "type": "WORKSHEET",
                  "name": "Workspace-1",
                  "version": 2,
                  "created": "2020-04-13T19:27:08.105Z",
                  "createdBy": "viuser",
                  "lastModified": "2020-04-13T19:27:26.175Z",
                  "lastModifiedBy": "viuser",
                  "tabOrder": 0,
                  "uxState": {
                    "commonToolPane": {
                      "expanded": true,
                      "width": 340
                    },
                    "filterPanel": {
                      "expanded": true,
                      "width": 200
                    }
                  },
                  "cells": [
                    {
                      "type": "LIVE",
                      "id": 301,
                      "row": 0,
                      "position": 0,
                      "height": 0,
                      "width": 0,
                      "version": 1,
                      "documents": [
                        {
                          "type": "person",
                          "id": "2f21e644-089a-47d8-a503-bbdd4d8dac3d",
                          "uniqueId": "person#2f21e644-089a-47d8-a503-bbdd4d8dac3d"
                        },
                        {
                          "type": "person",
                          "id": "ba0f8afd-b6e0-4763-91a8-9c6810d0156b",
                          "uniqueId": "person#ba0f8afd-b6e0-4763-91a8-9c6810d0156b"
                        }
                      ],
                      "visualizationType": "Network",
                      "resultsPerPage": 0,
                      "networkData": {
                        "links": [],
                        "nodes": {
                          "person~2f21e644-089a-47d8-a503-bbdd4d8dac3d": {
                            "id": "person~2f21e644-089a-47d8-a503-bbdd4d8dac3d",
                            "transitionStart": {
                              "x": 667,
                              "y": 206.5
                            },
                            "type": "person",
                            "typeLabel": "Person",
                            "x": 711.99394815911,
                            "y": 220.234232742122
                          },
                          "person~ba0f8afd-b6e0-4763-91a8-9c6810d0156b": {
                            "id": "person~ba0f8afd-b6e0-4763-91a8-9c6810d0156b",
                            "transitionStart": {
                              "x": 339.81315560960843,
                              "y": 106.62745147130762
                            },
                            "type": "person",
                            "typeLabel": "Person",
                            "x": 621.6305200034983,
                            "y": 192.65113758282533
                          }
                        },
                        "numNodes": 2,
                        "options": {
                          "activeNodes": false,
                          "centralityType": null,
                          "displayableTransactionType": null,
                          "groupCtr": 1,
                          "layout": {
                            "charge": 25,
                            "linkDistance": 130,
                            "linkStrength": 0.4,
                            "velocityDecay": 0.45
                          },
                          "nodeCtr": 1,
                          "scale": 2.0766116941529233,
                          "showLegend": true,
                          "showLinkLabels": false,
                          "showNodeAnnotation": true,
                          "showNodeLabels": true,
                          "showTimeline": false,
                          "showTransactionDetails": false,
                          "showTransactionLinks": false,
                          "toolsPane": {
                            "activeTool": "Object Inspector",
                            "open": true
                          },
                          "transactionTypeIndex": 0,
                          "translate": [
                            -872.0999999999999,
                            -222.32031484257868
                          ]
                        }
                      }
                    }
                  ]
                }
              ],
              "comments": [
                {
                  "id": 1,
                  "author": {
                    "id": "viuser",
                    "name": "Test viuser"
                  },
                  "createDate": "2020-04-13T19:18:05.087Z",
                  "lastUpdatedAt": "2020-04-13T19:18:05.087Z",
                  "lastUpdatedBy": "viuser",
                  "detail": "Sample comment<br />"
                }
              ],
              "attachmentsCount": 2
            }
            

            400 Response

            {
              "message": "There was an error processing your request.",
              "id": "DH9999",
              "errorCode": 9999,
              "httpStatusCode": 400,
              "details": [
                "See the log for additional details."
              ],
              "remediation": "Please resolve the error and then resubmit the request."
            }
            

            404 Response

            {
              "message": "There was an error processing your request.",
              "id": "DH9999",
              "errorCode": 9999,
              "httpStatusCode": 400,
              "details": [
                "See the log for additional details."
              ],
              "remediation": "Please resolve the error and then resubmit the request."
            }
            

            412 Response

            {
              "message": "There was an error processing your request.",
              "id": "DH9999",
              "errorCode": 9999,
              "httpStatusCode": 400,
              "details": [
                "See the log for additional details."
              ],
              "remediation": "Please resolve the error and then resubmit the request."
            }
            
            {
              "message": "There was an error processing your request.",
              "id": "DH9999",
              "errorCode": 9999,
              "httpStatusCode": 400,
              "details": [
                "See the log for additional details."
              ],
              "remediation": "Please resolve the error and then resubmit the request."
            }
            

            428 Response

            {
              "message": "There was an error processing your request.",
              "id": "DH9999",
              "errorCode": 9999,
              "httpStatusCode": 400,
              "details": [
                "See the log for additional details."
              ],
              "remediation": "Please resolve the error and then resubmit the request."
            }
            
            {
              "message": "There was an error processing your request.",
              "id": "DH9999",
              "errorCode": 9999,
              "httpStatusCode": 400,
              "details": [
                "See the log for additional details."
              ],
              "remediation": "Please resolve the error and then resubmit the request."
            }
            
            Responses
            Status Meaning Description Schema
            200 OK The request succeeded. The response body contains the document after the application of the patch. maskedEnrichedDocument
            400 Bad Request The request was invalid. sasError
            404 Not Found The document was not found. sasError
            412 Precondition Failed The document in the request body was out of date. sasError
            428 Precondition Required The document in the request body did not contain a version. sasError

            Delete an internal document

            Code samples

            # You can also use wget
            curl -X DELETE https://example.com/svi-datahub/documents/{entityTypeName}/{documentId} \
              -H 'Authorization: Bearer <access-token-goes-here>' \
              -H 'Accept: application/json'
            
            
            
            const headers = {
              'Accept':'application/json'
            };
            
            fetch('https://example.com/svi-datahub/documents/{entityTypeName}/{documentId}',
            {
              method: 'DELETE',
            
              headers: headers
            })
            .then(function(res) {
                return res.json();
            }).then(function(body) {
                console.log(body);
            });
            
            import requests
            headers = {
              'Accept': 'application/json'
            }
            
            r = requests.delete('https://example.com/svi-datahub/documents/{entityTypeName}/{documentId}', 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("DELETE", "https://example.com/svi-datahub/documents/{entityTypeName}/{documentId}", data)
                req.Header = headers
            
                client := &http.Client{}
                resp, err := client.Do(req)
                // ...
            }
            

            DELETE /documents/{entityTypeName}/{documentId}

            Deletes an internal document. Deleting external documents is not allowed.

            Parameters
            Name In Type Required Description
            entityTypeName path string true The name of the entity type to which the document belongs.
            documentId path string true The ID for the document.

            Example responses

            404 Response

            {
              "message": "There was an error processing your request.",
              "id": "DH9999",
              "errorCode": 9999,
              "httpStatusCode": 400,
              "details": [
                "See the log for additional details."
              ],
              "remediation": "Please resolve the error and then resubmit the request."
            }
            
            Responses
            Status Meaning Description Schema
            204 No Content The document was deleted. None
            404 Not Found The document was not found. sasError

            Bulk create and update documents

            Code samples

            # You can also use wget
            curl -X POST https://example.com/svi-datahub/documents/bulk \
              -H 'Authorization: Bearer <access-token-goes-here>' \
              -H 'Content-Type: application/json' \
              -H 'Accept: application/json' \
              -H 'Content-Item-Type: application/vnd.sas.investigation.data.masked.document+json'
            
            
            const inputBody = '{
              "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
            }';
            const headers = {
              'Content-Type':'application/json',
              'Accept':'application/json',
              'Content-Item-Type':'application/vnd.sas.investigation.data.masked.document+json'
            };
            
            fetch('https://example.com/svi-datahub/documents/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/json',
              'Accept': 'application/json',
              'Content-Item-Type': 'application/vnd.sas.investigation.data.masked.document+json'
            }
            
            r = requests.post('https://example.com/svi-datahub/documents/bulk', 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"},
                    "Content-Item-Type": []string{"application/vnd.sas.investigation.data.masked.document+json"},
                }
            
                data := bytes.NewBuffer([]byte{jsonReq})
                req, err := http.NewRequest("POST", "https://example.com/svi-datahub/documents/bulk", data)
                req.Header = headers
            
                client := &http.Client{}
                resp, err := client.Do(req)
                // ...
            }
            

            POST /documents/bulk

            Creates and updates internal documents in bulk. The input is a list of document objects. Each document represents either a Create or Update operation, depending on its form. The output is a list of operation summary results.

            The input for the request is a SAS collection, which looks like the following: json { "items":[...] } Each element in "items" represents a series of records to be inserted or updated. If a given record includes a primary key, then it is treated as an update. Otherwise, it is a Create operation. All locks, unlocks, creates, and updates are processed internally by the server.

            The response from the request is another SAS collection with summary results for each item that was sent. Result items are in the same order as the input collection. This is especially important if you need to capture the newly generated primary keys of values that were inserted. If there is a problem, there will be an "error" property in the results for the item that had issues. If some items return errors, it does not prevent other valid records from being successfully processed.

            Body parameter

            {
              "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
            }
            
            Parameters
            Name In Type Required Description
            Content-Item-Type header string false For document fields that use data masking, it is important to avoid accidentally overwriting values in the database with masked values that have been loaded by the client. In general, masking dots should not be stored in the database. The "Content-Item-Type" HTTP header can be used to control how masked fields are handled with bulk updates. If this HTTP header is not provided, then masked field values that are set to null will be ignored. If the "Content-Item-Type" header is set to "application/vnd.sas.investigation.data.masked.document+json" then masked fields that are set to the mask template (nine dots) will be ignored. The "Content-Item-Type" header value should match the data masking approach that was used to fetch data before an update is performed.
            body body sasCollection false none
            Detailed descriptions

            Content-Item-Type: For document fields that use data masking, it is important to avoid accidentally overwriting values in the database with masked values that have been loaded by the client. In general, masking dots should not be stored in the database. The "Content-Item-Type" HTTP header can be used to control how masked fields are handled with bulk updates. If this HTTP header is not provided, then masked field values that are set to null will be ignored. If the "Content-Item-Type" header is set to "application/vnd.sas.investigation.data.masked.document+json" then masked fields that are set to the mask template (nine dots) will be ignored. The "Content-Item-Type" header value should match the data masking approach that was used to fetch data before an update is performed.

            Enumerated Values
            Parameter Value
            Content-Item-Type application/vnd.sas.investigation.data.masked.document+json

            Example responses

            201 Response

            {
              "links": [],
              "name": "entities",
              "count": 1,
              "items": [
                {
                  "id": "uuid_100",
                  "entityType": "person",
                  "operation": "UPDATE"
                }
              ],
              "version": 2
            }
            

            400 Response

            {
              "message": "There was an error processing your request.",
              "id": "DH9999",
              "errorCode": 9999,
              "httpStatusCode": 400,
              "details": [
                "See the log for additional details."
              ],
              "remediation": "Please resolve the error and then resubmit the request."
            }
            

            415 Response

            {
              "message": "There was an error processing your request.",
              "id": "DH9999",
              "errorCode": 9999,
              "httpStatusCode": 400,
              "details": [
                "See the log for additional details."
              ],
              "remediation": "Please resolve the error and then resubmit the request."
            }
            
            Responses
            Status Meaning Description Schema
            201 Created Internal documents were created or updated. See items in the collection to determine whether the operation for an individual document succeeded or failed. bulkOperationResultCollection
            400 Bad Request The request was invalid. sasError
            415 Unsupported Media Type The endpoint does not support collection items of the type specified in the Content-Item-Type request header. sasError

            Code samples

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

            HEAD /documents/{entityTypeName}/{documentId}/{relationshipTypeName}

            For a given document and relationship type name, finds all the documents that are related to the given document according to the given relationship type.

            Since the child documents of a top-level document are related to it by a special kind of relationship type, this endpoint can be used to fetch children of a document. In this case, the name of the relationship type is identical to the child entity type, so use the child entity type name as the relationshipTypeName path parameter.

            The related documents can be filtered by a date range using the date and time fields on the entity type of the related document.

            It is important to clarify that there are two entity types to consider: the entity type that is specified in the path and the related entity type that is returned. Distinguishing between the two is important when filtering by a date range.

            For example, assume there is a relationship type defined between an entity type named "entityTypeA" and another entity type named "entityTypeB" that is called "fromAToB". For the request GET /documents/entityTypeA/{documentId}/fromAtoB, "entityTypeB" is the related entity type and a collection of "entityTypeB" documents are returned.

            The number of related documents can be filtered by fields on the related entity type using a combination of the "earliestValidFrom", "latestValidFrom", "earliestValidTo", "latestValidTo", "dateFieldName", "earliestDate", and "latestDate" parameters. Each of these parameters refer to a Date, Timestamp, or Timestamp With Time Zone field on the related entity type.

            When using the "earliestValidFrom" and "latestValidFrom" parameters, the results are filtered by the field name that is specified in the "validFromFieldName" property in the related entity type.

            When using the "earliestValidTo" and "latestValidTo" parameters, the results are filtered by the field name that is specified in the "validToFieldName" property in the related entity type.

            The "dateFieldName" parameter is used to specify an arbitrary Date, Timestamp, or Timestamp With Time Zone field name on the related entity type. When specified, include "earliestDate", "latestDate", or both parameters.

            Name In Type Required Description
            Accept-Item header string false The media type that the client accepts for items within the response collection.
            entityTypeName path string true The name of the entity type to which the document belongs.
            documentId path string true The ID for the document.
            relationshipTypeName path string true The name of a relationship type that is associated with the entity type name defined in the parameter "entityTypeName".
            start query integer false The starting index of the first document in a page.
            limit query integer false The maximum number of documents to return in this page of results. The actual number of returned documents is fewer if the collection is exhausted.
            earliestValidFrom query string(date-time) false The earliest value that is allowed for the related entity's "Valid From" date or timestamp field. If the "Valid From" field is a Date field, a date value with no timestamp is allowed. Otherwise, use an ISO-8601 timestamp value. By default, the field configured as the "validFromField" in the document's entity type is used for filtering. If the query parameter "dateFieldName" is provided, the field that is specified there overrides the entity type's configuration, and that field is used instead.
            earliestValidTo query string(date-time) false The earliest value that is allowed for the related document's "Valid To" date or timestamp field. If the "Valid To" field is a Date field, a date value with no timestamp is allowed. Otherwise, use an ISO-8601 timestamp value. By default, the field configured as the "validToField" in the document's entity type is used for filtering. If the query parameter "dateFieldName" is provided, the field that is specified there overrides the entity type's configuration, and that field is used instead.
            latestValidFrom query string(date-time) false The latest value that is allowed for the related document's "Valid From" date or timestamp field. If the "Valid From" field is a Date field, a date value with no timestamp is allowed. Otherwise, use an ISO-8601 timestamp value. By default, the field configured as the "validFromField" in the document's entity type is used for filtering. If the query parameter "dateFieldName" is provided, the field that is specified there overrides the entity type's configuration, and that field is used instead.
            latestValidTo query string(date-time) false The latest value that is allowed for the related document's "Valid To" date or timestamp field. If the "Valid To" field is a Date field, a date value with no timestamp is allowed. Otherwise, use an ISO-8601 timestamp value. By default, the field configured as the "validToField" in the document's entity type is used for filtering. If the query parameter "dateFieldName" is provided, the field that is specified there overrides the entity type's configuration, and that field is used instead.
            dateFieldName query string false An arbitrary Date, Timestamp, or Timestamp With Time Zone field in the related entity type. If a value is provided, the field with this name is used to filter documents against the given "earliestValidFrom", "earliestValidTo", "latestValidFrom", and "latestValidTo" parameters.
            Detailed descriptions

            relationshipTypeName: The name of a relationship type that is associated with the entity type name defined in the parameter "entityTypeName".

            limit: The maximum number of documents to return in this page of results. The actual number of returned documents is fewer if the collection is exhausted.

            earliestValidFrom: The earliest value that is allowed for the related entity's "Valid From" date or timestamp field. If the "Valid From" field is a Date field, a date value with no timestamp is allowed. Otherwise, use an ISO-8601 timestamp value. By default, the field configured as the "validFromField" in the document's entity type is used for filtering. If the query parameter "dateFieldName" is provided, the field that is specified there overrides the entity type's configuration, and that field is used instead.

            earliestValidTo: The earliest value that is allowed for the related document's "Valid To" date or timestamp field. If the "Valid To" field is a Date field, a date value with no timestamp is allowed. Otherwise, use an ISO-8601 timestamp value. By default, the field configured as the "validToField" in the document's entity type is used for filtering. If the query parameter "dateFieldName" is provided, the field that is specified there overrides the entity type's configuration, and that field is used instead.

            latestValidFrom: The latest value that is allowed for the related document's "Valid From" date or timestamp field. If the "Valid From" field is a Date field, a date value with no timestamp is allowed. Otherwise, use an ISO-8601 timestamp value. By default, the field configured as the "validFromField" in the document's entity type is used for filtering. If the query parameter "dateFieldName" is provided, the field that is specified there overrides the entity type's configuration, and that field is used instead.

            latestValidTo: The latest value that is allowed for the related document's "Valid To" date or timestamp field. If the "Valid To" field is a Date field, a date value with no timestamp is allowed. Otherwise, use an ISO-8601 timestamp value. By default, the field configured as the "validToField" in the document's entity type is used for filtering. If the query parameter "dateFieldName" is provided, the field that is specified there overrides the entity type's configuration, and that field is used instead.

            dateFieldName: An arbitrary Date, Timestamp, or Timestamp With Time Zone field in the related entity type. If a value is provided, the field with this name is used to filter documents against the given "earliestValidFrom", "earliestValidTo", "latestValidFrom", and "latestValidTo" parameters.

            Enumerated Values
            Parameter Value
            Accept-Item application/json
            Accept-Item application/vnd.sas.investigation.data.document
            Accept-Item application/vnd.sas.investigation.data.document+json
            Accept-Item application/vnd.sas.investigation.data.masked.document
            Accept-Item application/vnd.sas.investigation.data.masked.document+json
            Accept-Item application/vnd.sas.investigation.data.minimally.masked.document
            Accept-Item application/vnd.sas.investigation.data.minimally.masked.document+json
            Status Meaning Description Schema
            200 OK The request succeeded. None
            404 Not Found No documents were found that are associated with the given documents and relationship type None
            415 Unsupported Media Type The endpoint cannot produce collection items of the type specified in the Accept-Item header. None

            Code samples

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

            GET /documents/{entityTypeName}/{documentId}/{relationshipTypeName}

            For a given document and relationship type name, finds all the documents that are related to the given document according to the given relationship type.

            Since the child documents of a top-level document are related to it by a special kind of relationship type, this endpoint can be used to fetch children of a document. In this case, the name of the relationship type is identical to the child entity type, so use the child entity type name as the relationshipTypeName path parameter.

            The related documents can be filtered by a date range using the date and time fields on the related document's entity type.

            For the purpose of this documentation, it is important to clarify that there are two entity types to consider: the entity type that is specified in the path and the related entity type that is returned. Distinguishing between the two is important when filtering by a date range.

            For example, assume there is a relationship type defined between an entity type named "entityTypeA" and another entity type named "entityTypeB" that is called "fromAToB". For the request GET /documents/entityTypeA/{documentId}/fromAtoB, "entityTypeB" is the related entity type and a collection of "entityTypeB" documents are returned.

            The number of related documents can be filtered by fields on the related entity type using a combination of the "earliestValidFrom", "latestValidFrom", "earliestValidTo", "latestValidTo", "dateFieldName", "earliestDate", and "latestDate" parameters. Each of these parameters refer to a Date, Timestamp, or Timestamp With Time Zone field on the related entity type.

            When using the "earliestValidFrom" and "latestValidFrom" parameters, the results are filtered by the field name that is specified in the "validFromFieldName" property in the related entity type.

            When using the "earliestValidTo" and "latestValidTo" parameters, the results are filtered by the field name that is specified in the "validToFieldName" property in the related entity type.

            The "dateFieldName" parameter is used to specify an arbitrary Date, Timestamp, or Timestamp With Time Zone field name on the related entity type. When specified, include "earliestDate", "latestDate", or both parameters.

            Name In Type Required Description
            Accept-Item header string false The media type that the client accepts for items within the response collection.
            entityTypeName path string true The name of the entity type to which the document belongs.
            documentId path string true The ID for the document.
            relationshipTypeName path string true The name of a relationship type that is associated with the entity type name defined in the parameter "entityTypeName".
            start query integer false The starting index of the first document in a page.
            limit query integer false The maximum number of documents to return in this page of results. The actual number of returned documents is fewer if the collection is exhausted.
            earliestValidFrom query string(date-time) false The earliest value that is allowed for the related entity's "Valid From" date or timestamp field. If the "Valid From" field is a Date field, a date value with no timestamp is allowed. Otherwise, use an ISO-8601 timestamp value. By default, the field configured as the "validFromField" in the document's entity type is used for filtering. If the query parameter "dateFieldName" is provided, the field that is specified there overrides the entity type's configuration, and that field is used instead.
            earliestValidTo query string(date-time) false The earliest value that is allowed for the related document's "Valid To" date or timestamp field. If the "Valid To" field is a Date field, a date value with no timestamp is allowed. Otherwise, use an ISO-8601 timestamp value. By default, the field configured as the "validToField" in the document's entity type is used for filtering. If the query parameter "dateFieldName" is provided, the field that is specified there overrides the entity type's configuration, and that field is used instead.
            latestValidFrom query string(date-time) false The latest value that is allowed for the related document's "Valid From" date or timestamp field. If the "Valid From" field is a Date field, a date value with no timestamp is allowed. Otherwise, use an ISO-8601 timestamp value. By default, the field configured as the "validFromField" in the document's entity type is used for filtering. If the query parameter "dateFieldName" is provided, the field that is specified there overrides the entity type's configuration, and that field is used instead.
            latestValidTo query string(date-time) false The latest value that is allowed for the related document's "Valid To" date or timestamp field. If the "Valid To" field is a Date field, a date value with no timestamp is allowed. Otherwise, use an ISO-8601 timestamp value. By default, the field configured as the "validToField" in the document's entity type is used for filtering. If the query parameter "dateFieldName" is provided, the field that is specified there overrides the entity type's configuration, and that field is used instead.
            dateFieldName query string false An arbitrary Date, Timestamp, or Timestamp With Time Zone field in the related entity type. If a value is provided, the field with this name is used to filter documents against the given "earliestValidFrom", "earliestValidTo", "latestValidFrom", and "latestValidTo" parameters.
            Detailed descriptions

            relationshipTypeName: The name of a relationship type that is associated with the entity type name defined in the parameter "entityTypeName".

            limit: The maximum number of documents to return in this page of results. The actual number of returned documents is fewer if the collection is exhausted.

            earliestValidFrom: The earliest value that is allowed for the related entity's "Valid From" date or timestamp field. If the "Valid From" field is a Date field, a date value with no timestamp is allowed. Otherwise, use an ISO-8601 timestamp value. By default, the field configured as the "validFromField" in the document's entity type is used for filtering. If the query parameter "dateFieldName" is provided, the field that is specified there overrides the entity type's configuration, and that field is used instead.

            earliestValidTo: The earliest value that is allowed for the related document's "Valid To" date or timestamp field. If the "Valid To" field is a Date field, a date value with no timestamp is allowed. Otherwise, use an ISO-8601 timestamp value. By default, the field configured as the "validToField" in the document's entity type is used for filtering. If the query parameter "dateFieldName" is provided, the field that is specified there overrides the entity type's configuration, and that field is used instead.

            latestValidFrom: The latest value that is allowed for the related document's "Valid From" date or timestamp field. If the "Valid From" field is a Date field, a date value with no timestamp is allowed. Otherwise, use an ISO-8601 timestamp value. By default, the field configured as the "validFromField" in the document's entity type is used for filtering. If the query parameter "dateFieldName" is provided, the field that is specified there overrides the entity type's configuration, and that field is used instead.

            latestValidTo: The latest value that is allowed for the related document's "Valid To" date or timestamp field. If the "Valid To" field is a Date field, a date value with no timestamp is allowed. Otherwise, use an ISO-8601 timestamp value. By default, the field configured as the "validToField" in the document's entity type is used for filtering. If the query parameter "dateFieldName" is provided, the field that is specified there overrides the entity type's configuration, and that field is used instead.

            dateFieldName: An arbitrary Date, Timestamp, or Timestamp With Time Zone field in the related entity type. If a value is provided, the field with this name is used to filter documents against the given "earliestValidFrom", "earliestValidTo", "latestValidFrom", and "latestValidTo" parameters.

            Enumerated Values
            Parameter Value
            Accept-Item application/json
            Accept-Item application/vnd.sas.investigation.data.document
            Accept-Item application/vnd.sas.investigation.data.document+json
            Accept-Item application/vnd.sas.investigation.data.masked.document
            Accept-Item application/vnd.sas.investigation.data.masked.document+json
            Accept-Item application/vnd.sas.investigation.data.minimally.masked.document
            Accept-Item application/vnd.sas.investigation.data.minimally.masked.document+json

            Example responses

            200 Response

            {
              "links": [],
              "name": "documents",
              "count": 1,
              "version": 2,
              "items": [
                {
                  "objectTypeName": "person",
                  "objectTypeId": 100515,
                  "objectTypeVersion": 4,
                  "id": "2f21e644-089a-47d8-a503-bbdd4d8dac3d",
                  "fieldValues": {
                    "birthday": "2020-01-05T00:00:00Z",
                    "created_at_dttm": "2020-04-13T19:17:47.84Z",
                    "created_by_user_id": "viuser",
                    "first_name": "John",
                    "id": "2f21e644-089a-47d8-a503-bbdd4d8dac3d",
                    "last_name": "Smith",
                    "last_updated_at_dttm": "2020-04-13T19:31:37.097Z",
                    "last_updated_by_user_id": "viuser",
                    "version": 4
                  },
                  "createdAt": "2020-04-13T19:17:47.840Z",
                  "lastUpdatedAt": "2020-04-13T19:31:37.097Z",
                  "validFrom": "2020-01-05T00:00:00.000Z"
                }
              ]
            }
            

            Example of a Resource Collection that contains Document objects.

            Example of a Resource Collection that contains Masked Document objects.

            Example of a Resource Collection that contains Minimally-Masked Document objects.

            404 Response

            {
              "message": "There was an error processing your request.",
              "id": "DH9999",
              "errorCode": 9999,
              "httpStatusCode": 400,
              "details": [
                "See the log for additional details."
              ],
              "remediation": "Please resolve the error and then resubmit the request."
            }
            

            415 Response

            {
              "message": "There was an error processing your request.",
              "id": "DH9999",
              "errorCode": 9999,
              "httpStatusCode": 400,
              "details": [
                "See the log for additional details."
              ],
              "remediation": "Please resolve the error and then resubmit the request."
            }
            
            Status Meaning Description Schema
            200 OK The request succeeded. The media type of the items inside the response collection depends on the value of the Accept-Item header in the request. Inline
            404 Not Found No documents were found that are associated with the given documents and relationship type sasError
            415 Unsupported Media Type The endpoint cannot produce collection items of the type specified in the Accept-Item header. sasError

            Get headers for field values for document

            Code samples

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

            HEAD /documents/{objectTypeName}/{documentId}/fields

            Gets headers for a representation of multiple fields values for a top-level document. Since the GET operation for this endpoint does not produce an error if the user is not authorized to reveal the value of a masked field, this HEAD operation does not either.

            Parameters
            Name In Type Required Description
            objectTypeName path string true The object type of the document.
            documentId path string true The ID of the document.
            fieldName query array[string] true The names of the fields.
            Responses
            Status Meaning Description Schema
            200 OK The request succeeded. None
            404 Not Found The document or field was not found. None

            Get field values for document

            Code samples

            # You can also use wget
            curl -X GET https://example.com/svi-datahub/documents/{objectTypeName}/{documentId}/fields?fieldName=string \
              -H 'Authorization: Bearer <access-token-goes-here>' \
              -H 'Accept: application/json'
            
            
            
            const headers = {
              'Accept':'application/json'
            };
            
            fetch('https://example.com/svi-datahub/documents/{objectTypeName}/{documentId}/fields?fieldName=string',
            {
              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/svi-datahub/documents/{objectTypeName}/{documentId}/fields', params={
              'fieldName': [
              "string"
            ]
            }, 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/svi-datahub/documents/{objectTypeName}/{documentId}/fields", data)
                req.Header = headers
            
                client := &http.Client{}
                resp, err := client.Do(req)
                // ...
            }
            

            GET /documents/{objectTypeName}/{documentId}/fields

            Gets a representation of multiple fields values for a top-level document. If any of the fields is configured for masking, and if the requesting user is authorized to reveal the value of the masked field, the raw unmasked value of the field is returned. If any of the fields are configured for masking and the requesting user is not authorized to reveal the value of the masked field, the value will be omitted from the response.

            Parameters
            Name In Type Required Description
            objectTypeName path string true The object type of the document.
            documentId path string true The ID of the document.
            fieldName query array[string] true The names of the fields.

            Example responses

            200 Response

            {
              "count": 2,
              "items": [
                {
                  "fieldName": "ssn",
                  "raw": "012345678"
                },
                {
                  "fieldName": "last_name",
                  "raw": "Smith"
                }
              ]
            }
            

            404 Response

            {
              "message": "There was an error processing your request.",
              "id": "DH9999",
              "errorCode": 9999,
              "httpStatusCode": 400,
              "details": [
                "See the log for additional details."
              ],
              "remediation": "Please resolve the error and then resubmit the request."
            }
            
            Responses
            Status Meaning Description Schema
            200 OK The request succeeded. fieldValueCollection
            404 Not Found The document or field was not found. sasError

            Get headers for field value for document

            Code samples

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

            HEAD /documents/{objectTypeName}/{documentId}/fields/{fieldName}

            Gets headers for a representation of a field value for a top-level document. If the field is configured for masking, and if the requesting user is authorized to reveal the value of the masked field, the request will succeed. If the field is configured for masking and the requesting user is not authorized to reveal the value of the masked field, the request will fail.

            Parameters
            Name In Type Required Description
            objectTypeName path string true The object type of the document.
            documentId path string true The ID of the document.
            fieldName path string true The name of the field.
            Responses
            Status Meaning Description Schema
            200 OK The request succeeded. None
            404 Not Found The document or field was not found. None

            Get field value for document

            Code samples

            # You can also use wget
            curl -X GET https://example.com/svi-datahub/documents/{objectTypeName}/{documentId}/fields/{fieldName} \
              -H 'Authorization: Bearer <access-token-goes-here>' \
              -H 'Accept: application/json'
            
            
            
            const headers = {
              'Accept':'application/json'
            };
            
            fetch('https://example.com/svi-datahub/documents/{objectTypeName}/{documentId}/fields/{fieldName}',
            {
              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/svi-datahub/documents/{objectTypeName}/{documentId}/fields/{fieldName}', 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/svi-datahub/documents/{objectTypeName}/{documentId}/fields/{fieldName}", data)
                req.Header = headers
            
                client := &http.Client{}
                resp, err := client.Do(req)
                // ...
            }
            

            GET /documents/{objectTypeName}/{documentId}/fields/{fieldName}

            Gets a representation of a field value for a top-level document. If the field is configured for masking, and if the requesting user is authorized to reveal the value of the masked field, the raw unmasked value of the field is returned. If the field is configured for masking and the requesting user is not authorized to reveal the value of the masked field, the result is an error.

            Parameters
            Name In Type Required Description
            objectTypeName path string true The object type of the document.
            documentId path string true The ID of the document.
            fieldName path string true The name of the field.

            Example responses

            200 Response

            {
              "fieldName": "ssn",
              "raw": "012345678"
            }
            

            404 Response

            {
              "message": "There was an error processing your request.",
              "id": "DH9999",
              "errorCode": 9999,
              "httpStatusCode": 400,
              "details": [
                "See the log for additional details."
              ],
              "remediation": "Please resolve the error and then resubmit the request."
            }
            
            Responses
            Status Meaning Description Schema
            200 OK The request succeeded. fieldValue
            404 Not Found The document or field was not found. sasError

            Get headers for historical field value for document

            Code samples

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

            HEAD /documents/history/{objectTypeName}/{documentId}/fields/{fieldName}

            Gets headers for a representation of a field value for a top-level document at a certain point in its history. If the field is currently configured for masking, and if the requesting user is authorized to reveal the value of the masked field, the request will succeed. If the field is currently configured for masking and the requesting user is not authorized to reveal the value of the masked field, the request will fail.

            Parameters
            Name In Type Required Description
            objectTypeName path string true The object type of the document.
            documentId path string true The ID of the document.
            fieldName path string true The name of the field.
            version query integer true The version of the document in history.
            Responses
            Status Meaning Description Schema
            200 OK The request succeeded. None
            404 Not Found The document or field was not found. None

            Get historical field value for document

            Code samples

            # You can also use wget
            curl -X GET https://example.com/svi-datahub/documents/history/{objectTypeName}/{documentId}/fields/{fieldName}?version=0 \
              -H 'Authorization: Bearer <access-token-goes-here>' \
              -H 'Accept: application/json'
            
            
            
            const headers = {
              'Accept':'application/json'
            };
            
            fetch('https://example.com/svi-datahub/documents/history/{objectTypeName}/{documentId}/fields/{fieldName}?version=0',
            {
              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/svi-datahub/documents/history/{objectTypeName}/{documentId}/fields/{fieldName}', params={
              'version': '0'
            }, 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/svi-datahub/documents/history/{objectTypeName}/{documentId}/fields/{fieldName}", data)
                req.Header = headers
            
                client := &http.Client{}
                resp, err := client.Do(req)
                // ...
            }
            

            GET /documents/history/{objectTypeName}/{documentId}/fields/{fieldName}

            Gets a representation of a field value for a top-level document at a certain point in its history. If the field is currently configured for masking, and if the requesting user is authorized to reveal the value of the masked field, the raw unmasked value of the field is returned. If the field is currently configured for masking and the requesting user is not authorized to reveal the value of the masked field, the result is an error.

            Parameters
            Name In Type Required Description
            objectTypeName path string true The object type of the document.
            documentId path string true The ID of the document.
            fieldName path string true The name of the field.
            version query integer true The version of the document in history.

            Example responses

            200 Response

            {
              "fieldName": "ssn",
              "raw": "012345678"
            }
            

            404 Response

            {
              "message": "There was an error processing your request.",
              "id": "DH9999",
              "errorCode": 9999,
              "httpStatusCode": 400,
              "details": [
                "See the log for additional details."
              ],
              "remediation": "Please resolve the error and then resubmit the request."
            }
            
            Responses
            Status Meaning Description Schema
            200 OK The request succeeded. fieldValue
            404 Not Found The document or field was not found. sasError

            Get headers for field values for child document

            Code samples

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

            HEAD /documents/{objectTypeName}/{documentId}/children/{childDocType}/{childDocId}/fields

            Gets headers for a representation of multiple fields values for a child document. Since the GET operation for this endpoint does not produce an error if the user is not authorized to reveal the value of a masked field, this HEAD operation does not either.

            Parameters
            Name In Type Required Description
            objectTypeName path string true The object type of the document.
            documentId path string true The ID of the document.
            childDocType path string true The object type of the child document.
            childDocId path string true The ID of the child document.
            fieldName query array[string] true The names of the fields.
            Responses
            Status Meaning Description Schema
            200 OK The request succeeded. None
            404 Not Found The document or field was not found. None

            Get field values for child document

            Code samples

            # You can also use wget
            curl -X GET https://example.com/svi-datahub/documents/{objectTypeName}/{documentId}/children/{childDocType}/{childDocId}/fields?fieldName=string \
              -H 'Authorization: Bearer <access-token-goes-here>' \
              -H 'Accept: application/json'
            
            
            
            const headers = {
              'Accept':'application/json'
            };
            
            fetch('https://example.com/svi-datahub/documents/{objectTypeName}/{documentId}/children/{childDocType}/{childDocId}/fields?fieldName=string',
            {
              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/svi-datahub/documents/{objectTypeName}/{documentId}/children/{childDocType}/{childDocId}/fields', params={
              'fieldName': [
              "string"
            ]
            }, 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/svi-datahub/documents/{objectTypeName}/{documentId}/children/{childDocType}/{childDocId}/fields", data)
                req.Header = headers
            
                client := &http.Client{}
                resp, err := client.Do(req)
                // ...
            }
            

            GET /documents/{objectTypeName}/{documentId}/children/{childDocType}/{childDocId}/fields

            Gets a representation of multiple fields values for a child document. If any of the fields is configured for masking, and if the requesting user is authorized to reveal the value of the masked field, the raw unmasked value of the field is returned. If any of the fields is configured for masking and the requesting user is not authorized to reveal the value of the masked field, the value will be omitted from the response.

            Parameters
            Name In Type Required Description
            objectTypeName path string true The object type of the document.
            documentId path string true The ID of the document.
            childDocType path string true The object type of the child document.
            childDocId path string true The ID of the child document.
            fieldName query array[string] true The names of the fields.

            Example responses

            200 Response

            {
              "count": 2,
              "items": [
                {
                  "fieldName": "ssn",
                  "raw": "012345678"
                },
                {
                  "fieldName": "last_name",
                  "raw": "Smith"
                }
              ]
            }
            

            404 Response

            {
              "message": "There was an error processing your request.",
              "id": "DH9999",
              "errorCode": 9999,
              "httpStatusCode": 400,
              "details": [
                "See the log for additional details."
              ],
              "remediation": "Please resolve the error and then resubmit the request."
            }
            
            Responses
            Status Meaning Description Schema
            200 OK The request succeeded. fieldValueCollection
            404 Not Found The document or field was not found. sasError

            Get headers for field value for child document

            Code samples

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

            HEAD /documents/{objectTypeName}/{documentId}/children/{childDocType}/{childDocId}/fields/{fieldName}

            Gets headers for a representation of a field value for a child document. If the field is configured for masking, and if the requesting user is authorized to reveal the value of the masked field, the request will succeed. If the field is configured for masking and the requesting user is not authorized to reveal the value of the masked field, the request will fail.

            Parameters
            Name In Type Required Description
            objectTypeName path string true The object type of the document.
            documentId path string true The ID of the document.
            childDocType path string true The object type of the child document.
            childDocId path string true The ID of the child document.
            fieldName path string true The name of the field.
            Responses
            Status Meaning Description Schema
            200 OK The request succeeded. None
            404 Not Found The document or field was not found. None

            Get field value for child document

            Code samples

            # You can also use wget
            curl -X GET https://example.com/svi-datahub/documents/{objectTypeName}/{documentId}/children/{childDocType}/{childDocId}/fields/{fieldName} \
              -H 'Authorization: Bearer <access-token-goes-here>' \
              -H 'Accept: application/json'
            
            
            
            const headers = {
              'Accept':'application/json'
            };
            
            fetch('https://example.com/svi-datahub/documents/{objectTypeName}/{documentId}/children/{childDocType}/{childDocId}/fields/{fieldName}',
            {
              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/svi-datahub/documents/{objectTypeName}/{documentId}/children/{childDocType}/{childDocId}/fields/{fieldName}', 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/svi-datahub/documents/{objectTypeName}/{documentId}/children/{childDocType}/{childDocId}/fields/{fieldName}", data)
                req.Header = headers
            
                client := &http.Client{}
                resp, err := client.Do(req)
                // ...
            }
            

            GET /documents/{objectTypeName}/{documentId}/children/{childDocType}/{childDocId}/fields/{fieldName}

            Gets a representation of a field value for a child document. If the field is configured for masking, and if the requesting user is authorized to reveal the value of the masked field, the raw unmasked value of the field is returned. If the field is configured for masking and the requesting user is not authorized to reveal the value of the masked field, the result is an error.

            Parameters
            Name In Type Required Description
            objectTypeName path string true The object type of the document.
            documentId path string true The ID of the document.
            childDocType path string true The object type of the child document.
            childDocId path string true The ID of the child document.
            fieldName path string true The name of the field.

            Example responses

            200 Response

            {
              "fieldName": "ssn",
              "raw": "012345678"
            }
            

            404 Response

            {
              "message": "There was an error processing your request.",
              "id": "DH9999",
              "errorCode": 9999,
              "httpStatusCode": 400,
              "details": [
                "See the log for additional details."
              ],
              "remediation": "Please resolve the error and then resubmit the request."
            }
            
            Responses
            Status Meaning Description Schema
            200 OK The request succeeded. fieldValue
            404 Not Found The document or field was not found. sasError

            Get headers for historical field value for child document

            Code samples

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

            HEAD /documents/history/{objectTypeName}/{documentId}/children/{childDocType}/{childDocId}/fields/{fieldName}

            Gets headers for a representation of a field value for a child document at a certain point in its history. If the field is currently configured for masking, and if the requesting user is authorized to reveal the value of the masked field, the request will succeed. If the field is currently configured for masking and the requesting user is not authorized to reveal the value of the masked field, the request will fail.

            Parameters
            Name In Type Required Description
            objectTypeName path string true The object type of the document.
            documentId path string true The ID of the document.
            childDocType path string true The object type of the child document.
            childDocId path string true The ID of the child document.
            fieldName path string true The name of the field.
            version query integer true The version of the document in history.
            Responses
            Status Meaning Description Schema
            200 OK The request succeeded. None
            404 Not Found The document or field was not found. None

            Get historical field value for child document

            Code samples

            # You can also use wget
            curl -X GET https://example.com/svi-datahub/documents/history/{objectTypeName}/{documentId}/children/{childDocType}/{childDocId}/fields/{fieldName}?version=0 \
              -H 'Authorization: Bearer <access-token-goes-here>' \
              -H 'Accept: application/json'
            
            
            
            const headers = {
              'Accept':'application/json'
            };
            
            fetch('https://example.com/svi-datahub/documents/history/{objectTypeName}/{documentId}/children/{childDocType}/{childDocId}/fields/{fieldName}?version=0',
            {
              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/svi-datahub/documents/history/{objectTypeName}/{documentId}/children/{childDocType}/{childDocId}/fields/{fieldName}', params={
              'version': '0'
            }, 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/svi-datahub/documents/history/{objectTypeName}/{documentId}/children/{childDocType}/{childDocId}/fields/{fieldName}", data)
                req.Header = headers
            
                client := &http.Client{}
                resp, err := client.Do(req)
                // ...
            }
            

            GET /documents/history/{objectTypeName}/{documentId}/children/{childDocType}/{childDocId}/fields/{fieldName}

            Gets a representation of a field value for a child document at a certain point in its history. If the field is currently configured for masking, and if the requesting user is authorized to reveal the value of the masked field, the raw unmasked value of the field is returned. If the field is currently configured for masking and the requesting user is not authorized to reveal the value of the masked field, the result is an error.

            Parameters
            Name In Type Required Description
            objectTypeName path string true The object type of the document.
            documentId path string true The ID of the document.
            childDocType path string true The object type of the child document.
            childDocId path string true The ID of the child document.
            fieldName path string true The name of the field.
            version query integer true The version of the document in history.

            Example responses

            200 Response

            {
              "fieldName": "ssn",
              "raw": "012345678"
            }
            

            404 Response

            {
              "message": "There was an error processing your request.",
              "id": "DH9999",
              "errorCode": 9999,
              "httpStatusCode": 400,
              "details": [
                "See the log for additional details."
              ],
              "remediation": "Please resolve the error and then resubmit the request."
            }
            
            Responses
            Status Meaning Description Schema
            200 OK The request succeeded. fieldValue
            404 Not Found The document or field was not found. sasError

            Get headers for summary of action history for a document

            Code samples

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

            HEAD /documents/{objectTypeName}/{documentId}/actions

            Gets headers for a summary of action history for a document. Action history summaries contain a link to fetch the full representation. The 'Accept-Item' request header can be used to fetch the available action types for this document. If the 'Accept-Item' header is set to "application/vnd.sas.investigate.action.type", this endpoint returns a collection of action types. This collection represents all of the action types that exist historically for the specified document, providing an exhaustive list of all possible filter options.

            Parameters
            Name In Type Required Description
            objectTypeName path string true The object type of the document.
            documentId path string true The ID of the document.
            start query integer false The start index. This is used for paging.
            limit query integer false The maximum number of items to return in a page of results.
            sortBy query string false The sort criteria for the request. The only supported sort criteria are 'createdAt' ascending and 'createdAt' descending.
            actionType query string false The filter criteria for the request. Basic selection filter syntax for the 'actionType' field is supported. For example: '?actionType=DOCUMENT_EDIT
            Accept-Item header string false If set to 'application/vnd.sas.investigate.action.type', the available action types are returned.
            Detailed descriptions

            objectTypeName: The object type of the document.

            start: The start index. This is used for paging.

            limit: The maximum number of items to return in a page of results.

            sortBy: The sort criteria for the request. The only supported sort criteria are 'createdAt' ascending and 'createdAt' descending.

            actionType: The filter criteria for the request. Basic selection filter syntax for the 'actionType' field is supported. For example: '?actionType=DOCUMENT_EDIT|COMMENT_CREATE' returns only DOCUMENT_EDIT or COMMENT_CREATE actions.

            Accept-Item: If set to 'application/vnd.sas.investigate.action.type', the available action types are returned.

            Responses
            Status Meaning Description Schema
            200 OK The request succeeded. None
            400 Bad Request Action history was not available for the specified document. None
            404 Not Found The specified document was not found. None

            Get summary of action history for a document

            Code samples

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

            GET /documents/{objectTypeName}/{documentId}/actions

            Gets a summary of action history for a document. Action history summaries contain a link to fetch the full representation. The 'Accept-Item' request header can be used to fetch the available action types for this document. If the 'Accept-Item' header is set to "application/vnd.sas.investigate.action.type", this endpoint returns a collection of action types. This collection represents all of the action types that exist historically for the specified document, providing an exhaustive list of all possible filter options.

            Parameters
            Name In Type Required Description
            objectTypeName path string true The object type of the document.
            documentId path string true The ID of the document.
            start query integer false The start index. This is used for paging.
            limit query integer false The maximum number of items to return in a page of results.
            sortBy query string false The sort criteria for the request. The only supported sort criteria are 'createdAt' ascending and 'createdAt' descending.
            actionType query string false The filter criteria for the request. Basic selection filter syntax for the 'actionType' field is supported. For example: '?actionType=DOCUMENT_EDIT
            Accept-Item header string false If set to 'application/vnd.sas.investigate.action.type', the available action types are returned.
            Detailed descriptions

            objectTypeName: The object type of the document.

            start: The start index. This is used for paging.

            limit: The maximum number of items to return in a page of results.

            sortBy: The sort criteria for the request. The only supported sort criteria are 'createdAt' ascending and 'createdAt' descending.

            actionType: The filter criteria for the request. Basic selection filter syntax for the 'actionType' field is supported. For example: '?actionType=DOCUMENT_EDIT|COMMENT_CREATE' returns only DOCUMENT_EDIT or COMMENT_CREATE actions.

            Accept-Item: If set to 'application/vnd.sas.investigate.action.type', the available action types are returned.

            Example responses

            200 Response

            {
              "links": [
                {
                  "method": "GET",
                  "rel": "collection",
                  "href": "/svi-datahub/documents/person/uuid_100/actions",
                  "uri": "/svi-datahub/documents/person/uuid_100/actions",
                  "type": "application/vnd.sas.collection",
                  "itemType": "application/vnd.sas.investigate.action.summary"
                },
                {
                  "method": "GET",
                  "rel": "self",
                  "href": "/svi-datahub/documents/person/uuid_100/actions?start=0&limit=10",
                  "uri": "/svi-datahub/documents/person/uuid_100/actions?start=0&limit=10",
                  "type": "application/vnd.sas.collection",
                  "itemType": "application/vnd.sas.investigate.action.summary"
                },
                {
                  "method": "GET",
                  "rel": "availableActionTypes",
                  "href": "/svi-datahub/documents/person/uuid_100/actions",
                  "uri": "/svi-datahub/documents/person/uuid_100/actions",
                  "type": "application/vnd.sas.collection",
                  "itemType": "application/vnd.sas.investigate.action.type"
                }
              ],
              "name": "actions",
              "start": 0,
              "count": 1,
              "items": [
                {
                  "actionId": "2",
                  "action": "Edited the Person",
                  "actionType": "DOCUMENT_EDIT",
                  "objectType": "Person",
                  "objectId": "uuid_100",
                  "objectVersion": "2",
                  "createdBy": "videmo",
                  "createdAt": "2023-06-28T19:28:42.948Z",
                  "links": [
                    {
                      "method": "GET",
                      "rel": "self",
                      "href": "/svi-datahub/documents/person/uuid_100/actions/2?actionType=DOCUMENT_EDIT",
                      "uri": "/svi-datahub/documents/person/uuid_100/actions/2?actionType=DOCUMENT_EDIT",
                      "type": "application/vnd.sas.investigate.action"
                    }
                  ],
                  "version": 1
                }
              ],
              "limit": 10,
              "version": 2
            }
            

            400 Response

            {
              "message": "There was an error processing your request.",
              "id": "DH9999",
              "errorCode": 9999,
              "httpStatusCode": 400,
              "details": [
                "See the log for additional details."
              ],
              "remediation": "Please resolve the error and then resubmit the request."
            }
            

            404 Response

            {
              "message": "There was an error processing your request.",
              "id": "DH9999",
              "errorCode": 9999,
              "httpStatusCode": 400,
              "details": [
                "See the log for additional details."
              ],
              "remediation": "Please resolve the error and then resubmit the request."
            }
            
            Responses
            Status Meaning Description Schema
            200 OK The request succeeded. Inline
            400 Bad Request Action history was not available for the specified document. sasError
            404 Not Found The specified document was not found. sasError
            Response Schema
            Enumerated Values
            Property Value
            actionType DOCUMENT_CREATE
            actionType DOCUMENT_EDIT
            actionType DOCUMENT_DELETE
            actionType DOCUMENT_UNKNOWN
            actionType RELATIONSHIP_CREATE
            actionType RELATIONSHIP_EDIT
            actionType RELATIONSHIP_DELETE
            actionType RELATIONSHIP_UNKNOWN
            actionType OBJECT_LINKED
            actionType OBJECT_LINK_EDIT
            actionType OBJECT_UNLINKED
            actionType OBJECT_LINK_UNKNOWN
            actionType COMMENT_CREATE
            actionType COMMENT_EDIT
            actionType FILE_UPLOAD
            actionType FILE_DELETE

            Get headers for an action for a document

            Code samples

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

            HEAD /documents/{objectTypeName}/{documentId}/actions/{actionId}

            Gets headers for the full representation of an action from a document's action history. A link to this representation is returned in the links property of an action summary.

            Parameters
            Name In Type Required Description
            objectTypeName path string true The object type of the document.
            documentId path string true The ID of the document.
            actionId path string true The ID of the action. This could be a document version or the ID of an action.
            tableLimit query integer false Specifies the length at which to truncate child document action history.
            actionType query string false The type of the action. This is one of the available action types for the document. Currently, this parameter is not required by the server, but omitting it is deprecated. This parameter will be required in a future version of the API. Certain action types will not be available from this endpoint if the actionType parameter is not provided.
            Detailed descriptions

            objectTypeName: The object type of the document.

            documentId: The ID of the document.

            actionId: The ID of the action. This could be a document version or the ID of an action.

            tableLimit: Specifies the length at which to truncate child document action history. For example, assume that a request is made with this query parameter set to 5. If, for a given child document type, there is less than 5 child documents for a specific action (Create/Edit/Delete), then 'n' child documents are returned. If 'n' is greater than 5, a message instructs the user to use the Versions control to view the child documents.

            actionType: The type of the action. This is one of the available action types for the document. Currently, this parameter is not required by the server, but omitting it is deprecated. This parameter will be required in a future version of the API. Certain action types will not be available from this endpoint if the actionType parameter is not provided.

            Responses
            Status Meaning Description Schema
            200 OK The request succeeded. None
            400 Bad Request Action history was not available for the specified document. None
            404 Not Found The specified document or action was not found. None

            Get an action for a document

            Code samples

            # You can also use wget
            curl -X GET https://example.com/svi-datahub/documents/{objectTypeName}/{documentId}/actions/{actionId} \
              -H 'Authorization: Bearer <access-token-goes-here>' \
              -H 'Accept: application/json'
            
            
            
            const headers = {
              'Accept':'application/json'
            };
            
            fetch('https://example.com/svi-datahub/documents/{objectTypeName}/{documentId}/actions/{actionId}',
            {
              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/svi-datahub/documents/{objectTypeName}/{documentId}/actions/{actionId}', 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/svi-datahub/documents/{objectTypeName}/{documentId}/actions/{actionId}", data)
                req.Header = headers
            
                client := &http.Client{}
                resp, err := client.Do(req)
                // ...
            }
            

            GET /documents/{objectTypeName}/{documentId}/actions/{actionId}

            Gets the full representation of an action from a document's action history. A link to this representation is returned in the links property of an action summary.

            Parameters
            Name In Type Required Description
            objectTypeName path string true The object type of the document.
            documentId path string true The ID of the document.
            actionId path string true The ID of the action. This could be a document version or the ID of an action.
            tableLimit query integer false Specifies the length at which to truncate child document action history.
            actionType query string false The type of the action. This is one of the available action types for the document. Currently, this parameter is not required by the server, but omitting it is deprecated. This parameter will be required in a future version of the API. Certain action types will not be available from this endpoint if the actionType parameter is not provided.
            Detailed descriptions

            objectTypeName: The object type of the document.

            documentId: The ID of the document.

            actionId: The ID of the action. This could be a document version or the ID of an action.

            tableLimit: Specifies the length at which to truncate child document action history. For example, assume that a request is made with this query parameter set to 5. If, for a given child document type, there is less than 5 child documents for a specific action (Create/Edit/Delete), then 'n' child documents are returned. If 'n' is greater than 5, a message instructs the user to use the Versions control to view the child documents.

            actionType: The type of the action. This is one of the available action types for the document. Currently, this parameter is not required by the server, but omitting it is deprecated. This parameter will be required in a future version of the API. Certain action types will not be available from this endpoint if the actionType parameter is not provided.

            Example responses

            200 Response

            {
              "actionId": "2",
              "action": "Edited the Person",
              "actionType": "DOCUMENT_EDIT",
              "objectType": "Person",
              "objectId": "uuid_100",
              "objectVersion": "2",
              "createdBy": "videmo",
              "createdAt": "2023-06-28T00:00:00.000Z",
              "links": [
                {
                  "method": "GET",
                  "rel": "self",
                  "href": "/svi-datahub/documents/person/uuid_100/actions/2?actionType=DOCUMENT_EDIT",
                  "uri": "/svi-datahub/documents/person/uuid_100/actions/2?actionType=DOCUMENT_EDIT",
                  "type": "application/vnd.sas.investigate.action"
                }
              ],
              "version": 1,
              "items": [
                {
                  "type": "tableItem",
                  "action": "Changed fields",
                  "headings": [
                    "Field",
                    "Original Value",
                    "New Value"
                  ],
                  "rows": [
                    [
                      {
                        "value": "Person Id",
                        "type": "STRING"
                      },
                      {
                        "value": "uuid_100",
                        "type": "STRING"
                      }
                    ],
                    [
                      {
                        "value": "First Name",
                        "type": "STRING"
                      },
                      {
                        "value": "John",
                        "type": "STRING"
                      }
                    ],
                    [
                      {
                        "value": "Last Name",
                        "type": "STRING"
                      },
                      {
                        "value": "Smith",
                        "type": "STRING"
                      }
                    ],
                    [
                      {
                        "value": "Created By",
                        "type": "STRING"
                      },
                      {
                        "value": "unit_test",
                        "type": "STRING"
                      }
                    ],
                    [
                      {
                        "value": "Last Updated By",
                        "type": "STRING"
                      },
                      {
                        "value": "videmo",
                        "type": "STRING"
                      }
                    ]
                  ]
                }
              ]
            }
            

            400 Response

            {
              "message": "There was an error processing your request.",
              "id": "DH9999",
              "errorCode": 9999,
              "httpStatusCode": 400,
              "details": [
                "See the log for additional details."
              ],
              "remediation": "Please resolve the error and then resubmit the request."
            }
            

            404 Response

            {
              "message": "There was an error processing your request.",
              "id": "DH9999",
              "errorCode": 9999,
              "httpStatusCode": 400,
              "details": [
                "See the log for additional details."
              ],
              "remediation": "Please resolve the error and then resubmit the request."
            }
            
            Responses
            Status Meaning Description Schema
            200 OK The request succeeded. action
            400 Bad Request Action history was not available for the specified document. sasError
            404 Not Found The specified document or action was not found. sasError

            Get headers for summary of version history for a document

            Code samples

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

            HEAD /documents/{objectTypeName}/{documentId}/versions

            Gets headers for a summary of version history for a document. Version summaries contain a link to fetch the full version representation.

            Parameters
            Name In Type Required Description
            objectTypeName path string true The object type of the document.
            documentId path string true The ID of the document.
            start query integer false The start index. This is used for paging.
            limit query integer false The maximum number of items to return in a page of results.
            sortBy query string false The sort criteria for the request.
            includeDisplayLabel query boolean false Indicates whether to include the display label for the document.
            Detailed descriptions

            objectTypeName: The object type of the document.

            start: The start index. This is used for paging.

            limit: The maximum number of items to return in a page of results.

            sortBy: The sort criteria for the request.

            includeDisplayLabel: Indicates whether to include the display label for the document.

            Responses
            Status Meaning Description Schema
            200 OK The request succeeded. None
            400 Bad Request Version history was not available for the specified document. None
            404 Not Found The specified document was not found. None

            Get summary of version history for a document

            Code samples

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

            GET /documents/{objectTypeName}/{documentId}/versions

            Gets a summary of version history for a document. Version summaries contain a link to fetch the full version representation.

            Parameters
            Name In Type Required Description
            objectTypeName path string true The object type of the document.
            documentId path string true The ID of the document.
            start query integer false The start index. This is used for paging.
            limit query integer false The maximum number of items to return in a page of results.
            sortBy query string false The sort criteria for the request.
            includeDisplayLabel query boolean false Indicates whether to include the display label for the document.
            Detailed descriptions

            objectTypeName: The object type of the document.

            start: The start index. This is used for paging.

            limit: The maximum number of items to return in a page of results.

            sortBy: The sort criteria for the request.

            includeDisplayLabel: Indicates whether to include the display label for the document.

            Example responses

            200 Response

            {
              "links": [
                {
                  "method": "GET",
                  "rel": "collection",
                  "href": "/svi-datahub/documents/person/uuid_100/versions",
                  "uri": "/svi-datahub/documents/person/uuid_100/versions",
                  "type": "application/vnd.sas.collection"
                },
                {
                  "method": "GET",
                  "rel": "next",
                  "href": "/svi-datahub/documents/person/uuid_100/versions?start=40&limit=40",
                  "uri": "/svi-datahub/documents/person/uuid_100/versions?start=40&limit=40",
                  "type": "application/vnd.sas.collection"
                },
                {
                  "method": "GET",
                  "rel": "self",
                  "href": "/svi-datahub/documents/person/uuid_100/versions?start=0&limit=40",
                  "uri": "/svi-datahub/documents/person/uuid_100/versions?start=0&limit=40",
                  "type": "application/vnd.sas.collection"
                }
              ],
              "name": "versions",
              "start": 0,
              "count": 1,
              "items": [
                {
                  "typeName": "person",
                  "id": "uuid_100",
                  "version": "2",
                  "operation": "update",
                  "createdBy": "videmo",
                  "createdAt": "2023-06-28T19:28:42.948Z",
                  "links": [
                    {
                      "method": "GET",
                      "rel": "self",
                      "href": "/svi-datahub/documents/person/uuid_100/versions/2",
                      "uri": "/svi-datahub/documents/person/uuid_100/versions/2",
                      "type": "application/vnd.sas.investigate.version+json"
                    }
                  ]
                }
              ],
              "limit": 40,
              "version": 2
            }
            

            400 Response

            {
              "message": "There was an error processing your request.",
              "id": "DH9999",
              "errorCode": 9999,
              "httpStatusCode": 400,
              "details":