Skip to main content

Set an execution​

Set an execution to call a previously defined target or include the targets of a previously defined execution.

Request Body required
    condition object

    Defines the condition type and content of the condition for execution.

    request object

    Condition-type to execute if a request on the defined API point happens.

    method string

    Possible values: non-empty and <= 1000 characters

    GRPC-method as condition.

    service string

    Possible values: non-empty and <= 1000 characters

    GRPC-service as condition.

    all boolean

    All calls to any available service and endpoint as condition.

    response object

    Condition-type to execute on response if a request on the defined API point happens.

    method string

    Possible values: non-empty and <= 1000 characters

    GRPC-method as condition.

    service string

    Possible values: non-empty and <= 1000 characters

    GRPC-service as condition.

    all boolean

    All calls to any available service and endpoint as condition.

    function object

    Condition-type to execute if function is used, replaces actions v1.

    name string
    event object

    Condition-type to execute if an event is created in the system.

    event string

    Possible values: non-empty and <= 1000 characters

    Event name as condition.

    group string

    Possible values: non-empty and <= 1000 characters

    Event group as condition, all events under this group.

    all boolean

    all events as condition.

    targets object[]

    Ordered list of targets/includes called during the execution.

  • Array [
  • target string

    Unique identifier of existing target to call.

    include object

    Unique identifier of existing execution to include targets of.

    request object

    Condition-type to execute if a request on the defined API point happens.

    method string

    Possible values: non-empty and <= 1000 characters

    GRPC-method as condition.

    service string

    Possible values: non-empty and <= 1000 characters

    GRPC-service as condition.

    all boolean

    All calls to any available service and endpoint as condition.

    response object

    Condition-type to execute on response if a request on the defined API point happens.

    method string

    Possible values: non-empty and <= 1000 characters

    GRPC-method as condition.

    service string

    Possible values: non-empty and <= 1000 characters

    GRPC-service as condition.

    all boolean

    All calls to any available service and endpoint as condition.

    function object

    Condition-type to execute if function is used, replaces actions v1.

    name string
    event object

    Condition-type to execute if an event is created in the system.

    event string

    Possible values: non-empty and <= 1000 characters

    Event name as condition.

    group string

    Possible values: non-empty and <= 1000 characters

    Event group as condition, all events under this group.

    all boolean

    all events as condition.

  • ]
Responses

Execution successfully set


Schema
    details object

    Details provide some base information (such as the last change date) of the execution.

    sequence uint64

    on read: the sequence of the last event reduced by the projection

    on manipulation: the timestamp of the event(s) added by the manipulation

    changeDate date-time

    on read: the timestamp of the last event reduced by the projection

    on manipulation: the timestamp of the event(s) added by the manipulation

    resourceOwner resource_owner is the organization or instance_id an object belongs to
PUT /v3alpha/executions

Authorization

name: OAuth2type: oauth2scopes: openid,urn:zitadel:iam:org:project:id:zitadel:audflows: {
  "authorizationCode": {
    "authorizationUrl": "$CUSTOM-DOMAIN/oauth/v2/authorize",
    "tokenUrl": "$CUSTOM-DOMAIN/oauth/v2/token",
    "scopes": {
      "openid": "openid",
      "urn:zitadel:iam:org:project:id:zitadel:aud": "urn:zitadel:iam:org:project:id:zitadel:aud"
    }
  }
}

Request

Base URL
https://$CUSTOM-DOMAIN
Bearer Token
Content-Type
Body required
{
"condition": {
"request": {
"method": "/zitadel.session.v2beta.SessionService/ListSessions",
"service": "zitadel.session.v2beta.SessionService",
"all": true
},
"response": {
"method": "/zitadel.session.v2beta.SessionService/ListSessions",
"service": "zitadel.session.v2beta.SessionService",
"all": true
},
"function": {
"name": "string"
},
"event": {
"event": "user.human.added",
"group": "user.human",
"all": true
}
},
"targets": [
{
"target": "string",
"include": {
"request": {
"method": "/zitadel.session.v2beta.SessionService/ListSessions",
"service": "zitadel.session.v2beta.SessionService",
"all": true
},
"response": {
"method": "/zitadel.session.v2beta.SessionService/ListSessions",
"service": "zitadel.session.v2beta.SessionService",
"all": true
},
"function": {
"name": "string"
},
"event": {
"event": "user.human.added",
"group": "user.human",
"all": true
}
}
}
]
}
Accept
curl / cURL
curl -L -X PUT 'https://$CUSTOM-DOMAIN/v3alpha/executions' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
--data-raw '{
"condition": {
"request": {
"method": "/zitadel.session.v2beta.SessionService/ListSessions",
"service": "zitadel.session.v2beta.SessionService",
"all": true
},
"response": {
"method": "/zitadel.session.v2beta.SessionService/ListSessions",
"service": "zitadel.session.v2beta.SessionService",
"all": true
},
"function": {
"name": "string"
},
"event": {
"event": "user.human.added",
"group": "user.human",
"all": true
}
},
"targets": [
{
"target": "string",
"include": {
"request": {
"method": "/zitadel.session.v2beta.SessionService/ListSessions",
"service": "zitadel.session.v2beta.SessionService",
"all": true
},
"response": {
"method": "/zitadel.session.v2beta.SessionService/ListSessions",
"service": "zitadel.session.v2beta.SessionService",
"all": true
},
"function": {
"name": "string"
},
"event": {
"event": "user.human.added",
"group": "user.human",
"all": true
}
}
}
]
}'