### GET /api/collections/products/records Source: https://reqres.in/docs Lists records from the Products collection. Requires an x-api-key header and optionally an X-Reqres-Env header. ```APIDOC ## GET /api/collections/products/records ### Description Lists records from the Products collection in your project. ### Method GET ### Endpoint https://reqres.in/api/collections/products/records ### Parameters #### Headers - **x-api-key** (string) - Required - Your API key. - **X-Reqres-Env** (string) - Optional - Environment header, set to 'prod' or 'dev'. ### Request Example curl "https://reqres.in/api/collections/products/records" \ -H "x-api-key: YOUR_API_KEY" \ -H "X-Reqres-Env: prod" ### Response #### Success Response (200) Returns a list of records from the collection. #### Response Example (No explicit response example provided in the source.) ``` -------------------------------- ### GET /app/collections/products/records Source: https://reqres.in/docs Lists records from the Products collection for an app-user session. Requires an Authorization header with a Bearer session token. ```APIDOC ## GET /app/collections/products/records ### Description Lists records from the Products collection for a per-user session. ### Method GET ### Endpoint https://reqres.in/app/collections/products/records ### Parameters #### Headers - **Authorization** (string) - Required - Bearer token for the app-user session. ### Request Example curl "https://reqres.in/app/collections/products/records" \ -H "Authorization: Bearer YOUR_SESSION_TOKEN" ### Response #### Success Response (200) Returns a list of records for the user session. #### Response Example (No explicit response example provided in the source.) ``` -------------------------------- ### List records with x-api-key Source: https://reqres.in/docs Use this curl command to list records from the starter Products collection. It requires an x-api-key header and sets the X-Reqres-Env header to prod. The response returns sample data ready to query. ```bash curl "https://reqres.in/api/collections/products/records" \ -H "x-api-key: YOUR_API_KEY" \ -H "X-Reqres-Env: prod" ``` -------------------------------- ### Create a record with x-api-key Source: https://reqres.in/docs Use this curl command to create a new record in the Products collection. It requires an x-api-key header, sets the environment to prod, and sends a JSON payload with name and price. Changes persist after creation. ```bash curl -X POST "https://reqres.in/api/collections/products/records" \ -H "x-api-key: YOUR_API_KEY" \ -H "X-Reqres-Env: prod" \ -H "Content-Type: application/json" \ -d '{"data":{"name":"New Product","price":9.99}}' ``` -------------------------------- ### POST /api/collections/products/records Source: https://reqres.in/docs Creates a new record in the Products collection. Requires an x-api-key header and a JSON body with the record data. ```APIDOC ## POST /api/collections/products/records ### Description Creates a new record in the Products collection. ### Method POST ### Endpoint https://reqres.in/api/collections/products/records ### Parameters #### Headers - **x-api-key** (string) - Required - Your API key. - **X-Reqres-Env** (string) - Optional - Environment header, set to 'prod' or 'dev'. - **Content-Type** (string) - Required - Set to 'application/json'. #### Request Body - **data** (object) - Required - The record data to create. - **name** (string) - Required - Name of the product. - **price** (number) - Required - Price of the product. ### Request Example curl -X POST "https://reqres.in/api/collections/products/records" \ -H "x-api-key: YOUR_API_KEY" \ -H "X-Reqres-Env: prod" \ -H "Content-Type: application/json" \ -d '{"data":{"name":"New Product","price":9.99}}' ### Response #### Success Response (200) Returns the created record. #### Response Example (No explicit response example provided in the source.) ``` -------------------------------- ### List records with app-user session token Source: https://reqres.in/docs Use this curl command to list records in an app-user session for per-user isolation. It requires an Authorization: Bearer header with a session token. This isolates reads and writes to a single user. ```bash curl "https://reqres.in/app/collections/products/records" \ -H "Authorization: Bearer YOUR_SESSION_TOKEN" ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.