Learn by product

Select the product you would like help with:

Martini Logo
Select the product you would like help with:
Knowledge Base

Developing

Adding a parameter to an operation in Gloop API

Modified on: Thu, 20 Sep, 2018 at 5:01 PM

Depending on what operation you are trying to add a parameter to, adding a parameter to your APIs can either be done by using content assist,
keyboard shortcuts, or manually by mouse clicks. Check this article in our documentation page to learn more about Gloop REST API Editor.


Using Content Assist


GET or DELETE


In your Gloop REST API editor, head over to the Operations Editor and look for the parameters section and press dot key (.) in your keyboard



The Parameter will be the first on the list if you open the content assist with Parameter as the current selection. Selecting it will trigger a step by
step guide to setup a parameter for your API, this varies depending on what your services does e.g. your operation is GET with an endpoint that
has a path variable using the content assist to add a parameter will default to the parameter being Path. Look here to see what other parameter
types are being supported.


POST and other operations that uses body parameter


In addition to parameters, you can also add a body parameter for POST, PUT, or PATCH. The content assist is triggered at the operation itself, and
by typing body to have it appear in the suggestion should you wish to use the content assist.




Using the keyboard shortcut


GET or DELETE


The default shortcut is alt+e. Depending on what operating system your are in, this might be different, check your operating system's equivalent for alt.

Make sure that the current selection is the Parameters node as it may trigger a different effect.


POST and other operations that uses body parameter


The default shortcut is alt+b. Again, depending on the operating system you are in, the behavior of alt will be different, look for the equivalent key for your
operating system. Note: this shortcut is not available if an operation that does not accept a body parameter.


Adding manually via mouse clicks


This is method is straightforward, depending on what operation you are dealing with, hover your mouse at either the parameter or the operation  (for POST,
PUT, PATCH etc) note that for GET and DELETE operations, the body parameter will not be available.


Did you find it helpful? Yes No

Can you please tell us how we can improve this article?