Home > Appendices > API for Connector

Export to PDF

API for Connector

*Note: We are in the process of upgrading to new APIs to enhance user experience, improve stability, and facilitate easier integration. Visit our documentation page for additional details.

AvePoint Opus offers APIs to import data from additional systems beyond the built-in content sources, as well as File System and SharePoint On-Premises connected via agents. It also enables the export of records with specific disposal due date and updates their status to Disposed within AvePoint Opus.

Get Started

You can refer to the sections below to get started.

Register an AvePoint App

Before using the APIs, you must register an app in AvePoint Online Services > Administration > App registrations and grant permissions to the app. With the registered app, you can use the generated application (client) ID for authentication.

Refer to the following URLs to access the page where you can register the app.

- Commercial – [https://www.avepointonlineservices.com/app/registration/index](https://www.avepointonlineservices.com/app/registration/index) - U.S. Government – [https://usgov.avepointonlineservices.com/app/registration/index](https://usgov.avepointonlineservices.com/app/registration/index)

Refer to the Configure App Registrations for detailed instructions on how to register an app.

Get the Access Token

Once you have the application (client) ID, get the access token via the application (client) ID to authenticate with AvePoint Opus APIs.

The following information is required to get an access token:

ElementDescription
Identity Service AddressThe Identity Service Address:https://identity.avepointonlineservices.com (Commercial)https://identity-gov.avepointonlineservices.com (U.S. Government)
AOSAppClientIDThe application (client) ID you have retrieved.
ConnectorCertificateThumbprintThe thumbprint of the .pfx certificate file of the .cer certificate you used when registering the AvePoint app.
ConnectorScopeThe permissions you have granted to the AvePoint app. For AvePoint Opus, the scope is records.readwrite.all.

To get the access token using the above information, create a JSON Web token using the Client ID and certificate first, and then use the JSON Web token to request an access token of the defined scope from AOS Identity Service.

Below is an example of getting the access token.

private static readonly string _IdentityServerAddress = "https://identity.avepointonlineservices.com";private static readonly string _AosAppClientId = " ";private static readonly string _ConnectorCertificateThumbprint = " ";private static readonly string _ConnectorScope = "records.readwrite.all";private void SendRquest() { var accessToken = GetAccessToken(); var requestUrl = "SubmitRecords POST URL"; var parameter = "SubmitRecords Parameter"; var reponse = WebUtil.SendRequestForIds("Post", requestUrl, accessToken, JsonConvert.SerializeObject(parameter));}private string GetAccessToken() { var httpClient = new HttpClient(); var disco = await httpClient.GetDiscoveryDocumentAsync(IdentityServerAddress); var request = new ClientCredentialsTokenRequest { Address = disco.TokenEndpoint, ClientAssertion = new ClientAssertion { Type = OidcConstants.ClientAssertionTypes.JwtBearer, Value = CreateClientAuthJwt(disco, tenantId) }, Scope = _ConnectorScope, }; var tokenResponse = await httpClient.RequestClientCredentialsTokenAsync(request); return tokenResponse.AccessToken;}private string CreateClientAuthJwt(DiscoveryDocumentResponse response){ var tokenHandler = new JwtSecurityTokenHandler { TokenLifetimeInMinutes = 10 }; var subject = new ClaimsIdentity(new List { new Claim("sub", IdentityServerClientId), new Claim("jti", Guid.NewGuid().ToString()), }); var securityToken = tokenHandler.CreateJwtSecurityToken( issuer: _AosAppClientId, audience: response.TokenEndpoint, subject: subject, signingCredentials: new SigningCredentials(new X509SecurityKey(GetCertificate(_ConnectorCertificateThumbprint)), "RS256") ); return tokenHandler.WriteToken(securityToken);}

*Note: The token you get will expire in one hour, and you need to get the token again after the expiration.

API URL

When you use the AvePoint Opus API, you will need the API URL. The API URL varies with your data center. Choose the API URL according to your data center.

InfrastructureData CenterWeb API URL
Microsoft AzureAustralia Southeast (Victoria)https://graph-au.avepointonlineservices.com/records
Microsoft AzureCanada Central (Toronto)https://graph-ca.avepointonlineservices.com/records
Microsoft AzureGermany West Central (Frankfurt)https://graph-de.avepointonlineservices.com/records
Microsoft AzureEast US (Virginia)https://graph-us.avepointonlineservices.com/records
Microsoft AzureJapan West (Osaka)https://graph-jp.avepointonlineservices.com/records
Microsoft AzureNorth Europe (Ireland)https://graph-ne.avepointonlineservices.com/records
Microsoft AzureSoutheast Asia (Singapore)https://graph-sg.avepointonlineservices.com/records
Microsoft AzureSwitzerland North (Zurich)https://graph-ch.avepointonlineservices.com/records
Microsoft AzureUK South (London)https://graph-uk.avepointonlineservices.com/records
Microsoft AzureUS Gov Virginia (Virginia)https://graph-gov.avepointonlineservices.com/records
Microsoft AzureWest Europe (Netherlands)https://graph-we.avepointonlineservices.com/records
Microsoft AzureFrance Central (Paris)https://graph-fr.avepointonlineservices.com/records
Microsoft AzureKorea Central (Seoul)https://graph-kr.avepointonlineservices.com/records
Google Cloud PlatformGCP for Australia Southeast (Sydney)https://graph-gcp-au.avepointonlineservices.com/records
Google Cloud PlatformGCP for Japan (Tokyo)https://graph-gcp-jp.avepointonlineservices.com/records
Google Cloud PlatformGCP for East US (Moncks Corner)https://graph-gcp-us.avepointonlineservices.com/records
Google Cloud PlatformGCP for West Europe (Eemshaven, Netherlands)https://graph-gcp-we.avepointonlineservices.com/records
Google Cloud PlatformGCP for South Korea (Seoul)https://graph-gcp-kr.avepointonlineservices.com/records

Supported APIs

The following sections list the supported APIs.

POST api/connector/SubmitRecords

Submit records to AvePoint Opus. You need to download the JSON file of each connection from Settings > Connector to prepare the record information.

*Note: You can only submit up to 15 records at a time.

Example

{ "id": " ", "confilictOption": "Overwrite", "data": [ { "rowKey": "SingleText", "leafName": "SingleText", "termFullPath": "Taxonomy", "timeCreated": "DateTime", "timeModified": "DateTime", "createdBy": "SingleText", "modifiedBy": "SingleText", "Multiple%20_Text_%20_Column": "MultipleText", "DateTime%20_Column": "DateTime", "Single%20_Choice_%20_Column": "SingleChoice", "Multiple%20_Choice_%20_Column": "MultipleChoice", "People%20_or_%20_Group_%20_Column": "PeopleOrGroup", "Number%20_Column": "Number" } ] }

Request Information

ElementDescriptionTypeRequired
idThe ID of the connection.GUIDYes
conflictOptionThe conflict resolution when there are records with the same unique key.Valid values are:Overwrite to overwrite the record information in AvePoint Opus.Skip to skip submitting the record to AvePoint Opus.StringYes
rowKeyThe unique key of the record.StringYes
leafNameThe internal name of the built-in Name column in the connection.StringYes
termFullPathThe internal name of the built-in Classification column in the connection.The value must be the full path of a term in AvePoint Opus.StringNo
timeCreatedThe internal name of the built-in Created time column in the connection.The format of the value must follow the date and time format configured in Settings > General settings.StringYes
timeModifiedThe internal name of the built-in Modified time column in the connection.StringYes
createdByThe internal name of the built-in Created by column in the connection.StringNo
modifiedByThe internal name of the built-in Modified by column in the connection.StringNo

*Note: AvePoint Opus supports creating custom columns of different types to meet your requirements for variable record properties. When submitting records with custom columns, enter the internal name of each custom column you have defined in the connection. Values of custom columns are optional. For details, refer to Create a Connection.

- For the **Single line of text** type of column, value should be a single line of text. - For the **Multiple** **lines** **of text** type of column, value should be multiple lines of text. - For the **Date and Time** type of column, value should be a date and/or time. - For the **Choice** **(single selection)** type of column, value should be the numerical order of the correct option, not the option name. - For the **Choice** **(multiple selections)** type of column, value should be the numerical orders of the correct options separated by commas in square brackets. - For the **Person** **or Group** type of column, value should be the full email address of users and/or groups separated by commas in square brackets. If the user or group does not exist in AvePoint Opus, AvePoint Opus will query it in the Microsoft Entra that is authorized via the app profile in AvePoint Online Services. - For the **Number** type of column, value should be a number.

Response Information

ElementDescriptionType
MessageThe request details.String
FailedItemsIf some records failed to be submitted to AvePoint Opus, this parameter would appear, displaying the records failed in the request.The value contains:Item is the information of the item that failed in the request.Message is the details about the failure.Array (Object)

POST api/connector/GetDueRecords

Retrieve the records whose disposed due date is earlier than the specified time.

Example

{ id: " ", disposalDueDate: 2024-04-01 00:59:34, startIndex: "", itemsPerPage: 15, }

Request Information

ElementDescriptionTypeRequired
idThe ID of the connection.GUIDYes
disposalDueDateThe disposal due date.The format of the value must follow the date and time format configured in AvePoint Opus > Settings > General settings.StringYes
startIndexThe page index of the last request.StringNo
itemsPerPageThe number of records that you want to request on one page.The valid value is a number between 0 and 100.IntYes

Response Information

ElementDescriptionType
messageThe details about the action.String
pageIndexThe page index of the records that are queried in the request.String
queriedItemsThe records that match the request information.Array

POST api/connector/DisposeRecords

Update the status of records as Destroyed in AvePoint Opus.

Note the following:

- You can only update the status for up to 15 records at a time. - If manual approval is enabled, after record reviewers approve or reject the records, you can use this API to update the status of the approved records as Destroyed in AvePoint Opus.

Example

{ disposalIds: ["Item RowKey1","Item RowKey2"]}

Request Information

ElementDescriptionTypeRequired
Item RowKeyThe unique ID of the record that you want to update as Destroyed in AvePoint Opus.StringYes

Response Information

ElementDescriptionType
messageThe request details.String
failedItemsThe items that failed in the request.Array (["Row Key1", "Row Key2"])