Print

Import Curl Requests

Overview

Many API services provide documentation on how to make API requests using Curl, a very popular command-line tool for interacting with APIs.  For example, here's a screenshot from Shopify's API documentation.

import-export-img7

API Connector provides a Curl import tool to let you easily import these snippets directly into your API Connector workspace.

The cURL import tool will work with most standard cURL snippets, but not with graphQL or multi-part cURL requests.

Curl Import Tool

Click Extensions > API Connector > Import / Export > Import cURL to access the Curl import modal:
import-curl-menu

Once the modal opens, copy and paste in the entire Curl snippet, like this:

import-curl-img2

Now, just click the Import button to automatically parse and open the request in the API Connector sidebar:

From here you can Edit, Save, and Run the request, just as if you'd entered it manually.

2 thoughts on “Import Curl Requests”

  1. When I import a graphQL request as curl into Postman for testing, the resulting response is as expected. Unfortunately, when I import that same curl into API Connector, API Connector recognizes it as a GET method instead of POST while Postman correctly set the method to POST. Even after manually changing the method to POST in API Connector, I get an error message. Can you help me troubleshoot this?

    Reply
    • Hey Jason, sorry for the confusion, API Connector's curl import tool doesn't work with GraphQL. This is because Postman has special handling for graphQL, while API Connector currently only works with raw JSON or XML. However Postman still helps here, since when you import your curl request into Postman, they convert it into a raw request body, which you can then copy/paste into API Connector.

      Reply

Leave a Comment

Jump To