Skip to main content

Extension Service 🆕

The extension resource contains all the application extensions available and the ability to create and publish your own extensions.

Extension REST API​

The Extension REST API is a full CRUD API allowing you to search and filter extensions as well as update, version and delete them. It is accessed through the following URL:

https://api.opendatadsl.com/api/extension

The API consists of the following calls:

MethodPathExampleDescription
GETGet the build information for this service
GET{release}/publicv1/publicList public extensions that you can install privately
GET{release}/privatev1/privateList extensions that either your company has created or installed
GET{release}/{source}/{key}v1/private/odsl.exampleRetrieve a single extension using its unique id
GET{release}/{source}/{key}/{version}v1/private/odsl.example/1Retrieve a version of a single extension
GET{release}/{source}/{key}/*v1/private/odsl.example/*Get a list of versions for a specific extension
PUT{release}/{source}/{key}/{version}/{tag}v1/private/odsl.example/1/PRODTag a version with a name (which can be used instead of the version number when retrieving it)
POST{release}v1Create or update an extension, the extension is the body of the POST request
DELETE{release}/private/{key}v1/private/odsl.exampleUninstall an extension

Special REST Calls​

Publish an extension​

To publish an extension to the public repository, you need to:

Install/upgrade an extension​

To install an extension to your own environment, you need to:

Uninstall an extension​

To uninstall an extension from your private environment, you need to:

Get a view​

To get/run a view for an extension, you need to make a GET request with the name of the view, also adding an Accept header for text/html

GET <https://api.opendatadsl.com/api/extension/v1/private/{{_id}}/view/{{view.name}}>

e.g.

GET https://api.opendatadsl.com/api/extension/v1/private/odsl.example/view/test
Authorization: Bearer {{token}}
Accept: text/html

Entities​

Extension Entity​

The extension entity contains the following information:

NameDescriptionType
_idUnique id for the extension (must be {publisher}.{code}String
_typeThe type - always VarExtensionString
publisherThe publisher of the extensionString
codeThe code id of the extensionString
nameThe name of the extensionString
descriptionThe long description of the extension to be shown in the extension catalogString
iconThe icon (bootstrap icons) to be shown next the extension name in the catalogString
viewsAn array of views to be shown in the portal or excel add-inExtensionView[]
resourcesA set of resources used by this extension that will be published/installedObject (See Below)

Extension View Entity​

The Extension View entity is used to configure the views in the portal and excel add-in and contains the following:

NameDescriptionType
sectionThe section in the menu to display this view, defaults to ExtensionString
nameThe name of the viewString
descriptionDescription of the viewString
tabnameThe name of the tab, defaults to 'Main'String
appnameThe name of the app, this is only used if the view is in the Apps tabString
excelTrue if this is an Excel Add-in view, defaults to falseBoolean
insightsTrue if an Insights tab should be added, defaults to falseBoolean
iconThe icon shown next to the name in the GUIString
featureThe feature policy used to determine if a user can see this viewString
scriptThe mustache script containing the code for this viewString

Resources​

Extension resources and a list of entities which need to be installed with the extension. Resources are a JSON document, with each key in the document being a service name. The value of the service can either be a document or array, e.g.

{
"resources": {
"policy": ["odsl.example.test"]
}
}
{
"resources": {
"policy": {
"test" : "odsl.example.test"
}
}
}

Resource scripts​

There are 3 optional special scripts which can be defined:

  • install - This script will be run when an extension is installed into a client environment after all the defined resources have been copied
  • upgrade - This script will be run when a new version of an extension is available and upgrades an already installed extension in a client environment
  • uninstall - This script will be run after an extension is uninstalled and all the defined resources have been removed

The special resource scripts are defined as follows:

{
"resources": {
"script": {
"install" : "odsl.example.install",
"upgrade" : "odsl.example.upgrade",
"uninstall" : "odsl.example.uninstall"
}
}
}

Example Extension Manifest​

{
"_id": "odsl.example",
"_type": "VarExtension",
"publisher": "odsl",
"code": "example",
"name": "Example Extension",
"views": [
{
"section": "Examples",
"name": "test",
"excel": false,
"insights": true,
"icon": "graph-up-arrow",
"feature": "odsl.example.test",
"script": "odsl-extensions\extensions\example\odsl.example.test"
}
],
"resources": {
"policy": [
"extension.odsl.example"
],
"script": {
"install": "odsl-extensions\extensions\example\odsl.example.install",
"uninstall": "odsl-extensions\extensions\example\odsl.example.uninstall",
"upgrade": "odsl-extensions\extensions\example\odsl.example.upgrade"
}
}
}

Realtime Messages​

When installing or uninstalling an extension, important information is sent as messages to the Realtime Services.

The message is sent to the OnExtensionMessage method when subscribing to an extension, example message:

{
"message": "2025-05-09T11:48:17.090061400Z[UTC] info Upgrading extension in environment"
}