Postman Syntax

I am trying to understand the Postman syntax.

When I enter my URL and set my credentials in the Postman authorization tab the request works fine.

However, when I try to use the curl option -u to set my username and password (instead of using the authorization tab) I get various errors regarding port numbers and incorrect parameters.

I have looked at the Postman instructions, but I have not found anything helpful.

QUESTION: What is the basic Postman syntax for sending a request with curl options?

You could consider Postman as a GUI alternative to cURL. In Postman you fill in the user details in the authorization tab. That is the equivalent of using -u on the command line for cURL.

I’m trying to validate my curl options (-L, -c, -b, etc) without relying on Postman’s GUI. I thought that was the whole point of using Postman, but perhaps I’m mistaken.

You are not mistaken.

Use Postman to generate the call that you want and then use the "copy" command to copy the settings into the language of your choice. CURL is one of the options.

Even better, as you probably want this to end up in FMP, go to Soliant's website and search for @WimDecorte's Postman to FMP tool.

@steverichter I've just been looking at RapidAPI which is an very nice app (was paid now free) that does the same thing is as Postman. It has a lot of code generator extensions, one of which is produces code for FileMaker's Insert from URL. Worth a look?

1 Like

Attached is a generic FMP environment file and a DataApi19 collection.

Import both into Postman and configure your environment variables. Once those are set, run the /auth/Login request in the imported collection.

You should see a response like;

    "response": {
        "token": "16fc4291a6a3a7a17…"
    },
    "messages": [
        {
            "code": "0",
            "message": "OK"
        }
    ]
}

That will set the token variable at which point, you can proceed to explore the other requests within the collection.

DataAPI19 v0.5.postman_collection.json.zip (8.4 KB)

FMP env.postman_environment.json.zip (961 Bytes)

So far, Postman is giving me the same results as FMP. I am retrieving html instead of a text file.

I will try @rivet ’s suggestion next.

As @Malcolm indicated, PAW (RapidAPI) is a Postman competitor. IIRC Proof-Geist has a plugin that formats the cURL as FM expects in PAW - shows the transformation in a window at the lower left of the RapidAPI screen.

There is also a new? postman clone out there (not tried it yet) called hopscotch