{ "opencollection": "1.0.0", "info": { "name": "Postman Mocks API", "version": "1.0.0" }, "items": [ { "info": { "name": "mocks", "type": "folder" }, "items": [ { "info": { "name": "Get all mock servers", "type": "http" }, "http": { "method": "GET", "url": "https://api.postman.com/mocks", "headers": [ { "name": "x-api-key", "value": "" } ], "params": [ { "name": "teamId", "value": "", "type": "query", "description": "Return only results that belong to the given team ID." }, { "name": "workspace", "value": "", "type": "query", "description": "Return only results found in the given workspace ID." } ] }, "docs": "Gets all active mock servers. By default, this endpoint returns only mock servers you created across all workspaces.\n\n**Note:**\n\nIf you pass both the `teamId` and `workspace` query parameters, this endpoint only accepts the `workspace` query.\n" }, { "info": { "name": "Create a mock server", "type": "http" }, "http": { "method": "POST", "url": "https://api.postman.com/mocks", "headers": [ { "name": "x-api-key", "value": "" } ], "params": [ { "name": "workspace", "value": "", "type": "query", "description": "The workspace's ID." } ], "body": { "type": "json", "data": "{}" } }, "docs": "Creates a mock server in a collection.\n\n**Note:**\n\n- You cannot create mocks for collections added to an API definition.\n- If you do not include the `workspaceId` query parameter, the system creates the mock server in the oldest personal Internal workspace you own.\n" }, { "info": { "name": "Get a mock server", "type": "http" }, "http": { "method": "GET", "url": "https://api.postman.com/mocks/:mockId", "headers": [ { "name": "x-api-key", "value": "" } ], "params": [ { "name": "mockId", "value": "", "type": "path", "description": "The mock's ID." } ] }, "docs": "Gets information about a mock server." }, { "info": { "name": "Update a mock server", "type": "http" }, "http": { "method": "PUT", "url": "https://api.postman.com/mocks/:mockId", "headers": [ { "name": "x-api-key", "value": "" } ], "params": [ { "name": "mockId", "value": "", "type": "path", "description": "The mock's ID." } ], "body": { "type": "json", "data": "{}" } }, "docs": "Updates a mock server's properties, such as its name or collection." }, { "info": { "name": "Delete a mock server", "type": "http" }, "http": { "method": "DELETE", "url": "https://api.postman.com/mocks/:mockId", "headers": [ { "name": "x-api-key", "value": "" } ], "params": [ { "name": "mockId", "value": "", "type": "path", "description": "The mock's ID." } ] }, "docs": "Deletes a mock server." }, { "info": { "name": "Get a mock server's call logs", "type": "http" }, "http": { "method": "GET", "url": "https://api.postman.com/mocks/:mockId/call-logs", "headers": [ { "name": "x-api-key", "value": "" } ], "params": [ { "name": "mockId", "value": "", "type": "path", "description": "The mock's ID." }, { "name": "limit", "value": "", "type": "query", "description": "The maximum number of rows to return in the response." }, { "name": "cursor", "value": "", "type": "query", "description": "The pointer to the first record of the set of paginated results. To view the next response, use the `nextCursor` value for this parameter." }, { "name": "until", "value": "", "type": "query", "description": "Return only results created until this given time, in [ISO 8601](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) format. This value cannot be earlier than the `since` value." }, { "name": "since", "value": "", "type": "query", "description": "Return only results created since the given time, in [ISO 8601](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) format. This value cannot be later than the `until` value." }, { "name": "responseStatusCode", "value": "", "type": "query", "description": "Return only call logs that match the given HTTP response status code." }, { "name": "responseType", "value": "", "type": "query", "description": "Return only call logs that match the given response type. Matching is not case-sensitive." }, { "name": "requestMethod", "value": "", "type": "query", "description": "Return only call logs that match the given HTTP method. Matching is not case-sensitive." }, { "name": "requestPath", "value": "", "type": "query", "description": "Return only call logs that match the given request path. Matching is not case-sensitive." }, { "name": "sort", "value": "", "type": "query", "description": "Sort the results by the given value. If you use this query parameter, you must also use the `direction` parameter." }, { "name": "direction", "value": "", "type": "query", "description": "Sort in ascending (`asc`) or descending (`desc`) order. Matching is not case-sensitive. If you use this query parameter, you must also use the `sort` parameter." }, { "name": "include", "value": "", "type": "query", "description": "Include call log records with header and body data. This query parameter accepts the `request.headers`, `request.body`, `response.headers`, and `response.body` values. For multiple include types, comma-separate each value." } ] }, "docs": "Gets a mock server's call logs. You can get a maximum of 6.5MB of call logs or a total of 100 call logs, whichever limit is met first in one API call.\n\nCall logs contain exchanged request and response data made to mock servers. The logs provide visibility into how the mock servers are being used. You can log data to debug, test, analyze, and more, depending upon the use case.\n\n**Note:**\n\nCall logs have a retention period based on your [Postman plan](https://www.postman.com/pricing/#mock-calls). " }, { "info": { "name": "Publish a mock server", "type": "http" }, "http": { "method": "POST", "url": "https://api.postman.com/mocks/:mockId/publish", "headers": [ { "name": "x-api-key", "value": "" } ], "params": [ { "name": "mockId", "value": "", "type": "path", "description": "The mock's ID." } ] }, "docs": "Publishes a mock server. Publishing a mock server sets its **Access Control** configuration setting to public." }, { "info": { "name": "Unpublish a mock server", "type": "http" }, "http": { "method": "DELETE", "url": "https://api.postman.com/mocks/:mockId/unpublish", "headers": [ { "name": "x-api-key", "value": "" } ], "params": [ { "name": "mockId", "value": "", "type": "path", "description": "The mock's ID." } ] }, "docs": "Unpublishes a mock server. Unpublishing a mock server sets its **Access Control** configuration setting to private." }, { "info": { "name": "Get all server responses", "type": "http" }, "http": { "method": "GET", "url": "https://api.postman.com/mocks/:mockId/server-responses", "headers": [ { "name": "x-api-key", "value": "" } ], "params": [ { "name": "mockId", "value": "", "type": "path", "description": "The mock's ID." } ] }, "docs": "Gets all of a mock server's server responses." }, { "info": { "name": "Create a server response", "type": "http" }, "http": { "method": "POST", "url": "https://api.postman.com/mocks/:mockId/server-responses", "headers": [ { "name": "x-api-key", "value": "" } ], "params": [ { "name": "mockId", "value": "", "type": "path", "description": "The mock's ID." } ], "body": { "type": "json", "data": "{}" } }, "docs": "Creates a server response. Server responses let you simulate 5xx server-level responses, such as 500 or 503.\n\nServer-level responses are agnostic to application-level logic. Server responses let you simulate this behavior on a mock server. You do not need to define each error for all exposed paths on the mock server.\n\nIf you set a server response as active, then all the calls to the mock server return with that active server response.\n\n**Note:**\n\nYou can create multiple server responses for a mo" }, { "info": { "name": "Get a server response", "type": "http" }, "http": { "method": "GET", "url": "https://api.postman.com/mocks/:mockId/server-responses/:serverResponseId", "headers": [ { "name": "x-api-key", "value": "" } ], "params": [ { "name": "mockId", "value": "", "type": "path", "description": "The mock's ID." }, { "name": "serverResponseId", "value": "", "type": "path", "description": "The server response's ID." } ] }, "docs": "Gets information about a server response." }, { "info": { "name": "Update a server response", "type": "http" }, "http": { "method": "PUT", "url": "https://api.postman.com/mocks/:mockId/server-responses/:serverResponseId", "headers": [ { "name": "x-api-key", "value": "" } ], "params": [ { "name": "mockId", "value": "", "type": "path", "description": "The mock's ID." }, { "name": "serverResponseId", "value": "", "type": "path", "description": "The server response's ID." } ], "body": { "type": "json", "data": "{}" } }, "docs": "Updates a server response." }, { "info": { "name": "Delete a server response", "type": "http" }, "http": { "method": "DELETE", "url": "https://api.postman.com/mocks/:mockId/server-responses/:serverResponseId", "headers": [ { "name": "x-api-key", "value": "" } ], "params": [ { "name": "mockId", "value": "", "type": "path", "description": "The mock's ID." }, { "name": "serverResponseId", "value": "", "type": "path", "description": "The server response's ID." } ] }, "docs": "Deletes a mock server's server response." } ] } ], "bundled": true }