Create a target​
Create a new target, which can be used in executions.
Request Body required
Possible values: non-empty
and <= 200 characters
Unique name of the target.
restWebhook object
restCall object
Call is executed in parallel to others, ZITADEL does not wait until the call is finished. The state is ignored, call is sent as post.
Timeout defines the duration until ZITADEL cancels the execution.
Possible values: non-empty
and <= 1000 characters
Request Body required
Possible values: non-empty
and <= 200 characters
Unique name of the target.
restWebhook object
restCall object
Call is executed in parallel to others, ZITADEL does not wait until the call is finished. The state is ignored, call is sent as post.
Timeout defines the duration until ZITADEL cancels the execution.
Possible values: non-empty
and <= 1000 characters
Request Body required
Possible values: non-empty
and <= 200 characters
Unique name of the target.
restWebhook object
restCall object
Call is executed in parallel to others, ZITADEL does not wait until the call is finished. The state is ignored, call is sent as post.
Timeout defines the duration until ZITADEL cancels the execution.
Possible values: non-empty
and <= 1000 characters
- 200
- 201
- 403
- 404
- default
A successful response.
Schema
ID is the read-only unique identifier of the target.
details object
{
"id": "string",
"details": {
"sequence": "2",
"changeDate": "2024-05-10T13:32:03.304Z",
"resourceOwner": "69629023906488334"
}
}
Schema
ID is the read-only unique identifier of the target.
details object
{
"id": "string",
"details": {
"sequence": "2",
"changeDate": "2024-05-10T13:32:03.304Z",
"resourceOwner": "69629023906488334"
}
}
Schema
ID is the read-only unique identifier of the target.
details object
{
"id": "string",
"details": {
"sequence": "2",
"changeDate": "2024-05-10T13:32:03.304Z",
"resourceOwner": "69629023906488334"
}
}
Target successfully created
Schema
ID is the read-only unique identifier of the target.
details object
{
"id": "string",
"details": {
"sequence": "2",
"changeDate": "2024-05-10T13:32:03.305Z",
"resourceOwner": "69629023906488334"
}
}
Schema
ID is the read-only unique identifier of the target.
details object
{
"id": "string",
"details": {
"sequence": "2",
"changeDate": "2024-05-10T13:32:03.305Z",
"resourceOwner": "69629023906488334"
}
}
Schema
ID is the read-only unique identifier of the target.
details object
{
"id": "string",
"details": {
"sequence": "2",
"changeDate": "2024-05-10T13:32:03.305Z",
"resourceOwner": "69629023906488334"
}
}
Returned when the user does not have permission to access the resource.
Schema
details object[]
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}
Schema
details object[]
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}
Schema
details object[]
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}
Returned when the resource does not exist.
Schema
details object[]
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}
Schema
details object[]
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}
Schema
details object[]
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}
An unexpected error response.
Schema
details object[]
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}
Schema
details object[]
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}
Schema
details object[]
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}
POST /v3alpha/targets
Authorization
name: OAuth2type: oauth2scopes:openid,urn:zitadel:iam:org:project:id:zitadel:aud
flows: { "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
Request
curl -L -X POST 'https://$CUSTOM-DOMAIN/v3alpha/targets' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
--data-raw '{
"name": "ip_allow_list",
"restWebhook": {
"interruptOnError": true
},
"restCall": {
"interruptOnError": true
},
"restAsync": {},
"timeout": "10s",
"endpoint": "https://example.com/hooks/ip_check"
}'
curl -L -X POST 'https://$CUSTOM-DOMAIN/v3alpha/targets' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
--data-raw '{
"name": "ip_allow_list",
"restWebhook": {
"interruptOnError": true
},
"restCall": {
"interruptOnError": true
},
"restAsync": {},
"timeout": "10s",
"endpoint": "https://example.com/hooks/ip_check"
}'
curl -L -X POST 'https://$CUSTOM-DOMAIN/v3alpha/targets' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
--data-raw '{
"name": "ip_allow_list",
"restWebhook": {
"interruptOnError": true
},
"restCall": {
"interruptOnError": true
},
"restAsync": {},
"timeout": "10s",
"endpoint": "https://example.com/hooks/ip_check"
}'
curl -L -X POST 'https://$CUSTOM-DOMAIN/v3alpha/targets' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
--data-raw '{
"name": "ip_allow_list",
"restWebhook": {
"interruptOnError": true
},
"restCall": {
"interruptOnError": true
},
"restAsync": {},
"timeout": "10s",
"endpoint": "https://example.com/hooks/ip_check"
}'
curl -L -X POST 'https://$CUSTOM-DOMAIN/v3alpha/targets' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
--data-raw '{
"name": "ip_allow_list",
"restWebhook": {
"interruptOnError": true
},
"restCall": {
"interruptOnError": true
},
"restAsync": {},
"timeout": "10s",
"endpoint": "https://example.com/hooks/ip_check"
}'
curl -L -X POST 'https://$CUSTOM-DOMAIN/v3alpha/targets' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
--data-raw '{
"name": "ip_allow_list",
"restWebhook": {
"interruptOnError": true
},
"restCall": {
"interruptOnError": true
},
"restAsync": {},
"timeout": "10s",
"endpoint": "https://example.com/hooks/ip_check"
}'
curl -L -X POST 'https://$CUSTOM-DOMAIN/v3alpha/targets' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
--data-raw '{
"name": "ip_allow_list",
"restWebhook": {
"interruptOnError": true
},
"restCall": {
"interruptOnError": true
},
"restAsync": {},
"timeout": "10s",
"endpoint": "https://example.com/hooks/ip_check"
}'
curl -L -X POST 'https://$CUSTOM-DOMAIN/v3alpha/targets' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
--data-raw '{
"name": "ip_allow_list",
"restWebhook": {
"interruptOnError": true
},
"restCall": {
"interruptOnError": true
},
"restAsync": {},
"timeout": "10s",
"endpoint": "https://example.com/hooks/ip_check"
}'
curl -L -X POST 'https://$CUSTOM-DOMAIN/v3alpha/targets' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
--data-raw '{
"name": "ip_allow_list",
"restWebhook": {
"interruptOnError": true
},
"restCall": {
"interruptOnError": true
},
"restAsync": {},
"timeout": "10s",
"endpoint": "https://example.com/hooks/ip_check"
}'