mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-11 13:19:21 +00:00
docs: fix the example docs related to set execution api (actions) (#10359)
# Which Problems Are Solved Fix docs related to Actions V2 SetExecution API [endpoint](https://zitadel.com/docs/apis/resources/action_service_v2/action-service-set-execution) # How the Problems Are Solved The examples are updated # Additional Changes N/A # Additional Context - Closes #10320
This commit is contained in:
@@ -103,9 +103,7 @@ curl -L -X PUT 'https://$CUSTOM-DOMAIN/v2beta/actions/executions' \
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"targets": [
|
"targets": [
|
||||||
{
|
"<TargetID returned>"
|
||||||
"target": "<TargetID returned>"
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
}'
|
}'
|
||||||
```
|
```
|
||||||
|
@@ -129,9 +129,7 @@ curl -L -X PUT 'https://$CUSTOM-DOMAIN/v2beta/actions/executions' \
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"targets": [
|
"targets": [
|
||||||
{
|
"<TargetID returned>"
|
||||||
"target": "<TargetID returned>"
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
}'
|
}'
|
||||||
```
|
```
|
||||||
|
@@ -107,9 +107,7 @@ curl -L -X PUT 'https://$CUSTOM-DOMAIN/v2beta/actions/executions' \
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"targets": [
|
"targets": [
|
||||||
{
|
"<TargetID returned>"
|
||||||
"target": "<TargetID returned>"
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
}'
|
}'
|
||||||
```
|
```
|
||||||
|
@@ -154,9 +154,7 @@ curl -L -X PUT 'https://$CUSTOM-DOMAIN/v2beta/actions/executions' \
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"targets": [
|
"targets": [
|
||||||
{
|
"<TargetID returned>"
|
||||||
"target": "<TargetID returned>"
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
}'
|
}'
|
||||||
```
|
```
|
||||||
|
@@ -114,9 +114,7 @@ curl -L -X PUT 'https://$CUSTOM-DOMAIN/v2beta/actions/executions' \
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"targets": [
|
"targets": [
|
||||||
{
|
"<TargetID returned>"
|
||||||
"target": "<TargetID returned>"
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
}'
|
}'
|
||||||
```
|
```
|
||||||
|
@@ -107,9 +107,7 @@ curl -L -X PUT 'https://$CUSTOM-DOMAIN/v2beta/actions/executions' \
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"targets": [
|
"targets": [
|
||||||
{
|
"<TargetID returned>"
|
||||||
"target": "<TargetID returned>"
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
}'
|
}'
|
||||||
```
|
```
|
||||||
|
@@ -173,9 +173,7 @@ curl -L -X PUT 'https://$CUSTOM-DOMAIN/v2beta/actions/executions' \
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"targets": [
|
"targets": [
|
||||||
{
|
"<TargetID returned>"
|
||||||
"target": "<TargetID returned>"
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
}'
|
}'
|
||||||
```
|
```
|
||||||
|
@@ -107,9 +107,7 @@ curl -L -X PUT 'https://$CUSTOM-DOMAIN/v2beta/actions/executions' \
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"targets": [
|
"targets": [
|
||||||
{
|
"<TargetID returned>"
|
||||||
"target": "<TargetID returned>"
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
}'
|
}'
|
||||||
```
|
```
|
||||||
|
@@ -406,17 +406,11 @@ If you then have a call on `/zitadel.user.v2.UserService/UpdateHumanUser` the fo
|
|||||||
|
|
||||||
And if you use a different service, for example `zitadel.session.v2.SessionService`, then the `all` Execution would still be used.
|
And if you use a different service, for example `zitadel.session.v2.SessionService`, then the `all` Execution would still be used.
|
||||||
|
|
||||||
### Targets and Includes
|
### Targets
|
||||||
|
|
||||||
:::info
|
An execution can contain only a list of Targets, and Targets are comma separated string values.
|
||||||
Includes are limited to 3 levels, which mean that include1->include2->include3 is the maximum for now.
|
|
||||||
If you have feedback to the include logic, or a reason why 3 levels are not enough, please open [an issue on github](https://github.com/zitadel/zitadel/issues) or [start a discussion on github](https://github.com/zitadel/zitadel/discussions)/[start a topic on discord](https://zitadel.com/chat)
|
|
||||||
:::
|
|
||||||
|
|
||||||
An execution can not only contain a list of Targets, but also Includes.
|
Here's an example of a Target defined on a service (e.g. `zitadel.user.v2.UserService`)
|
||||||
The Includes can be defined in the Execution directly, which means you include all defined Targets by a before set Execution.
|
|
||||||
|
|
||||||
If you define 2 Executions as follows:
|
|
||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
@@ -426,13 +420,12 @@ If you define 2 Executions as follows:
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"targets": [
|
"targets": [
|
||||||
{
|
"<TargetID1>"
|
||||||
"target": "<TargetID1>"
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Here's an example of a Target defined on a method (e.g. `/zitadel.user.v2.UserService/AddHumanUser`)
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"condition": {
|
"condition": {
|
||||||
@@ -441,21 +434,13 @@ If you define 2 Executions as follows:
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"targets": [
|
"targets": [
|
||||||
{
|
"<TargetID2>",
|
||||||
"target": "<TargetID2>"
|
"<TargetID1>"
|
||||||
},
|
|
||||||
{
|
|
||||||
"include": {
|
|
||||||
"request": {
|
|
||||||
"service": "zitadel.user.v2.UserService"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
The called Targets on "/zitadel.user.v2.UserService/AddHumanUser" would be, in order:
|
The called Targets on `/zitadel.user.v2.UserService/AddHumanUser` would be, in order:
|
||||||
|
|
||||||
1. `<TargetID2>`
|
1. `<TargetID2>`
|
||||||
2. `<TargetID1>`
|
2. `<TargetID1>`
|
||||||
|
@@ -675,7 +675,7 @@ message SetExecutionRequest {
|
|||||||
// Ordered list of targets called during the execution.
|
// Ordered list of targets called during the execution.
|
||||||
repeated string targets = 2;
|
repeated string targets = 2;
|
||||||
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = {
|
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = {
|
||||||
example: "{\"condition\":{\"request\":{\"method\":\"zitadel.session.v2.SessionService/ListSessions\"}},\"targets\":[{\"target\":\"69629026806489455\"}]}";
|
example: "{\"condition\":{\"request\":{\"method\":\"zitadel.session.v2.SessionService/ListSessions\"}},\"targets\":[\"69629026806489455\"]}";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user