netbeans-rest-client icon indicating copy to clipboard operation
netbeans-rest-client copied to clipboard

Import and map postman exported data

Open Chris2011 opened this issue 2 years ago • 3 comments

I encountered, that I can export a collection with different requests from postman and it would be cool, if we can import it and use the same data from postman. Here is a demo file:

{
	"info": {
		"_postman_id": "120d6e73-976e-44e9-9ebf-264f5d16ce96",
		"name": "Test",
		"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
	},
	"item": [
		{
			"name": "New Request",
			"request": {
				"method": "GET",
				"header": [],
				"url": {
					"raw": "puls-webagentur.de",
					"host": [
						"puls-webagentur",
						"de"
					]
				}
			},
			"response": []
		}
	]
}

Chris2011 avatar Aug 24 '23 19:08 Chris2011

It would be useful. So the idea would be opening a tab per "item". What I don't understand is why "host" is an array. Do you know where can I learn more about this data format?

javierllorente avatar Aug 24 '23 20:08 javierllorente

I would just say, take postman and play around. When I google for that I couldn't find that much except the json org scheme: https://schema.postman.com/collection/json/v2.0.0/draft-04/collection.json

But there is also v2.0.1 which is not public yet, it seems.

Chris2011 avatar Aug 25 '23 08:08 Chris2011

I couldn't find much info either. Thanks. I will take a look at it.

javierllorente avatar Aug 26 '23 20:08 javierllorente

Sorry. I had forgotten about it. I have just pushed an initial version. The import/export buttons can be found in the miscellaneous section; Tools → Options → Miscellaneous → REST Client Only request method and URL can be imported/exported for now. Commit db422d2

javierllorente avatar Jul 11 '24 22:07 javierllorente

Headers can be now imported/exported. Commit 1211ada

javierllorente avatar Jul 12 '24 23:07 javierllorente

Closing this issue as it is now completed.

javierllorente avatar Jul 13 '24 09:07 javierllorente

Awesome :)

Chris2011 avatar Jul 14 '24 08:07 Chris2011