Resources and operations

In Resources and operations, the user can define all API resources with each desired HTTP method.

In addition to the manual insertion of resources and operations, there are other methods to include resources. To learn more about them, access Swagger Editor, Import WSDL and Create from Connector.

Creating a resource

To create a resource manually, click the Add resource option and fill in the required data:

add resource

The Resource description field is not required, but we suggest completing it to render identification easier.

After saving the resource, you need to register an operation for it.

You don’t need to add a resource when creating an API — it can be inserted later. However, if the resource is inserted as of the creation of the API, the inclusion of the operation becomes mandatory.

To go through with it, choose the Method, indicate the Path and click on Save operation, as shown below:

add operation

You can create as many operations as you need. Remember to save each operation before clicking on Save and next.

  • If you do not configure an OPTIONS method for the resource, responses to preflight requests will contain the following headers:

    key: value

    Access-Control-Allow-Origin: *
    Access-Control-Allow-Methods: HEAD, DELETE, POST, GET, OPTIONS, PUT, PATCH

    Should request headers Access-Control-Request-Headers be informed in the preflight request, their content will be included in the Access-Control-Allow-Headers key-value header.

  • If you do implement an OPTIONS method for the resource, the flow will be followed and the interceptor hierarchy you set will be kept.

Editing and deleting a resource

After registering the resources and operations, you can edit, delete, and create new ones on the same creation screen.

For further editing and deletion, click the API card and you will be redirected to the Overview screen, where you can make the changes you need. Click here to read more about it.

Thanks for your feedback!

Share your suggestions with us!
Click here and then [+ Submit idea]