Importing RAML folders in Postman

Avatar

For several developers, the RESTful API Modeling Language (RAML) has become a popular choice for designing APIs. With the announcement of RAML 1.0 today, RAML has added several well thought out features that help API publishers address the complexity of designing large APIs.

Postman has supported RAML imports for a while now. However, the ability to import a RAML folder was missing, due to some limitations with Chrome’s File API. We are happy to announce that those issues have now been resolved, and Postman now supports folder imports in general, and RAML folders in particular. With version 3.1+, Postman can detect all RAML API definitions inside a folder and import all of them. The current version of the importer supports version 0.8 of the RAML spec.

Here’s a short example of how I used this feature to import the GitHub API into Postman:

1. Clone the GitHub RAML Definition

The RAML definition for the Github API is available on Github. I cloned the repository to my local machine by running this in my terminal:

$ git clone https://github.com/raml-apis/GitHub.git

2. Open the Postman import dialog

The import button can be found in Postman’s top navigation bar:

raml-import-button

You’ll see the import dialog, as shown below. Notice the new “Folder” tab.

import-modal

3. Import a folder!

Click on “Choose”, select the folder we just cloned (“Github”), and the hit “Upload”.

upload-folder

Now, Postman will detect all all the RAML definitions, convert them internally to Postman
Collections, and then show you the import success message:

import-success

Postman’s folder importer can also import all files that are Postman Collections, or Postman Environments. This makes it easier to import multiple collections and their associated environments into Postman.

We hope you have fun with the new feature!

Tags:

What do you think about this topic? Tell us in a comment below.

Comment

Your email address will not be published. Required fields are marked *


This site uses Akismet to reduce spam. Learn how your comment data is processed.

11 thoughts on “Importing RAML folders in Postman

    Avatar

    Is it possible to use a RAML file to define Postman Tests? i.e. the content the Tests tab would have after importing.

      Avatar

      Presently I would assume not.. but with RAML 1.0 comes a lot of additions that could make it possible to define custom tags in a RAML file that could be picked up by a parser like Postman that could then do something fancy with the custom tags (annotations). However I am not entirely clear on what you are asking.. I assume once the RAML file is imported, you can create a new collection and rearrange the requests however you like from the imported RAML collection.

    Avatar

    when do we expect RAML 1.0 support?

    Avatar

    hmm, any chance of postman supporting RAML 1.0 then?

      Avatar

      We are looking into this now that the 1.0 spec is officially out.

    Avatar

    Does Postman provide us with different command tool than Newman? I would like to import my Raml file directly into Postman from the command line, to have as a part of continuous delivery from my build server. Is this possible?

    Avatar

    We’ll be using RAML 1.0 so I wonder:
    1. when raml 1.0 support we might expect (even Beta) ?
    2. can I re-read raml folder so that old postman tests are not lost ?

    Avatar

    I am trying to import raml file but its giving error

    “Error while importing raml: type error:cannot set property “id” of undefined”
    Is there is any problem in raml/postman?
    is there any way to see postman logs?

    Please help me ASAP!

      Avatar

      I am using RAML 0.8

    Avatar

    It’s been a few years, but this doesn’t work with the latest version of Postman (v7.35.0). When I select the “Github” folder, it gives me this error:

    Error while importing RAML 0.8: Imported folder contains multiple Root of the RAML 0.8 Specs.