-
Notifications
You must be signed in to change notification settings - Fork 10
[API] Common Functionality
Kai edited this page Nov 5, 2024
·
3 revisions
see: Process Artifacts Endpoints
see: Engine: Process Instance Rest Endpoint
| Artefact | Valid On | REST Method | REST URL | Body/Return Value | Notes |
|---|---|---|---|---|---|
| Status of the Engine | Engine | GET |
/status |
{ "running": true,"version": "0.0.1"}
|
shows if the engine is running, is already initialized and which version it has |
| All Configurable Keys of the Engine | MS, Engine |
GETPUTDELETE
|
/configuration |
{ "key": value, ... } |
Gets, sets and deletes an engine's configurable keys. GET: the values are already combined from the cli, config.json and default values. PUT: sets and overrides the values in config.json |
| Gets a specific config keys of the Engine | Engine | GET |
/configuration/{key} |
{ "key": value, ... } |
Gets a specific config key. |
| All Logs | Engine |
GETDELETE
|
/logging[?entries={100}] |
GET gets all process and standard logs. Optionally it is possible to set the amount of returned entries, Default: the last 100 entries DELETE removes all stored standard and process log entries. |
|
| Logging Meta-Data | Engine | GET |
/logging/status |
GET gets all the meta data about the logging system: how many tables, how many entries, which processes have logs, next log rotation | |
| All standard Logs | Engine |
GETDELETE
|
/logging/standard[?entries={100}] |
GET gets all standard logs. Optionally it is possible to set the amount of returned entries, Default: the last 100 entries DELETE removes all stored standard log entries. |
|
| All process Logs | Engine |
GETDELETE
|
/logging/process[?entries={100}] |
GET gets all process logs. Optionally it is possible to set the amount of returned entries, Default: the last 100 entries DELETE removes all stored standard log entries. |
|
| All process Logs of a process | Engine |
GETDELETE
|
/logging/process/{file-name}[?entries={100}] |
GET gets all process logs of a specific process. Optionally it is possible to set the amount of returned entries, Default: the last 100 entries DELETE removes all stored standard log entries. |
|
| All process Logs of a process instance | Engine |
GETDELETE
|
/logging/process/{file-name}/instance/{id}[?entries={100}]
|
GET gets all process logs of a specific process instance. Optionally, it is possible to set the amount of returned entries, Default: the last 100 entries DELETE removes all stored standard log entries. |
|
| Machine Properties | Engine | GET |
/machine |
{...} |
returns all machine properties. For a list of all available properties, see here |
| Machine Properties | Engine | GET |
/machine/{property},{property} |
{...} |
Returns the specified machine properties. For a list of all available properties, see here |
| Machines known to the MS | MS | GET |
/machines |
[...] |
returns all stored or discovered Machines and their last machine properties |
| Machine Properties | MS | POST |
/machines |
{...} |
allows adding a new machine with some meta information |
| Machine Properties | MS | GET |
/machines/{machineId} |
{ meta-data...,"machine": {machineInfo...}, "deployedProcesses": {deploymentInfo...}}
|
returns the known information about a machine, machine contains the information that one would get via the engine machine endpoint without fast changing information like cpu/mem/disk load (this information is only available through websocket api |
| None | MS | DELETE |
/machines/{machineId} |
deletes the machine from the store if it is currently stored (doesn't affect machines that are only discovered |
| Artefact | REST Method | REST URL | Request Body | Return Body | Notes |
|---|---|---|---|---|---|
| Trigger local Hard Constraint evaluation | POST |
/evaluation |
Constraints, see below |
200 OKNegative: 501 Not Implementedmaybe Soft Constraint values, if requested |
If softConstraints object is given in the body and not empty, the Engine can decide (profile keys machine.env.allowSCValuesForHomeEnv and machine.env.allowSCValuesForExternalEnv) if it returns the internal values |
Request Body:
{
"requestingMachine": { id, name, hostname, homeEnvId, homeEnvName },
"processInfo": { id, name, creatorEnvId, creatorEnvName, nextFlowNode },
"hardConstraints": {
"user.name": {
"condition": "===",
"value": [ "Max", "Jens" ]
},
"machine.mem.load": {
"condition": ">=",
"value": "10"
}
},
"softConstraints": [
"machine.cpu.speed",
"machine.cpu.currentLoad",
...
]
}Response Body (if positive):
{
"machine.cpu.speed": …,
"machine.cpu.currentLoad": …,
…
}| Artefact | REST Method | REST URL | Body/Return Value | Notes |
|---|---|---|---|---|
| Return a compacted JSON-LD list with all capabilities on the machine | GET |
/capabilities |
{ ...JSON-LD...} |
|
| Run Capability and Return Result | POST |
/capabilities/execute |
{ "CapabilityName": <Name>,"Parameter": { "para1": 42, "para2": { "value": 42, "unit": "px" }, ...},"Webhook": <URL>}
|
This is for testing purposes and does not conform with the Capability concept of the dBPMS. The Webhook is optional. If given one (or multiple) response will be sent via HTTP POST to the given URL (JSON encoded) |
| Artefact | REST Method | REST URL | Body/Return Value | Notes |
|---|---|---|---|---|
| All Combined Configurable Keys of the Engine (Profiles and Config Keys) | GET |
/configuration |
{ "key": value, ... } |
Gets an engine configurable keys. Represents all combined key-values of the configuration and the currently active profiles: Home Env > Current Envs > Current User Profile > Default Profile. |
| All Config Keys |
GETPUTDELTE
|
/configuration/engine |
{ "key": value, ... } |
Gets, sets or deletes an engine configuration. GET: Represents all key-values configuration pair: if there is nothing manually configured (config.json), it returns the default values from config_default.json. PUT: all manually values, even if they are the default values, will be stored in config.json. values, that are not mentioned will be reseted to their default value (will be deleted from config.json) DELETE: resets everything to the default values (== empty config.json) |
| Config Key |
GETPUTDELTE
|
/configuration/engine/{config-key} |
{ "key": value } |
reads or writes a specific config-key |
| All User Profiles | GET |
/configuration/user-profiles |
{ ... } |
Read the profiles of all stored user profiles |
| User Profile | GET |
/configuration/user-profiles/{user-id} |
{ ... } |
Read the profile of one specific stored user profile |
| Active User | GET |
/configuration/user-profiles/active |
{ ... } |
Read the user profile of the currently logged in user |
| All Environment Profiles | GET |
/configuration/environment-profiles |
{ ... } |
Read the profiles and sub-profiles of all environments stored on the engine |
| Home Environment Profiles | GET |
/configuration/ environment-profiles/home
|
{ ... } |
Read the base, external and class profiles of the home environment |
| Home Base Environment Profile |
GETPUTDELETE
|
/configuration/ environment-profiles/home/base
|
{ ... } (see here) |
Reads, sets and deletes the base profile of the home environment. It is the default profile of the home environment. |
| Home External Environment Profile |
GETPUTDELETE
|
/configuration/ environment-profiles/home/external
|
{ ... } (see here) |
Reads, sets and deletes the external profile of the home environment. The external profile is sent to Machines not belonging to the same home environment to be stored as an external environment profile. |
| Home Class Environment Profile |
GETPUTDELETE
|
/configuration/ environment-profiles/home/{class-name}
|
{ ... } (see here) |
Reads, sets and deletes a class profile, e.g. a special profile only for Drones. It Extends the restrictions of the base profile for specific classes. |
| External Environment Profile |
GETPUTDELETE
|
/configuration/ environment-profiles/{environment-id}
|
{ ... } (see here) |
Reads, sets and deletes the (base) profile of the external environment. There is no differentiation between base, external and class profiles for External Profile on an Engine. |
This is the Dev Wiki