Adding Resources and Methods

A REST API is built around the concept of resources. A resource is any information that can be named such as a document or an image, a temporary service such as today's weather in Los Angeles, a collection of other resources, or a non-virtual objec. In REST, a resource is always associated with a set of methods that operate it. The supported methods are GET, DELETE, PUT, PATCH, and POST.

After adding the API, you can model the API by adding resources and methods to it.

To add resources and methods:

  1. In the left Resource section, click Add Resource.
  2. In the displayed Add a resource and methods dialog, enter a resource path that starts with a slash, and select one or more methods. Click Save.

  3. Optional: In the left Resource section, click an added method and click to add a tag for the operation.

    Tags can be used for logical grouping of operations by resources or any other qualifier. By default, no tag is added for each operation.

  4. Optional: In the Method Information section, click the Summary or Description links to add a description for the selected operation. Note that the maximum size of the Summary field is 120 characters. You can also click ID to change the method's predefined ID. Note that in an older API Specification, a method has no ID. You can go to the API Spec edit page and that the ID can be generated.

Editing Resources

Use the following options to edit an added resource:

Editing Methods

Use the following options to edit an added method:

What to Do Next

Adding and Editing Request Parameters