> ## Documentation Index
> Fetch the complete documentation index at: https://docs.coreflux.org/llms.txt
> Use this file to discover all available pages before exploring further.

# DELMIA Apriso (Dassault Systèmes)

> Client-mode REST API connector for DELMIA Apriso: get STS tokens, run the Standard Operations you published (production declarations, machine status, quality results, order lookups) and queue Business Integrator messages from MQTT

Technical Preview

## Overview

[DELMIA Apriso](https://www.3ds.com/products/delmia/apriso) is Dassault Systemes' manufacturing operations platform (MES, quality, warehouse, maintenance). Its Web API lets an external system call the **Standard Operations** you publish as REST web services, and its Business Integrator accepts inbound XML messages. This connector lets plant logic on MQTT declare production, push machine status, record quality results and read orders in Apriso without custom code.

* **DelmiaAprisoApi** (`DelmiaAprisoRestApi.lot`) is a client connector on `https://YOUR_APRISO_SERVER` with 16 events.
* **DelmiaAprisoWebhookReceiver** (`mes_delmia-apriso_webhook.lot`, optional) is a server connector on port `9008` that receives calls from Apriso.

> [!WARNING]
>
> Dassault Systemes does not publish an OpenAPI file for Apriso. Each server generates its own Web API Reference at `/Apriso/HttpServices/help`, and the help center needs a 3DS login. These events come from the public DELMIA Apriso 2021 Technical Guides **Web API** and **Business Integrator: Integration Planning**. Check the endpoints and scopes against your server's Web API Reference (the `GetApiHelp` event returns it) before you rely on them.

## Server host

Apriso is installed per customer on IIS. Replace `YOUR_APRISO_SERVER` in `BASE_ADDRESS` with your Apriso web server, with no trailing slash. The endpoints already include the `/Apriso` application path: the Web API lives under `/Apriso/HttpServices` and the Secure Token Service (STS) at `/Apriso/Portal/sts/2.0/token`. On a lab server without TLS, use `http://` and set `USE_SSL` to `"false"`.

## Authentication

> [!WARNING]
>
> API keys, client secrets and access tokens act as an Apriso client application. Keep them in Hub secrets, map them in with `GET SECRET`, and never publish them on a topic other clients can read.

1. Register Coreflux as a client application in `ClientApplications.xml` (in the server's `CentralConfiguration` folder) with a `ClientId`, and an `ApiKey` and/or a `ClientSecret`, the `Scopes` it may request (`standard_operations`, `message_processing`, ...) and the `ClientCredentials` grant. Restart the Apriso services.
2. Pick a flow. Every Web API event takes `"authorization"` and `"client_id"` in its MQTT payload and sends them as `Authorization` and `X-Client-Application`.
   * **API key:** `"authorization": "ApiKey <ApiKey>"`, `"client_id": "<ClientId>"`. Check it with `HelloApiKey`.
   * **Access token:** publish `GetToken` (client credentials) with `client_id`, `client_secret` and `scope`, then send `"authorization": "Bearer <access_token>"`. Check it with `HelloToken`. `GetUserToken` (password grant, `login_type` `standard` or `ldap`) and `RefreshToken` are there too.
3. Publish the Standard Operations you want to call in **Process Builder > Web Services Manager**, with security level API Key or Access Token.

Suggested secrets: `APRISO_CLIENT_ID`, `APRISO_API_KEY` and `APRISO_CLIENT_SECRET`. Wrong or missing credentials return `401 Unauthorized`. A token only reaches the endpoints of the scopes it was issued for.

## Payload conventions

* **Standard Operations.** `DescribeOperation` returns the operation's `Inputs`, `Outputs` and a sample `ExecutionParameters` body. The run events send `"body"` unchanged: `{"Inputs": {...}, "ExecutionMode": 1, "JobPool": "", "Retries": 1, "SleepTime": 1000, "SynchronuousQueue": "", "Timeout": 5000}`. Only `Inputs` is required. `ExecutionMode` is `0` (in the IIS process), `1` (synchronous through Job Executor, the default) or `2` (queued asynchronously). The response carries `Outputs`.
* **Revisions.** Calls use the operation's default revision. The `...Revision` events take a `revision` such as `REV.001.001`.
* **Presets.** `DeclareProduction`, `ReportMachineStatus`, `PostQualityInspectionResult` and `GetOrder` use the same contract on their own topics, so each plant use case gets a clean topic. Their operation codes and Inputs are examples: send the codes and Inputs of the operations you published.
* **Business Integrator.** `ProcessMessageAsync` sends `"body"` as an XML string with `Content-Type: application/xml` for the `message_name` of your external system, and needs a token with the `message_processing` scope.
* **Formats.** Apriso answers JSON by default. Token requests are form-encoded, so keep the values in `client_secret`, `password` and `scope` free of `&` and `=`.

## Tokens and auth checks

| Event | Request | Topic | Notes |
| - | - | - | - |
| GetToken | `POST /Apriso/Portal/sts/2.0/token` | `mes/delmia-apriso/token/create` | Client Credentials grant: access token for the user set in FlexNet.BackgroundProcessingContext EmployeeID (expires\_in 86400 in the guide) |
| GetUserToken | `POST /Apriso/Portal/sts/2.0/token` | `mes/delmia-apriso/user-token/create` | Resource Owner Password grant (Standard or LDAP login): access token for an Apriso user |
| RefreshToken | `POST /Apriso/Portal/sts/2.0/token` | `mes/delmia-apriso/token/refresh` | Refresh an Authorization Code token (refresh\_token from the code flow) |
| HelloApiKey | `GET /Apriso/HttpServices/hello/apiKeySecured` | `mes/delmia-apriso/hello-api-key/get` | Auth smoke (API key): answers "Correct API Key passed!"; 401 on a wrong key or client id |
| HelloToken | `GET /Apriso/HttpServices/hello/tokenSecured` | `mes/delmia-apriso/hello-token/get` | Auth smoke (access token): 200 with a valid Bearer token, 401 otherwise |

## Standard Operations

| Event | Request | Topic | Notes |
| - | - | - | - |
| ListOperations | `GET /Apriso/HttpServices/operations` | `mes/delmia-apriso/operation/list` | Standard Operations published through the Web API on this server (scope standard\_operations) |
| DescribeOperation | `GET /Apriso/HttpServices/operations/{operation_code}` | `mes/delmia-apriso/operation/describe` | Inputs, Outputs and a sample ExecutionParameters payload of the operation's default revision |
| DescribeOperationRevision | `GET /Apriso/HttpServices/operations/{operation_code}/{revision}` | `mes/delmia-apriso/operation-revision/describe` | Same as DescribeOperation for one revision (e.g. REV.001.001) |
| RunOperation | `POST /Apriso/HttpServices/operations/{operation_code}` | `mes/delmia-apriso/operation/run` | Execute a published Standard Operation (default revision) with Inputs + execution parameters; returns Outputs. Writes whatever the operation writes |
| RunOperationRevision | `POST /Apriso/HttpServices/operations/{operation_code}/{revision}` | `mes/delmia-apriso/operation-revision/run` | Execute one revision of a published Standard Operation |

## Plant presets

| Event | Request | Topic | Notes |
| - | - | - | - |
| DeclareProduction | `POST /Apriso/HttpServices/operations/{operation_code}` | `mes/delmia-apriso/production-declaration/post` | Preset: declare produced quantity against a WIP order through your published production-declaration operation (Inputs are operation-specific examples) |
| ReportMachineStatus | `POST /Apriso/HttpServices/operations/{operation_code}` | `mes/delmia-apriso/machine-status/post` | Preset: push a machine / resource status change from the UNS into your published status operation (ExecutionMode 2 = queued async) |
| PostQualityInspectionResult | `POST /Apriso/HttpServices/operations/{operation_code}` | `mes/delmia-apriso/quality-inspection-result/post` | Preset: record an inspection / data collection result through your published quality operation |
| GetOrder | `POST /Apriso/HttpServices/operations/{operation_code}` | `mes/delmia-apriso/order/get` | Preset: read an order through your published read-only order query operation (Standard Operations execute with POST even when they only read) |

## Business Integrator and discovery

| Event | Request | Topic | Notes |
| - | - | - | - |
| ProcessMessageAsync | `POST /Apriso/HttpServices/ProcessMessageASync/{message_name}` | `mes/delmia-apriso/bi-message/send` | Queue an inbound Business Integrator XML message for the named external system (scope message\_processing); returns true when accepted |
| GetApiHelp | `GET /Apriso/HttpServices/help` | `mes/delmia-apriso/api-help/get` | The server's generated Web API Reference (HTML): every controller, endpoint and required scope on your version |

## Receiving calls from Apriso (optional)

Deploy `mes_delmia-apriso_webhook.lot` to let Apriso call the broker. It runs in server mode on port `9008` and republishes each request body unchanged.

| Event | Endpoint | Topic | Use |
| - | - | - | - |
| OutboundMessage | `POST /delmia-apriso/outbound/message` | `mes/delmia-apriso/outbound-message/received` | Business Integrator REST Adapter (Job Action Type 39): the mapped external XML (or internal XML) POSTed to the REST Client URL + RELATIVEURI |
| OutboundWebApiCall | `POST /delmia-apriso/outbound/event` | `mes/delmia-apriso/outbound-event/received` | Process Builder / Portal Web API Client (Apr.WebAPI ApiKeyClient Post) calling Coreflux as an external provider with a JSON body |

For the Business Integrator REST Adapter, set the REST Client URL to `http(s)://<broker>:9008` and `RELATIVEURI` to `/delmia-apriso/outbound/message`. The connector has no authentication, so keep the port on the plant network or behind a reverse proxy with TLS.

## Examples

Get a token (client credentials):

```json theme={"theme":"css-variables","languages":{"custom":["/languages/lot.json"]}}
{
  "client_id": "<client id>",
  "client_secret": "<client secret>",
  "scope": "standard_operations,message_processing",
  "state": "coreflux"
}
```

Run a published operation with an API key:

```json theme={"theme":"css-variables","languages":{"custom":["/languages/lot.json"]}}
{
  "authorization": "ApiKey <api key>  (or: Bearer <access_token>)",
  "client_id": "<client id>",
  "operation_code": "GetEmployee",
  "body": {
    "Inputs": {
      "Id": 1
    },
    "ExecutionMode": 1,
    "Retries": 1,
    "SleepTime": 1000,
    "Timeout": 5000
  }
}
```

Declare production against a WIP order:

```json theme={"theme":"css-variables","languages":{"custom":["/languages/lot.json"]}}
{
  "authorization": "ApiKey <api key>  (or: Bearer <access_token>)",
  "client_id": "<client id>",
  "operation_code": "ProductionDeclaration",
  "body": {
    "Inputs": {
      "WipOrderNo": "WO-1001",
      "OperationSequenceNo": "10",
      "Quantity": 12,
      "UomCode": "EA"
    },
    "ExecutionMode": 1,
    "Retries": 1,
    "SleepTime": 1000,
    "Timeout": 5000
  }
}
```

Queue a Business Integrator message:

```json theme={"theme":"css-variables","languages":{"custom":["/languages/lot.json"]}}
{
  "authorization": "Bearer <access_token with message_processing>",
  "client_id": "<client id>",
  "message_name": "MyExternalSystem1",
  "body": "<FlexNet_WorkCenters Version=\"1.0\"><WorkCenter><Code>WP02</Code><Facility>C1P</Facility></WorkCenter></FlexNet_WorkCenters>"
}
```

Keep a token fresh and forward a good-part count from the UNS (from `docs-helper-actions.lot`):

```lot theme={"theme":"css-variables","languages":{"custom":["/languages/lot.json"]}}
DEFINE ACTION AprisoLogin
ON EVERY 12 HOURS DO
    SET "cid" WITH GET SECRET "APRISO_CLIENT_ID"
    SET "csec" WITH GET SECRET "APRISO_CLIENT_SECRET"
    PUBLISH TOPIC "mes/delmia-apriso/token/create" WITH { "client_id": {cid}, "client_secret": {csec}, "scope": "standard_operations,message_processing", "state": "coreflux" }

DEFINE ACTION AprisoKeepToken
ON TOPIC "mes/delmia-apriso/token/create/response" DO
    SET "token" WITH GET JSON "access_token" IN PAYLOAD AS STRING
    KEEP TOPIC "internal/delmia-apriso/authorization" WITH "Bearer " + {token}
```

## Writes

Write events: RunOperation, RunOperationRevision, DeclareProduction, ReportMachineStatus, PostQualityInspectionResult, ProcessMessageAsync. They change data in Apriso through the operations you published or through Business Integrator. `GetOrder` posts too, but only runs the read-only operation you point it at. No event deletes anything.

## Not packaged

The SOAP web services (`IFlexNetMessageProcessor`), the Implicit and Authorization Code browser flows (they need a user in the Apriso Portal), the cache, personalization and data paging controllers (their endpoints are only in each server's Web API Reference), 3DPassport authentication, and any `DELETE`.

## Status

Technical preview, blocked on a live test. There is no public Apriso server or sandbox. A local mock built from the Technical Guides passes every event and the auth, scope, unknown-operation and bad-input controls (111/111 checks, 2026-10-06 04:07 WEST). It still needs a run against a real Apriso server with a registered client application.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.