In this example, we'll use the POST method to create a new leave type entry in our Leave type model.
Procedure
-
Select the POST method, for example, POST /custom/leave-types. Then, applaud prepares an example value for you to use to create a new entry.
-
From the Example Value box, copy the text and under the Parameters section, in the Value box, paste the example value. Delete any information that's not relevant to you. In this example, we're only interested in the name and paid lines. So, we can delete all the other lines.
Note
If there's a comma remaining on the last line of the value after removing lines, delete this. Otherwise, the JSON won't be in a valid format, and the request won't work.
-
Replace string with the value of your choice. In this example, we'll use compassionate, for example, "name": "compassionate" and replace paid with the value of your choice. In this example, we'll use False, for example, "paid": false.
-
Select Try it out. The API returns the object in the Response body with a Response code 200, meaning your request was successful.