mirror of
https://github.com/andwati/zitadel.git
synced 2026-12-02 08:58:52 +00:00
fix(doc): update actions v2 examples (#11017)
# Which Problems Are Solved This PR fixes the examples used in the actions v2 docs. # How the Problems Are Solved * By fixing the actions v2 import path used in the example # Additional Changes * Use actions v2 instead of actions v2beta in the examples * Use v2 `CreateUser` instead of v2beta `AddHumanUser` in `request-manipulation` example # Additional Context - Follow up for https://github.com/zitadel/zitadel-go/issues/523
This commit is contained in:
@@ -74,7 +74,7 @@ target can be created as follows:
|
|||||||
See [Create a target](/apis/resources/action_service_v2/action-service-create-target) for more detailed information.
|
See [Create a target](/apis/resources/action_service_v2/action-service-create-target) for more detailed information.
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
curl -L -X POST 'https://$CUSTOM-DOMAIN/v2beta/actions/targets' \
|
curl -L -X POST 'https://$CUSTOM-DOMAIN/v2/actions/targets' \
|
||||||
-H 'Content-Type: application/json' \
|
-H 'Content-Type: application/json' \
|
||||||
-H 'Accept: application/json' \
|
-H 'Accept: application/json' \
|
||||||
-H 'Authorization: Bearer <TOKEN>' \
|
-H 'Authorization: Bearer <TOKEN>' \
|
||||||
@@ -98,7 +98,7 @@ condition.
|
|||||||
See [Set an execution](/apis/resources/action_service_v2/action-service-set-execution) for more detailed information.
|
See [Set an execution](/apis/resources/action_service_v2/action-service-set-execution) for more detailed information.
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
curl -L -X PUT 'https://$CUSTOM-DOMAIN/v2beta/actions/executions' \
|
curl -L -X PUT 'https://$CUSTOM-DOMAIN/v2/actions/executions' \
|
||||||
-H 'Content-Type: application/json' \
|
-H 'Content-Type: application/json' \
|
||||||
-H 'Accept: application/json' \
|
-H 'Accept: application/json' \
|
||||||
-H 'Authorization: Bearer <TOKEN>' \
|
-H 'Authorization: Bearer <TOKEN>' \
|
||||||
|
|||||||
@@ -100,7 +100,7 @@ As you see in the example above the target is created with HTTP and port '8090'
|
|||||||
See [Create a target](/apis/resources/action_service_v2/action-service-create-target) for more detailed information.
|
See [Create a target](/apis/resources/action_service_v2/action-service-create-target) for more detailed information.
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
curl -L -X POST 'https://$CUSTOM-DOMAIN/v2beta/actions/targets' \
|
curl -L -X POST 'https://$CUSTOM-DOMAIN/v2/actions/targets' \
|
||||||
-H 'Content-Type: application/json' \
|
-H 'Content-Type: application/json' \
|
||||||
-H 'Accept: application/json' \
|
-H 'Accept: application/json' \
|
||||||
-H 'Authorization: Bearer <TOKEN>' \
|
-H 'Authorization: Bearer <TOKEN>' \
|
||||||
@@ -124,7 +124,7 @@ condition.
|
|||||||
See [Set an execution](/apis/resources/action_service_v2/action-service-set-execution) for more detailed information.
|
See [Set an execution](/apis/resources/action_service_v2/action-service-set-execution) for more detailed information.
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
curl -L -X PUT 'https://$CUSTOM-DOMAIN/v2beta/actions/executions' \
|
curl -L -X PUT 'https://$CUSTOM-DOMAIN/v2/actions/executions' \
|
||||||
-H 'Content-Type: application/json' \
|
-H 'Content-Type: application/json' \
|
||||||
-H 'Accept: application/json' \
|
-H 'Accept: application/json' \
|
||||||
-H 'Authorization: Bearer <TOKEN>' \
|
-H 'Authorization: Bearer <TOKEN>' \
|
||||||
|
|||||||
@@ -78,7 +78,7 @@ As you see in the example above the target is created with HTTP and port '8090'
|
|||||||
See [Create a target](/apis/resources/action_service_v2/action-service-create-target) for more detailed information.
|
See [Create a target](/apis/resources/action_service_v2/action-service-create-target) for more detailed information.
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
curl -L -X POST 'https://$CUSTOM-DOMAIN/v2beta/actions/targets' \
|
curl -L -X POST 'https://$CUSTOM-DOMAIN/v2/actions/targets' \
|
||||||
-H 'Content-Type: application/json' \
|
-H 'Content-Type: application/json' \
|
||||||
-H 'Accept: application/json' \
|
-H 'Accept: application/json' \
|
||||||
-H 'Authorization: Bearer <TOKEN>' \
|
-H 'Authorization: Bearer <TOKEN>' \
|
||||||
@@ -102,7 +102,7 @@ condition.
|
|||||||
See [Set an execution](/apis/resources/action_service_v2/action-service-set-execution) for more detailed information.
|
See [Set an execution](/apis/resources/action_service_v2/action-service-set-execution) for more detailed information.
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
curl -L -X PUT 'https://$CUSTOM-DOMAIN/v2beta/actions/executions' \
|
curl -L -X PUT 'https://$CUSTOM-DOMAIN/v2/actions/executions' \
|
||||||
-H 'Content-Type: application/json' \
|
-H 'Content-Type: application/json' \
|
||||||
-H 'Accept: application/json' \
|
-H 'Accept: application/json' \
|
||||||
-H 'Authorization: Bearer <TOKEN>' \
|
-H 'Authorization: Bearer <TOKEN>' \
|
||||||
|
|||||||
@@ -46,15 +46,15 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
type contextRequest struct {
|
type contextRequest struct {
|
||||||
Request *addHumanUserRequestWrapper `json:"request"`
|
Request *createUserRequestWrapper `json:"request"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// addHumanUserRequestWrapper necessary to marshal and unmarshal the JSON into the proto message correctly
|
// createUserRequestWrapper necessary to marshal and unmarshal the JSON into the proto message correctly
|
||||||
type addHumanUserRequestWrapper struct {
|
type createUserRequestWrapper struct {
|
||||||
user.AddHumanUserRequest
|
user.CreateUserRequest
|
||||||
}
|
}
|
||||||
|
|
||||||
func (r *addHumanUserRequestWrapper) MarshalJSON() ([]byte, error) {
|
func (r *createUserRequestWrapper) MarshalJSON() ([]byte, error) {
|
||||||
data, err := protojson.Marshal(r)
|
data, err := protojson.Marshal(r)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
@@ -62,7 +62,7 @@ func (r *addHumanUserRequestWrapper) MarshalJSON() ([]byte, error) {
|
|||||||
return data, nil
|
return data, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (r *addHumanUserRequestWrapper) UnmarshalJSON(data []byte) error {
|
func (r *createUserRequestWrapper) UnmarshalJSON(data []byte) error {
|
||||||
return protojson.Unmarshal(data, r)
|
return protojson.Unmarshal(data, r)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -86,10 +86,13 @@ func call(w http.ResponseWriter, req *http.Request) {
|
|||||||
// build the response from the received request
|
// build the response from the received request
|
||||||
response := request.Request
|
response := request.Request
|
||||||
// manipulate the request to send back as response
|
// manipulate the request to send back as response
|
||||||
if response.Metadata == nil {
|
metadata := response.GetHuman().GetMetadata()
|
||||||
response.Metadata = make([]*user.SetMetadataEntry, 0)
|
if metadata == nil {
|
||||||
|
metadata = make([]*user.Metadata, 0)
|
||||||
}
|
}
|
||||||
response.Metadata = append(response.Metadata, &user.SetMetadataEntry{Key: "organization", Value: []byte("company")})
|
metadata = append(metadata, &user.Metadata{Key: "organization", Value: []byte("dunder mifflin")})
|
||||||
|
|
||||||
|
response.GetHuman().Metadata = metadata
|
||||||
|
|
||||||
// marshal the request into json
|
// marshal the request into json
|
||||||
data, err := json.Marshal(response)
|
data, err := json.Marshal(response)
|
||||||
@@ -126,7 +129,7 @@ As you see in the example above the target is created with HTTP and port '8090'
|
|||||||
See [Create a target](/apis/resources/action_service_v2/action-service-create-target) for more detailed information.
|
See [Create a target](/apis/resources/action_service_v2/action-service-create-target) for more detailed information.
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
curl -L -X POST 'https://$CUSTOM-DOMAIN/v2beta/actions/targets' \
|
curl -L -X POST 'https://$CUSTOM-DOMAIN/v2/actions/targets' \
|
||||||
-H 'Content-Type: application/json' \
|
-H 'Content-Type: application/json' \
|
||||||
-H 'Accept: application/json' \
|
-H 'Accept: application/json' \
|
||||||
-H 'Authorization: Bearer <TOKEN>' \
|
-H 'Authorization: Bearer <TOKEN>' \
|
||||||
@@ -149,7 +152,7 @@ To call the target just created before, with the intention to manipulate the req
|
|||||||
See [Set an execution](/apis/resources/action_service_v2/action-service-set-execution) for more detailed information.
|
See [Set an execution](/apis/resources/action_service_v2/action-service-set-execution) for more detailed information.
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
curl -L -X PUT 'https://$CUSTOM-DOMAIN/v2beta/actions/executions' \
|
curl -L -X PUT 'https://$CUSTOM-DOMAIN/v2/actions/executions' \
|
||||||
-H 'Content-Type: application/json' \
|
-H 'Content-Type: application/json' \
|
||||||
-H 'Accept: application/json' \
|
-H 'Accept: application/json' \
|
||||||
-H 'Authorization: Bearer <TOKEN>' \
|
-H 'Authorization: Bearer <TOKEN>' \
|
||||||
@@ -176,7 +179,7 @@ curl -L -X POST 'https://$CUSTOM-DOMAIN/v2/users/new' \
|
|||||||
-H 'Accept: application/json' \
|
-H 'Accept: application/json' \
|
||||||
-H 'Authorization: Bearer <TOKEN>' \
|
-H 'Authorization: Bearer <TOKEN>' \
|
||||||
--data-raw '{
|
--data-raw '{
|
||||||
"organizationId": "336392597046099971",
|
"organizationId": "344648897353810062",
|
||||||
"human":
|
"human":
|
||||||
{
|
{
|
||||||
"profile":
|
"profile":
|
||||||
@@ -205,7 +208,7 @@ curl -L -X PUT 'https://$CUSTOM-DOMAIN/v2/users/new' \
|
|||||||
-H 'Accept: application/json' \
|
-H 'Accept: application/json' \
|
||||||
-H 'Authorization: Bearer <TOKEN>' \
|
-H 'Authorization: Bearer <TOKEN>' \
|
||||||
--data-raw '{
|
--data-raw '{
|
||||||
"organizationId": "336392597046099971",
|
"organizationId": "344648897353810062",
|
||||||
"human":
|
"human":
|
||||||
{
|
{
|
||||||
"profile":
|
"profile":
|
||||||
@@ -220,11 +223,15 @@ curl -L -X PUT 'https://$CUSTOM-DOMAIN/v2/users/new' \
|
|||||||
"email":
|
"email":
|
||||||
{
|
{
|
||||||
"email": "[email protected]"
|
"email": "[email protected]"
|
||||||
}
|
},
|
||||||
|
"metadata":
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"key": "organization",
|
||||||
|
"value": "ZHVuZGVyIG1pZmZsaW4="
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
"metadata": [
|
|
||||||
{"key": "organization", "value": "Y29tcGFueQ=="}
|
|
||||||
]
|
|
||||||
}'
|
}'
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
@@ -38,10 +38,10 @@ import (
|
|||||||
"io"
|
"io"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"github.com/zitadel/zitadel/pkg/actions"
|
"github.com/zitadel/zitadel-go/v3/pkg/actions"
|
||||||
)
|
)
|
||||||
|
|
||||||
const signingKey = "somekey"
|
const signingKey = "somekey" // signing key received after creating the target
|
||||||
|
|
||||||
// webhook HandleFunc to read the request body and then print out the contents
|
// webhook HandleFunc to read the request body and then print out the contents
|
||||||
func webhook(w http.ResponseWriter, req *http.Request) {
|
func webhook(w http.ResponseWriter, req *http.Request) {
|
||||||
@@ -54,7 +54,7 @@ func webhook(w http.ResponseWriter, req *http.Request) {
|
|||||||
}
|
}
|
||||||
defer req.Body.Close()
|
defer req.Body.Close()
|
||||||
// validate signature
|
// validate signature
|
||||||
if err := actions.ValidatePayload(sentBody, req.Header.Get(actions.SigningHeader), signingKey); err != nil {
|
if err := actions.ValidateRequestPayload(sentBody, &req.Header, signingKey); err != nil {
|
||||||
// if the signed content is not equal the sent content return an error
|
// if the signed content is not equal the sent content return an error
|
||||||
http.Error(w, "error", http.StatusInternalServerError)
|
http.Error(w, "error", http.StatusInternalServerError)
|
||||||
return
|
return
|
||||||
@@ -85,7 +85,7 @@ As you see in the example above the target is created with HTTP and port '8090'
|
|||||||
See [Create a target](/apis/resources/action_service_v2/action-service-create-target) for more detailed information.
|
See [Create a target](/apis/resources/action_service_v2/action-service-create-target) for more detailed information.
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
curl -L -X POST 'https://$CUSTOM-DOMAIN/v2beta/actions/targets' \
|
curl -L -X POST 'https://$CUSTOM-DOMAIN/v2/actions/targets' \
|
||||||
-H 'Content-Type: application/json' \
|
-H 'Content-Type: application/json' \
|
||||||
-H 'Accept: application/json' \
|
-H 'Accept: application/json' \
|
||||||
-H 'Authorization: Bearer <TOKEN>' \
|
-H 'Authorization: Bearer <TOKEN>' \
|
||||||
@@ -99,7 +99,15 @@ curl -L -X POST 'https://$CUSTOM-DOMAIN/v2beta/actions/targets' \
|
|||||||
}'
|
}'
|
||||||
```
|
```
|
||||||
|
|
||||||
Save the returned ID to set in the execution.
|
Example response after creating the target:
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"id": "344649040681500814",
|
||||||
|
"creationDate": "2025-10-31T15:00:36.432595dZ",
|
||||||
|
"signingKey": "somekey"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
Save the returned ID to set in the execution. Use the `signingKey` to validate the request signature.
|
||||||
|
|
||||||
## Set execution
|
## Set execution
|
||||||
|
|
||||||
@@ -109,7 +117,7 @@ condition.
|
|||||||
See [Set an execution](/apis/resources/action_service_v2/action-service-set-execution) for more detailed information.
|
See [Set an execution](/apis/resources/action_service_v2/action-service-set-execution) for more detailed information.
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
curl -L -X PUT 'https://$CUSTOM-DOMAIN/v2beta/actions/executions' \
|
curl -L -X PUT 'https://$CUSTOM-DOMAIN/v2/actions/executions' \
|
||||||
-H 'Content-Type: application/json' \
|
-H 'Content-Type: application/json' \
|
||||||
-H 'Accept: application/json' \
|
-H 'Accept: application/json' \
|
||||||
-H 'Authorization: Bearer <TOKEN>' \
|
-H 'Authorization: Bearer <TOKEN>' \
|
||||||
@@ -131,12 +139,12 @@ Now that you have set up the target and execution, you can test it by creating a
|
|||||||
by calling the ZITADEL API to create a human user.
|
by calling the ZITADEL API to create a human user.
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
curl -L -X PUT 'https://$CUSTOM-DOMAIN/v2/users/new' \
|
curl -L -X POST 'https://$CUSTOM-DOMAIN/v2/users/new' \
|
||||||
-H 'Content-Type: application/json' \
|
-H 'Content-Type: application/json' \
|
||||||
-H 'Accept: application/json' \
|
-H 'Accept: application/json' \
|
||||||
-H 'Authorization: Bearer <TOKEN>' \
|
-H 'Authorization: Bearer <TOKEN>' \
|
||||||
--data-raw '{
|
--data-raw '{
|
||||||
"organizationId": "336392597046099971",
|
"organizationId": "344648897353810062",
|
||||||
"human":
|
"human":
|
||||||
{
|
{
|
||||||
"profile":
|
"profile":
|
||||||
@@ -150,7 +158,7 @@ curl -L -X PUT 'https://$CUSTOM-DOMAIN/v2/users/new' \
|
|||||||
},
|
},
|
||||||
"email":
|
"email":
|
||||||
{
|
{
|
||||||
"email": "[email protected]"
|
"email": "mini+test@mouse.com"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}'
|
}'
|
||||||
@@ -161,46 +169,50 @@ the [Sent information Request](./usage#sent-information-request) payload descrip
|
|||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"fullMethod": "/zitadel.user.v2.UserService/CreateUser",
|
"fullMethod": "/zitadel.user.v2.UserService/CreateUser",
|
||||||
"instanceID": "336392597046034435",
|
"instanceID": "344648897353744526",
|
||||||
"orgID": "336392597046099971",
|
"orgID": "344648897353810062",
|
||||||
"projectID": "336392597046165507",
|
"projectID": "344648897353875598",
|
||||||
"userID": "336392597046755331",
|
"userID": "344648897354465422",
|
||||||
"request":
|
"request":
|
||||||
|
{
|
||||||
|
"organizationId": "344648897353810062",
|
||||||
|
"human":
|
||||||
{
|
{
|
||||||
"organizationId": "336392597046099971",
|
"profile":
|
||||||
"human":
|
{
|
||||||
{
|
"givenName": "Minnie",
|
||||||
"profile":
|
"familyName": "Mouse",
|
||||||
{
|
"nickName": "Mini",
|
||||||
"givenName": "Minnie",
|
"displayName": "Minnie Mouse",
|
||||||
"familyName": "Mouse",
|
"preferredLanguage": "en",
|
||||||
"nickName": "Mini",
|
"gender": "GENDER_FEMALE"
|
||||||
"displayName": "Minnie Mouse",
|
},
|
||||||
"preferredLanguage": "en",
|
"email":
|
||||||
"gender": "GENDER_FEMALE"
|
{
|
||||||
},
|
"email": "[email protected]"
|
||||||
"email":
|
}
|
||||||
{
|
|
||||||
"email": "[email protected]"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"headers":
|
|
||||||
{
|
|
||||||
"Content-Type":
|
|
||||||
[
|
|
||||||
"application/grpc"
|
|
||||||
],
|
|
||||||
"Host":
|
|
||||||
[
|
|
||||||
"localhost:8080"
|
|
||||||
],
|
|
||||||
"X-Forwarded-Host":
|
|
||||||
[
|
|
||||||
"localhost:8080"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"headers":
|
||||||
|
{
|
||||||
|
"Content-Type":
|
||||||
|
[
|
||||||
|
"application/grpc"
|
||||||
|
],
|
||||||
|
"Host":
|
||||||
|
[
|
||||||
|
"localhost:8080"
|
||||||
|
],
|
||||||
|
"X-Forwarded-For":
|
||||||
|
[
|
||||||
|
"::1"
|
||||||
|
],
|
||||||
|
"X-Forwarded-Host":
|
||||||
|
[
|
||||||
|
"localhost:8080"
|
||||||
|
]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
@@ -78,7 +78,7 @@ As you see in the example above the target is created with HTTP and port '8090'
|
|||||||
See [Create a target](/apis/resources/action_service_v2/action-service-create-target) for more detailed information.
|
See [Create a target](/apis/resources/action_service_v2/action-service-create-target) for more detailed information.
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
curl -L -X POST 'https://$CUSTOM-DOMAIN/v2beta/actions/targets' \
|
curl -L -X POST 'https://$CUSTOM-DOMAIN/v2/actions/targets' \
|
||||||
-H 'Content-Type: application/json' \
|
-H 'Content-Type: application/json' \
|
||||||
-H 'Accept: application/json' \
|
-H 'Accept: application/json' \
|
||||||
-H 'Authorization: Bearer <TOKEN>' \
|
-H 'Authorization: Bearer <TOKEN>' \
|
||||||
@@ -102,7 +102,7 @@ condition.
|
|||||||
See [Set an execution](/apis/resources/action_service_v2/action-service-set-execution) for more detailed information.
|
See [Set an execution](/apis/resources/action_service_v2/action-service-set-execution) for more detailed information.
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
curl -L -X PUT 'https://$CUSTOM-DOMAIN/v2beta/actions/executions' \
|
curl -L -X PUT 'https://$CUSTOM-DOMAIN/v2/actions/executions' \
|
||||||
-H 'Content-Type: application/json' \
|
-H 'Content-Type: application/json' \
|
||||||
-H 'Accept: application/json' \
|
-H 'Accept: application/json' \
|
||||||
-H 'Authorization: Bearer <TOKEN>' \
|
-H 'Authorization: Bearer <TOKEN>' \
|
||||||
@@ -129,7 +129,7 @@ curl -L -X POST 'https://$CUSTOM-DOMAIN/v2/users/new' \
|
|||||||
-H 'Accept: application/json' \
|
-H 'Accept: application/json' \
|
||||||
-H 'Authorization: Bearer <TOKEN>' \
|
-H 'Authorization: Bearer <TOKEN>' \
|
||||||
--data-raw '{
|
--data-raw '{
|
||||||
"organizationId": "336392597046099971",
|
"organizationId": "344648897353810062",
|
||||||
"human":
|
"human":
|
||||||
{
|
{
|
||||||
"profile":
|
"profile":
|
||||||
@@ -143,7 +143,7 @@ curl -L -X POST 'https://$CUSTOM-DOMAIN/v2/users/new' \
|
|||||||
},
|
},
|
||||||
"email":
|
"email":
|
||||||
{
|
{
|
||||||
"email": "[email protected]"
|
"email": "mini+test@mouse.com"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}'
|
}'
|
||||||
@@ -155,46 +155,50 @@ The incoming request headers to the Execution are propagated via the request pay
|
|||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"fullMethod": "/zitadel.user.v2.UserService/CreateUser",
|
"fullMethod": "/zitadel.user.v2.UserService/CreateUser",
|
||||||
"instanceID": "336392597046034435",
|
"instanceID": "344648897353744526",
|
||||||
"orgID": "336392597046099971",
|
"orgID": "344648897353810062",
|
||||||
"projectID": "336392597046165507",
|
"projectID": "344648897353875598",
|
||||||
"userID": "336392597046755331",
|
"userID": "344648897354465422",
|
||||||
"request":
|
"request":
|
||||||
|
{
|
||||||
|
"organizationId": "344648897353810062",
|
||||||
|
"human":
|
||||||
{
|
{
|
||||||
"organizationId": "336392597046099971",
|
"profile":
|
||||||
"human":
|
{
|
||||||
{
|
"givenName": "Minnie",
|
||||||
"profile":
|
"familyName": "Mouse",
|
||||||
{
|
"nickName": "Mini",
|
||||||
"givenName": "Minnie",
|
"displayName": "Minnie Mouse",
|
||||||
"familyName": "Mouse",
|
"preferredLanguage": "en",
|
||||||
"nickName": "Mini",
|
"gender": "GENDER_FEMALE"
|
||||||
"displayName": "Minnie Mouse",
|
},
|
||||||
"preferredLanguage": "en",
|
"email":
|
||||||
"gender": "GENDER_FEMALE"
|
{
|
||||||
},
|
"email": "[email protected]"
|
||||||
"email":
|
}
|
||||||
{
|
|
||||||
"email": "[email protected]"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"headers":
|
|
||||||
{
|
|
||||||
"Content-Type":
|
|
||||||
[
|
|
||||||
"application/grpc"
|
|
||||||
],
|
|
||||||
"Host":
|
|
||||||
[
|
|
||||||
"localhost:8080"
|
|
||||||
],
|
|
||||||
"X-Forwarded-Host":
|
|
||||||
[
|
|
||||||
"localhost:8080"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"headers":
|
||||||
|
{
|
||||||
|
"Content-Type":
|
||||||
|
[
|
||||||
|
"application/grpc"
|
||||||
|
],
|
||||||
|
"Host":
|
||||||
|
[
|
||||||
|
"localhost:8080"
|
||||||
|
],
|
||||||
|
"X-Forwarded-For":
|
||||||
|
[
|
||||||
|
"::1"
|
||||||
|
],
|
||||||
|
"X-Forwarded-Host":
|
||||||
|
[
|
||||||
|
"localhost:8080"
|
||||||
|
]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
@@ -144,7 +144,7 @@ target can be created as follows:
|
|||||||
See [Create a target](/apis/resources/action_service_v2/action-service-create-target) for more detailed information.
|
See [Create a target](/apis/resources/action_service_v2/action-service-create-target) for more detailed information.
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
curl -L -X POST 'https://$CUSTOM-DOMAIN/v2beta/actions/targets' \
|
curl -L -X POST 'https://$CUSTOM-DOMAIN/v2/actions/targets' \
|
||||||
-H 'Content-Type: application/json' \
|
-H 'Content-Type: application/json' \
|
||||||
-H 'Accept: application/json' \
|
-H 'Accept: application/json' \
|
||||||
-H 'Authorization: Bearer <TOKEN>' \
|
-H 'Authorization: Bearer <TOKEN>' \
|
||||||
@@ -168,7 +168,7 @@ we define an execution with a response condition.
|
|||||||
See [Set an execution](/apis/resources/action_service_v2/action-service-set-execution) for more detailed information.
|
See [Set an execution](/apis/resources/action_service_v2/action-service-set-execution) for more detailed information.
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
curl -L -X PUT 'https://$CUSTOM-DOMAIN/v2beta/actions/executions' \
|
curl -L -X PUT 'https://$CUSTOM-DOMAIN/v2/actions/executions' \
|
||||||
-H 'Content-Type: application/json' \
|
-H 'Content-Type: application/json' \
|
||||||
-H 'Accept: application/json' \
|
-H 'Accept: application/json' \
|
||||||
-H 'Authorization: Bearer <TOKEN>' \
|
-H 'Authorization: Bearer <TOKEN>' \
|
||||||
|
|||||||
@@ -78,7 +78,7 @@ As you see in the example above the target is created with HTTP and port '8090'
|
|||||||
See [Create a target](/apis/resources/action_service_v2/action-service-create-target) for more detailed information.
|
See [Create a target](/apis/resources/action_service_v2/action-service-create-target) for more detailed information.
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
curl -L -X POST 'https://$CUSTOM-DOMAIN/v2beta/actions/targets' \
|
curl -L -X POST 'https://$CUSTOM-DOMAIN/v2/actions/targets' \
|
||||||
-H 'Content-Type: application/json' \
|
-H 'Content-Type: application/json' \
|
||||||
-H 'Accept: application/json' \
|
-H 'Accept: application/json' \
|
||||||
-H 'Authorization: Bearer <TOKEN>' \
|
-H 'Authorization: Bearer <TOKEN>' \
|
||||||
@@ -102,7 +102,7 @@ condition.
|
|||||||
See [Set an execution](/apis/resources/action_service_v2/action-service-set-execution) for more detailed information.
|
See [Set an execution](/apis/resources/action_service_v2/action-service-set-execution) for more detailed information.
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
curl -L -X PUT 'https://$CUSTOM-DOMAIN/v2beta/actions/executions' \
|
curl -L -X PUT 'https://$CUSTOM-DOMAIN/v2/actions/executions' \
|
||||||
-H 'Content-Type: application/json' \
|
-H 'Content-Type: application/json' \
|
||||||
-H 'Accept: application/json' \
|
-H 'Accept: application/json' \
|
||||||
-H 'Authorization: Bearer <TOKEN>' \
|
-H 'Authorization: Bearer <TOKEN>' \
|
||||||
@@ -129,7 +129,7 @@ curl -L -X POST 'https://$CUSTOM-DOMAIN/v2/users/new' \
|
|||||||
-H 'Accept: application/json' \
|
-H 'Accept: application/json' \
|
||||||
-H 'Authorization: Bearer <TOKEN>' \
|
-H 'Authorization: Bearer <TOKEN>' \
|
||||||
--data-raw '{
|
--data-raw '{
|
||||||
"organizationId": "336392597046099971",
|
"organizationId": "344648897353810062",
|
||||||
"human":
|
"human":
|
||||||
{
|
{
|
||||||
"profile":
|
"profile":
|
||||||
@@ -156,13 +156,13 @@ The incoming request headers to the Execution are propagated via the request pay
|
|||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"fullMethod": "/zitadel.user.v2.UserService/CreateUser",
|
"fullMethod": "/zitadel.user.v2.UserService/CreateUser",
|
||||||
"instanceID": "336392597046034435",
|
"instanceID": "344648897353744526",
|
||||||
"orgID": "336392597046099971",
|
"orgID": "344648897353810062",
|
||||||
"projectID": "336392597046165507",
|
"projectID": "344648897353875598",
|
||||||
"userID": "336392597046755331",
|
"userID": "344648897354465422",
|
||||||
"request":
|
"request":
|
||||||
{
|
{
|
||||||
"organizationId": "336392597046099971",
|
"organizationId": "344648897353810062",
|
||||||
"human":
|
"human":
|
||||||
{
|
{
|
||||||
"profile":
|
"profile":
|
||||||
@@ -195,6 +195,10 @@ The incoming request headers to the Execution are propagated via the request pay
|
|||||||
[
|
[
|
||||||
"localhost:8080"
|
"localhost:8080"
|
||||||
],
|
],
|
||||||
|
"X-Forwarded-For":
|
||||||
|
[
|
||||||
|
"::1"
|
||||||
|
],
|
||||||
"X-Forwarded-Host":
|
"X-Forwarded-Host":
|
||||||
[
|
[
|
||||||
"localhost:8080"
|
"localhost:8080"
|
||||||
|
|||||||
@@ -80,7 +80,7 @@ As shown in the example above, the target is created with HTTP and port '8090'.
|
|||||||
See [Create a target](/apis/resources/action_service_v2/action-service-create-target) for more detailed information. Notice that the `endpoint` is your Webhook.site URL.
|
See [Create a target](/apis/resources/action_service_v2/action-service-create-target) for more detailed information. Notice that the `endpoint` is your Webhook.site URL.
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
curl -L -X POST 'https://$CUSTOM-DOMAIN/v2beta/actions/targets' \
|
curl -L -X POST 'https://$CUSTOM-DOMAIN/v2/actions/targets' \
|
||||||
-H 'Content-Type: application/json' \
|
-H 'Content-Type: application/json' \
|
||||||
-H 'Accept: application/json' \
|
-H 'Accept: application/json' \
|
||||||
-H 'Authorization: Bearer <TOKEN>' \
|
-H 'Authorization: Bearer <TOKEN>' \
|
||||||
@@ -117,7 +117,7 @@ See [Set an execution](/apis/resources/action_service_v2/action-service-set-exec
|
|||||||
Here, `<TargetID returned>` is the `id` from the previous step.
|
Here, `<TargetID returned>` is the `id` from the previous step.
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
curl -L -X PUT 'https://$CUSTOM-DOMAIN/v2beta/actions/executions' \
|
curl -L -X PUT 'https://$CUSTOM-DOMAIN/v2/actions/executions' \
|
||||||
-H 'Content-Type: application/json' \
|
-H 'Content-Type: application/json' \
|
||||||
-H 'Accept: application/json' \
|
-H 'Accept: application/json' \
|
||||||
-H 'Authorization: Bearer <TOKEN>' \
|
-H 'Authorization: Bearer <TOKEN>' \
|
||||||
|
|||||||
Reference in New Issue
Block a user