Page tree
Skip to end of metadata
Go to start of metadata

Overview

The REST API provides access to   functionality for third-party applications. The API is HTTP-based, so it can be used with any language that has an HTTP library, such as curl.

Base URL

All API endpoints are relative to the base URL. For example, assuming   is available at http://localhost:8080/information-discovery, the REST API base URL for all endpoints is:

http://localhost:8080/information-discovery/rest/

All API endpoints are relative to the base URL. For example, assuming   is available at http://localhost:8080/health-discovery, the REST API base URL for all endpoints is:

http://localhost:8080/health-discovery/rest/

All API endpoints are relative to the base URL. For example, assuming   is available at http://localhost:8080/patent-monitor, the REST API base URL for all endpoints is:

http://localhost:8080/patent-monitor/rest/


API Versions

The   REST API has multiple versions. You can specify the version in the request URL after the REST API base URL. For example, here's a call to API version 1 indicated by the v1 URL path:

curl -X GET 'http://localhost:8080/information-discovery/rest/v1/buildInfo'


curl -X GET 'http://localhost:8080/health-discovery/rest/v1/buildInfo'
curl -X GET 'http://localhost:8080/patent-monitor/rest/v1/buildInfo'

Response

Typically, requests to the REST API are answered with a JSON return. The return object essentially consists of a payload property, which contains the actual user data, and an errorMessages property, which contains any error messages. Successful API requests are answered with a HTTP status code 200.

{
	"payload": {},
    "errorMessages": [
      "string"
    ]
}


API Tokens

The REST API (starting with API version 1) uses API tokens to protect resources against unauthorized use. Users can create personalized API tokens and use them for authentication on API calls:

To authorize an API call, the user underlying the API token is used. The API tokens must be transferred in the api-token header. The following example shows a REST API request using an API token:

curl -X GET --header 'api-token: 235907816cd27cc1411633bea37fc5c7af38030f6ce22888d0d49872b8b74ad6' 'http://localhost:8080/information-discovery/rest/v1/buildInfo'
curl -X GET --header 'api-token: 235907816cd27cc1411633bea37fc5c7af38030f6ce22888d0d49872b8b74ad6' 'http://localhost:8080/health-discovery/rest/v1/buildInfo'
curl -X GET --header 'api-token: 235907816cd27cc1411633bea37fc5c7af38030f6ce22888d0d49872b8b74ad6' 'http://localhost:8080/patent-monitor/rest/v1/buildInfo'


Error Handling

Errors are indicated by standard HTTP error codes. The following error codes are used by the REST API:

CodeDescription
400Bad request. Please check the error message for further details.
401Unauthorized request. Please supply a valid API token in the api-token header.
403Forbidden. The user that does not have the required privileges to access the resource.
404Resource could not be found.
405

Request method not supported.

500Internal server error.


Additional information may be provided by the JSON response that contains more details about the error. In this case, this additional information will be contained in the errorMessages property.

{
    "payload": null,
    "errorMessages": [
        "Pipeline \"MyPipeline\" has not been initialized"
    ]
}


Browser Interface

 comes with a built-in browser interface for the REST API based on Swagger UI. It allows you to get an overview of the API and to submit sample requests directly from the browser. The browser interface is available at

http://localhost:8080/information-discovery/swagger-ui.html


http://localhost:8080/health-discovery/swagger-ui.html
http://localhost:8080/patent-monitor/swagger-ui.html

  • No labels