Visual Investigator REST API
Data Hub
Base URLs:
- https://example.com/svi-datahub
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:
- Create and modify the definitions for internal entity types
- Specify the definitions for read-only external entity types
- Perform basic database Read and Write operations on internal entity types
- Query data associated with internal and external entity types
- Define relationship types that specify how entity types relate to one another
- Query relationship links between data associated with entity types
- Define data store connection information for accessing external databases
- Manage reference lists
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://
grant_type=password&username=
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 | When an operation is successful |
400 | Bad Request | When request fails any applicable validation rules for request parameters and content |
401 | Unauthorized | When the request doesn't contain a valid OAuth 2.0 token from SASLogon |
403 | Forbidden | When the user associated with the OAuth 2.0 token doesn't have the required privilege(s) |
404 | Not Found | When the service is unavailable |
500 | Internal Server Error | When an error occurs internally or while calling another service |
Operations
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
{
"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/value"
},
"x-widdershins-oldRef": "#/components/examples/dataStoreExample"
}
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/value"
},
"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/value"
},
"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
[
{
"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"
}
}
}
]
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 | string | 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 |
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
{
"description": "Example of a Data Store credential object.",
"value": {
"username": "testUser",
"password": "dGVzdFBhc3N3b3JkMTIz"
},
"x-widdershins-oldRef": "#/components/examples/dataStoreCredentialExample"
}
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
{
"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"
}
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": "string",
"requiredFields": [
"string"
],
"defaultAdditionalFields": {
"property1": {
"fieldKey": "string",
"fieldValue": "string"
},
"property2": {
"fieldKey": "string",
"fieldValue": "string"
}
}
}
]
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 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
{
"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"
}
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 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
[
"string"
]
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 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
{
"type": "string",
"name": "string",
"schema": "string",
"dataStoreName": "string",
"databaseProductName": "string",
"selectable": true,
"columns": [
{
"dataType": "BOOLEAN",
"name": "string",
"length": 0,
"precision": 0,
"scale": 0,
"required": true,
"primaryKeyColumn": true,
"ordinalPosition": 0,
"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",
"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",
"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 |
---|---|---|---|---|
body | body | enrichedDocument | false | The document to be created. |
Example responses
201 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",
"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."
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
201 | Created | The internal document was created. | enrichedDocument |
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 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'
const headers = {
'Accept':'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'
}
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"},
}
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 |
---|---|---|---|---|
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:
- '0' - No child documents are included in each document
- '1' - Child documents are included in each document if they exist for that document
Example responses
200 Response
[
{
"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",
"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": {},
"type": "person",
"typeLabel": "Person",
"x": 711.99394815911,
"y": 220.234232742122
},
"person~ba0f8afd-b6e0-4763-91a8-9c6810d0156b": {
"id": "person~ba0f8afd-b6e0-4763-91a8-9c6810d0156b",
"transitionStart": {},
"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."
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. | Inline |
404 | Not Found | The entity type was not found. | sasError |
Response Schema
Status Code 200
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | [allOf] | false | none | [The actual data that is associated with a particular Entity Type. Entity Types are the metadata and Documents are the data. The document is "enriched" with additional data such as comments, insights, and workspaces. ] |
» Enriched Document | enrichedDocument | false | none | The actual data that is associated with a particular Entity Type. Entity Types are the metadata and Documents are the data. The document is "enriched" with additional data such as comments, insights, and workspaces. |
allOf
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
»» anonymous | document | false | none | The actual data that is associated with a particular Entity Type. Entity Types are the metadata and Documents are the data. |
»»» objectTypeName | string | false | none | The name of the entity type with which the document is associated. |
»»» objectTypeId | integer(int64) | false | none | The ID of the entity type with which the document is associated. |
»»» objectTypeVersion | integer | false | none | The internal Data Hub version for the entity type that is associated with the document. |
»»» id | string | false | none | The qualified ID that uniquely identifies the document. |
»»» displayLabel | string | false | none | The value to use for displaying the ID of the document. |
»»» fieldValues | object | false | none | The values for the fields and child objects that are defined for the related entity type. The actual data of the document exists here. |
»»» validFrom | string(date-time) | false | none | The timestamp value that indicates the starting datetime for when the document is valid. |
»»» validTo | string(date-time) | false | none | The timestamp value that indicates the ending datetime for when the document is valid. |
»»» createdAt | string(date-time) | false | none | The timestamp that indicates when the document was created. |
»»» lastUpdatedAt | string(date-time) | false | none | The timestamp that indicates when the document was last modified. |
and
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
»» anonymous | object | false | none | none |
»»» comments | [comment] | false | none | The comments that are associated with the document. |
»»»» Comment | comment | false | none | Additional text on an internal document. During an Update operation, all properties of a comment are read-only except the category. This is for security and audit purposes to keep historical data accurate. |
»»»»» id | integer(int64) | false | none | The unique identifier for the comment. |
»»»»» category | string | false | none | The category of the comment. |
»»»»» author | commentUser | false | none | Information about an author of a comment. |
»»»»»» id | string | false | none | The unique identifier of the comment author. |
»»»»»» name | string | false | none | The name of the user who is the comment author. |
»»»»» createDate | string(date-time) | false | none | The date on which the comment was created. |
»»»»» lastUpdatedAt | string(date-time) | false | none | The date on which the comment was updated. |
»»»»» lastUpdatedBy | string | false | none | The user who last updated the comment. |
»»»»» detail | string | false | none | Text of the comment. |
»»» sheets | [sheet] | false | none | The insights and workspaces that are associated with the document. |
»»»» Sheet | sheet | false | none | An instance of an insight or workspace. |
»»»»» id | integer(int64) | false | none | A value that uniquely identifies the insight or workspace. |
»»»»» name | string | false | none | The name of the insight or workspace. |
»»»»» tabOrder | integer | false | none | The tab order for the insight or workspace. |
»»»»» type | string | false | none | Indicates the type of "sheet", either a workspace or an insight:
|
»»»»» cells | [sheetCell] | false | none | The individual cells on the sheet. |
»»»»»» Cell | sheetCell | false | none | An individual cell on a workspace or an insight. |
»»»»»»» id | integer(int64) | false | none | A value that uniquely identifies the cell. |
»»»»»»» row | integer | false | none | The row of the worksight or insight in which the cell exists. |
»»»»»»» position | integer | false | none | The position of the cell in the row. |
»»»»»»» type | string | false | none | The type of the cell:
|
»»»»»»» height | integer | false | none | The height of the cell. |
»»»»»»» width | integer | false | none | The width of the cell. |
»»»»»»» lastModified | string(date-time) | false | none | The timestamp that indicates when this cell was last modified. |
»»»»» lastModified | string(date-time) | false | none | The timestamp that indicates when this cell was last modified. |
»»» attachmentsCount | integer(int64) | false | none | The number of attachments that are associated with the document. |
Enumerated Values
Property | Value |
---|---|
type | WORKSHEET |
type | NOTESHEET |
type | LIVE |
type | STATIC |
type | IMAGE |
type | TEXT |
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/json' \
-H 'Accept: application/json' \
-H 'Accept-Item: string'
const inputBody = '{
"filter": "string",
"start": 0,
"limit": 20,
"depth": 0,
"includeDisplayLabel": false,
"sortBy": "first_name:ascending;last_name:descending"
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'Accept-Item':'string'
};
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/json',
'Accept': 'application/json',
'Accept-Item': 'string'
}
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/json"},
"Accept": []string{"application/json"},
"Accept-Item": []string{"string"},
}
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:
- application/vnd.sas.investigation.data.document+json
- application/vnd.sas.investigation.data.enriched.document+json
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.
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
{
"filter": "string",
"start": 0,
"limit": 20,
"depth": 0,
"includeDisplayLabel": false,
"sortBy": "first_name:ascending;last_name:descending"
}
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, specify 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.
Example responses
200 Response
{
"name": "string",
"start": 0,
"limit": 0,
"count": 0,
"accept": "string",
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"version": 0
}
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. | sasCollection |
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 |
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. Specify whether child documents are returned as well. A user can read an external or internal document.
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:
- '0' - No child documents are included in each document
- '1' - Child documents are included in each document if they exist for that document
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",
"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. | enrichedDocument |
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'
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",
"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'
};
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'
}
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"},
}
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",
"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. |
body | body | enrichedDocument | false | A modified version of an existing document. |
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",
"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. | enrichedDocument |
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'
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'
};
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'
}
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"},
}
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 |
---|---|---|---|---|
body | body | sasCollection | false | none |
Example responses
201 Response
{
"name": "string",
"start": 0,
"limit": 0,
"count": 0,
"accept": "string",
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"version": 0,
"items": [
{
"id": "string",
"entityType": "string",
"operation": "CREATE",
"error": {
"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
}
}
]
}
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 | 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 |
Get other documents related to an individual document
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'
const headers = {
'Accept':'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'
}
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"},
}
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}
Given a document and a relationship type name, finds all the documents that are related to the given document. 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.
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. |
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 been 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 been 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.
Example responses
200 Response
{
"name": "string",
"start": 0,
"limit": 0,
"count": 0,
"accept": "string",
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"version": 0,
"items": [
{
"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",
"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": {},
"person~ba0f8afd-b6e0-4763-91a8-9c6810d0156b": {}
},
"numNodes": 2,
"options": {
"activeNodes": false,
"centralityType": null,
"displayableTransactionType": null,
"groupCtr": 1,
"layout": {},
"nodeCtr": 1,
"scale": 2.0766116941529233,
"showLegend": true,
"showLinkLabels": false,
"showNodeAnnotation": true,
"showNodeLabels": true,
"showTimeline": false,
"showTransactionDetails": false,
"showTransactionLinks": false,
"toolsPane": {},
"transactionTypeIndex": 0,
"translate": []
}
}
}
]
}
],
"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."
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The request succeeded. | enrichedDocumentCollection |
404 | Not Found | No documents that are associated with the given documents and relationship type were found. | sasError |
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. Only sorting by the 'createdAt' field descending or ascending is supported. |
actionType | query | string | false | The filter criteria for the request. The 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' is 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. Only sorting by the 'createdAt' field descending or ascending is supported.
actionType: The filter criteria for the request. The Basic Selection filter syntax for the 'actionType' field is supported. For example: '?actionType=DOCUMENT_EDIT|COMMENT_CREATE' would return only DOCUMENT_EDIT or COMMENT_CREATE actions.
Accept-Item: If set to 'application/vnd.sas.investigate.action.type', the 'available action types' is returned.
Example responses
200 Response
{
"name": "string",
"start": 0,
"limit": 0,
"count": 0,
"accept": "string",
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"version": 0,
"items": [
{
"actionId": "string",
"action": "string",
"actionType": "string",
"objectType": "string",
"objectId": "string",
"objectVersion": "string",
"createdBy": "string",
"createdAt": "2019-08-24T14:15:22Z",
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"version": 0,
"localizedMessage": "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. | 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 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 documents 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 become required in a future version of the API. Certain newer 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 is displayed instructing 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 become required in a future version of the API. Certain newer action types will not be available from this endpoint if the actionType parameter is not provided.
Example responses
200 Response
{
"actionId": "string",
"action": "string",
"actionType": "DOCUMENT_CREATE",
"objectType": "string",
"objectId": "string",
"objectVersion": "string",
"createdBy": "string",
"createdAt": "2019-08-24T14:15:22Z",
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"version": 0,
"items": [
{}
]
}
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 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
{
"name": "string",
"start": 0,
"limit": 0,
"count": 0,
"accept": "string",
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"version": 0,
"items": [
{
"typeName": "string",
"id": "string",
"version": "string",
"displayLabel": "string",
"operation": "string",
"createdBy": "string",
"createdAt": "2019-08-24T14:15:22Z",
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "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. | versionSummaryCollection |
400 | Bad Request | Version history was not available for the specified document. | sasError |
404 | Not Found | The specified document was not found. | sasError |
Get a version for a document
Code samples
# You can also use wget
curl -X GET https://example.com/svi-datahub/documents/{objectTypeName}/{documentId}/versions/{version} \
-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/{version}',
{
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/{version}', 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/{version}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /documents/{objectTypeName}/{documentId}/versions/{version}
Gets the full representation of a version from a document's version history. A link to this representation is returned in the links property of a version 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. |
version | path | string | true | The version of the document to fetch. |
changedOnly | query | boolean | false | Indicates whether to return only the fields that have changed between the previous and requested document version. |
includeDisplayLabel | query | boolean | false | Indicates whether to include the display label for the document in the version. |
Detailed descriptions
objectTypeName: The object type of the document.
documentId: The ID of the document.
version: The version of the document to fetch.
changedOnly: Indicates whether to return only the fields that have changed between the previous and requested document version.
includeDisplayLabel: Indicates whether to include the display label for the document in the version.
Example responses
200 Response
{
"typeName": "string",
"id": "string",
"version": "string",
"displayLabel": "string",
"operation": "string",
"createdBy": "string",
"createdAt": "2019-08-24T14:15:22Z",
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"values": [
{
"name": "string",
"label": "string",
"previousVersionValue": {},
"value": {},
"type": "string",
"valueChanged": true
}
]
}
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. | version |
400 | Bad Request | Version history was not available for the specified document. | sasError |
404 | Not Found | The specified document or document version was not found. | sasError |
Get a summary of version history for a child document
Code samples
# You can also use wget
curl -X GET https://example.com/svi-datahub/documents/{objectTypeName}/{documentId}/versions/{version}/children/{childDocType} \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/vnd.sas.collection'
const headers = {
'Accept':'application/vnd.sas.collection'
};
fetch('https://example.com/svi-datahub/documents/{objectTypeName}/{documentId}/versions/{version}/children/{childDocType}',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
headers = {
'Accept': 'application/vnd.sas.collection'
}
r = requests.get('https://example.com/svi-datahub/documents/{objectTypeName}/{documentId}/versions/{version}/children/{childDocType}', headers = headers)
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/vnd.sas.collection"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://example.com/svi-datahub/documents/{objectTypeName}/{documentId}/versions/{version}/children/{childDocType}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /documents/{objectTypeName}/{documentId}/versions/{version}/children/{childDocType}
Gets a summary of version history for a child document. Child version summaries contain a link to fetch the full child version representation.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
objectTypeName | path | string | true | The object type of the child document's parent document. |
documentId | path | string | true | The ID of the child document's parent document. |
version | path | string | true | The version of the child document's parent document. |
childDocType | path | string | true | The object type of the child 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 child document in the version. |
operation | query | string | false | A query parameter that can be used to filter the child documents by their operation. |
Detailed descriptions
objectTypeName: The object type of the child document's parent 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 child document in the version.
operation: A query parameter that can be used to filter the child documents by their operation. The available operations are:
- "create"
- "delete"
- "update"
- "unknown"
- "unchanged"
Example responses
200 Response
{
"name": "string",
"start": 0,
"limit": 0,
"count": 0,
"accept": "string",
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"version": 0,
"items": [
{
"typeName": "string",
"id": "string",
"version": "string",
"displayLabel": "string",
"operation": "string",
"createdBy": "string",
"createdAt": "2019-08-24T14:15:22Z",
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"parentTypeName": "string",
"parentId": "string",
"parentVersion": "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. | childVersionSummaryCollection |
400 | Bad Request | Version history was not available for the specified child document. | sasError |
404 | Not Found | The specified child document or parent document was not found. | sasError |
Get a child version for a child document
Code samples
# You can also use wget
curl -X GET https://example.com/svi-datahub/documents/{objectTypeName}/{documentId}/versions/{version}/children/{childDocType}/{childDocId} \
-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/{version}/children/{childDocType}/{childDocId}',
{
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/{version}/children/{childDocType}/{childDocId}', 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/{version}/children/{childDocType}/{childDocId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /documents/{objectTypeName}/{documentId}/versions/{version}/children/{childDocType}/{childDocId}
Gets the full representation of a child version from a child document's version history. A link to this representation is returned in the "links" property of a child version summary.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
objectTypeName | path | string | true | The object type of the child document's parent document. |
documentId | path | string | true | The ID of the child document's parent document. |
version | path | string | true | The version of the child document's parent document. |
childDocType | path | string | true | The object type of the child document. |
childDocId | path | string | true | The ID of the child document. |
changedOnly | query | boolean | false | Specifies whether to return only the fields that have changed between the previous and requested child document version. |
includeDisplayLabel | query | boolean | false | Specifies whether to include the display label for the child document. |
Detailed descriptions
objectTypeName: The object type of the child document's parent document.
documentId: The ID of the child document's parent document.
version: The version of the child document's parent document.
childDocType: The object type of the child document.
childDocId: The ID of the child document.
changedOnly: Specifies whether to return only the fields that have changed between the previous and requested child document version.
includeDisplayLabel: Specifies whether to include the display label for the child document.
Example responses
200 Response
{
"typeName": "string",
"id": "string",
"version": "string",
"displayLabel": "string",
"operation": "string",
"createdBy": "string",
"createdAt": "2019-08-24T14:15:22Z",
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"parentTypeName": "string",
"parentId": "string",
"parentVersion": "string",
"values": [
{
"name": "string",
"label": "string",
"previousVersionValue": {},
"value": {},
"type": "string",
"valueChanged": true
}
]
}
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. | childVersion |
400 | Bad Request | Version history was not available for the specified child document. | sasError |
404 | Not Found | The specified child document, parent document, or parent document version was not found. | sasError |
Get additional history information about a historical document version
Code samples
# You can also use wget
curl -X GET https://example.com/svi-datahub/documents/{objectTypeName}/{documentId}/versions/{version}/items \
-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/{version}/items',
{
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/{version}/items', 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/{version}/items", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /documents/{objectTypeName}/{documentId}/versions/{version}/items
Gets additional history information about a historical document version. For example, this could be insight Create, Edit, and Delete operations.
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. |
version | path | string | true | The version of the document for which to fetch additional history information. |
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. |
Detailed descriptions
objectTypeName: The object type of the document.
documentId: The ID of the document.
version: The version of the document for which to fetch additional history information.
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.
Example responses
200 Response
{
"name": "string",
"start": 0,
"limit": 0,
"count": 0,
"accept": "string",
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"version": 0,
"items": [
{
"historyInfoId": "string",
"itemRefId": "string",
"itemType": "IMAGE",
"itemLabel": "string",
"operation": "CREATE",
"ownerType": "string",
"ownerId": "string",
"ownerVersion": "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. | historyinfoCollection |
400 | Bad Request | Additional history information was not available for the specified document. | sasError |
404 | Not Found | The specified document or document version was not found. | sasError |
Get additional history information for a child document at a specific parent document version
Code samples
# You can also use wget
curl -X GET https://example.com/svi-datahub/documents/{objectTypeName}/{documentId}/versions/{version}/children/{childDocType}/{childDocId}/items \
-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/{version}/children/{childDocType}/{childDocId}/items',
{
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/{version}/children/{childDocType}/{childDocId}/items', 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/{version}/children/{childDocType}/{childDocId}/items", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /documents/{objectTypeName}/{documentId}/versions/{version}/children/{childDocType}/{childDocId}/items
Gets additional history information for a child document at a specific parent document version.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
objectTypeName | path | string | true | The object type of the child document's parent document. |
documentId | path | string | true | The ID of the child document's parent document. |
version | path | string | true | The version of the child document's parent document. |
childDocType | path | string | true | The object type of the child document. |
childDocId | path | string | true | The ID of the child 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. |
Detailed descriptions
objectTypeName: The object type of the child document's parent document.
documentId: The ID of the child document's parent document.
version: The version of the child document's parent document.
childDocType: The object type of the child document.
childDocId: The ID of the child 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.
Example responses
200 Response
{
"name": "string",
"start": 0,
"limit": 0,
"count": 0,
"accept": "string",
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"version": 0,
"items": [
{
"historyInfoId": "string",
"itemRefId": "string",
"itemType": "IMAGE",
"itemLabel": "string",
"operation": "CREATE",
"ownerType": "string",
"ownerId": "string",
"ownerVersion": "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. | historyinfoCollection |
400 | Bad Request | Additional history information was not available for the given child document. | sasError |
404 | Not Found | The specified parent document, child document, or parent document version was not found. | sasError |
Lock a document for editing and deletion
Code samples
# You can also use wget
curl -X POST https://example.com/svi-datahub/locks/documents?type=string&id=string \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json'
const inputBody = 'null';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json'
};
fetch('https://example.com/svi-datahub/locks/documents?type=string&id=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/locks/documents', params={
'type': 'string', 'id': '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/locks/documents", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /locks/documents
Places a lock on a document prior to modifying or deleting the document. If another user has a lock on the object, the request fails. Be sure to delete the lock after editing the document. A document lock times out after two hours or when the session ends; whichever occurs first.
Body parameter
null
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
type | query | string | true | The entity type name of the document. |
id | query | string | true | The ID of the document. |
body | body | any | false | none |
Example responses
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."
}
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."
}
409 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 lock was placed on the document. There is no body in the response. | Inline |
400 | Bad Request | The request was invalid. | sasError |
404 | Not Found | The document was not found. | sasError |
409 | Conflict | Unable to place a lock on the document because another user has already locked it. | sasError |
Response Schema
Release a document lock
Code samples
# You can also use wget
curl -X DELETE https://example.com/svi-datahub/locks/documents?type=string&id=string
-H 'Authorization: Bearer <access-token-goes-here>' \
fetch('https://example.com/svi-datahub/locks/documents?type=string&id=string',
{
method: 'DELETE'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
r = requests.delete('https://example.com/svi-datahub/locks/documents', params={
'type': 'string', 'id': 'string'
})
print(r.json())
package main
import (
"bytes"
"net/http"
)
func main() {
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("DELETE", "https://example.com/svi-datahub/locks/documents", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
DELETE /locks/documents
Releases a document lock. A document lock times out after two hours or when the session ends; whichever occurs first.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
type | query | string | true | The entity type name of the document. |
id | query | string | true | The ID of the document. |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
204 | No Content | The lock was released. If there was no lock, a 204 is still returned. | None |
Query document lock for user
Code samples
# You can also use wget
curl -X GET https://example.com/svi-datahub/locks/documents?type=string&id=string \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/json'
const headers = {
'Accept':'application/json'
};
fetch('https://example.com/svi-datahub/locks/documents?type=string&id=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/locks/documents', params={
'type': 'string', 'id': '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/locks/documents", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /locks/documents
Determines whether the user has a lock on a document.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
type | query | string | true | The entity type name of the document. |
id | query | string | true | The ID of the document. |
Example responses
200 Response
true
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 response is a Boolean value that indicates whether the user has a lock on the document. | boolean |
404 | Not Found | The document was not found. | sasError |
Relationship Links
Contains the operations related to relationship links.
Create a new relationship link between two documents
Code samples
# You can also use wget
curl -X POST https://example.com/svi-datahub/links?includeEntityLabels=false \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json'
const inputBody = '{
"relationshipTypeName": "string",
"relationshipTypeVersion": "string",
"relationshipTypeLabel": "string",
"id": "string",
"qualifiedTypeName": "string",
"fromObjectTypeName": "string",
"fromObjectTypeVersion": 0,
"fromObjectId": "string",
"fromObjectDisplayLabel": "string",
"toObjectTypeName": "string",
"toObjectTypeVersion": 0,
"toObjectId": "string",
"toObjectDisplayLabel": "string",
"validFrom": "2019-08-24T14:15:22Z",
"validTo": "2019-08-24T14:15:22Z",
"createdAt": "2019-08-24T14:15:22Z",
"lastUpdatedAt": "2019-08-24T14:15:22Z"
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json'
};
fetch('https://example.com/svi-datahub/links?includeEntityLabels=false',
{
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/links', params={
'includeEntityLabels': 'false'
}, 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/links", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /links
Creates a new relationship link between two documents. A link is an instance of a relationship type. A relationship type that describes the link must already exist. The relationship type must have an internal bridge table to create links.
Body parameter
{
"relationshipTypeName": "string",
"relationshipTypeVersion": "string",
"relationshipTypeLabel": "string",
"id": "string",
"qualifiedTypeName": "string",
"fromObjectTypeName": "string",
"fromObjectTypeVersion": 0,
"fromObjectId": "string",
"fromObjectDisplayLabel": "string",
"toObjectTypeName": "string",
"toObjectTypeVersion": 0,
"toObjectId": "string",
"toObjectDisplayLabel": "string",
"validFrom": "2019-08-24T14:15:22Z",
"validTo": "2019-08-24T14:15:22Z",
"createdAt": "2019-08-24T14:15:22Z",
"lastUpdatedAt": "2019-08-24T14:15:22Z"
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
includeEntityLabels | query | boolean | true | Compute and include display labels for both to and from documents in the response. |
body | body | relationshipLink | false | An object that represents the link. |
Example responses
201 Response
{
"relationshipTypeName": "string",
"relationshipTypeVersion": "string",
"relationshipTypeLabel": "string",
"id": "string",
"qualifiedTypeName": "string",
"fromObjectTypeName": "string",
"fromObjectTypeVersion": 0,
"fromObjectId": "string",
"fromObjectDisplayLabel": "string",
"toObjectTypeName": "string",
"toObjectTypeVersion": 0,
"toObjectId": "string",
"toObjectDisplayLabel": "string",
"validFrom": "2019-08-24T14:15:22Z",
"validTo": "2019-08-24T14:15:22Z",
"createdAt": "2019-08-24T14:15:22Z",
"lastUpdatedAt": "2019-08-24T14:15:22Z"
}
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 new relationship link between two documents was created. | relationshipLink |
400 | Bad Request | The request was invalid. | sasError |
Query a list of links or an individual link based on specific query parameters
Code samples
# You can also use wget
curl -X GET https://example.com/svi-datahub/links \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/json'
const headers = {
'Accept':'application/json'
};
fetch('https://example.com/svi-datahub/links',
{
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/links', 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/links", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /links
Gets either a list of links that are associated with a document or an individual link. The type of request is determined by the included query parameters. Do not mix the query parameters for both types of requests.
- Query a list of links that are associated with a document. Fetch a list of all links that originate from a specific document. Use these query parameters:
- _relationshipName
- _fromEntityTypeName
- _entityId
- _entityTypeName
- _includeEntityLabels
- Query an individual link. Fetch an individual link between two documents. Use these parameters:
- relationshipName
- fromEntityTypeName
- fromEntityId
- toEntityTypeName
- toEntityId
- includeEntityLabels
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
_relationshipName | query | string | false | The name of the relationship type upon which the link is based. |
_fromEntityTypeName | query | string | false | The entity type of the starting point of the link. |
_entityId | query | string | false | The unique identifier for the entity that is the starting point of the link. |
_entityTypeName | query | string | false | The same value as _fromEntityTypeName. (This is required for legacy reasons.) |
_includeEntityLabels | query | boolean | false | Compute and include display labels for both to and from documents. |
relationshipName | query | string | false | The name of the relationship type upon which the link is based. |
fromEntityTypeName | query | string | false | The entity type of the starting point of the link. |
fromEntityId | query | string | false | The unique identifier for the entity that is the starting point of the link. |
toEntityTypeName | query | string | false | The entity type of the destination point of the link. |
toEntityId | query | string | false | The unique identifier for the entity that is the destination point of the link. |
includeEntityLabels | query | boolean | false | Compute and include display labels for both to and from documents. |
Example responses
200 Response
{
"relationshipTypeName": "string",
"relationshipTypeVersion": "string",
"relationshipTypeLabel": "string",
"id": "string",
"qualifiedTypeName": "string",
"fromObjectTypeName": "string",
"fromObjectTypeVersion": 0,
"fromObjectId": "string",
"fromObjectDisplayLabel": "string",
"toObjectTypeName": "string",
"toObjectTypeVersion": 0,
"toObjectId": "string",
"toObjectDisplayLabel": "string",
"validFrom": "2019-08-24T14:15:22Z",
"validTo": "2019-08-24T14:15:22Z",
"createdAt": "2019-08-24T14:15:22Z",
"lastUpdatedAt": "2019-08-24T14:15:22Z"
}
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 response is either an individual link or an array of links. | relationshipLink |
404 | Not Found | Unable able to find a link or links based on the values provided in the request. | sasError |
Update a relationship link
Code samples
# You can also use wget
curl -X PUT https://example.com/svi-datahub/links/@item?_id=string \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json'
const inputBody = '{
"relationshipTypeName": "string",
"relationshipTypeVersion": "string",
"relationshipTypeLabel": "string",
"id": "string",
"qualifiedTypeName": "string",
"fromObjectTypeName": "string",
"fromObjectTypeVersion": 0,
"fromObjectId": "string",
"fromObjectDisplayLabel": "string",
"toObjectTypeName": "string",
"toObjectTypeVersion": 0,
"toObjectId": "string",
"toObjectDisplayLabel": "string",
"validFrom": "2019-08-24T14:15:22Z",
"validTo": "2019-08-24T14:15:22Z",
"createdAt": "2019-08-24T14:15:22Z",
"lastUpdatedAt": "2019-08-24T14:15:22Z"
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json'
};
fetch('https://example.com/svi-datahub/links/@item?_id=string',
{
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/links/@item', params={
'_id': '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("PUT", "https://example.com/svi-datahub/links/@item", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
PUT /links/@item
Updates an existing relationship link where the relationship type has an internal bridge table.
Body parameter
{
"relationshipTypeName": "string",
"relationshipTypeVersion": "string",
"relationshipTypeLabel": "string",
"id": "string",
"qualifiedTypeName": "string",
"fromObjectTypeName": "string",
"fromObjectTypeVersion": 0,
"fromObjectId": "string",
"fromObjectDisplayLabel": "string",
"toObjectTypeName": "string",
"toObjectTypeVersion": 0,
"toObjectId": "string",
"toObjectDisplayLabel": "string",
"validFrom": "2019-08-24T14:15:22Z",
"validTo": "2019-08-24T14:15:22Z",
"createdAt": "2019-08-24T14:15:22Z",
"lastUpdatedAt": "2019-08-24T14:15:22Z"
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
_id | query | string | true | The ID for an individual link. A link ID uses the following format: |
_includeEntityLabels | query | boolean | false | Compute and include display labels for both to and from documents in the response. |
body | body | relationshipLink | false | An object that represents the link. |
Detailed descriptions
_id: The ID for an individual link. A link ID uses the following format:
${relationshipName}|_|${fromEntityTypeName}|_|${toEntityTypeName}|_|${fromEntityId}|_|${toEntityId}
where |_|
is the delimiter between link ID components.
Link ID component details:
* relationshipName
- The relationship type name that defines the link.
* fromEntityTypeName
- The entity type name of the starting point for the link.
* fromEntityId
- The unique identifier of the entity that is the starting point for the link.
* toEntityTypeName
- The entity type name of the destination point for the link.
* toEntityId
- The unique identifier of the entity that is the destination point for the link.
When submitting the request, the pipe character (|
) must be percent-encoded as %7C
. See below for
an example of the pipe character properly encoded:
${relationshipName}%7C_%7C${fromEntityTypeName}%7C_%7C${toEntityTypeName}%7C_%7C${fromEntityId}%7C_%7C${toEntityId}
Example responses
200 Response
{
"relationshipTypeName": "string",
"relationshipTypeVersion": "string",
"relationshipTypeLabel": "string",
"id": "string",
"qualifiedTypeName": "string",
"fromObjectTypeName": "string",
"fromObjectTypeVersion": 0,
"fromObjectId": "string",
"fromObjectDisplayLabel": "string",
"toObjectTypeName": "string",
"toObjectTypeVersion": 0,
"toObjectId": "string",
"toObjectDisplayLabel": "string",
"validFrom": "2019-08-24T14:15:22Z",
"validTo": "2019-08-24T14:15:22Z",
"createdAt": "2019-08-24T14:15:22Z",
"lastUpdatedAt": "2019-08-24T14:15:22Z"
}
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. | relationshipLink |
400 | Bad Request | The request was invalid. | sasError |
404 | Not Found | Unable to find the link. | sasError |
412 | Precondition Failed | The link in the request body was out of date. | sasError |
428 | Precondition Required | The link in the request body did not contain a version. | sasError |
Query an individual link
Code samples
# You can also use wget
curl -X GET https://example.com/svi-datahub/links/@item?_id=string \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/json'
const headers = {
'Accept':'application/json'
};
fetch('https://example.com/svi-datahub/links/@item?_id=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/links/@item', params={
'_id': '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/links/@item", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /links/@item
Retrieves an individual link using an ID string.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
_id | query | string | true | The ID for an individual link. A link ID uses the following format: |
_includeDisplayLabel | query | boolean | false | Compute and include display labels for both to and from documents in the response. |
Detailed descriptions
_id: The ID for an individual link. A link ID uses the following format:
${relationshipName}|_|${fromEntityTypeName}|_|${toEntityTypeName}|_|${fromEntityId}|_|${toEntityId}
where |_|
is the delimiter between link ID components.
Link ID component details:
* relationshipName
- The relationship type name that defines the link.
* fromEntityTypeName
- The entity type name of the starting point for the link.
* fromEntityId
- The unique identifier of the entity that is the starting point for the link.
* toEntityTypeName
- The entity type name of the destination point for the link.
* toEntityId
- The unique identifier of the entity that is the destination point for the link.
When submitting the request, the pipe character (|
) must be percent-encoded as %7C
. See below for
an example of the pipe character properly encoded:
${relationshipName}%7C_%7C${fromEntityTypeName}%7C_%7C${toEntityTypeName}%7C_%7C${fromEntityId}%7C_%7C${toEntityId}
Example responses
200 Response
{
"relationshipTypeName": "string",
"relationshipTypeVersion": "string",
"relationshipTypeLabel": "string",
"id": "string",
"qualifiedTypeName": "string",
"fromObjectTypeName": "string",
"fromObjectTypeVersion": 0,
"fromObjectId": "string",
"fromObjectDisplayLabel": "string",
"toObjectTypeName": "string",
"toObjectTypeVersion": 0,
"toObjectId": "string",
"toObjectDisplayLabel": "string",
"validFrom": "2019-08-24T14:15:22Z",
"validTo": "2019-08-24T14:15:22Z",
"createdAt": "2019-08-24T14:15:22Z",
"lastUpdatedAt": "2019-08-24T14:15:22Z"
}
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. An individual link is returned. | relationshipLink |
400 | Bad Request | The request was invalid. | sasError |
404 | Not Found | Unable to find the link. | sasError |
Delete a relationship link
Code samples
# You can also use wget
curl -X DELETE https://example.com/svi-datahub/links/@item?_id=string \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/json'
const headers = {
'Accept':'application/json'
};
fetch('https://example.com/svi-datahub/links/@item?_id=string',
{
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/links/@item', params={
'_id': '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("DELETE", "https://example.com/svi-datahub/links/@item", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
DELETE /links/@item
Deletes an existing relationship link where the relationship type has an internal bridge table.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
_id | query | string | true | The ID for an individual link. A link ID uses the following format: |
Detailed descriptions
_id: The ID for an individual link. A link ID uses the following format:
${relationshipName}|_|${fromEntityTypeName}|_|${toEntityTypeName}|_|${fromEntityId}|_|${toEntityId}
where |_|
is the delimiter between link ID components.
Link ID component details:
* relationshipName
- The relationship type name that defines the link.
* fromEntityTypeName
- The entity type name of the starting point for the link.
* fromEntityId
- The unique identifier of the entity that is the starting point for the link.
* toEntityTypeName
- The entity type name of the destination point for the link.
* toEntityId
- The unique identifier of the entity that is the destination point for the link.
When submitting the request, the pipe character (|
) must be percent-encoded as %7C
. See below for
an example of the pipe character properly encoded:
${relationshipName}%7C_%7C${fromEntityTypeName}%7C_%7C${toEntityTypeName}%7C_%7C${fromEntityId}%7C_%7C${toEntityId}
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 request succeeded. | None |
404 | Not Found | Unable to find a link or links based on the values provided in the request. | sasError |
Get summary of action history for a link
Code samples
# You can also use wget
curl -X GET https://example.com/svi-datahub/links/@item/actions?_id=string \
-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/links/@item/actions?_id=string',
{
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/links/@item/actions', params={
'_id': 'string'
}, 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/links/@item/actions", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /links/@item/actions
Gets a summary of action history for a link. 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 link. 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 given link, providing an exhaustive list of all possible filter options.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
_id | query | string | true | The ID for an individual link. A link ID uses the following format: |
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. Only sorting by the 'createdAt' field descending or ascending is supported. |
actionType | query | string | false | The filter criteria for the request. The Basic Selection filter syntax for the 'actionType' field is supported. For example: '?actionType=RELATIONSHIP_EDIT' would return only RELATIONSHIP_EDIT actions. |
Accept-Item | header | string | false | If set to 'application/vnd.sas.investigate.action.type', the 'available action types' are returned. |
Detailed descriptions
_id: The ID for an individual link. A link ID uses the following format:
${relationshipName}|_|${fromEntityTypeName}|_|${toEntityTypeName}|_|${fromEntityId}|_|${toEntityId}
where |_|
is the delimiter between link ID components.
Link ID component details:
* relationshipName
- The relationship type name that defines the link.
* fromEntityTypeName
- The entity type name of the starting point for the link.
* fromEntityId
- The unique identifier of the entity that is the starting point for the link.
* toEntityTypeName
- The entity type name of the destination point for the link.
* toEntityId
- The unique identifier of the entity that is the destination point for the link.
When submitting the request, the pipe character (|
) must be percent-encoded as %7C
. See below for
an example of the pipe character properly encoded:
${relationshipName}%7C_%7C${fromEntityTypeName}%7C_%7C${toEntityTypeName}%7C_%7C${fromEntityId}%7C_%7C${toEntityId}
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. Only sorting by the 'createdAt' field descending or ascending is supported.
actionType: The filter criteria for the request. The Basic Selection filter syntax for the 'actionType' field is supported. For example: '?actionType=RELATIONSHIP_EDIT' would return only RELATIONSHIP_EDIT actions.
Accept-Item: If set to 'application/vnd.sas.investigate.action.type', the 'available action types' are returned.
Example responses
200 Response
{
"name": "string",
"start": 0,
"limit": 0,
"count": 0,
"accept": "string",
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"version": 0,
"items": [
{
"actionId": "string",
"action": "string",
"actionType": "string",
"objectType": "string",
"objectId": "string",
"objectVersion": "string",
"createdBy": "string",
"createdAt": "2019-08-24T14:15:22Z",
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"version": 0,
"localizedMessage": "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. | Inline |
400 | Bad Request | Action history was not available for the given link. | sasError |
404 | Not Found | The specified link 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 an action from the action history of a link
Code samples
# You can also use wget
curl -X GET https://example.com/svi-datahub/links/@item/actions/{actionId}?_id=string \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/json'
const headers = {
'Accept':'application/json'
};
fetch('https://example.com/svi-datahub/links/@item/actions/{actionId}?_id=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/links/@item/actions/{actionId}', params={
'_id': '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/links/@item/actions/{actionId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /links/@item/actions/{actionId}
Gets the full representation of an action from a links action history. A link to this representation is returned in the links property of an action summary.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
actionId | path | string | true | The ID of the action. |
_id | query | string | true | The ID for an individual link. A link ID uses the following format: |
Detailed descriptions
actionId: The ID of the action.
_id: The ID for an individual link. A link ID uses the following format:
${relationshipName}|_|${fromEntityTypeName}|_|${toEntityTypeName}|_|${fromEntityId}|_|${toEntityId}
where |_|
is the delimiter between link ID components.
Link ID component details:
* relationshipName
- The relationship type name that defines the link.
* fromEntityTypeName
- The entity type name of the starting point for the link.
* fromEntityId
- The unique identifier of the entity that is the starting point for the link.
* toEntityTypeName
- The entity type name of the destination point for the link.
* toEntityId
- The unique identifier of the entity that is the destination point for the link.
When submitting the request, the pipe character (|
) must be percent-encoded as %7C
. See below for
an example of the pipe character properly encoded:
${relationshipName}%7C_%7C${fromEntityTypeName}%7C_%7C${toEntityTypeName}%7C_%7C${fromEntityId}%7C_%7C${toEntityId}
Example responses
200 Response
{
"actionId": "string",
"action": "string",
"actionType": "DOCUMENT_CREATE",
"objectType": "string",
"objectId": "string",
"objectVersion": "string",
"createdBy": "string",
"createdAt": "2019-08-24T14:15:22Z",
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"version": 0,
"items": [
{}
]
}
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 link. | sasError |
404 | Not Found | The specified link or requested action was not found. | sasError |
Get summary of version history for a link
Code samples
# You can also use wget
curl -X GET https://example.com/svi-datahub/links/@item/versions?_id=string \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/json'
const headers = {
'Accept':'application/json'
};
fetch('https://example.com/svi-datahub/links/@item/versions?_id=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/links/@item/versions', params={
'_id': '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/links/@item/versions", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /links/@item/versions
Gets a summary of version history for a link. Version summaries contain a link to fetch the full version representation.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
_id | query | string | true | The ID for an individual link. A link ID uses the following format: |
includeDisplayLabel | query | boolean | false | Specifies whether to include the display label for the link. |
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. |
Detailed descriptions
_id: The ID for an individual link. A link ID uses the following format:
${relationshipName}|_|${fromEntityTypeName}|_|${toEntityTypeName}|_|${fromEntityId}|_|${toEntityId}
where |_|
is the delimiter between link ID components.
Link ID component details:
* relationshipName
- The relationship type name that defines the link.
* fromEntityTypeName
- The entity type name of the starting point for the link.
* fromEntityId
- The unique identifier of the entity that is the starting point for the link.
* toEntityTypeName
- The entity type name of the destination point for the link.
* toEntityId
- The unique identifier of the entity that is the destination point for the link.
When submitting the request, the pipe character (|
) must be percent-encoded as %7C
. See below for
an example of the pipe character properly encoded:
${relationshipName}%7C_%7C${fromEntityTypeName}%7C_%7C${toEntityTypeName}%7C_%7C${fromEntityId}%7C_%7C${toEntityId}
includeDisplayLabel: Specifies whether to include the display label for the link.
start: The start index. This is used for paging.
limit: The maximum number of items to return in a page of results.
Example responses
200 Response
{
"name": "string",
"start": 0,
"limit": 0,
"count": 0,
"accept": "string",
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"version": 0,
"items": [
{
"typeName": "string",
"id": "string",
"version": "string",
"displayLabel": "string",
"operation": "string",
"createdBy": "string",
"createdAt": "2019-08-24T14:15:22Z",
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "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. | versionSummaryCollection |
400 | Bad Request | Version history was not available for the specified link. | sasError |
404 | Not Found | The specified link was not found. | sasError |
Get a version from a links version history
Code samples
# You can also use wget
curl -X GET https://example.com/svi-datahub/links/@item/versions/{version}?_id=string \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/json'
const headers = {
'Accept':'application/json'
};
fetch('https://example.com/svi-datahub/links/@item/versions/{version}?_id=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/links/@item/versions/{version}', params={
'_id': '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/links/@item/versions/{version}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /links/@item/versions/{version}
Gets the full representation of a version from a links version history. The link to fetch the full representation is returned with version summaries.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
version | path | string | true | - The version of the links history to fetch. |
_id | query | string | true | The ID for an individual link. A link ID uses the following format: |
includeDisplayLabel | query | boolean | false | Specifies whether to include the display label for the link in the version. |
changedOnly | query | boolean | false | Specifies whether to return only fields that have changed between the previous and requested link version. |
Detailed descriptions
version: - The version of the links history to fetch.
_id: The ID for an individual link. A link ID uses the following format:
${relationshipName}|_|${fromEntityTypeName}|_|${toEntityTypeName}|_|${fromEntityId}|_|${toEntityId}
where |_|
is the delimiter between link ID components.
Link ID component details:
* relationshipName
- The relationship type name that defines the link.
* fromEntityTypeName
- The entity type name of the starting point for the link.
* fromEntityId
- The unique identifier of the entity that is the starting point for the link.
* toEntityTypeName
- The entity type name of the destination point for the link.
* toEntityId
- The unique identifier of the entity that is the destination point for the link.
When submitting the request, the pipe character (|
) must be percent-encoded as %7C
. See below for
an example of the pipe character properly encoded:
${relationshipName}%7C_%7C${fromEntityTypeName}%7C_%7C${toEntityTypeName}%7C_%7C${fromEntityId}%7C_%7C${toEntityId}
includeDisplayLabel: Specifies whether to include the display label for the link in the version.
changedOnly: Specifies whether to return only fields that have changed between the previous and requested link version.
Example responses
200 Response
{
"typeName": "string",
"id": "string",
"version": "string",
"displayLabel": "string",
"operation": "string",
"createdBy": "string",
"createdAt": "2019-08-24T14:15:22Z",
"links": [
{
"method": "string",
"rel": "string",
"uri": "string",
"href": "string",
"title": "string",
"type": "string",
"itemType": "string",
"responseType": "string",
"responseItemType": "string"
}
],
"values": [
{
"name": "string",
"label": "string",
"previousVersionValue": {},
"value": {},
"type": "string",
"valueChanged": true
}
]
}
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. | version |
400 | Bad Request | Version history was not available for the given link. | sasError |
404 | Not Found | The specified link or the requested version was not found. | sasError |
Entity Types
Contains the operations related to managing entity type metadata.
Retrieve an entity type object by name
Code samples
# You can also use wget
curl -X GET https://example.com/svi-datahub/admin/storedObjects \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/json'
const headers = {
'Accept':'application/json'
};
fetch('https://example.com/svi-datahub/admin/storedObjects',
{
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/storedObjects', 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/storedObjects", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /admin/storedObjects
Retrieves an entity type by name. An entity type is the metadata that is associated with documents.
The client can request a representation that contains additional metadata from this endpoint by specifying one of the following media types in the Accept header.
Value in Accept header | Additional data in representation |
---|---|
application/json | No additional data beyond the default Entity Type representation. |
application/vnd.sas.investigation.meta.entity.type.admin+json;version=2 | The default Entity Type representation, plus additional File Category metadata1. |
application/vnd.sas.investigation.meta.entity.type.admin.audit+json | The default Entity Type representation, plus additional File Category metadata1, plus metadata for audit object virtual fields2. |
1 Additional File Category metadata includes, for each File Category in the Entity Type metadata, whether files exist under that File Category, and a collection of Templates that reference that File Category.
2 Audit object virtual fields expose the values in "Created By User" fields and "Last Updated By User" fields as serialized JSON objects that can be consumed by User/Group Selection controls. An Entity Type without a "Created By User" field (that is, a field that has a name similar to "created_by_user") will not have an audit object virtual field for "Created By User." Likewise, an Entity Type without a "Last Updated By User" field (as defined by the field's role) will not have a "Last Updated By User" audit object virtual field.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
name | query | string | false | The name of an entity type object. |
excludeUnauthorized | query | boolean | false | Specifies whether to exclude the results that the user is not authorized to view. Only admin users can set this to true. |
Detailed descriptions
excludeUnauthorized: Specifies whether to exclude the results that the user is not authorized to view. Only admin users can set this to true.
Example responses
200 Response
{
"id": "string",
"createdBy": "string",
"createdAt": "2019-08-24T14:15:22Z",
"lastUpdatedBy": "string",
"lastUpdatedAt": "2019-08-24T14:15:22Z",
"label": "string",
"description": "string",
"localizedLabels": [
{
"id": "string",
"createdBy": "string",
"createdAt": "2019-08-24T14:15:22Z",
"lastUpdatedBy": "string",
"lastUpdatedAt": "2019-08-24T14:15:22Z",
"version": 0,
"locale": "en-US",
"label": "string"
}
],
"localizedDescriptions": [
{
"id": "string",
"createdBy": "string",
"createdAt": "2019-08-24T14:15:22Z",
"lastUpdatedBy": "string",
"lastUpdatedAt": "2019-08-24T14:15:22Z",
"version": 0,
"locale": "en-US",
"description": "string"
}
],
"name": "string",
"dataStoreName": "string",
"tableName": "string",
"systemReserved": true,
"historyEnabled": true,
"version": 0,
"validFromFieldName": "string",
"validToFieldName": "string",
"lastUpdatedAtTimeFieldName": "string",
"createdAtTimeFieldName": "string",
"displayTextFields": [
{
"name": "string",
"displayIndex": 0
}
],
"dataStoreAssignedTimeZone": "string",
"type": "MANAGED",
"markerColor": "#9d2b12",
"nodeShape": "CIRCLE",
"nodeColor": "#F0F1F2",
"borderColor": "#F0F1F2",
"borderWidth": 0,
"scale": 0,
"styles": [
{
"id": "string",
"conditionId": "string",
"evaluationOrder": 0,
"iconName": "string",
"markerCode": "string",
"nodeColor": "string",
"borderColor": "string",
"borderWidth": 0
}
],
"elementGroupRoot": true,
"indexedForSearch": true,
"fields": [
{
"id": "string",
"createdBy": "string",
"createdAt": "2019-08-24T14:15:22Z",
"lastUpdatedBy": "string",
"lastUpdatedAt": "2019-08-24T14:15:22Z",
"label": "string",
"description": "string",
"localizedLabels": [
{
"id": "string",
"createdBy": "string",
"createdAt": "2019-08-24T14:15:22Z",
"lastUpdatedBy": "string",
"lastUpdatedAt": "2019-08-24T14:15:22Z",
"version": 0,
"locale": "en-US",
"label": "string"
}
],
"localizedDescriptions": [
{
"id": "string",
"createdBy": "string",
"createdAt": "2019-08-24T14:15:22Z",
"lastUpdatedBy": "string",
"lastUpdatedAt": "2019-08-24T14:15:22Z",
"version": 0,
"locale": "en-US",
"description": "string"
}
],
"name": "string",
"columnName": "string",
"dataType": "BOOLEAN",
"length": 0,
"precision": 0,
"scale": 0,
"required": true,
"primaryKeyField": true,
"unique": true,
"autoGenerated": true,
"systemReserved": true,
"displayIndex": 0,
"version": 0,
"constrainingListName": "string",
"userSelectionStrategy": "USERS",
"allowMultipleSelections": true,
"primaryKeySeqNo": 0,
"readOnly": true,
"indexedForSearch": true,
"logicalDataType": "USER_GROUP",
"ownerName": "string",
"relatedElementName": "string"
}
],
"relationshipsFrom": [
{
"id": "string",
"createdBy": "string",
"createdAt": "2019-08-24T14:15:22Z",
"lastUpdatedBy": "string",
"lastUpdatedAt": "2019-08-24T14:15:22Z",
"label": "string",
"description": "string",
"localizedLabels": [
{
"id": "string",
"createdBy": "string",
"createdAt": "2019-08-24T14:15:22Z",
"lastUpdatedBy": "string",
"lastUpdatedAt": "2019-08-24T14:15:22Z",
"version": 0,
"locale": "en-US",
"label": "string"
}
],
"localizedDescriptions": [
{
"id": "string",
"createdBy": "string",
"createdAt": "2019-08-24T14:15:22Z",
"lastUpdatedBy": "string",
"lastUpdatedAt": "2019-08-24T14:15:22Z",
"version": 0,
"locale": "en-US",
"description": "string"
}
],
"name": "string",
"dataStoreName": "string",
"tableName": "string",
"systemReserved": true,
"historyEnabled": true,
"version": 0,
"validFromFieldName": "string",
"validToFieldName": "string",
"lastUpdatedAtTimeFieldName": "string",
"createdAtTimeFieldName": "string",
"displayTextFields": [
{
"name": "string",
"displayIndex": 0
}
],
"dataStoreAssignedTimeZone": "string",
"reverseName": "string",
"reverseLabel": "string",
"fromObjectName": "string",
"fromObjectLabel": "string",
"toObjectName": "string",
"toObjectLabel": "string",
"required": true,
"cardinality": "ONE_TO_ONE",
"sortCriteria": {
"fieldName": "string",
"sortOrder": "asc"
},
"type": "DIRECT_CHILD",
"symmetric": true,
"managed": true,
"toObjectTypeFieldName": "string",
"toObjectTypeNames": [
"string"
],
"joinKeyFieldName": "string",
"joinConditions": [
{
"type": "FieldRef"
}
],
"fields": [
{
"id": "string",
"createdBy": "string",
"createdAt": "2019-08-24T14:15:22Z",
"lastUpdatedBy": "string",
"lastUpdatedAt": "2019-08-24T14:15:22Z",
"label": "string",
"description": "string",
"localizedLabels": [
{
"id": "string",
"createdBy": "string",
"createdAt": "2019-08-24T14:15:22Z",
"lastUpdatedBy": "string",
"lastUpdatedAt": "2019-08-24T14:15:22Z",
"version": 0,
"locale": "en-US",
"label": "string"
}
],
"localizedDescriptions": [
{
"id": "string",
"createdBy": "string",
"createdAt": "2019-08-24T14:15:22Z",
"lastUpdatedBy": "string",
"lastUpdatedAt": "2019-08-24T14:15:22Z",
"version": 0,
"locale": "en-US",
"description": "string"
}
],
"name": "string",
"columnName": "string",
"dataType": "BOOLEAN",
"length": 0,
"precision": 0,
"scale": 0,
"required": true,
"primaryKeyField": true,
"unique": true,
"autoGenerated": true,
"systemReserved": true,
"displayIndex": 0,
"version": 0,
"constrainingListName": "string",
"userSelectionStrategy": "USERS",
"allowMultipleSelections": true,
"primaryKeySeqNo": 0,
"readOnly": true,
"indexedForSearch": true,
"logicalDataType": "USER_GROUP",
"ownerName": "string"
}
],
"localizedReverseLabels": [
{
"id": "string",
"createdBy": "string",
"createdAt": "2019-08-24T14:15:22Z",
"lastUpdatedBy": "string",
"lastUpdatedAt": "2019-08-24T14:15:22Z",
"version": 0,
"locale": "en-US",
"label": "string"
}
],
"deleteTableName": "string",
"useCustomIndex": true,
"color": "string",
"width": 0,
"dashType": "solid",
"styles": [
{
"id": "string",
"conditionId": "string",
"evaluationOrder": 0,
"color": "string",
"width": 0,
"dashType": "solid"
}
],
"reindexRequired": true
}
],
"relationshipsTo": [
{
"id": "string",
"createdBy": "string",
"createdAt": "2019-08-24T14:15:22Z",
"lastUpdatedBy": "string",
"lastUpdatedAt": "2019-08-24T14:15:22Z",
"label": "string",
"description": "string",
"localizedLabels": [
{
"id": "string",
"createdBy": "string",
"createdAt": "2019-08-24T14:15:22Z",
"lastUpdatedBy": "string",
"lastUpdatedAt": "2019-08-24T14:15:22Z",
"version": 0,
"locale": "en-US",
"label": "string"
}
],
"localizedDescriptions": [
{
"id": "string",
"createdBy": "string",
"createdAt": "2019-08-24T14:15:22Z",
"lastUpdatedBy": "string",
"lastUpdatedAt": "2019-08-24T14:15:22Z",
"version": 0,
"locale": "en-US",
"description": "string"
}
],
"name": "string",
"dataStoreName": "string",
"tableName": "string",
"systemReserved": true,
"historyEnabled": true,
"version": 0,
"validFromFieldName": "string",
"validToFieldName": "string",
"lastUpdatedAtTimeFieldName": "string",
"createdAtTimeFieldName": "string",
"displayTextFields": [
{
"name": "string",
"displayIndex": 0
}
],
"dataStoreAssignedTimeZone": "string",
"reverseName": "string",
"reverseLabel": "string",
"fromObjectName": "string",
"fromObjectLabel": "string",
"toObjectName": "string",
"toObjectLabel": "string",
"required": true,
"cardinality": "ONE_TO_ONE",
"sortCriteria": {
"fieldName": "string",
"sortOrder": "asc"
},
"type": "DIRECT_CHILD",
"symmetric": true,
"managed": true,
"toObjectTypeFieldName": "string",
"toObjectTypeNames": [
"string"
],
"joinKeyFieldName": "string",
"joinConditions": [
{
"type": "FieldRef"
}
],
"fields": [
{
"id": "string",
"createdBy": "string",
"createdAt": "2019-08-24T14:15:22Z",
"lastUpdatedBy": "string",
"lastUpdatedAt": "2019-08-24T14:15:22Z",
"label": "string",
"description": "string",
"localizedLabels": [
{
"id": "string",
"createdBy": "string",
"createdAt": "2019-08-24T14:15:22Z",
"lastUpdatedBy": "string",
"lastUpdatedAt": "2019-08-24T14:15:22Z",
"version": 0,
"locale": "en-US",
"label": "string"
}
],
"localizedDescriptions": [
{
"id": "string",
"createdBy": "string",
"createdAt": "2019-08-24T14:15:22Z",
"lastUpdatedBy": "string",
"lastUpdatedAt": "2019-08-24T14:15:22Z",
"version": 0,
"locale": "en-US",
"description": "string"
}
],
"name": "string",
"columnName": "string",
"dataType": "BOOLEAN",
"length": 0,
"precision": 0,
"scale": 0,
"required": true,
"primaryKeyField": true,
"unique": true,
"autoGenerated": true,
"systemReserved": true,
"displayIndex": 0,
"version": 0,
"constrainingListName": "string",
"userSelectionStrategy": "USERS",
"allowMultipleSelections": true,
"primaryKeySeqNo": 0,
"readOnly": true,
"indexedForSearch": true,
"logicalDataType": "USER_GROUP",
"ownerName": "string"
}
],
"localizedReverseLabels": [
{
"id": "string",
"createdBy": "string",
"createdAt": "2019-08-24T14:15:22Z",
"lastUpdatedBy": "string",
"lastUpdatedAt": "2019-08-24T14:15:22Z",
"version": 0,
"locale": "en-US",
"label": "string"
}
],
"deleteTableName": "string",
"useCustomIndex": true,
"color": "string",
"width": 0,
"dashType": "solid",
"styles": [
{
"id": "string",
"conditionId": "string",
"evaluationOrder": 0,
"color": "string",
"width": 0,
"dashType": "solid"
}
],
"reindexRequired": true
}
],
"defaultRegularIcon": {
"id": "string",
"createdBy": "string",
"createdAt": "2019-08-24T14:15:22Z",
"lastUpdatedBy": "string",
"lastUpdatedAt": "2019-08-24T14:15:22Z",
"name": "string",
"imageType": "gif",
"imageLocation": "string",
"bytes": "string",
"version": 0
},
"defaultMapIcon": {
"id": "string",
"createdBy": "string",
"createdAt": "2019-08-24T14:15:22Z",
"lastUpdatedBy": "string",
"lastUpdatedAt": "2019-08-24T14:15:22Z",
"name": "string",
"imageType": "gif",
"imageLocation": "string",
"bytes": "string",
"version": 0
},
"parentName": "string",
"allowElementGroupRootAssignment": true,
"deleteTableName": "string",
"urnFormat": "string",
"urnLength": 0,
"urnStartValue": 0,
"urnType": "UUID",
"requireSearchBeforeCreate": true,
"enableCasDistributedDataLoad": true,
"attachmentsIndexedForSearch": true,
"reindexRequired": true,
"mobileOfflineEnabled": true,
"publishCode": "OPEN"
}
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. | entityType |
404 | Not Found | The request did not find an entity type with a matching name. | sasError |
Retrieve an entity type object by ID
Code samples
# You can also use wget
curl -X GET https://example.com/svi-datahub/admin/storedObjects/{entityTypeId} \
-H 'Authorization: Bearer <access-token-goes-here>' \
-H 'Accept: application/json'
const headers = {
'Accept':'application/json'
};
fetch('https://example.com/svi-datahub/admin/storedObjects/{entityTypeId}',
{
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/storedObjects/{entityTypeId}', 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/storedObjects/{entityTypeId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /admin/storedObjects/{entityTypeId}
Retrieves an entity type by ID. An entity type is the metadata that is associated with documents.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
entityTypeId | path | string | true | The ID of the entity type object. |
excludeUnauthorized | query | boolean | false | Specifies whether to exclude the results that the user is not authorized to view. Only admin users can set this to true. |
Detailed descriptions
excludeUnauthorized: Specifies whether to exclude the results that the user is not authorized to view. Only admin users can set this to true.
Example responses
200 Response
{
"id": "string",
"createdBy": "string",
"createdAt": "2019-08-24T14:15:22Z",
"lastUpdatedBy": "string",
"lastUpdatedAt": "2019-08-24T14:15:22Z",
"label": "string",
"description": "string",
"localizedLabels": [
{
"id": "string",
"createdBy": "string",
"createdAt": "2019-08-24T14:15:22Z",
"lastUpdatedBy": "string",
"lastUpdatedAt": "2019-08-24T14:15:22Z",
"version": 0,
"locale": "en-US",
"label": "string"
}
],
"localizedDescriptions": [
{
"id": "string",
"createdBy": "string",
"createdAt": "2019-08-24T14:15:22Z",
"lastUpdatedBy": "string",
"lastUpdatedAt": "2019-08-24T14:15:22Z",
"version": 0,
"locale": "en-US",
"description": "string"
}
],
"name": "string",
"dataStoreName": "string",
"tableName": "string",
"systemReserved": true,
"historyEnabled": true,
"version": 0,
"validFromFieldName": "string",
"validToFieldName": "string",
"lastUpdatedAtTimeFieldName": "string",
"createdAtTimeFieldName": "string",
"displayTextFields": [
{
"name": "string",
"displayIndex": 0
}
],
"dataStoreAssignedTimeZone": "string",
"type": "MANAGED",
"markerColor": "#9d2b12",
"nodeShape": "CIRCLE",
"nodeColor": "#F0F1F2",
"borderColor": "#F0F1F2",
"borderWidth": 0,
"scale": 0,
"styles": [
{
"id": "string",
"conditionId": "string",
"evaluationOrder": 0,
"iconName": "string",
"markerCode": "string",
"nodeColor": "string",
"borderColor": "string",
"borderWidth": 0
}
],
"elementGroupRoot": true,
"indexedForSearch": true,
"fields": [
{
"id": "string",
"createdBy": "string",
"createdAt": "2019-08-24T14:15:22Z",
"lastUpdatedBy": "string",
"lastUpdatedAt": "2019-08-24T14:15:22Z",
"label": "string",
"description": "string",
"localizedLabels": [
{
"id": "string",
"createdBy": "string",
"createdAt": "2019-08-24T14:15:22Z",
"lastUpdatedBy": "string",
"lastUpdatedAt": "2019-08-24T14:15:22Z",
"version": 0,
"locale": "en-US",
"label": "string"
}
],
"localizedDescriptions": [
{
"id": "string",
"createdBy": "string",
"createdAt": "2019-08-24T14:15:22Z",
"lastUpdatedBy": "string",
"lastUpdatedAt": "2019-08-24T14:15:22Z",
"version": 0,
"locale": "en-US",
"description": "string"
}
],
"name": "string",
"columnName": "string",
"dataType": "BOOLEAN",
"length": 0,
"precision": 0,
"scale": 0,
"required": true,
"primaryKeyField": true,
"unique": true,
"autoGenerated": true,
"systemReserved": true,
"displayIndex": 0,
"version": 0,
"constrainingListName": "string",
"userSelectionStrategy": "USERS",
"allowMultipleSelections": true,
"primaryKeySeqNo": 0,
"readOnly": true,
"indexedForSearch": true,
"logicalDataType": "USER_GROUP",
"ownerName": "string",
"relatedElementName": "string"
}
],
"relationshipsFrom": [
{
"id": "string",
"createdBy": "string",
"createdAt": "2019-08-24T14:15:22Z",
"lastUpdatedBy": "string",
"lastUpdatedAt": "2019-08-24T14:15:22Z",
"label": "string",
"description": "string",
"localizedLabels": [
{
"id": "string",
"createdBy": "string",
"createdAt": "2019-08-24T14:15:22Z",
"lastUpdatedBy": "string",
"lastUpdatedAt": "2019-08-24T14:15:22Z",
"version": 0,
"locale": "en-US",
"label": "string"
}
],
"localizedDescriptions": [
{
"id": "string",
"createdBy": "string",
"createdAt": "2019-08-24T14:15:22Z",
"lastUpdatedBy": "string",
"lastUpdatedAt": "2019-08-24T14:15:22Z",
"version": 0,
"locale": "en-US",
"description": "string"
}
],
"name": "string",
"dataStoreName": "string",
"tableName": "string",
"systemReserved": true,
"historyEnabled": true,
"version": 0,
"validFromFieldName": "string",
"validToFieldName": "string",
"lastUpdatedAtTimeFieldName": "string",
"createdAtTimeFieldName": "string",
"displayTextFields": [
{
"name": "string",
"displayIndex": 0
}
],
"dataStoreAssignedTimeZone": "string",
"reverseName": "string",
"reverseLabel": "string",
"fromObjectName": "string",
"fromObjectLabel": "string",
"toObjectName": "string",
"toObjectLabel": "string",
"required": true,
"cardinality": "ONE_TO_ONE",
"sortCriteria": {
"fieldName": "string",
"sortOrder": "asc"
},
"type": "DIRECT_CHILD",
"symmetric": true,
"managed": true,
"toObjectTypeFieldName": "string",
"toObjectTypeNames": [
"string"
],
"joinKeyFieldName": "string",
"joinConditions": [
{
"type": "FieldRef"
}
],
"fields": [
{
"id": "string",
"createdBy": "string",
"createdAt": "2019-08-24T14:15:22Z",
"lastUpdatedBy": "string",
"lastUpdatedAt": "2019-08-24T14:15:22Z",
"label": "string",
"description": "string",
"localizedLabels": [
{
"id": "string",
"createdBy": "string",
"createdAt": "2019-08-24T14:15:22Z",
"lastUpdatedBy": "string",
"lastUpdatedAt": "2019-08-24T14:15:22Z",
"version": 0,
"locale": "en-US",
"label": "string"
}
],
"localizedDescriptions": [
{
"id": "string",
"createdBy": "string",
"createdAt": "2019-08-24T14:15:22Z",
"lastUpdatedBy": "string",
"lastUpdatedAt": "2019-08-24T14:15:22Z",
"version": 0,
"locale": "en-US",
"description": "string"
}
],
"name": "string",
"columnName": "string",
"dataType": "BOOLEAN",
"length": 0,
"precision": 0,
"scale": 0,
"required": true,
"primaryKeyField": true,
"unique": true,
"autoGenerated": true,
"systemReserved": true,
"displayIndex": 0,
"version": 0,
"constrainingListName": "string",
"userSelectionStrategy": "USERS",
"allowMultipleSelections": true,
"primaryKeySeqNo": 0,
"readOnly": true,
"indexedForSearch": true,
"logicalDataType": "USER_GROUP",