Import this API into Postman

Postman is a free tool for testing and interfacing with APIs. You can download it here.

Use the OpenAPI spec to create a Postman collection with the current endpoints, request bodies, and authentication settings.

Download OpenAPI Spec Changelog Back to API Docs
  1. In Postman, open your workspace. In the left sidebar, click the three-dot menu next to the sidebar controls, then choose Import. If you only see Create manually, go back to the main workspace sidebar and use this three-dot menu import option.
  2. Postman sidebar menu with Import selected
    Use the sidebar three-dot menu to start an import.
  3. Paste this link into the import field https://www.eatthismuch.com/g/openapi.yaml or choose Files and select the downloaded eatthismuch-api.yaml file.
  4. When Postman asks how to import the specification, choose OpenAPI 3.0 Specification with a Postman Collection, then click Import. This keeps the collection linked to the API specification.
  5. Postman import dialog with OpenAPI 3.0 Specification with a Postman Collection selected
    Choose the OpenAPI specification option, not the Postman Collection option.
  6. Postman will create a linked collection from the OpenAPI spec. Open that collection, then select the Authorization tab. Set Auth Type to API Key, set Key to X-API-Key, paste your API key into Value, and leave Add to set to Header.
  7. Postman collection Authorization tab configured for API Key auth
    Set the API key once on the collection so requests inherit it.
  8. To test generation, open gapi > generate > week > Generate week meal plan. Use the Params tab for options like output, format, and include_groceries, then open the Body tab to edit the JSON request before clicking Send.
  9. Postman Generate week meal plan endpoint with query params
    The generated collection groups endpoints by path, such as gapi > generate > week.
  10. For later OpenAPI changes, open Specs > Eat This Much API, select the YAML spec file, replace its contents with the updated openapi.yaml, and save. Then use Update Collection in the top right to apply the spec changes to the linked Postman collection.
  11. Postman spec editor with Update Collection control
    Paste updated YAML into the spec, then update the linked collection.