Passer au contenu principal
POST
/
actions
/
actions
/
{id}
/
deploy
TypeScript
import { ManagementClient } from "auth0";

async function main() {
    const client = new ManagementClient({
        token: "<token>",
    });
    await client.actions.deploy("id");
}
main();
{
  "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": [
      {
        "id": "<string>",
        "version": "<string>",
        "status": "<string>",
        "runtimes": [
          "<string>"
        ],
        "default_runtime": "<string>",
        "compatible_triggers": [
          {
            "id": "<string>",
            "version": "<string>"
          }
        ],
        "binding_policy": "trigger-bound"
      }
    ],
    "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": [
    {
      "id": "<string>",
      "version": "<string>",
      "status": "<string>",
      "runtimes": [
        "<string>"
      ],
      "default_runtime": "<string>",
      "compatible_triggers": [
        {
          "id": "<string>",
          "version": "<string>"
        }
      ],
      "binding_policy": "trigger-bound"
    }
  ],
  "modules": [
    {
      "module_id": "<string>",
      "module_name": "<string>",
      "module_version_id": "<string>",
      "module_version_number": 123
    }
  ]
}

Autorisations

Authorization
string
header
requis

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Paramètres de chemin

id
string
requis

The ID of an action.

Réponse

Request to create action version was accepted.

id
string
défaut:12a3b9e6-06e6-4a29-96bf-90c82fe79a0d

The unique id of an action version.

action_id
string
défaut:910b1053-577f-4d81-a8c8-020e7319a38a

The id of the action to which this version belongs.

code
string
défaut:module.exports = () => {}

The source code of this specific version of the action.

dependencies
object[]

The list of third party npm modules, and their versions, that this specific version depends on.

deployed
boolean
défaut:true

Indicates if this specific version is the currently one deployed.

runtime
string
défaut:node22

The Node runtime. For example: node22

secrets
object[]

The list of secrets that are included in an action or a version of an action.

status
enum<string>
défaut:built

The build status of this specific version.

Options disponibles:
pending,
building,
packaged,
built,
retrying,
failed
number
number
défaut:1

The index of this version in list of versions for the action.

errors
object[]

Any errors that occurred while the version was being built.

action
object

The action to which this version belongs.

built_at
string<date-time>
défaut:2021-01-01T00:00:00.000Z

The time when this version was built successfully.

created_at
string<date-time>
défaut:2021-01-01T00:00:00.000Z

The time when this version was created.

updated_at
string<date-time>
défaut:2021-01-01T00:00:00.000Z

The time when a version was updated. Versions are never updated externally. Only Auth0 will update an action version as it is being built.

supported_triggers
object[]

The list of triggers that this version supports. At this time, a version can only target a single trigger at a time.

Minimum array length: 1
modules
object[]

The list of action modules and their versions used by this action version.