openapi: 3.0.3 info: title: Basket Pantry API description: Pantry is a free service that provides perishable data storage for small projects. Use the RESTful API to post JSON objects and Pantry will store them. Data is automatically deleted after a period of inactivity. version: 1.0.0 contact: name: Pantry url: https://getpantry.cloud/ license: name: MIT servers: - url: https://getpantry.cloud/apiv1 description: Pantry production API tags: - name: Pantry description: Pantry account (account-level operations) paths: /pantry/create: post: tags: - Pantry summary: Create a new pantry description: Create a new pantry account, returning a pantry ID used for all subsequent calls. operationId: createPantry requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/CreatePantryRequest' responses: '200': description: Pantry created; returns the new pantry ID. content: text/plain: schema: type: string '400': description: Invalid request. /pantry/{pantryID}: get: tags: - Pantry summary: Get pantry details operationId: getPantry parameters: - $ref: '#/components/parameters/PantryID' responses: '200': description: Pantry details. content: application/json: schema: $ref: '#/components/schemas/Pantry' '400': description: Could not retrieve pantry. put: tags: - Pantry summary: Update pantry details operationId: updatePantry parameters: - $ref: '#/components/parameters/PantryID' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/UpdatePantryRequest' responses: '200': description: Updated pantry. content: application/json: schema: $ref: '#/components/schemas/Pantry' '400': description: Could not update pantry. delete: tags: - Pantry summary: Delete a pantry operationId: deletePantry parameters: - $ref: '#/components/parameters/PantryID' responses: '204': description: Pantry deleted. '400': description: Could not delete pantry. components: parameters: PantryID: name: pantryID in: path required: true description: The unique pantry identifier returned from create. schema: type: string format: uuid schemas: CreatePantryRequest: type: object required: - name - description - contactEmail properties: name: type: string description: Display name for the pantry. description: type: string description: Description of the pantry. contactEmail: type: string format: email description: Contact email associated with this pantry. UpdatePantryRequest: type: object properties: name: type: string description: type: string Pantry: type: object properties: name: type: string description: type: string errors: type: array items: type: string notifications: type: boolean percentFull: type: integer baskets: type: array items: $ref: '#/components/schemas/BasketSummary' BasketSummary: type: object properties: name: type: string ttl: type: integer description: Time-to-live in seconds before basket expiry.