Technical documantation - Server APIs v2

Version 2 of APIs are available in release 5.1 and later.

Use version 5.1.4 and later for Swagger.

Overview

Version 2 of API to access information supports json. Use 2 for version. Documentation is available using swagger. Please refer to:

https://www.domain.com/AssertWeb/swagger

In selected APIs it is possible to select how information is returned, as ID or as href. APIs with this option accepts the parameter itemType.

public enum ExportResponseItemType { Default = 0, Id = 1, Href = 2, }

Sample usage

Use case: Search catalogues

POST /api/v{version}/{culture}/{site}/SearchCatalogues

Try simple search request. Search string can be catalogue name, description or identity.

{ "query": "searchstring" }

Response will be a list of catalogue IDs.

Use case: Get all catalogues

Call will return all catalogues as a list. Use parameter itemType to select if list is ID (itemType undefined or 1) or href (itemType 2).

Use case: Get a full catalogue

ID is the id returned in the Search catalogues call. Response will he the meta data on the catalogue, nodes structure and URLs to modules, documents and parts in the catalogue. Use these URLs to get modules, parts and documents.

Configuration

Authentication is controlled by standard authentication methods, see https://signifikant.atlassian.net/wiki/spaces/ASKB/pages/901578756/Technical+documentation+-+Signifikant+REST+API+authentication?src=search.

Which information is actually possible to access using the API is controlled by a configuration file

AssertWeb/AppData/SITE/api-export-settings.config

Settings for the API

 

Attribute

Values

Usage

Attribute

Values

Usage

settings-id

string

Name of the setting. Is used to connect users in api-permissions with export settings.

max-items

int

Limit on number of root elements

specifications

string, true or false

List of specifications defined by code. Each listed specification will be included in the api resposes.

true will make all specifications to be included. false will make API remove all specifications.

excluded-specifications

string

List of specifications defined by code. Each listed specification will be excluded in the api resposes.

result-set

true/false

True will make API return a list of objects also when list contains only one object. This is default.

False will make API return only the object if result is only one and a list otherwise.

permissions

true/false

Will permissions be included in API response.

permissions-disabled

string

List of permissions. Do not consider permissions in permissions-disabled list.

Note. Carefully use this setting, it may lead to information leak.

filters

true/false

Will filters be included in API response.

filters-disabled

string

List of filters. Do not consider filters in filters-disabled list.

translations

 

 

href

true/false

Include href to information objects.

value-separator

character

 

<propertyname>

true/false

Determines if property is to be included in API response or not. Eg filters=”false” will ensure filters are not included in API responses.

 

 

 

 

Settings for connecting systems

API users are connected to export settings and given permissions based on the api-permissions.config. For more information on autentication see https://signifikant.atlassian.net/wiki/spaces/ASKB/pages/901578756/Technical+documentation+-+Signifikant+REST+API+authentication?src=search.

An API user is assigned permissions by the <Permissions> tag and connected to an export setting by the <> tag.