Add an operation

In this topic, you learn how to add an operation to an API.

In each operation you define a method to interact with the data of the API. You can define multiple operations with different methods and parameters for requests.

Prerequisites

Procedure

  1. Navigate to the Operations tab and click + to add an operation.

    api designer add operation

  2. In Path, enter a slash and the name for your table definition, for example, /clonetroopers.

  3. In Method, select a method from the list, for example GET:

    GET

    Read and retrieve data from the resource.

    PUT

    Update existing data in the resource.

    POST

    Add new data to the resource.

    DELETE

    Delete data from the resource.

    HEAD

    Read and retrieve data without the response body. Unlike GET, HEAD retrieves the response header only.

    OPTIONS

    Read and retrieve all operations and content types that are available without retrieving specific data.

    PATCH

    Apply partial changes to an operation. Unlike PUT, PATCH changes only part of the data instead of replacing it entirely.

  4. Enter a short Summary and a longer Description to provide context information about the operation.

  5. In Tags, enter keywords that describe the resource, for example, clones.

  6. Activate any of the following:

    Trace Operations

    Trace request you or others make to the API in API Trace.

    Save Request Body

    When you trace operations, the request details are traced, too.

    Send Credentials (cookie)

    Use credentials for cookie-based authorization.

    Use Example Data

    Use example data to run an unfinished API in the App Designer. Example data is not traced in API Trace or API Client.

  7. Click Save.

Result

  • You have added an operation with a method.