--- description: REST and GraphQL API documentation on the Operations collection in Directus. readTime: 5 min read pageClass: page-reference --- # Operations > Operations are the building blocks of Data Flows within Directus. ## The Operation Object `id` **uuid**\ Primary key of the operation. `name` **string**\ Name for the operation. `key` **string**\ Key for the operation. Must be unique within a given flow. `type` **string**\ Type of operation. One of `log`, `mail`, `notification`, `create`, `read`, `request`, `sleep`, `transform`, `trigger`, `condition`, or any type of custom operation extensions. `options` **json**\ Options depending on the type of the operation. `position_x` **integer**\ Position of the operation on the X axis within the flow workspace. `position_y` **integer**\ Position of the operation on the Y axis within the flow workspace. `date_created` **timestamp**\ Timestamp in ISO8601 when the operation was created. `user_created` **many-to-one**\ The user who created the operation. Many-to-one to [users](/reference/system/users#the-users-object). `resolve` **uuid**\ The operation triggered when the current operation succeeds (or `then` logic of a condition operation). Primary key of an [operation](#the-operation-object). `reject` **uuid**\ The operation triggered when the current operation fails (or `otherwise` logic of a condition operation). Primary key of an [operation](#the-operation-object). `flow` **many-to-one**\ The flow containing this operation. Many-to-one to [flows](/reference/system/flows#the-flow-object). ```json { "id": "585b04cd-2821-4dcc-a563-ae5d29ecace2", "name": "Log a Message", "key": "log_message", "type": "log", "position_x": 12, "position_y": 24, "date_created": "2022-05-11T13:14:52Z", "user_created": "12e62fd0-29c7-4fd3-b3d3-c7a39933e8af", "resolve": "bf4099c0-c54c-4736-ab4e-95e2487595e4", "reject": null, "flow": "22544db5-93f7-48e2-a028-7ae02c8fe49a" } ``` ## List Operations List all operations that exist in Directus. ### Request #### Query Parameters Supports all [global query parameters](/reference/query). ### Response An array of up to [limit](/reference/query#limit) [operation objects](#the-operation-object). If no items are available, data will be an empty array. ### Example ## Retrieve an operation List an existing operation by primary key. ### Request #### Query Parameters Supports all [global query parameters](/reference/query). ### Response Returns the requested [operation object](#the-operation-object). ### Example ## Create an Operation Create a new operation. ### Request #### Query Parameters Supports all [global query parameters](/reference/query). #### Request Body A partial [operation object](#the-operation-object). ### Response Returns the [operation object](#the-operation-object) for the created operation. ### Example ## Create Multiple Operations Create multiple new operations. ### Request #### Query Parameters Supports all [global query parameters](/reference/query). #### Request Body An array of partial [operation objects](#the-operation-object). ### Response Returns the [operation object](#the-operation-object) for the created operation. ### Example ## Update an Operation Update an existing operation. ### Request #### Query Parameters Supports all [global query parameters](/reference/query). #### Request Body A partial [operation object](#the-operation-object). ### Response Returns the [operation object](#the-operation-object) for the updated operation. ### Example ## Update Multiple Operations Update multiple existing operations. #### Query Parameters Supports all [global query parameters](/reference/query). #### Request Body `keys` **Required**\ Array of primary keys of the operations you'd like to update. `data` **Required**\ Any of [the operation object](#the-operation-object)'s properties. ### Response Returns the [operation objects](#the-operation-object) for the updated operations. ### Example ## Delete an Operation Delete an existing operation. ### Request ### Returns Empty body. ### Example ## Delete Multiple Operations Delete multiple existing operations. ### Request #### Request Body An array of operations primary keys ### Returns Empty body. ### Example ## Triggering an operation Trigger an operation based on primary key. ### Request #### Request Body Payload for the operation, if needed. ### Returns Result of the operation, if any. ### Example