# Importing Postman files with /api/\*\*\* endpoints not working

**URL:** <https://community.postman.com/t/importing-postman-files-with-api-endpoints-not-working/64266>\
**Category:** Help Hub\
**Tags:** import\
**Created:** [July 18, 2024, 2:52pm UTC](https://community.postman.com/t/importing-postman-files-with-api-endpoints-not-working/64266 "2024-07-18T14:52:14Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![aviation-explorer-21](https://avatars.discourse-cdn.com/v4/letter/a/7c8e57/32.png) [@aviation-explorer-21](https://community.postman.com/u/aviation-explorer-21)\
**Post date:** [July 18, 2024, 2:52pm UTC](https://community.postman.com/t/importing-postman-files-with-api-endpoints-not-working/64266/1 "2024-07-18T14:52:14Z")

</div>

I have a Postman collection that I have exported as a .json file and store in my team’s GitLab repo. We recently updated our endpoints to have /api prefixing them, so I edited the .json file to reflect those changes. I then imported the .json file into Postman, but the /api changes did not reflect in Postman. For example, this is one of the endpoints:

```auto
"request": {
						"method": "GET",
						"header": [],
						"url": {
							"raw": "{{API_BASE_URL}}/api/payroll/actuals?",
							"host": [
								"{{API_BASE_URL}}"
							],
						}
					},
					"response": []
				},

```

Any idea why this is not importing my endpoints correctly?  
 ![Screenshot 2024-07-18 at 10.51.51 AM](https://us1.discourse-cdn.com/getpostman/original/3X/9/5/953c7e6c150f4365918c0f70149d1a89e66826e5.png)

---

<div class="post-metadata">

**Author:** ![danny-dainton](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/danny-dainton/32/29401_2.png) [@danny-dainton](https://community.postman.com/u/danny-dainton)\
**Post date:** [July 18, 2024, 3:06pm UTC](https://community.postman.com/t/importing-postman-files-with-api-endpoints-not-working/64266/2 "2024-07-18T15:06:56Z")

</div>

Hey @aviation-explorer-21 👋

Are you able to share a scaled down version of your edited Collection file?

You can also try and manually create the correct request in Postman and export that. That can be used to do a 1:1 comparison with your changes and what the changes should look like?

---

<div class="post-metadata">

**Author:** ![aviation-explorer-21](https://avatars.discourse-cdn.com/v4/letter/a/7c8e57/32.png) [@aviation-explorer-21](https://community.postman.com/u/aviation-explorer-21)\
**Post date:** [July 18, 2024, 3:14pm UTC](https://community.postman.com/t/importing-postman-files-with-api-endpoints-not-working/64266/3 "2024-07-18T15:14:51Z")

</div>

I just changed the endpoint manually in Postman and exported the collection and I can see that the request is identical

```auto
{
	"info": {
		"_postman_id": "***",
		"name": "SPM API",
		"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
	},
	"item": [
		{
			"name": "Payroll",
			"item": [
				{
					"name": "Actuals-Workday",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"pm.test(\"No errors are returned\", function () {",
									" var json = pm.response.json();",
									" pm.expect(json).to.not.ownProperty(\"errors\");",
									"});",
									"",
									"var payrollData = pm.response.json();",
									"",
									"pm.test(\"There was data returned\", function () {",
									" pm.expect(payrollData).length.to.greaterThan(0)",
									"});",
									""
								],
								"type": "text/javascript"
							}
						}
					],
					"request": {
						"method": "GET",
						"header": [],
						"url": {
							"raw": "{{API_BASE_URL}}/api/payroll/actuals",
							"host": [
								"{{API_BASE_URL}}"
							],
							"path": [
								"payroll",
								"actuals"
							]
						}
					},
					"response": []
				}
			]
		}
	]
}

```

Above is a small part of the collection. I have almost 20 endpoints (which is why I just wanted to edit the json file), but I shared just one. This code above when I import into Postman does not the /api reflected.

---

<div class="post-metadata">

**Author:** ![aviation-explorer-21](https://avatars.discourse-cdn.com/v4/letter/a/7c8e57/32.png) [@aviation-explorer-21](https://community.postman.com/u/aviation-explorer-21)\
**Post date:** [July 18, 2024, 3:20pm UTC](https://community.postman.com/t/importing-postman-files-with-api-endpoints-not-working/64266/4 "2024-07-18T15:20:07Z")

</div>

Oh I see it must be part of the “path”, not sure why there are two places that controller the URL of the endpoint.

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/system/32/29796_2.png) [@system](https://community.postman.com/u/system)\
**Post date:** [August 17, 2024, 3:21pm UTC](https://community.postman.com/t/importing-postman-files-with-api-endpoints-not-working/64266/5 "2024-08-17T15:21:05Z")

</div>

Closed on August 17, 2024, 3:21pm UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
