API Stability Long-Term

The createActionFromPackageTemplate() GraphQL mutation field may be used to create an action from a package action template.

For more information on creating an action, see the Actions documentation page. You may also want to look at the Packages page for related information.

Syntax

Below is the syntax for the createActionFromPackageTemplate() mutation field:

graphql
createActionFromPackageTemplate(
      viewName: string!
      packageId: VersionedPackageSpecifier!
      actionTemplateName: string!
      overrideName: string
   ): CreateActionFromPackageTemplateMutation!

For the package identifier, you'll have to enter the name of package, followed by an ampersand and the version number. As for the returned parameters, see the section here. Below is an example that may make the syntax easier to understand:

Show:
graphql
mutation {
  createActionFromPackageTemplate(
         viewName: "humio", 
         packageId: "crowdstrike/logscale-slack@1.0.0", 
         actionTemplateName: "Slack")
  {action {name, isAllowedToRun, allowedActions} }
}
Example Responses
Show:
json
{
  "data": {
    "createActionFromPackageTemplate": {
      "action": {
        "name": "Slack",
        "isAllowedToRun": true,
        "allowedActions": [
          "Read",
          "Update"
        ]
      }
    }
  }
}

Given and Returned Datatypes

The given datatype VersionedPackageSpecifier is just a scalar. However, the returned datatype CreateActionFromPackageTemplateMutation has one parameter and several sub-parameters:

Table: CreateActionFromPackageTemplateMutation

ParameterTypeRequiredDefaultStabilityDescription
Some arguments may be required, as indicated in the Required column. For some fields, this column indicates that a result will always be returned for this column.
Table last updated: Mar 25, 2025
actionactionyes Long-TermThe action to create from a package template. See Action.