Passer au contenu principal
PATCH
/
actions
/
modules
/
{id}
Update a specific Actions Module
curl --request PATCH \
  --url https://{tenantDomain}/api/v2/actions/modules/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "code": "<string>",
  "secrets": [
    {
      "name": "<string>",
      "value": "<string>"
    }
  ],
  "dependencies": [
    {
      "name": "<string>",
      "version": "<string>"
    }
  ]
}
'
{
  "id": "<string>",
  "name": "<string>",
  "code": "<string>",
  "dependencies": [
    {
      "name": "<string>",
      "version": "<string>"
    }
  ],
  "secrets": [
    {
      "name": "<string>",
      "updated_at": "2023-11-07T05:31:56Z"
    }
  ],
  "actions_using_module_total": 123,
  "all_changes_published": true,
  "latest_version_number": 123,
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z",
  "latest_version": {
    "id": "<string>",
    "version_number": 123,
    "code": "<string>",
    "dependencies": [
      {
        "name": "<string>",
        "version": "<string>"
      }
    ],
    "secrets": [
      {
        "name": "<string>",
        "updated_at": "2023-11-07T05:31:56Z"
      }
    ],
    "created_at": "2023-11-07T05:31:56Z"
  }
}

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 the action module to update.

Corps

code
string

The source code of the action module.

Maximum string length: 65536
Pattern: ^[^]*$
secrets
object[]

The secrets to associate with the action module.

dependencies
object[]

The npm dependencies of the action module.

Réponse

The action module was updated.

id
string

The unique ID of the module.

name
string

The name of the module.

code
string

The source code from the module's draft version.

dependencies
object[]

The npm dependencies from the module's draft version.

secrets
object[]

The secrets from the module's draft version (names and timestamps only, values never returned).

actions_using_module_total
integer

The number of deployed actions using this module.

all_changes_published
boolean

Whether all draft changes have been published as a version.

latest_version_number
integer

The version number of the latest published version. Omitted if no versions have been published.

created_at
string<date-time>

Timestamp when the module was created.

updated_at
string<date-time>

Timestamp when the module was last updated.

latest_version
object

The latest published version as a reference object. Omitted if no versions have been published.