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{
"total": 1,
"page": 0,
"per_page": 20,
"versions": [
{
"id": "12a3b9e6-06e6-4a29-96bf-90c82fe79a0d",
"action_id": "910b1053-577f-4d81-a8c8-020e7319a38a",
"code": "module.exports = () => {}",
"dependencies": [
{
"name": "<string>",
"version": "<string>",
"registry_url": "<string>"
}
],
"deployed": true,
"runtime": "node22",
"secrets": [
{
"name": "mySecret",
"updated_at": "2021-01-01T00:00:00.000Z"
}
],
"status": "built",
"number": 1,
"errors": [
{
"id": "<string>",
"msg": "<string>",
"url": "<string>"
}
],
"action": {
"id": "910b1053-577f-4d81-a8c8-020e7319a38a",
"name": "my-action",
"supported_triggers": [
{
"version": "<string>",
"status": "<string>",
"runtimes": [
"<string>"
],
"default_runtime": "<string>",
"compatible_triggers": [
{
"version": "<string>"
}
]
}
],
"all_changes_deployed": false,
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
},
"built_at": "2021-01-01T00:00:00.000Z",
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z",
"supported_triggers": [
{
"version": "<string>",
"status": "<string>",
"runtimes": [
"<string>"
],
"default_runtime": "<string>",
"compatible_triggers": [
{
"version": "<string>"
}
]
}
],
"modules": [
{
"module_id": "<string>",
"module_name": "<string>",
"module_version_id": "<string>",
"module_version_number": 123
}
]
}
]
}Get an action's versions
Retrieve all of an action’s versions. An action version is created whenever an action is deployed. An action version is immutable, once created.
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{
"total": 1,
"page": 0,
"per_page": 20,
"versions": [
{
"id": "12a3b9e6-06e6-4a29-96bf-90c82fe79a0d",
"action_id": "910b1053-577f-4d81-a8c8-020e7319a38a",
"code": "module.exports = () => {}",
"dependencies": [
{
"name": "<string>",
"version": "<string>",
"registry_url": "<string>"
}
],
"deployed": true,
"runtime": "node22",
"secrets": [
{
"name": "mySecret",
"updated_at": "2021-01-01T00:00:00.000Z"
}
],
"status": "built",
"number": 1,
"errors": [
{
"id": "<string>",
"msg": "<string>",
"url": "<string>"
}
],
"action": {
"id": "910b1053-577f-4d81-a8c8-020e7319a38a",
"name": "my-action",
"supported_triggers": [
{
"version": "<string>",
"status": "<string>",
"runtimes": [
"<string>"
],
"default_runtime": "<string>",
"compatible_triggers": [
{
"version": "<string>"
}
]
}
],
"all_changes_deployed": false,
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z"
},
"built_at": "2021-01-01T00:00:00.000Z",
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z",
"supported_triggers": [
{
"version": "<string>",
"status": "<string>",
"runtimes": [
"<string>"
],
"default_runtime": "<string>",
"compatible_triggers": [
{
"version": "<string>"
}
]
}
],
"modules": [
{
"module_id": "<string>",
"module_name": "<string>",
"module_version_id": "<string>",
"module_version_number": 123
}
]
}
]
}Autorisations
bearerAuthoAuth2ClientCredentials
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Paramètres de chemin
The ID of the action.
Paramètres de requête
Use this field to request a specific page of the list results.
This field specify the maximum number of results to be returned by the server. 20 by default
⌘I