REST API overview
Apart from being exposed via the UI, D1 functionality is also available via REST API. This document provides an overview of the available administration and repository endpoints by using the Open API and Swagger pages from the product itself as a base.
Accessing open API/Swagger
You can access Open API and Swagger by clicking the API link on the D1 landing page. You can open a repository API or administrator API:
Depending on the link you select on the landing page, Swagger UI will display different endpoints. You can select the following endpoints:
- D1 Administration API -
/api/v1/access.adx.admin
- Repository API -
/api/v1/access.adx.content.repositoryName
API URL
The API URLs which are used for calling D1 API endpoints are the following:
https://host:port/tribefire-services/api/v1/access.adx.admin/API_endpoint.
https://host:port/tribefire-services/api/v1/access.adx.content. repositoryName/API_endpoint
API endpoints are described in tables on this page.
Using open API/Swagger
When you decide on what to display, the Swagger UI displays a list of items of your interest based on the URL that you used.
Including session ID in Open API requests
To include the SessionId
parameter in Open API requests, you must enable the Session ID option.
To do that, go to your repository's API page, click the arrow under the Simple View, and then check the Session-ID box.
The image below shows how to enable session IDs in Open API requests.
List of items
The list contains REST API endpoints sorted in an alphabetical order. You can see HTTP methods and descriptions of the supported calls in the list:
Check the sections below for a list of all endpoints available in Administrator and Repository APIs, along with their equivalent UI functionality (if available).
HTTP codes
D1 REST API returns the following HTTP codes:
Code | Description |
---|---|
200 | Request evaluated successfully. Note that for asynchronous requests, such as conversions, this information only means that the operation has been successfully started and NOT that it has been successfully completed. Consequently, HTTP code does not correspond to the actual status of the started job. |
400 | Invalid input was given. |
401 | Session ID was not found. See Authenticating to D1 for more details. |
404 | Target resource not found. |
500 | Server error. |
D1 administration API
When you enter the Administrator API (available only with d1-admin
, d1-root
or tf-admin
role), the endpoints described in this section are exposed via Swagger. The same functionality might be available in the UI.
Endpoints described in this section start with the endpoint type: api/v1/access.adx.admin/v1.
Export and import
The following endpoints represent services related to export and import of repository configuration data.
Method | Description | Endpoint | Request query parameters | Form data | Returns |
---|---|---|---|---|---|
GET | Export repository configuration by IDs | /export/configuration/ | sessionId , repositoryIds (array) | none | .zip file with repository configuration |
GET | Export repository configuration by names | /export/configuration/by-names | sessionId , repositoryNames (array) | none | .zip file with repository configuration |
GET | Export repository configuration by technical name | /export/configuration/by-technical-names | repositoryTechnicalNames (array) | none | .zip file with repository configuration |
POST | Import repository configuration | /import/configuration | none | autoSync , importRepositoryOption , importUsers , resource , useRuntimeValues | |
POST | Export metadata by ID | /repository/metadata/export | none | repositoryId | Metadata export job ID |
POST | Import metadata by ID | /repository/metadata/import | none | importFolderPath , repositoryId | Metadata import job ID |
The export and import process is explained in more details in Exporting and importing repository configuration via REST.
For information about importing and exporting repository configuration, see Exporting and importing repository configuration via D1 UI.
Policy administration
The following endpoints represent services related to policy administration, explained in more details in Working with Policies with D1 REST API.
Request type | Service description | Endpoint | Request query parameters | Form data | Returns |
---|---|---|---|---|---|
DELETE | Delete Policies By Ids | /policies | sessionId , policyIds | none | Job response quoting the duration of execution |
DELETE | Delete Policies By Technical Names | /policies/by-technical-names | sessionId , technicalNames (deletes all custom policies if empty!) | none | Job response quoting the duration of execution |
DELETE | Delete Policy By Id | /policy | sessionId , policyId | none | Job response quoting the duration of execution |
DELETE | Delete Policy By Technical Name | /policy/by-technical-name | sessionId , `technicalName`` | none | Job response quoting the duration of execution |
POST | Create Default Type Policy | /policy/default-type | sessionId | name, defaultTypeName | Metadata of the created policy |
POST | Create Inheritance Policy | /policy/inheritance | sessionId | name , inheritAcl, inheritClassification, inheritCommonProperties, inheritPolicies, inheritTags | Metadata of the created policy |
POST | Create Type Restriction Policy | /policy/type-restriction | sessionId | name , description, allowedTypeNames, deniedTypeNames, includeSubTypes | Metadata of the created policy |
Repository administration
The following endpoints represent services related to repository administration.
Method | Endpoint | Description | UI Equivalent |
---|---|---|---|
DELETE | /repository | Delete Repository By Id | Use the Delete option in the D1 Administrator. |
POST | /repository/activate | Activate By Id | Use the Activate option in the Administrator. |
POST | /repository/by-template | Create Repository By Template | Assign the template while creating a new repository in the D1 Administrator. |
POST | /repository/cmis | Create Cmis Repository | Select New/New CMIS Repository in the D1 Administrator. |
POST | /repository/dctm | Create Dctm Repository | Select New/New DCTM Repository in the D1 Administrator. |
POST | /repository/deactivate | Deactivate By Id | Use the Deactivate option in the D1 Administrator. |
POST | /repository/standard-db-storage | Create Standard Repository By Db Storage | Select New/New Standard Repository, then assign db as storage type in the D1 Administrator. |
POST | /repository/standard-fs-storage | Create Standard Repository By Fs Storage | Select New/New Standard Repository, then assign fs as storage type in the Administrator. |
POST | /repository/synchronize | Synchronize Configuration Request | Use the Synchronize option in the D1 Administrator. |
For information about repositories management via UI, see Repositories management.
Repository health
The following endpoints represent activities related to checking repository health.
Method | Endpoint | Description |
---|---|---|
GET | /repository/connection-check | Check Repository |
GET | /repository/connection-check/by-name | Check Repository By Name |
GET | /repository/connection-check/by-technical-name | Check Repository By Technical Name |
GET | /repository/deep-check | Deep Health Check |
GET | /repository/deep-check/by-name | Deep Health Check By Name |
GET | /repository/deep-check/by-technical-name | Deep Health Check By Technical Name |
For information about how to use the UI equivalent of these endpoints, see Running Conversion Service and platform health checks.
User administration
These endpoints represent activities related to user, group, and role management.
Method | Endpoint | Description |
---|---|---|
DELETE | /group | Delete Group By Id |
GET | /group | Get Group |
POST | /group | Create Group |
GET | /group/by-name | Get Group By Name |
POST | /group/picture | Assign Picture By Group |
GET | /group/search | Search Groups |
DELETE | /role | Delete Role By Id |
GET | /role | Get Role |
POST | /role | Create Role |
GET | role/by-name | Get Role By Name |
GET | /search | Search Roles |
DELETE | /session | Close Session |
GET | /session | Get Session |
GET | /session/search | Search Sessions |
DELETE | /user | Delete User By Id |
GET | /user | Get User |
POST | /user | Create User |
GET | /user/by-name | Get User By Name |
GET | /user/effective-roles | Get Effective Roles |
POST | /user/generateKeys | Generate Key Pair |
GET | /user/getKeys | Get Key Pair |
POST | /user/picture | Assign Picture By User |
GET | /user/search | Search Users |
For information about how to use UI equivalents of the described API endpoints, see User management.
Repository API
When you enter the Repository API, the following endpoints are exposed via Swagger (note that the same functionality may be available in the UI).
Endpoints described in this section start with the endpoint type: /access.D1.content.repository_name/v1.
Access control
Method | Endpoint | Description |
---|---|---|
POST | /acl/deny | Deny access by Id |
POST | /acl/grant | Grant access by Id |
For information about controlling access via UI, see Access control.
CRUD
Important: after creating a content, its version status is set to WORKING_COPY
, which means it's checked out and can be updated. Only contents with this status can be updated, you will get an error otherwise. Delete operations should work regardless of the status. Remember to check in your contents when you're done updating them.
Use the endpoints described in Versioning to check out and check in contents.
Method | Endpoint | Description | UI Equivalent |
---|---|---|---|
DELETE | /content | Delete Content By Id | Deleting content |
GET | /content | Get Content | n/a |
PATCH | /content | Update Content By Id | Modifying content |
POST | /content | Create Content | Adding content |
POST | /content-by-uri | Create Content By Uri | n/a |
POST | /contents | Create multiple contents | Adding content, see also Creating Contents with REST. |
POST | /content/copy | Copy Content By Id | n/a |
GET | /content/download | Download Content By Id | Use the download button in D1 Repository Explorer |
POST | /content/move | Move Content By Id | n/a |
POST | /content/reindex | Reindex Content by Id | See Content reindexing |
POST | /content/relocate | Relocate Content by Id | See Relocating individual contents |
DELETE | /content/representations | Delete representations by Id | See Representations |
GET | /content/representations | Get representations by Id | See Representations |
GET | /content/representations/download | Download representations by Id | See Representations |
GET | /content/search | Search Contents | Use the search bar in Explorer. For details, see Searching for contents. |
GET | /content/search-by-condition | Search Contents By Condition | Use the advanced features of the search bar in D1 Repository Explorer. |
GET | /content/search-by-text | Search Content By Text | Use the search bar in adx Repository Explorer. For details, see Searching for contents. |
POST | /content/signature/sign | Sign Content By Id | See Signing documents with digital signature |
POST | /content/signature/verify | Verify Content Signature By Id | See Signing documents with digital signature (step 4) |
POST | /content/transfer | Transfer Content By Id | n/a |
DELETE | /entry | Delete Entry By Id | n/a |
GET | /entry | Get Entry | n/a |
PATCH | /entry | Update Entry By Id | n/a |
PUT | /entry/move | Move Entry By Id | n/a |
GET | /entry/search | Search Entries | n/a |
GET | /entry/search-by-condition | Search Entries By Condition | n/a |
DELETE | /entry/tags | Delete Tags | n/a |
PATCH | /entry/tags | Add Tags | n/a |
POST | /entry/tags | Set Tags | n/a |
DELETE | /folder | Delete Folder By Id | Working with folders. |
GET | /folder | Get Folder | Working with folders. |
PATCH | /folder | Update Folder By Id | Working with folders. |
POST | /folder | Create Folder | Working with folders. |
PUT | /folder/move | Move Folder By Id | n/a |
GET | /folder/search | Search Folders | Use the search bar when in folder menu. |
GET | /folder/search-by-condition | Search Folders By Condition | Use the advanced search bar when in folder menu. |
Conversion
These endpoints relate to the document conversion operations available from within an D1 repository. Conversion requests are asynchronous - D1 will only return the job ID with code 200 (success), but this does NOT imply that the job itself was successful.
Do not confuse these endpoints with internal conversion operations available from the Conversion API.
You can define content specification in the body of a request - see Sending Conversion requests with new content specification. This option is not exposed via Swagger form.
Method | Endpoint | Description |
---|---|---|
POST | /convert/apply-template | Apply template to documents |
POST | /convert/document | Create Document Representation By Id |
POST | /convert/extract | Extract Text By Id |
POST | /convert/image | Convert To Image By Id |
POST | /convert/merge | Merge By Ids |
POST | /convert/merge-templates | Merge Templates By Ids |
POST | /convert/pdf | Convert To Pdf By Id |
POST | /convert/split | Split By Id |
GET | /convert/status | Get Job Status |
POST | /convert/watermark | Apply Watermark By Id |
For information about UI equivalents, see Viewing repository cache.
Versioning
These endpoints provide content versioning for D1 functionality. See Versioning for more details on content versions.
Method | Endpoint | Description |
---|---|---|
POST | /content/cancel-checkout | Cancel Checkout By Id |
POST | /content/checkin | Checkin By Id - sets status to CURRENT and updates the version number |
POST | /content/checkout | Checkout By Id - sets status to WORKING_COPY |
For information about the UI equivalent, see Versioning.
Try it out in open API/Swagger
When you click on an entry and expand its details, you can click the Try it out button to test the REST call. Clicking this button enables you to fill in all the parameters, execute the query, and inspect the outcome in the Responses section directly in your browser.
If you try out the endpoints for REST calls which require a body to be passed, the body is already pre-populated with the resource's properties and their placeholder values.
When you tried out a REST call and you're satisfied with the result, you can copy the exact URL or Curl you need for this operation from the Responses section.