Is there an API to fetch public workspaces?

curl -X GET "https://api.getpostman.com/workspaces/postman-public-workspace" --header "X-API-Key: MY-SECRET"

Tried using this endpoint which I found in from Postman public workspace. I’m getting an error

{
    "error": {
        "name": "forbiddenError",
        "message": "You are not permitted to perform the action."
    }
}

How can I programmatically fetch data of any public workspace, using the workspace ID? I need every data point possible- contributor names, activity, workspace description, collection IDs etc.

Hi @secretshardul! Welcome to our community :wave:

With this endpoint (https://api.getpostman.com/workspaces/:workspace_uid), it expects “workspace_uid” rather than the name of the workspace.

So you can try with the following instead where 405e0480-49cf-463b-8052-6c0d05a8e8f3 is the workspace UID of the public workspace:

curl --location --request GET 'https://api.getpostman.com/workspaces/405e0480-49cf-463b-8052-6c0d05a8e8f3' \
--header 'X-API-Key: YOUR_API_KEY' 

Hope this helps!

1 Like

@taehoshino thanks for the answer, it’s working! But I need more data points, for this endpoint only provides description, collections and environments.

{
    "workspace": {
        "id": "405e0480-49cf-463b-8052-6c0d05a8e8f3",
        "name": "Postman Public Workspace",
        "type": "team",
        "description": "Postman public workspace has our Postman API and other collections that enable developers, engineers, architects, testers, product managers and other API consumers to accomplish a lot of their workflows programmatically.\n\n## Purpose\nThis public workspace is designed to provide a central place for Postman teams to publish the public Postman APIs and collections we use to accomplish our work, while also making them available for Postman developers to use.\n\n## Engage\nThis is a public workspace intended to provide multiple engagement opportunities for Postman developers to put the Postman platform and our APIs to work, helping automate how developers are providing and consuming APIs.\n\n- **Watch APIs** -\nYou can watch APIs, receiving updates when Postman makes changes.\n\n- **API Comments** -\nYou can comment on each API published to this public workspace.\n\n- **Collection Comments** -\nYou can comment on each collection published to this workspace.\n\n- **Fork Collections** -\nYou are welcome to fork each collection and put to use in your workspaces.\n\n- **Pull Requests** -\nWe welcome pull requests to help us evolve and improve our collections.\n\n- [**Community**](https://community.postman.com/)\nPost your general questions to the Postman community forum.",
        "collections": [
            {
                "id": "46774162-3c70-4266-8255-ff3ea44e9621",
                "name": "API Usage",
                "uid": "12959542-46774162-3c70-4266-8255-ff3ea44e9621"
            },
            {
                "id": "10307621-5191-4182-9678-0d26bad16940",
                "name": "API Lifecycle",
                "uid": "12959542-10307621-5191-4182-9678-0d26bad16940"
            },
            {
                "id": "c1c7aed2-9d10-42b3-813c-5373539c4f1d",
                "name": "Environment Scanner",
                "uid": "12959542-c1c7aed2-9d10-42b3-813c-5373539c4f1d"
            },
            {
                "id": "6384d25d-7df7-417a-a408-121d860e0333",
                "name": "Governance - Design",
                "uid": "12959542-6384d25d-7df7-417a-a408-121d860e0333"
            },
            {
                "id": "805366ba-5684-44d1-b75c-f47885c3c87a",
                "name": "Postman to JMeter",
                "uid": "12959542-805366ba-5684-44d1-b75c-f47885c3c87a"
            },
            {
                "id": "3326f10b-6914-4ba9-9de3-f9adbf9e6381",
                "name": "Team Transfer",
                "uid": "12959542-3326f10b-6914-4ba9-9de3-f9adbf9e6381"
            },
            {
                "id": "f29af2d2-c172-4aaf-9771-94fd7c8f6fce",
                "name": "Update Schema from VCS",
                "uid": "12959542-f29af2d2-c172-4aaf-9771-94fd7c8f6fce"
            },
            {
                "id": "669ab9ff-c44c-4d51-bdf6-a92cfd2ac1b3",
                "name": "Tools that use Postman API",
                "uid": "12959542-669ab9ff-c44c-4d51-bdf6-a92cfd2ac1b3"
            },
            {
                "id": "c614a5da-501b-4ced-994d-1100a4b600b3",
                "name": "Governance - Full Lifecycle",
                "uid": "12959542-c614a5da-501b-4ced-994d-1100a4b600b3"
            },
            {
                "id": "c8142d51-e97c-46b6-bd77-52bb66712c9a",
                "name": "Postman API (OpenAPI)",
                "uid": "12959542-c8142d51-e97c-46b6-bd77-52bb66712c9a"
            }
        ],
        "environments": [
            {
                "id": "169f997e-885f-4f2a-86b6-be1a4f520e22",
                "name": "Environment Scanner",
                "uid": "5922408-169f997e-885f-4f2a-86b6-be1a4f520e22"
            },
            {
                "id": "f0eefc94-0be4-42c9-ae71-a831ab297a2f",
                "name": "Team transfer",
                "uid": "5922408-f0eefc94-0be4-42c9-ae71-a831ab297a2f"
            },
            {
                "id": "fa1c7be7-97ef-421f-ba59-b86f4291ef2a",
                "name": "Postman to JMeter",
                "uid": "5922408-fa1c7be7-97ef-421f-ba59-b86f4291ef2a"
            },
            {
                "id": "e6510a1e-9967-44b0-a626-1387822a682b",
                "name": "API Lifecycyle",
                "uid": "5922408-e6510a1e-9967-44b0-a626-1387822a682b"
            },
            {
                "id": "a8f466c4-dcf9-42a6-a024-2a5c400340cd",
                "name": "API Usage",
                "uid": "5922408-a8f466c4-dcf9-42a6-a024-2a5c400340cd"
            },
            {
                "id": "6d01dd05-b174-4ac9-9741-56d561fe7bca",
                "name": "Governance",
                "uid": "5922408-6d01dd05-b174-4ac9-9741-56d561fe7bca"
            },
            {
                "id": "cd4b55cc-e0d1-4bae-be01-ed7f26c750db",
                "name": "New Environment",
                "uid": "14053826-cd4b55cc-e0d1-4bae-be01-ed7f26c750db"
            }
        ]
    }
}

Are there APIs for

  1. Getting contributor details, activity feed per workspace.

    Contributors

    Activity feed

  2. Getting list of public workplaces, as seen on the explore page.

Hey @secretshardul!

Currently there is no other endpoints that return those details - however, that might be a useful feature to have :smiling_face_with_three_hearts:

We track our issues publicly on GitHub and would love for you to file this request there so other customers can also weigh in. Our product managers use that feedback to prioritize and add items to our development roadmap :wink: