Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions examples/extended_operations.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
SetVariableRequest,
SetVariableRequestVariables,
Unset,
VariableHistoryItemKey,
VariableHistoryItemSearchQuery,
VariableHistoryItemSearchQueryFilter,
VariableKey,
Expand Down Expand Up @@ -419,6 +420,22 @@ def get_variable_example(variable_key: VariableKey) -> None:
# endregion GetVariable


# region GetVariableHistoryItem
def get_variable_history_item_example(
variable_history_item_key: VariableHistoryItemKey,
) -> None:
client = CamundaClient()

result = client.get_variable_history_item(
variable_history_item_key=variable_history_item_key,
)

print(f"{result.timestamp}: {result.name} = {result.value}")


# endregion GetVariableHistoryItem


# region SearchVariables
def search_variables_example() -> None:
client = CamundaClient()
Expand Down
7 changes: 7 additions & 0 deletions examples/operation-map.json
Original file line number Diff line number Diff line change
Expand Up @@ -979,6 +979,13 @@
"label": "Get a variable"
}
],
"get_variable_history_item": [
{
"file": "extended_operations.py",
"region": "GetVariableHistoryItem",
"label": "Get a variable history item"
}
],
"list_history_backups": [
{
"file": "backup.py",
Expand Down
125 changes: 125 additions & 0 deletions external-spec/bundled/rest-api.bundle.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

51 changes: 48 additions & 3 deletions external-spec/bundled/spec-metadata.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,11 @@ components:
type: string
description: |
The end date of the batch operation.
This is `null` if the batch operation is still running.
This is `null` while the batch operation is running or suspended. Once the `state` is
`COMPLETED`, `PARTIALLY_COMPLETED` or `FAILED`, it is set only after all items have
been processed (completed or failed). Until then it stays `null`, so a finished
`state` does not guarantee an `endDate`.
A canceled batch operation gets its end date when it is canceled.
format: date-time
nullable: true
actorType:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ paths:
schema:
$ref: 'keys.yaml#/components/schemas/ElementInstanceKey'
requestBody:
required: true
required: false
content:
application/json:
schema:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -581,6 +581,8 @@ paths:
# Variable endpoints
/variables/history/search:
$ref: 'variables.yaml#/paths/~1variables~1history~1search'
/variables/history/{variableHistoryItemKey}:
$ref: 'variables.yaml#/paths/~1variables~1history~1{variableHistoryItemKey}'
/variables/search:
$ref: 'variables.yaml#/paths/~1variables~1search'
/variables/{variableKey}:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,55 @@ paths:
x-added-in-version: "8.11"
x-scope: physical-tenant

/variables/history/{variableHistoryItemKey}:
get:
x-eventually-consistent: true
tags:
- Variable
operationId: getVariableHistoryItem
x-required-permissions:
- { resourceType: PROCESS_DEFINITION, permissionType: READ_PROCESS_INSTANCE }
security:
- bearerAuth: []
- basicAuth: []
summary: Get variable history item
description: |-
Get a variable history item by its key.

A variable history item records one change of a variable. Unlike the variable history
search, this endpoint returns the full value of the variable after the change and doesn't
truncate it.
parameters:
- name: variableHistoryItemKey
in: path
required: true
description: The key of the variable history item.
schema:
$ref: 'keys.yaml#/components/schemas/VariableHistoryItemKey'
responses:
"200":
description: The variable history item is successfully returned.
content:
application/json:
schema:
$ref: '#/components/schemas/VariableHistoryItemResult'
"400":
$ref: 'common-responses.yaml#/components/responses/InvalidData'
"401":
$ref: 'common-responses.yaml#/components/responses/Unauthorized'
"403":
$ref: 'common-responses.yaml#/components/responses/Forbidden'
"404":
description: The variable history item with the given key was not found.
content:
application/problem+json:
schema:
$ref: 'problem-detail.yaml#/components/schemas/ProblemDetail'
"500":
$ref: 'common-responses.yaml#/components/responses/InternalServerError'
x-added-in-version: "8.11"
x-scope: physical-tenant

/variables/search:
post:
x-eventually-consistent: true
Expand Down Expand Up @@ -522,6 +571,18 @@ components:
description: Indicates if the value is truncated.
type: boolean

VariableHistoryItemResult:
description: Variable history item response.
type: object
required:
- value
allOf:
- $ref: '#/components/schemas/VariableHistoryItemResultBase'
properties:
value:
description: Full value of this variable after the change.
type: string

VariableHistoryItemResultBase:
description: Variable history item response base.
type: object
Expand Down
Loading
Loading