API

Thru exposes multiple APIs to access the service.

Thru.MFT.Configuration.Api

The Management API allows clients to get information and manipulate entities in a single instance.

Entities are flows, activity, alerts, files, deliveries, organizations, subscription and user management etc.

Examples for using this API :

  • Exposing activity and alerts in external system

  • Automating the adding of organizations and subscriptions

  • Automating user management

  • Enabling / Disabling entities (Organizations, subscriptions)

  • Replaying files, retrying deliveries

Thru uses Swagger, which is an Interface Description Language for describing RESTful APIs expressed using JSON.

Swagger is used together with a set of open-source software tools to design, build, document, and use RESTful web services.

Swagger includes automated documentation, code generation, and test-case generation.

You can access the api by adding /Swagger/ to a site url.

Thru.MFT.Audit.API

The Audit API changes to elements in the UI and user actions.

The changes are visible through an API endpoint api/audit/swagger/ or /api/audit/swagger/v1/swagger.json

Example requests :

1 - GET /api/Audit - Retrieves audit log events filtered by the "Configuration" category and on or after the given date

api/Audit?category=100&rangeStart=2022-10-21T05:00:00.000Z

2 - GET /api/Audit - Retrieves audit log events filtered by the "Transfer" category and between the given date ranges

api/Audit?category=600&rangeStart=2022-10-18T05:00:00.000Z&rangeEnd=2022-10-22T04:59:00.000Z

3 - GET /api/Audit - Retrieves audit log events filtered by the "Login Failed" event type and on or after the given date

api/Audit?eventType=202&rangeStart=2022-10-21T05:00:00.000Z

4 - GET /api/Audit - Same example as the previous with pagination support

api/Audit?eventType=202&rangeStart=2022-10-21T05:00:00.000Z&pageSize=50&pageNumber=1

Thru.Application.Health.Check.API

The overall health of the entire application can be checked using the following endpoint:

GET [[PublicApiUrl]]/api/Healthcheck/Application (this requires the api url not the site url)

If the application is healthy, the API will return HTTP status code 200. If any component is unhealthy, the API will return HTTP status code 503.

In either case, the response body will look like:

{
    "Thru.MFT.Mailer": "Healthy",
    "Thru.MFT.SFTPS": "Healthy",
    "Thru.MFT.Redis": "Healthy",
    "Thru.MFT.Flow.API": "Healthy",
    "Thru.MFT.Databases": "Healthy",
    "Thru.MFT.UI.API": "Healthy",
    "Thru.MFT.TransferManager": "Healthy",
    "Thru.MFT.FlowManager": "Healthy",
    "Thru.MFT.SFTPS.API": "Healthy"
}