Go
package example
import (
context "context"
management "github.com/auth0/go-auth0/management/management"
actions "github.com/auth0/go-auth0/management/management/actions"
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 := &actions.ListActionVersionsRequestParameters{
Page: management.Int(
1,
),
PerPage: management.Int(
1,
),
}
client.Actions.Versions.List(
context.TODO(),
"actionId",
request,
)
}import { ManagementClient } from "auth0";
async function main() {
const client = new ManagementClient({
token: "<token>",
});
await client.actions.versions.list("actionId", {
page: 1,
perPage: 1,
});
}
main();import { ManagementClient } from "auth0";
async function main() {
const client = new ManagementClient({
token: "<token>",
});
await client.actions.versions.list("actionId", {
page: 1,
perPage: 1,
});
}
main();curl --request GET \
--url https://{tenantDomain}/api/v2/actions/actions/{actionId}/versions \
--header 'Authorization: Bearer <token>'import requests
url = "https://{tenantDomain}/api/v2/actions/actions/{actionId}/versions"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{tenantDomain}/api/v2/actions/actions/{actionId}/versions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}HttpResponse<String> response = Unirest.get("https://{tenantDomain}/api/v2/actions/actions/{actionId}/versions")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{tenantDomain}/api/v2/actions/actions/{actionId}/versions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"page": 0,
"per_page": 20,
"total": 1,
"versions": [
{
"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"
}
]
}Obtener las versiones de una Action
Recupere todas las versiones de una Action. Se crea una versión de una Action cada vez que se despliega una Action. Una versión de una Action es inmutable una vez creada.
GET
https://{tenantDomain}/api/v2
/
actions
/
actions
/
{actionId}
/
versions
Go
package example
import (
context "context"
management "github.com/auth0/go-auth0/management/management"
actions "github.com/auth0/go-auth0/management/management/actions"
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 := &actions.ListActionVersionsRequestParameters{
Page: management.Int(
1,
),
PerPage: management.Int(
1,
),
}
client.Actions.Versions.List(
context.TODO(),
"actionId",
request,
)
}import { ManagementClient } from "auth0";
async function main() {
const client = new ManagementClient({
token: "<token>",
});
await client.actions.versions.list("actionId", {
page: 1,
perPage: 1,
});
}
main();import { ManagementClient } from "auth0";
async function main() {
const client = new ManagementClient({
token: "<token>",
});
await client.actions.versions.list("actionId", {
page: 1,
perPage: 1,
});
}
main();curl --request GET \
--url https://{tenantDomain}/api/v2/actions/actions/{actionId}/versions \
--header 'Authorization: Bearer <token>'import requests
url = "https://{tenantDomain}/api/v2/actions/actions/{actionId}/versions"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{tenantDomain}/api/v2/actions/actions/{actionId}/versions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}HttpResponse<String> response = Unirest.get("https://{tenantDomain}/api/v2/actions/actions/{actionId}/versions")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{tenantDomain}/api/v2/actions/actions/{actionId}/versions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"page": 0,
"per_page": 20,
"total": 1,
"versions": [
{
"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"
}
]
}Autorizaciones
bearerAuthoAuth2ClientCredentials
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Parámetros de ruta
El ID de la Action.
Parámetros de consulta
Use este campo para solicitar una página específica de la lista de resultados.
Este campo especifica la cantidad máxima de resultados que devolverá el servidor. El valor predeterminado es 20
Respuesta
Se recuperaron las versiones de la Action.
⌘I