The Import
feature will only be able to parse known formats, it’s not a general-purpose importer. It requires the file to be in a specific format - hence the reason why you would see an error message if it’s not.
The Collection format in most basic would be this:
{
"info": {
"name": "New Collection",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
},
"item": []
}
That would display, once imported, an empty Collection.
As you add more Folders and Requests to the Collection, the structure will start to look more like this:
{
"info": {
"name": "New Collection",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
},
"item": [
{
"name": "New Folder",
"item": [
{
"name": "New Request",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "https://postman-echo.com/get",
"protocol": "https",
"host": [
"postman-echo",
"com"
],
"path": [
"get"
]
}
},
"response": []
}
]
}
]
}
This will increase in size and change as you add more complex requests and items, such as Collection Variables
to the Collection.
I’m not really sure what your final requests would look like, given the file that you have created so I couldn’t give you a better answer.
This is the raw schema for the Postman Collection Format v2.1.0