SentryOne Document Using the API

Feature Availability:  The SentryOne Document API is available only in SentryOne Document Software. If you are using the cloud version of SentryOne Document at https://document.sentryone.com/, the API is not available at this time.

Introduction

The SentryOne Document REST API exposes multiple endpoints:

  • DataDictionary
  • DataDictionaryConfiguration
  • Document
  • EnpointAlias
  • Export
  • Identity
  • Import
  • License
  • Lineage
  • MetadataExtraction
  • MetadataProvider
  • ObjectMap
  • Page
  • RemoteAgent
  • RemoteAgentPool
  • Search
  • Snapshot

  • Solution
  • SolutionItem
  • TableOfContents
  • Task
  • TaskHistory
  • Templates
  • VersionHistory
  • WorkflowHistory

Security

Authentication

The API is authenticated by using Windows Authentication.

API Documentation

Accessing the documentation

The REST documentation output for your environment is located at:

http://{S1DHostName}:44322/swagger/index.html

Using the documentation

This documentation includes information about the parameters and examples of the request body and schema. 

Note:  Expand the HTTP method header line in the API documentation page for details.

From here you can use the Try it out button to test the API endpoints using your installation.

SentryOne Document API PUT Method ExampleSentryOne Document API documentation example with Try it out button.

Once you select the Try it out button, you will see the option to Execute the request. Enter parameter values as needed, then select Execute.

SentryOne Document API Try it out exampleExecute request example

Open API specification

Additional Information: The SentryOne Document API has an Open API specification document. There are many client tools that allow you to work with the API. See the Swagger Specification Documentation for more details on getting started.

Examples

Snapshots

You can use the Snapshots endpoint with PowerShell to manage your snapshots. If you wanted to call the API endpoint to get all of your solution IDs and run the request for each ID, you can snapshot all solutions with a single script (instead of scheduling them one-by-one):

$apiUrl = "http://{S1DHostName}:44322/api/v1/solutions"
$r = Invoke-RestMethod -Method Get -Uri $apiUrl -ContentType "application/json" -UseDefaultCredentials
ForEach($solution in $r){
    $solutionId = $solution.id
    $apiUrl = "http://localhost:44322/api/v1/solutions/$solutionId/snapshots"
    $data = @{
        'loggingLevel' = '2'
        'solutionItemIds' = ''
    }
    $requestBody = $data | ConvertTo-Json -Compress
    Invoke-RestMethod -Method Post -Uri $apiUrl -Body $requestBody -ContentType "application/json" -UseDefaultCredentials
}

Note:  Remember to update {S1DHostName} in the script to your environment's host name.

If you wanted to make a request for a specific solution (instead of using the scheduling command line), you could run this:

$apiUrl = "http://localhost:44322/api/v1/solutions/{solutionId}/snapshots"
$data = @{
'loggingLevel' = '2'
'solutionItemIds' = ''
}
$requestBody = $data | ConvertTo-Json -Compress
Invoke-RestMethod -Method Post -Uri $apiUrl -Body $requestBody -ContentType "application/json" -UseDefaultCredentials