package example
import (
context "context"
management "github.com/auth0/go-auth0/management/management"
triggers "github.com/auth0/go-auth0/management/management/actions/triggers"
client "github.com/auth0/go-auth0/management/management/client"
option "github.com/auth0/go-auth0/management/management/option"
)
func do() {
client := client.NewClient(
option.WithToken(
"<token>",
),
)
request := &triggers.ListActionTriggerBindingsRequestParameters{
Page: management.Int(
1,
),
PerPage: management.Int(
1,
),
}
client.Actions.Triggers.Bindings.List(
context.TODO(),
"triggerId",
request,
)
}{
"bindings": [
{
"action": {
"all_changes_deployed": false,
"built_at": "2021-01-01T00:00:00.000Z",
"code": "module.exports = () => {}",
"created_at": "2021-01-01T00:00:00.000Z",
"dependencies": [
{
"name": "<string>",
"registry_url": "<string>",
"version": "<string>"
}
],
"deploy": false,
"deployed_version": {
"action": {
"all_changes_deployed": false,
"created_at": "2021-01-01T00:00:00.000Z",
"id": "910b1053-577f-4d81-a8c8-020e7319a38a",
"name": "my-action",
"supported_triggers": [
{
"compatible_triggers": [
{
"version": "<string>"
}
],
"default_runtime": "<string>",
"runtimes": [
"<string>"
],
"status": "<string>",
"version": "<string>"
}
],
"updated_at": "2021-01-01T00:00:00.000Z"
},
"action_id": "910b1053-577f-4d81-a8c8-020e7319a38a",
"built_at": "2021-01-01T00:00:00.000Z",
"code": "module.exports = () => {}",
"created_at": "2021-01-01T00:00:00.000Z",
"dependencies": [
{
"name": "<string>",
"registry_url": "<string>",
"version": "<string>"
}
],
"deployed": true,
"errors": [
{
"id": "<string>",
"msg": "<string>",
"url": "<string>"
}
],
"id": "12a3b9e6-06e6-4a29-96bf-90c82fe79a0d",
"modules": [
{
"module_id": "<string>",
"module_name": "<string>",
"module_version_id": "<string>",
"module_version_number": 123
}
],
"number": 1,
"runtime": "node22",
"secrets": [
{
"name": "mySecret",
"updated_at": "2021-01-01T00:00:00.000Z"
}
],
"status": "built",
"supported_triggers": [
{
"compatible_triggers": [
{
"version": "<string>"
}
],
"default_runtime": "<string>",
"runtimes": [
"<string>"
],
"status": "<string>",
"version": "<string>"
}
],
"updated_at": "2021-01-01T00:00:00.000Z"
},
"id": "910b1053-577f-4d81-a8c8-020e7319a38a",
"installed_integration_id": "7d2bc0c9-c0c2-433a-9f4e-86ef80270aad",
"integration": {
"catalog_id": "awesome-auth0-integration",
"created_at": "2021-06-21T15:47:29.072Z",
"current_release": {
"id": "<string>",
"required_configuration": [
{
"default_value": "<string>",
"description": "<string>",
"label": "<string>",
"name": "<string>",
"optional": true,
"options": [
{
"label": "<string>",
"value": "<string>"
}
],
"placeholder": "<string>",
"required": true
}
],
"required_secrets": [
{
"default_value": "<string>",
"description": "<string>",
"label": "<string>",
"name": "<string>",
"optional": true,
"options": [
{
"label": "<string>",
"value": "<string>"
}
],
"placeholder": "<string>",
"required": true
}
],
"semver": {
"major": 1,
"minor": 1
},
"trigger": {
"compatible_triggers": [
{
"version": "<string>"
}
],
"default_runtime": "<string>",
"runtimes": [
"<string>"
],
"status": "<string>",
"version": "<string>"
}
},
"description": "An awesome Auth0 integration",
"feature_type": "action",
"id": "8e9fe2d0-a2fc-4c8c-9e35-dae5afadb70b",
"logo": "<string>",
"name": "Example Auth0 integration",
"partner_id": "b8575c12-8d9d-4b5c-b28e-671fe9d39029",
"privacy_policy_url": "<string>",
"public_support_link": "<string>",
"short_description": "Awesome Auth0 integration",
"terms_of_use_url": "<string>",
"updated_at": "2021-06-21T15:47:29.072Z",
"url_slug": "awesome-auth0-integration-slug"
},
"modules": [
{
"module_id": "<string>",
"module_name": "<string>",
"module_version_id": "<string>",
"module_version_number": 123
}
],
"name": "my-action",
"runtime": "node22",
"secrets": [
{
"name": "mySecret",
"updated_at": "2021-01-01T00:00:00.000Z"
}
],
"status": "built",
"supported_triggers": [
{
"compatible_triggers": [
{
"version": "<string>"
}
],
"default_runtime": "<string>",
"runtimes": [
"<string>"
],
"status": "<string>",
"version": "<string>"
}
],
"updated_at": "2021-01-01T00:00:00.000Z"
},
"created_at": "2021-01-01T00:00:00.000Z",
"display_name": "my-action-1",
"id": "4a881e22-0562-4178-bc91-b0f2b321dc13",
"updated_at": "2021-01-01T00:00:00.000Z"
}
],
"page": 0,
"per_page": 20,
"total": 1
}Récupérer les associations
Récupérez les actions associées à un déclencheur. Une fois qu’une action est créée et déployée, elle doit être rattachée (c.-à-d. liée) à un déclencheur pour être exécutée dans le cadre d’un flux. La liste des actions renvoyée reflète l’ordre dans lequel elles seront exécutées dans le flux approprié.
package example
import (
context "context"
management "github.com/auth0/go-auth0/management/management"
triggers "github.com/auth0/go-auth0/management/management/actions/triggers"
client "github.com/auth0/go-auth0/management/management/client"
option "github.com/auth0/go-auth0/management/management/option"
)
func do() {
client := client.NewClient(
option.WithToken(
"<token>",
),
)
request := &triggers.ListActionTriggerBindingsRequestParameters{
Page: management.Int(
1,
),
PerPage: management.Int(
1,
),
}
client.Actions.Triggers.Bindings.List(
context.TODO(),
"triggerId",
request,
)
}{
"bindings": [
{
"action": {
"all_changes_deployed": false,
"built_at": "2021-01-01T00:00:00.000Z",
"code": "module.exports = () => {}",
"created_at": "2021-01-01T00:00:00.000Z",
"dependencies": [
{
"name": "<string>",
"registry_url": "<string>",
"version": "<string>"
}
],
"deploy": false,
"deployed_version": {
"action": {
"all_changes_deployed": false,
"created_at": "2021-01-01T00:00:00.000Z",
"id": "910b1053-577f-4d81-a8c8-020e7319a38a",
"name": "my-action",
"supported_triggers": [
{
"compatible_triggers": [
{
"version": "<string>"
}
],
"default_runtime": "<string>",
"runtimes": [
"<string>"
],
"status": "<string>",
"version": "<string>"
}
],
"updated_at": "2021-01-01T00:00:00.000Z"
},
"action_id": "910b1053-577f-4d81-a8c8-020e7319a38a",
"built_at": "2021-01-01T00:00:00.000Z",
"code": "module.exports = () => {}",
"created_at": "2021-01-01T00:00:00.000Z",
"dependencies": [
{
"name": "<string>",
"registry_url": "<string>",
"version": "<string>"
}
],
"deployed": true,
"errors": [
{
"id": "<string>",
"msg": "<string>",
"url": "<string>"
}
],
"id": "12a3b9e6-06e6-4a29-96bf-90c82fe79a0d",
"modules": [
{
"module_id": "<string>",
"module_name": "<string>",
"module_version_id": "<string>",
"module_version_number": 123
}
],
"number": 1,
"runtime": "node22",
"secrets": [
{
"name": "mySecret",
"updated_at": "2021-01-01T00:00:00.000Z"
}
],
"status": "built",
"supported_triggers": [
{
"compatible_triggers": [
{
"version": "<string>"
}
],
"default_runtime": "<string>",
"runtimes": [
"<string>"
],
"status": "<string>",
"version": "<string>"
}
],
"updated_at": "2021-01-01T00:00:00.000Z"
},
"id": "910b1053-577f-4d81-a8c8-020e7319a38a",
"installed_integration_id": "7d2bc0c9-c0c2-433a-9f4e-86ef80270aad",
"integration": {
"catalog_id": "awesome-auth0-integration",
"created_at": "2021-06-21T15:47:29.072Z",
"current_release": {
"id": "<string>",
"required_configuration": [
{
"default_value": "<string>",
"description": "<string>",
"label": "<string>",
"name": "<string>",
"optional": true,
"options": [
{
"label": "<string>",
"value": "<string>"
}
],
"placeholder": "<string>",
"required": true
}
],
"required_secrets": [
{
"default_value": "<string>",
"description": "<string>",
"label": "<string>",
"name": "<string>",
"optional": true,
"options": [
{
"label": "<string>",
"value": "<string>"
}
],
"placeholder": "<string>",
"required": true
}
],
"semver": {
"major": 1,
"minor": 1
},
"trigger": {
"compatible_triggers": [
{
"version": "<string>"
}
],
"default_runtime": "<string>",
"runtimes": [
"<string>"
],
"status": "<string>",
"version": "<string>"
}
},
"description": "An awesome Auth0 integration",
"feature_type": "action",
"id": "8e9fe2d0-a2fc-4c8c-9e35-dae5afadb70b",
"logo": "<string>",
"name": "Example Auth0 integration",
"partner_id": "b8575c12-8d9d-4b5c-b28e-671fe9d39029",
"privacy_policy_url": "<string>",
"public_support_link": "<string>",
"short_description": "Awesome Auth0 integration",
"terms_of_use_url": "<string>",
"updated_at": "2021-06-21T15:47:29.072Z",
"url_slug": "awesome-auth0-integration-slug"
},
"modules": [
{
"module_id": "<string>",
"module_name": "<string>",
"module_version_id": "<string>",
"module_version_number": 123
}
],
"name": "my-action",
"runtime": "node22",
"secrets": [
{
"name": "mySecret",
"updated_at": "2021-01-01T00:00:00.000Z"
}
],
"status": "built",
"supported_triggers": [
{
"compatible_triggers": [
{
"version": "<string>"
}
],
"default_runtime": "<string>",
"runtimes": [
"<string>"
],
"status": "<string>",
"version": "<string>"
}
],
"updated_at": "2021-01-01T00:00:00.000Z"
},
"created_at": "2021-01-01T00:00:00.000Z",
"display_name": "my-action-1",
"id": "4a881e22-0562-4178-bc91-b0f2b321dc13",
"updated_at": "2021-01-01T00:00:00.000Z"
}
],
"page": 0,
"per_page": 20,
"total": 1
}Autorisations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Paramètres de chemin
Un point d’extensibilité d’Actions. Un point d’extensibilité des Actions.
post-login, credentials-exchange, pre-user-registration, post-user-registration, post-change-password, send-phone-message, custom-phone-provider, custom-email-provider, password-reset-post-challenge, custom-token-exchange, event-stream, password-hash-migration, login-post-identifier, signup-post-identifier Paramètres de requête
Utilisez ce champ pour demander une page précise dans la liste de résultats.
Le nombre maximal de résultats renvoyés dans une seule requête. 20 par défaut
Réponse
Les associations ont été récupérées.
La liste des Actions associées à ce déclencheur, dans l’ordre dans lequel elles seront exécutées.
Show child attributes
Show child attributes
Indice de page des résultats renvoyés. La première page est 0.
Nombre de résultats par page.
Le nombre total de résultats.