Skip to main content Skip to complementary content

Managing components

Creating a component

Create a component to be reused in several elements in your API.

Procedure

  1. Open your API and click the COMPONENTS tab in the left panel.
  2. Click the + button to the right of the element for which you want to create a component.
    You can also create a component by clicking the + button to the right of the API name and selecting a type of component.
  3. Enter a Name and a Type for your component.

    Example

    Example of creating a component called id with the type string.
  4. Optional: Add more attributes.
  5. Click Save.

Results

Your component is created. You can now use it in the corresponding elements.

Cloning a component

Create a component based on an existing one.

Before you begin

You have created a component.

Procedure

  1. Open your API and click the COMPONENTS tab.
  2. Click the Clone icon to the right of the component that you want to clone.
  3. Enter a new Name.
  4. Edit the component as needed, then click Save.

Extracting to a component

Extract a path variable, query parameter, header, or response as a component to reuse it in other elements of your API.

Procedure

  1. Navigate to the element that you want to extract.
  2. Click the menu to the right of the pencil icon.
  3. Click Extract as component.
    View of the request parameter with the pencil icon options expanded.

Results

Your component is created. You can see it in the COMPONENTS tab and you can start using it.

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – please let us know!