Appearance
Get action metadata ​
API ReferenceNote: The path is a placeholder. The actual path is determined by the configuration of the app component.
When a user has navigated to the custom rule builder UI and selected a rule action (either through the sidebar or via a rule preset), Asana will make a request to the app to get the configuration form definition for the chosen rule action. This will initiate the flow to configure a new rule action or edit the configuration of an existing rule action. This is the endpoint and schema for updating rule actions; app triggers (V2) will be analogous.
OpenAPI definition ​
json
{
"openapi": "3.0.0",
"info": {
"description": "This is the interface for handling requests for app components. This reference is generated from an [OpenAPI spec] (https://raw.githubusercontent.com/Asana/openapi/master/defs/app_components_oas.yaml).",
"title": "App Components",
"termsOfService": "https://asana.com/terms",
"contact": {
"name": "Asana Support",
"url": "https://asana.com/support"
},
"license": {
"name": "Apache 2.0",
"url": "https://www.apache.org/licenses/LICENSE-2.0"
},
"version": "0.1",
"x-docs-schema-whitelist": [
"AttachedResourceResponse",
"FormField-Checkbox",
"FormField-Date",
"FormField-Datetime",
"FormField-Dropdown",
"FormField-MultiLineText",
"FormField-RadioButton",
"FormField-RichText",
"FormField-SingleLineText",
"FormField-StaticText",
"FormField-Typeahead",
"FormMetadataResponse",
"RanActionResponse",
"WidgetFooter-CustomText",
"WidgetFooter-Created",
"WidgetFooter-Updated",
"WidgetMetadataResponse",
"WidgetField-DatetimeWithIcon",
"WidgetField-Pill",
"WidgetField-TextWithIcon",
"TypeaheadListResponse",
"TypeaheadItem",
"FormValues",
"BadRequestResponse",
"UnauthorizedResponse",
"ForbiddenResponse",
"NotFoundResponse",
"InternalServerErrorResponse"
]
},
"x-readme": {
"explorer-enabled": false
},
"servers": [
{
"url": "{siteUrl}",
"description": "Main endpoint."
}
],
"tags":
{
"name": "Rule actions",
"description": "When a rule containing a rule action is triggered, the [rules engine will make a request to the app to inform the app to run the configured rule action. The resulting status code will indicate to the rules engine whether the action was successfully completed and, if not, specify a cause for the error.\n\n_Note: An app server must be hosted in order for rule actions to function. For a brief list of popular hosting options, see [hosting](/docs/hosting)._"
}
],
"components": {
"parameters": {
"action": {
"name": "action",
"in": "query",
"schema": {
"type": "string"
},
"description": "The ID of an existing rule action that is being edited. Should be omitted when configuring a new rule action."
},
"action_type": {
"name": "action_type",
"required": true,
"in": "query",
"schema": {
"type": "string"
},
"description": "The ID of the configuration used to create the rule action."
},
"expires_at": {
"name": "expires_at",
"required": true,
"in": "query",
"schema": {
"type": "string"
},
"description": "The time (in ISO 8601 date format) when the request should expire."
},
"project": {
"name": "project",
"required": true,
"in": "query",
"schema": {
"type": "string"
},
"description": "The project GID this hook is coming from."
},
"user": {
"name": "user",
"required": true,
"in": "query",
"schema": {
"type": "string"
},
"description": "The user GID this hook is coming from."
},
"workspace": {
"name": "workspace",
"required": true,
"in": "query",
"schema": {
"type": "string"
},
"description": "The workspace GID this hook is coming from."
}
},
"responses": {
"BadRequest": {
"description": "Bad request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BadRequestResponse"
}
}
}
},
"Unauthorized": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UnauthorizedResponse"
}
}
}
},
"Forbidden": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ForbiddenResponse"
}
}
}
},
"NotFound": {
"description": "Not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NotFoundResponse"
}
}
}
},
"InternalServerError": {
"description": "Server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/InternalServerErrorResponse"
}
}
}
}
},
"schemas": {
"BadRequestResponse": {
"description": "An error response object indicating a bad request (i.e., a status code of `400`).",
"type": "object",
"properties": {
"error": {
"description": "The error to display.",
"type": "string",
"example": "Illegal or malformed request."
}
}
},
"ForbiddenResponse": {
"description": "An error response object indicating a forbidden request (i.e., a status code of `403`).",
"type": "object",
"properties": {
"error": {
"description": "The error to display.",
"type": "string",
"example": "Access forbidden."
}
}
},
"InternalServerErrorResponse": {
"description": "An error response object indicating a request that could not be found (i.e., a status code of `500`).",
"type": "object",
"properties": {
"error": {
"description": "The error to display.",
"type": "string",
"example": "Internal server error."
}
}
},
"FormMetadataResponse": {
"description": "Contains the metadata that describes how to display and manage a form.",
"type": "object",
"required": [
"metadata",
"template"
],
"properties": {
"template": {
"description": "The interface name and version of a distinct form UI layout. A `template` is directly associated with a particular `metadata` schema.",
"type": "string",
"enum": [
"form_metadata_v0"
],
"example": "form_metadata_v0"
},
"metadata": {
"description": "The metadata (i.e., underlying definition) of a form. `metadata` must exist alongside a `template`, and its schema must be specific to the value of that `template`.",
"type": "object",
"required": [
"fields",
"title"
],
"properties": {
"title": {
"description": "The title of the form, which is displayed at the top of the creation form",
"type": "string",
"example": "Create New Issue"
},
"fields": {
"description": "An array of form field objects that are rendered in the order they are in the array. Limit of 30 fields.\n\nValid object schemas: [FormField-Checkbox](/reference/app-components-forms/modal-forms#formfield-checkbox), [FormField-Date](/reference/app-components-forms/modal-forms#formfield-date), [FormField-Datetime](/reference/app-components-forms/modal-forms#formfield-datetime), [FormField-Dropdown](/reference/app-components-forms/modal-forms#formfield-dropdown), [FormField-MultiLineText](/reference/app-components-forms/modal-forms#formfield-multilinetext), [FormField-RadioButton](/reference/app-components-forms/modal-forms#formfield-radiobutton), [FormField-RichText](/reference/app-components-forms/modal-forms#formfield-richtext), [FormField-SingleLineText](/reference/app-components-forms/modal-forms#formfield-singlelinetext), [FormField-StaticText](/reference/app-components-forms/modal-forms#formfield-statictext), [FormField-Typeahead](/reference/app-components-forms/modal-forms#formfield-typeahead)",
"type": "array"
},
"on_submit_callback": {
"description": "The URL to `POST` the form to when the user clicks the submit button. If this is field is omitted then the submission button will be disabled. This is useful if the user must enter information in a watched field first, such as to show additional fields.",
"type": "string",
"example": "https://www.example.com/on_submit"
},
"on_change_callback": {
"description": "The URL to `POST` the form to whenever watched field values are changed.",
"type": "string",
"example": "https://www.example.com/on_change"
}
}
}
}
},
"NotFoundResponse": {
"description": "An error response object indicating a request that could not be found (i.e., a status code of `404`).",
"type": "object",
"properties": {
"error": {
"description": "The error to display.",
"type": "string",
"example": "Not found."
}
}
},
"UnauthorizedResponse": {
"description": "An error response object indicating a unauthorized request (i.e., a status code of `401`).",
"type": "object",
"properties": {
"error": {
"description": "The error to display.",
"type": "string",
"example": "Authorization required."
}
}
}
}
},
"paths": {
"/action.metadata_url_path_placeholder": {
"parameters": [
{
"$ref": "#/components/parameters/action"
},
{
"$ref": "#/components/parameters/action_type"
},
{
"$ref": "#/components/parameters/project"
},
{
"$ref": "#/components/parameters/workspace"
},
{
"$ref": "#/components/parameters/user"
},
{
"$ref": "#/components/parameters/expires_at"
}
],
"get": {
"summary": "Get action metadata",
"description": "_Note: The path is a placeholder. The actual path is determined by the configuration of the app component._\n\nWhen a user has navigated to the custom rule builder UI and selected a rule action (either through the sidebar or via a rule preset), Asana will make a request to the app to get the configuration form definition for the chosen rule action. This will initiate the flow to configure a new rule action or edit the configuration of an existing rule action. This is the endpoint and schema for updating rule actions; app triggers (V2) will be analogous. <br> <br> <a href=\"https://d3ki9tyy5l5ruj.cloudfront.net/obj/54149144bfbdb0897a8720f8411586d4ab86b545/ac-rule-metadata.png\">\n \n</a>",
"tags": [
"Rule actions"
],
"operationId": "getActionMetadata",
"responses": {
"200": {
"description": "Successfully retrieved the metadata for a single action.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/FormMetadataResponse"
}
}
}
},
"400": {
"$ref": "#/components/responses/BadRequest"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"500": {
"$ref": "#/components/responses/InternalServerError"
}
}
}
}
}
}