Op deze pagina

API-referentie: Simulaties

Met simulaties kun je what-if-scenario’s uitvoeren op procesmodellen. Je kunt verwerkingstijden, bronallocaties en aankomstpercentages instellen om procesgedrag te voorspellen.

Simulaties voor een proces weergeven

Endpoint: GET /v1/tenant/{tenantId}/processes/{processId}/simulations

Auth: API-sleutel met tenant-scope · read scope

Parameters:

Naam Type Locatie Verplicht Beschrijving
tenantId string path Ja Indeling: uuid
processId string path Ja Indeling: uuid
limit integer query Nee Maximumaantal items dat wordt geretourneerd
offset integer query Nee Aantal items dat wordt overgeslagen

Response (200):

Lijst met simulaties

[
	{
		"id": "00000000-0000-0000-0000-000000000000",
		"displayName": "string",
		"datasetName": "string",
		"startTime": "2024-03-15T16:30:00Z",
		"endTime": "2024-03-15T16:30:00Z",
		"useWarmUp": true
	}
]

Fouten:

  • 400 Ongeldige aanvraag, bijvoorbeeld door een ongeldige filterexpressie, een proces zonder model, een niet-ondersteund uploadtype of een ontbrekend verplicht veld
  • 401 Ontbrekende, ongeldige, uitgeschakelde of verlopen API-sleutel
  • 404 Bron niet gevonden

Een simulatie maken (idempotent wanneer een id wordt opgegeven)

Endpoint: POST /v1/tenant/{tenantId}/processes/{processId}/simulations

Auth: API-sleutel met tenant-scope · write scope

Parameters:

Naam Type Locatie Verplicht Beschrijving
tenantId string path Ja Indeling: uuid
processId string path Ja Indeling: uuid

Request body:

{
	"id": "00000000-0000-0000-0000-000000000000",
	"displayName": "string",
	"datasetName": "string",
	"startTime": "2024-03-15T16:30:00Z",
	"endTime": "2024-03-15T16:30:00Z",
	"useWarmUp": true
}
Veld Type Verplicht Beschrijving
id string Nee Optionele id voor idempotente nieuwe pogingen (moet een UUID zijn)
Indeling: uuid
displayName string Nee Naam van de simulatie
Standaard: New Simulation
datasetName string Nee Naam van de dataset waarop de simulatie wordt uitgevoerd
startTime string Nee Starttijd van de simulatie
Indeling: date-time
endTime string Nee Eindtijd van de simulatie
Indeling: date-time
useWarmUp boolean Nee Of de opwarmperiode moet worden genegeerd
Standaard: false

Response (201):

Simulatie aangemaakt

{
	"simulation": {
		"id": "00000000-0000-0000-0000-000000000000",
		"displayName": "string"
	},
	"message": "string"
}
Veld Type Verplicht Beschrijving
simulation object Ja
message string Ja

Fouten:

  • 400 Ongeldige aanvraag, bijvoorbeeld door een ongeldige filterexpressie, een proces zonder model, een niet-ondersteund uploadtype of een ontbrekend verplicht veld
  • 401 Ontbrekende, ongeldige, uitgeschakelde of verlopen API-sleutel
  • 404 Bron niet gevonden
  • 409 De aanvraag conflicteert met de huidige status, bijvoorbeeld door een licentieplaatsbeperking of een opnieuw gebruikt id

Een simulatie met elementinstellingen, attributen en bronnen ophalen

Endpoint: GET /v1/tenant/{tenantId}/processes/{processId}/simulations/{simulationId}

Auth: API-sleutel met tenant-scope · read scope

Parameters:

Naam Type Locatie Verplicht Beschrijving
tenantId string path Ja Indeling: uuid
processId string path Ja Indeling: uuid
simulationId string path Ja Indeling: uuid

Response (200):

Simulatiedetails

{
	"simulation": {
		"id": "00000000-0000-0000-0000-000000000000",
		"displayName": "string",
		"datasetName": "string",
		"startTime": "2024-03-15T16:30:00Z",
		"endTime": "2024-03-15T16:30:00Z",
		"useWarmUp": true
	},
	"elementSettings": [
		{
			"simulationId": "00000000-0000-0000-0000-000000000000",
			"modelElementId": "00000000-0000-0000-0000-000000000000",
			"settings": {
				"processingTimeDistribution": [
					{
						"timeslot": {
							"periodicity": "Always"
						},
						"conditions": [
							{
								"type": "Values",
								"attribute": "string",
								"values": [
									"string"
								]
							}
						],
						"distribution": {
							"type": "Fixed",
							"value": 0
						},
						"timeUnit": "seconds",
						"rateUnit": "perTimeSlot"
					}
				],
				"processingTimeUnit": "seconds",
				"updateAttributeRules": [
					{
						"id": "string",
						"attributeId": "00000000-0000-0000-0000-000000000000",
						"timeslot": {
							"periodicity": "Always"
						},
						"conditions": [
							{
								"type": "Values",
								"attribute": "string",
								"values": [
									"string"
								]
							}
						],
						"newValue": "string",
						"isEnabled": true
					}
				],
				"requiredResources": [
					{
						"resourceId": "00000000-0000-0000-0000-000000000000",
						"amount": 0
					}
				],
				"caseStartsDistribution": [
					{
						"timeslot": {
							"periodicity": "Always"
						},
						"conditions": [
							{
								"type": "Values",
								"attribute": "string",
								"values": [
									"string"
								]
							}
						],
						"distribution": {
							"type": "Fixed",
							"value": 0
						},
						"timeUnit": "seconds",
						"rateUnit": "perTimeSlot"
					}
				],
				"caseStartsTimeUnit": "perTimeSlot",
				"capacityInterval": "perHour",
				"skipChanceDistribution": [
					{
						"timeslot": {
							"periodicity": "Always"
						},
						"conditions": [
							{
								"type": "Values",
								"attribute": "string",
								"values": [
									"string"
								]
							}
						],
						"distribution": {
							"type": "Fixed",
							"value": 0
						},
						"timeUnit": "seconds",
						"rateUnit": "perTimeSlot"
					}
				],
				"queueStrategy": "fifo",
				"chanceToTakeDistribution": [
					{
						"timeslot": {
							"periodicity": "Always"
						},
						"conditions": [
							{
								"type": "Values",
								"attribute": "string",
								"values": [
									"string"
								]
							}
						],
						"distribution": {
							"type": "Fixed",
							"value": 0
						},
						"timeUnit": "seconds",
						"rateUnit": "perTimeSlot"
					}
				]
			}
		}
	],
	"attributes": [
		{
			"id": "00000000-0000-0000-0000-000000000000",
			"simulationId": "00000000-0000-0000-0000-000000000000",
			"displayName": "string",
			"valueDistribution": {
				"type": "Number",
				"numberDistributions": [
					{
						"timeslot": {
							"periodicity": "Always"
						},
						"conditions": [
							{
								"type": "Values",
								"attribute": "string",
								"values": [
									"string"
								]
							}
						],
						"distribution": {
							"type": "Fixed",
							"value": 0
						},
						"timeUnit": "seconds",
						"rateUnit": "perTimeSlot",
						"id": "string",
						"isEnabled": true,
						"isDefault": true
					}
				],
				"textDistributions": [
					{
						"id": "string",
						"timeslot": {
							"periodicity": "Always"
						},
						"isEnabled": true,
						"isDefault": true,
						"mode": "list",
						"textValues": [
							{
								"id": "string",
								"value": "string",
								"chance": 0
							}
						]
					}
				]
			},
			"simulationAttributeType": "string"
		}
	],
	"resources": [
		{
			"id": "00000000-0000-0000-0000-000000000000",
			"simulationId": "00000000-0000-0000-0000-000000000000",
			"displayName": "string",
			"levelDistribution": [
				{
					"timeslot": {
						"periodicity": "Always"
					},
					"conditions": [
						{
							"type": "Values",
							"attribute": "string",
							"values": [
								"string"
							]
						}
					],
					"distribution": {
						"type": "Fixed",
						"value": 0
					},
					"timeUnit": "seconds",
					"rateUnit": "perTimeSlot"
				}
			],
			"attributeId": "00000000-0000-0000-0000-000000000000"
		}
	]
}
Veld Type Verplicht Beschrijving
simulation object Ja Simulatiekop
elementSettings object[] Ja Simulatie-instellingen per element
attributes object[] Ja Gesimuleerde attributen
bronnen object[] Ja Bronnenpools

Fouten:

  • 400 Ongeldige aanvraag, bijvoorbeeld door een ongeldige filterexpressie, een proces zonder model, een niet-ondersteund uploadtype of een ontbrekend verplicht veld
  • 401 Ontbrekende, ongeldige, uitgeschakelde of verlopen API-sleutel
  • 404 Bron niet gevonden

Een simulatie bijwerken (velden en/of elementinstellingen)

Endpoint: PUT /v1/tenant/{tenantId}/processes/{processId}/simulations/{simulationId}

Auth: API-sleutel met tenant-scope · write scope

Parameters:

Naam Type Locatie Verplicht Beschrijving
tenantId string path Ja Indeling: uuid
processId string path Ja Indeling: uuid
simulationId string path Ja Indeling: uuid

Request body:

{
	"displayName": "string",
	"datasetName": "string",
	"startTime": "2024-03-15T16:30:00Z",
	"endTime": "2024-03-15T16:30:00Z",
	"useWarmUp": true,
	"elementSettings": [
		{
			"modelElementId": "00000000-0000-0000-0000-000000000000",
			"settings": {
				"caseStartsDistribution": [
					{
						"timeslot": {
							"periodicity": "Always"
						},
						"conditions": [
							{
								"type": "Values",
								"attribute": "string",
								"values": [
									"string"
								]
							}
						],
						"distribution": {
							"type": "Fixed",
							"value": 0
						},
						"timeUnit": "seconds",
						"rateUnit": "perTimeSlot"
					}
				],
				"processingTimeDistribution": [
					{
						"timeslot": {
							"periodicity": "Always"
						},
						"conditions": [
							{
								"type": "Values",
								"attribute": "string",
								"values": [
									"string"
								]
							}
						],
						"distribution": {
							"type": "Fixed",
							"value": 0
						},
						"timeUnit": "seconds",
						"rateUnit": "perTimeSlot"
					}
				]
			}
		}
	]
}
Veld Type Verplicht Beschrijving
displayName string Nee Naam van de simulatie
datasetName string Nee Naam van de dataset waarop de simulatie wordt uitgevoerd
startTime string Nee Starttijd van de simulatie
Indeling: date-time
endTime string Nee Eindtijd van de simulatie
Indeling: date-time
useWarmUp boolean Nee Of de opwarmperiode moet worden genegeerd
elementSettings object[] Nee Overschrijvingen van instellingen per element

Response (200):

Simulatie bijgewerkt

{
	"message": "string"
}
Veld Type Verplicht Beschrijving
message string Ja

Fouten:

  • 400 Ongeldig verzoek, bijvoorbeeld door een ongeldige filterexpressie, een proces zonder model, een niet-ondersteund uploadtype of een ontbrekend verplicht veld
  • 401 Ontbrekende, ongeldige, uitgeschakelde of verlopen API-sleutel
  • 404 Bron niet gevonden

Een simulatie definitief verwijderen

Endpoint: DELETE /v1/tenant/{tenantId}/processes/{processId}/simulations/{simulationId}

Authenticatie: API-sleutel voor tenant · write scope

Parameters:

Naam Type Locatie Verplicht Beschrijving
tenantId string path Ja Indeling: uuid
processId string path Ja Indeling: uuid
simulationId string path Ja Indeling: uuid

Response (200):

Simulatie verwijderd

{
	"message": "string"
}
Veld Type Verplicht Beschrijving
message string Ja

Fouten:

  • 400 Ongeldig verzoek, bijvoorbeeld door een ongeldige filterexpressie, een proces zonder model, een niet-ondersteund uploadtype of een ontbrekend verplicht veld
  • 401 Ontbrekende, ongeldige, uitgeschakelde of verlopen API-sleutel
  • 404 Bron niet gevonden

Deze endpoints gebruiken AI om automatisch simulatie-instellingen te genereren op basis van het procesmodel.

Simulatie-instellingen genereren met AI (asynchroon, controleer het status-endpoint)

Endpoint: POST /v1/tenant/{tenantId}/processes/{processId}/simulations/{simulationId}/generate-settings

Authenticatie: API-sleutel voor tenant · write scope · limiet 2 verzoeken/s (burst 4)

Parameters:

Naam Type Locatie Verplicht Beschrijving
tenantId string path Ja Indeling: uuid
processId string path Ja Indeling: uuid
simulationId string path Ja Indeling: uuid

Request body:

{
	"processDescription": "string",
	"additionalContext": "string"
}
Veld Type Verplicht Beschrijving
processDescription string Nee
additionalContext string Nee

Response (200):

Genereren gestart / resultaat

{
	"message": "string"
}
Veld Type Verplicht Beschrijving
message string Ja

Fouten:

  • 400 Ongeldig verzoek, bijvoorbeeld door een ongeldige filterexpressie, een proces zonder model, een niet-ondersteund uploadtype of een ontbrekend verplicht veld
  • 401 Ontbrekende, ongeldige, uitgeschakelde of verlopen API-sleutel
  • 404 Bron niet gevonden

Status van het genereren van simulatie-instellingen controleren

Endpoint: GET /v1/tenant/{tenantId}/processes/{processId}/simulations/{simulationId}/generate-settings/status

Authenticatie: API-sleutel voor tenant · write scope

Parameters:

Naam Type Locatie Verplicht Beschrijving
tenantId string path Ja Indeling: uuid
processId string path Ja Indeling: uuid
simulationId string path Ja Indeling: uuid

Response (200):

Generatiestatus

{
	"message": "string"
}
Veld Type Verplicht Beschrijving
message string Ja

Fouten:

  • 400 Ongeldig verzoek, bijvoorbeeld door een ongeldige filterexpressie, een proces zonder model, een niet-ondersteund uploadtype of een ontbrekend verplicht veld
  • 401 Ontbrekende, ongeldige, uitgeschakelde of verlopen API-sleutel
  • 404 Bron niet gevonden

Een simulatie uitvoeren (asynchroon, resultaten komen in de procesdatatabellen)

Endpoint: POST /v1/tenant/{tenantId}/processes/{processId}/simulations/{simulationId}/run

Authenticatie: API-sleutel voor tenant · write scope · limiet 5 verzoeken/s (burst 10)

Parameters:

Naam Type Locatie Verplicht Beschrijving
tenantId string path Ja Indeling: uuid
processId string path Ja Indeling: uuid
simulationId string path Ja Indeling: uuid

Response (200):

Simulatie gestart

{
	"message": "string"
}
Veld Type Verplicht Beschrijving
message string Ja

Fouten:

  • 400 Ongeldig verzoek, bijvoorbeeld door een ongeldige filterexpressie, een proces zonder model, een niet-ondersteund uploadtype of een ontbrekend verplicht veld
  • 401 Ontbrekende, ongeldige, uitgeschakelde of verlopen API-sleutel
  • 404 Bron niet gevonden

Status van de laatste simulatie-uitvoering ophalen (afgeleid van de outputdatatabel)

Endpoint: GET /v1/tenant/{tenantId}/processes/{processId}/simulations/{simulationId}/run/status

Authenticatie: API-sleutel voor tenant · read scope

Parameters:

Naam Type Locatie Verplicht Beschrijving
tenantId string path Ja Indeling: uuid
processId string path Ja Indeling: uuid
simulationId string path Ja Indeling: uuid

Response (200):

Uitvoeringsstatus

{
	"state": "notStarted",
	"startedAt": "2024-03-15T16:30:00Z",
	"completedAt": "2024-03-15T16:30:00Z",
	"step": "string",
	"casesSimulated": 0,
	"targetCases": 0,
	"eventsGenerated": 0,
	"errorMessage": "string",
	"simulationId": "00000000-0000-0000-0000-000000000000"
}
Veld Type Verplicht Beschrijving
state notStarted | running | processing | ready | error Ja Toegestane waarden: notStarted, running, processing, ready, error
startedAt string Nee Indeling: date-time
completedAt string Nee Indeling: date-time
step string Nee
casesSimulated number Nee
targetCases number Nee
eventsGenerated number Nee
errorMessage string Nee
simulationId string Ja Indeling: uuid

Fouten:

  • 400 Ongeldig verzoek, bijvoorbeeld door een ongeldige filterexpressie, een proces zonder model, een niet-ondersteund uploadtype of een ontbrekend verplicht veld
  • 401 Ontbrekende, ongeldige, uitgeschakelde of verlopen API-sleutel
  • 404 Bron niet gevonden