Skip to navigation

HTTP Actions

View as Markdown

platform.extensions.http-actions

An HTTP action is one request to an external API through an HTTP connector: the method, the path, headers, query parameters and a request body built from the action’s inputs.

To learn what HTTP actions do, see HTTP Actions in the Tool Studio docs.

  • Endpoint: /platform/extensions/http-actions | Methods: GET, PATCH, POST
  • Request shape: fields go at the top level of the JSON body, with no resource wrapper. The item’s id goes in the URL for reads and updates, not in the body.
  • Updates: a JSON merge-patch with version: {num, change_description} from your last read. Lists of objects merge row by row, so read first and send the whole list when you remove or reorder rows. See Tool Studio.
  • References: Uses an HTTP connector through connector_id (the connector’s id). Conversational processes, data types and plugins refer to the action by its id; compound actions refer to it by signature.name.

Endpoints

All paths are relative to https://api.moveworks.ai/configurations/v1alpha1. Each endpoint page lists the request and response schema, an example, and the errors it can return.

MethodPathEndpoint reference
GET/platform/extensions/http-actionsList HTTP actions
POST/platform/extensions/http-actionsCreate HTTP action
GET/platform/extensions/http-actions/{id}Get HTTP action
PATCH/platform/extensions/http-actions/{id}Update HTTP action

Rules the API checks

  • method is required.
  • path starts with / and has no query string. Use {{{argument}}} for path parameters and query_params for the query string.
  • Up to 250 headers and 250 query parameters.
  • body_bender takes the short form of a Data Mapper expression.

Fields

FieldTypeRequiredNotes
idstringread-onlyUnique identifier of the HTTP action, assigned by the server.
signatureFunctionSignatureSettings✅The action’s callable contract: its name, description, input arguments and result schema. Required.
connector_idstring✅Connector that supplies the base URL and authentication for the request. ID of an existing connector (GET /configurations/v1alpha1/platform/connectors).
methodenum✅HTTP method the action calls. One of: GET, POST, PUT, DELETE, PATCH. Required on create. One of: GET, POST, PUT, DELETE, PATCH.
pathstringPath appended to the connector’s base URL, not a full URL. Must start with a slash and contain no query string. Use {{{variable}}} for path parameters.
query_paramsarray<QueryParamSettings>Query parameters appended to the request URL. Up to 250.
headersarray<HttpHeaderSettings>Request headers. Up to 250.
body_benderobjectRequest body as a Moveworks data mapper expression. An update that includes this field replaces the whole body.
file_benderobjectFiles sent in the request, as a Moveworks data mapper resolving to {argument_name: File / File[]}, where File is {filename, location}. Available to body_bender under the file keyword.
updated_timestringread-onlyWhen the configuration was last updated.
updated_bystringread-onlyWho last updated the configuration.
versionVersion✅Document version. On update, send back the num from your last read.

Example create body

{
"signature": {
"name": "get_purchase_order",
"display_name": "Get Purchase Order",
"description": "Fetch a purchase order from the ERP by its PO number.",
"arguments": [
{
"name": "po_number",
"description": "The purchase order number, e.g. PO-1024.",
"type": {
"primitive": "string"
},
"required": true,
"example_value": "PO-1024"
}
]
},
"connector_id": "6f1c9f0e-6e1a-4b39-9a1e-1c6d0f2b7a55",
"method": "GET",
"path": "/api/v1/purchase_orders/{{{po_number}}}",
"headers": [
{
"key": "Accept",
"value": "application/json"
}
],
"version": {
"change_description": "Initial version."
}
}