Skip to main content

REST

REST operations also have their specialities, since the request and response types are completely dynamic. For example, an endpoint may receive JSON and reply with XML or a PDF.

Creating a REST operation

Add a new operation by clicking the icon. Next, choose a descriptive name for your operation.

If you imported REST API definitions, you can use an imported API operation as a template by clicking the checkbox and selecting the desired operation. Should you leave the checkbox unselected or if you did not import any API definitions, Kreya will simply create an empty REST operation.

Changing the request content type

By default, Kreya generates an example request based on the OpenAPI definition. If Kreya cannot find a request definition, the default request content is empty. To change that, click on the request content type tab and select the desired type.

REST multipart form requests

Sending multipart requests with Kreya is pretty easy. Simply select the "Multipart" request type. Then, you can start adding and removing "parts". Note that a "part" must have a name. To delete parts, hover over the part header and click the trash can icon twice.