404 getting workspace https://api.getpostman.com/workspaces/{{workspace_id}}

Hi,

I have started getting a 404 response when querying a particular workspace by ID.
Nothing has changed as far as I can tell… it had been working the last number of days.

I can get all workspaces fine with a GET to https://api.getpostman.com/workspaces
The particular failing workspace is included in the response.

{
    "workspaces": [
        {
            "id": "xxxxxxxxxxxxxxxxxx",
            "name": "workspace 1",
            "type": "team"
        },
        {
            "id": "xxxxxxxxxxxxxxxxxx",
            "name": "workspace 2",
            "type": "team"
        },
        .....
    ]
}

When I query the individual workspaces by ID, only that 1 particular workspace gives a 404.

{
    "error": {
        "name": "instanceNotFoundError",
        "message": "We could not find the collection you are looking for",
        "statusCode": 404
    }
}

The error message say “We could not find the collection you are looking for”.
It’s the workspaces API I am using with a workspace GUID too.
I’m wondering if there is some issue with a collection within the workspace that is causing the problem?

All the others workspaces can be retrieved fine by their GUID, returning 200 and including the workspace’s collections in the response.

Any ideas what’s going on here?
Tried with a new api key, confirmed my user has access to the workspace etc.
I can see the workspace fine in the postman app and in browser.

Hi @EoinHealy_AS

The only way I have been able to replicate this is if the 36-character UID is incorrect.

Can you confirm that the workspace UID you are using matches what you see manually?

If you didn’t already know, you can check it manually like this;

Hi @w4dd325,

Yep I can confirm I have the correct UID. I copied it from the workspace details in the UI as you mentioned just to be sure.

I then modified the value just to compare the response with an incorrect GUID and I get 2 different error messages.

With an incorrect GUID, I get

{
    "error": {
        "name": "instanceNotFoundError",
        "message": "We could not find the **workspace** you are looking for",
        "statusCode": 404
    }
}

With the correct GUID I get

{
    "error": {
        "name": "instanceNotFoundError",
        "message": "We could not find the **collection** you are looking for",
        "statusCode": 404
    }
}

That error message make me think there is some collection in the workspace that is invalid.

Just spotted in the workspace overview that there should be 7 collections but there are only 6 visible in the UI. I wonder if there is something wrong with that other collection…

I’m not convinced that would be the issue. My demo workspace has a forked collection and I think those values are picked up in the figures on the right.

Like this;

Hmm thanks @w4dd325 for that. I’m still not sure what the issue was.

We haven’t been using that fork feature before. I tried deleting collections 1 by 1 to see if that would fix it. Eventually I had no collections left and the UI was still saying 1 collection contained in the workspace but none were visible.

I tried using the postman API to do a PUT with an empty collections array to see if that would fix it. I got a 200 on the workspace PUT update, but still got 404s on the GET.

In the end, I just deleted the workspace, created a new one and imported back in the collections that I had deleted. I get a 200 on the new workspace now at least. But I’m still not sure what exactly was wrong with the original one…