[GH-ISSUE #333] Import a Postman's Collection #121

Closed
opened 2026-03-16 13:32:32 +03:00 by kerem · 17 comments
Owner

Originally created by @FMGordillo on GitHub (Nov 25, 2019).
Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/333

Is your feature request related to a problem? Please describe.
Auth0.com offers a "Try with Postman" button that gives you a Collection of different APIs, but the schema of the output JSON is different from the one that Postwoman needs.

Describe the solution you'd like
An embedded transformer from Postman's Collection to Postwoman's Collection

Current Postman's schema:

{
  "id": "...",
  "name": "Auth0 Authentication API",
  "description": "....",
  "auth": null,
  "events": null,
  "variables": [...],
  "order": [...],
  "folders_order": [... ],
  "folders": [...],
  "requests": [...]
}

Current Postwoman's Schema:

[
  {
    "name": "My Collection",
    "folders": [],
    "requests": []
  }
]
Originally created by @FMGordillo on GitHub (Nov 25, 2019). Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/333 **Is your feature request related to a problem? Please describe.** [Auth0.com](https://auth0.com) offers a "Try with Postman" button that gives you a Collection of different APIs, but the schema of the output JSON is different from the one that Postwoman needs. **Describe the solution you'd like** An embedded transformer from Postman's Collection to Postwoman's Collection Current Postman's schema: ``` { "id": "...", "name": "Auth0 Authentication API", "description": "....", "auth": null, "events": null, "variables": [...], "order": [...], "folders_order": [... ], "folders": [...], "requests": [...] } ``` Current Postwoman's Schema: ``` [ { "name": "My Collection", "folders": [], "requests": [] } ] ```
kerem 2026-03-16 13:32:32 +03:00
Author
Owner

@FMGordillo commented on GitHub (Nov 25, 2019):

And when I try to insert my collection, the console error is: Uncaught TypeError: Invalid attempt to spread non-iterable instance

<!-- gh-comment-id:557952899 --> @FMGordillo commented on GitHub (Nov 25, 2019): And when I try to insert my collection, the console error is: `Uncaught TypeError: Invalid attempt to spread non-iterable instance`
Author
Owner

@liyasthomas commented on GitHub (Nov 25, 2019):

I haven't look deep into it. But it seems like Postwoman does follow the same export format. Except the sample collection file. PW have provision for multiple Collections export as JSON array.

Try a sample collection export with multiple connection on Postwoman. It would be similar to this:

[
  {
    "name": "My Collection",
    "folders": [],
    "requests": []
  },
  {
    "name": "Hh",
    "folders": [],
    "requests": []
  }
]

The above export contains 2 Collections and is in array. Try multiple Collections export in PM and check it solves the import issue.

<!-- gh-comment-id:557954478 --> @liyasthomas commented on GitHub (Nov 25, 2019): I haven't look deep into it. But it seems like Postwoman does follow the same export format. Except the sample collection file. PW have provision for multiple Collections export as JSON array. Try a sample collection export with multiple connection on Postwoman. It would be similar to this: ``` [ { "name": "My Collection", "folders": [], "requests": [] }, { "name": "Hh", "folders": [], "requests": [] } ] ``` The above export contains 2 Collections and is in array. Try multiple Collections export in PM and check it solves the import issue.
Author
Owner

@sheldon-markk commented on GitHub (Dec 9, 2019):

How to we import a postman collection? is there a way to do this?

<!-- gh-comment-id:563083107 --> @sheldon-markk commented on GitHub (Dec 9, 2019): How to we import a postman collection? is there a way to do this?
Author
Owner

@Aditya94A commented on GitHub (Jan 25, 2020):

Just saw this, I tried to import postman collection here:
image

It doesn't seem to be working. No new collection is created.

<!-- gh-comment-id:578390883 --> @Aditya94A commented on GitHub (Jan 25, 2020): Just saw this, I tried to import postman collection here: ![image](https://user-images.githubusercontent.com/13274079/73119040-789bdb80-3f82-11ea-9177-bc24c0c69a5a.png) It doesn't seem to be working. No new collection is created.
Author
Owner

@liyasthomas commented on GitHub (Jan 25, 2020):

That option is for Postwoman Collections.

<!-- gh-comment-id:578391207 --> @liyasthomas commented on GitHub (Jan 25, 2020): That option is for Postwoman Collections.
Author
Owner

@Aditya94A commented on GitHub (Jan 27, 2020):

Strongly recommend re-opening.

Just as an example (my use-case): There are a few things stopping me from using postwoman, the second biggest one is the fact that I already have 10+ collection with on average 20+ requests in each collection on Postman (the biggest one is teams). So, the prospect of manually re-inputting all of my 200 requests is daunting enough that I'll probably never get around to it. However, if it was one-click it would be really enticing for me (and I imagine most postman users to give this a shot, likely correlating with a direct spike in the usage and popularity of postwoman as an alternative)

Should be relatively straightforward to dig into postman collection export format as they export it in a human-readable way and even encourage applications (like testing) to be built on top of it since it's so simple. 😄

<!-- gh-comment-id:578580351 --> @Aditya94A commented on GitHub (Jan 27, 2020): Strongly recommend re-opening. Just as an example (my use-case): There are a few things stopping me from using postwoman, the second biggest one is the fact that I already have 10+ collection with on average 20+ requests in each collection on Postman (the biggest one is teams). So, the prospect of manually re-inputting all of my 200 requests is daunting enough that I'll probably never get around to it. However, if it was one-click it would be really enticing for me (and I imagine most postman users to give this a shot, likely correlating with a direct spike in the usage and popularity of postwoman as an alternative) Should be relatively straightforward to dig into postman collection export format as they export it in a human-readable way and even encourage applications (like testing) to be built on top of it since it's so simple. 😄
Author
Owner

@liyasthomas commented on GitHub (Feb 9, 2020):

Considering the backward compatibility for this feature, I think its not possible to implement "Postman' s collection import" feature. I'll investigate more into this and already synced Collections for its practical integration.

<!-- gh-comment-id:583806561 --> @liyasthomas commented on GitHub (Feb 9, 2020): Considering the backward compatibility for this feature, I think its not possible to implement "Postman' s collection import" feature. I'll investigate more into this and already synced Collections for its practical integration.
Author
Owner

@bee22193 commented on GitHub (Feb 9, 2020):

ในข้อความดังต้นนัน.. ทีมgoogle ได้ตัดสินใจเอาเพราะมีการเข้าระบบบันชีจริง..
จับได้คือสองจุด... จะให้ตอบบไหนอีก.. สนุกเหรอหัวเราะ

กิตติพันธ์

ในวันที่ อา. 9 ก.พ. 2020 12:29 น. Liyas Thomas notifications@github.com
เขียนว่า:

Considering the backward compatibility for this feature, I think its not
possible to implement "Postman' s collection import" feature. I'll
investigate more into this and already synced Collections and its practical
integration.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/liyasthomas/postwoman/issues/333?email_source=notifications&email_token=AOICORF3LBJQB3YSWRNPPYTRB6IDXA5CNFSM4JRCDUQ2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOELGC4YI#issuecomment-583806561,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AOICORAHBU2WMWLGMT2FDH3RB6IDXANCNFSM4JRCDUQQ
.

<!-- gh-comment-id:583807263 --> @bee22193 commented on GitHub (Feb 9, 2020): ในข้อความดังต้นนัน.. ทีมgoogle ได้ตัดสินใจเอาเพราะมีการเข้าระบบบันชีจริง.. จับได้คือสองจุด... จะให้ตอบบไหนอีก.. สนุกเหรอหัวเราะ กิตติพันธ์ ในวันที่ อา. 9 ก.พ. 2020 12:29 น. Liyas Thomas <notifications@github.com> เขียนว่า: > Considering the backward compatibility for this feature, I think its not > possible to implement "Postman' s collection import" feature. I'll > investigate more into this and already synced Collections and its practical > integration. > > — > You are receiving this because you are subscribed to this thread. > Reply to this email directly, view it on GitHub > <https://github.com/liyasthomas/postwoman/issues/333?email_source=notifications&email_token=AOICORF3LBJQB3YSWRNPPYTRB6IDXA5CNFSM4JRCDUQ2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOELGC4YI#issuecomment-583806561>, > or unsubscribe > <https://github.com/notifications/unsubscribe-auth/AOICORAHBU2WMWLGMT2FDH3RB6IDXANCNFSM4JRCDUQQ> > . >
Author
Owner

@Aditya94A commented on GitHub (Feb 9, 2020):

How about a simple one-to-one converter for postman collection format to postwoman collection format? Then it becomes a simple abstraction on top of the already existing code to import postwoman collections.

Input a postman collection, it internally reformats it to the same format as a normal postwoman collection and then uses that.

To lower the effort required when dealing with backward compatibility, perhaps picking only one format version (say, only the current latest v2.1 postman collection format can be imported to postwoman) should make it easier, since v2.1 collection schema will never change (as Postman follows semver for collection versions).

<!-- gh-comment-id:583830358 --> @Aditya94A commented on GitHub (Feb 9, 2020): How about a simple one-to-one converter for postman collection format to postwoman collection format? Then it becomes a simple abstraction on top of the already existing code to import postwoman collections. Input a postman collection, it internally reformats it to the same format as a normal postwoman collection and then uses that. To lower the effort required when dealing with backward compatibility, perhaps picking only one format version (say, only the current latest v2.1 postman collection format can be imported to postwoman) should make it easier, since v2.1 collection schema will never change (as Postman follows semver for collection versions).
Author
Owner

@JacobAnavisca commented on GitHub (Feb 15, 2020):

Just created a PR for this https://github.com/liyasthomas/postwoman/pull/574 and also added an import check

<!-- gh-comment-id:586647877 --> @JacobAnavisca commented on GitHub (Feb 15, 2020): Just created a PR for this https://github.com/liyasthomas/postwoman/pull/574 and also added an import check
Author
Owner

@liyasthomas commented on GitHub (Feb 17, 2020):

Resolved in #574 huge thanks to @JacobAnavisca

Postwoman now supports importing Postman Collections v2.1.0

<!-- gh-comment-id:586890093 --> @liyasthomas commented on GitHub (Feb 17, 2020): Resolved in #574 huge thanks to @JacobAnavisca Postwoman now supports importing [Postman Collections `v2.1.0`](https://schema.getpostman.com/json/collection/latest/docs/index.html)
Author
Owner

@allthesignals commented on GitHub (Mar 23, 2020):

How do you use this?

<!-- gh-comment-id:602730142 --> @allthesignals commented on GitHub (Mar 23, 2020): How do you use this?
Author
Owner

@liyasthomas commented on GitHub (Mar 23, 2020):

@allthesignals
Navigate to Collection tab on right side bar.
Click "Import/Export"
Click "Import from JSON"
Select any Postman_collection.json file

<!-- gh-comment-id:602866797 --> @liyasthomas commented on GitHub (Mar 23, 2020): @allthesignals Navigate to Collection tab on right side bar. Click "Import/Export" Click "Import from JSON" Select any Postman_collection.json file
Author
Owner

@mahoriR commented on GitHub (Jul 1, 2020):

I really want to try postwoman as a replacement to postman but inability to import postman collection is a deal breaker. This is the console log on chrome-

Uncaught TypeError: Cannot read property 'folders' of undefined
    at f.parsePostmanCollection (d598b93aaba4329b6520.js:1)
    at f.parsePostmanCollection (d598b93aaba4329b6520.js:1)
    at FileReader.t.onload (d598b93aaba4329b6520.js:1)
parsePostmanCollection @ d598b93aaba4329b6520.js:1
parsePostmanCollection @ d598b93aaba4329b6520.js:1
t.onload @ d598b93aaba4329b6520.js:1
load (async)
importFromJSON @ d598b93aaba4329b6520.js:1
Qt @ 557011e92a0d7fd3749c.js:2
n @ 557011e92a0d7fd3749c.js:2
c._wrapper @ 557011e92a0d7fd3749c.js:2

Note: I'm able to import the same collection in insomnia.

<!-- gh-comment-id:652253402 --> @mahoriR commented on GitHub (Jul 1, 2020): I really want to try postwoman as a replacement to postman but inability to import postman collection is a deal breaker. This is the console log on chrome- ``` Uncaught TypeError: Cannot read property 'folders' of undefined at f.parsePostmanCollection (d598b93aaba4329b6520.js:1) at f.parsePostmanCollection (d598b93aaba4329b6520.js:1) at FileReader.t.onload (d598b93aaba4329b6520.js:1) parsePostmanCollection @ d598b93aaba4329b6520.js:1 parsePostmanCollection @ d598b93aaba4329b6520.js:1 t.onload @ d598b93aaba4329b6520.js:1 load (async) importFromJSON @ d598b93aaba4329b6520.js:1 Qt @ 557011e92a0d7fd3749c.js:2 n @ 557011e92a0d7fd3749c.js:2 c._wrapper @ 557011e92a0d7fd3749c.js:2 ``` **Note**: I'm able to import the same collection in insomnia.
Author
Owner

@liyasthomas commented on GitHub (Jul 1, 2020):

It's a known issue that Importing Postman Collections fails on nested Collections.
Kindly track this issue: https://github.com/liyasthomas/postwoman/issues/850

<!-- gh-comment-id:652254564 --> @liyasthomas commented on GitHub (Jul 1, 2020): It's a known issue that Importing Postman Collections fails on nested Collections. Kindly track this issue: https://github.com/liyasthomas/postwoman/issues/850
Author
Owner

@hyfydistro commented on GitHub (May 20, 2022):

Is it possible to export for postman?

<!-- gh-comment-id:1132416332 --> @hyfydistro commented on GitHub (May 20, 2022): Is it possible to export for postman?
Author
Owner

@AndrewBastin commented on GitHub (May 20, 2022):

@hyfydistro not yet, but there is an open issue for this. Follow #2092 for tracking implementation.

<!-- gh-comment-id:1132712428 --> @AndrewBastin commented on GitHub (May 20, 2022): @hyfydistro not yet, but there is an open issue for this. Follow #2092 for tracking implementation.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/hoppscotch#121
No description provided.