In this article, we will see how Postman is used with our API.

Postman is a platform for building and using APIs.

Postman can be used through your web browser after sign-up. The Postman app can be downloaded here.

GET

Postman

This is the window you will see once you have registered and opened Postman.

  1. GET – Here you will define what kind of operation you would like to perform. In RecMan, we use GET and POST, but in this example, we will use GET.
  2. URL – If you are performing a GET, you can type an URL with scope, type and fields here. See examples in the articles.
  3. Send – Once all the information is in place, you press Send in order to perform the selected operation and fetch information from your database.
  4. This bar has some options, but when performing a GET, you only need to worry about the Headers button. The Header tab has to contain the following information:

    Postman

  5. Displayed here is what your operation returned. In this example, the return was Job Posts, and the output is in JSON.
  6. Here you can see your previous operations. You can easily go back to previous operations and perform them again.

POST

When performing a POST, your screen will look slightly different, and you define scope, field and KEY in a different location.

Note

Please note that any operation performed with a POST will make changes to your system. You can potentially delete information in your RecMan system.

Postman

  1. POST – We have defined that we will perform a POST from the menu.
  2. The URL when performing a POST is always https://api.recman.no/post/.

    Note

    Make sure that the URL you use when performing a post is identical to this one. A single typing error will result in a failed operation.

  3. SEND – After you have defined everything, you press SEND in order to execute the operation.
  4. While the Header should look the same as it did on GET, the important field here is the Body. As shown in the example, your operation is now defined by a script rather than the URL, and here the syntax is important. Please see examples in the POST articles.
  5. The output. The only result you get when performing a POST is «success»: true or «success»: false, depending on the success of the operation.
  6. The log of your previous GETs and POSTs.
Was this article helpful?
0 out of 0 found this helpful