diff --git a/.postman/resources.yaml b/.postman/resources.yaml new file mode 100644 index 0000000..687449c --- /dev/null +++ b/.postman/resources.yaml @@ -0,0 +1,9 @@ +# Use this workspace to collaborate +workspace: + id: 050a85d2-54eb-4a2e-995c-b1729109abcb + +# All resources in the `postman/` folder are automatically registered in Local View. +# Point to additional files outside the `postman/` folder to register them individually. Example: +#localResources: +# collections: +# - ../tests/E2E Test Collection/ diff --git a/postman/collections/Book-API/.resources/definition.yaml b/postman/collections/Book-API/.resources/definition.yaml new file mode 100644 index 0000000..4568d8c --- /dev/null +++ b/postman/collections/Book-API/.resources/definition.yaml @@ -0,0 +1,8 @@ +$kind: collection +name: Book API +description: REST API for managing books - CRUD operations +variables: + - key: baseUrl + value: 'http://localhost:3000' + - key: bookId + value: '' diff --git a/postman/collections/Book-API/Books/.resources/definition.yaml b/postman/collections/Book-API/Books/.resources/definition.yaml new file mode 100644 index 0000000..ff4abb6 --- /dev/null +++ b/postman/collections/Book-API/Books/.resources/definition.yaml @@ -0,0 +1,4 @@ +$kind: collection +name: Books +description: CRUD operations for managing books +order: 2000 diff --git a/postman/collections/Book-API/Books/Create Book.request.yaml b/postman/collections/Book-API/Books/Create Book.request.yaml new file mode 100644 index 0000000..430eb3e --- /dev/null +++ b/postman/collections/Book-API/Books/Create Book.request.yaml @@ -0,0 +1,18 @@ +$kind: http-request +name: Create Book +description: Create a new book +method: POST +url: '{{baseUrl}}/api/v1/books' +order: 3000 +headers: + - key: Content-Type + value: application/json +body: + type: json + content: |- + { + "title": "The Great Gatsby", + "author": "F. Scott Fitzgerald", + "year": 1925, + "publisher": "Scribner" + } diff --git a/postman/collections/Book-API/Books/Delete Book.request.yaml b/postman/collections/Book-API/Books/Delete Book.request.yaml new file mode 100644 index 0000000..6205ed2 --- /dev/null +++ b/postman/collections/Book-API/Books/Delete Book.request.yaml @@ -0,0 +1,6 @@ +$kind: http-request +name: Delete Book +description: Delete a book by ID +method: DELETE +url: '{{baseUrl}}/api/v1/books/{{bookId}}' +order: 5000 diff --git a/postman/collections/Book-API/Books/Get Book.request.yaml b/postman/collections/Book-API/Books/Get Book.request.yaml new file mode 100644 index 0000000..6686a92 --- /dev/null +++ b/postman/collections/Book-API/Books/Get Book.request.yaml @@ -0,0 +1,6 @@ +$kind: http-request +name: Get Book +description: Get a single book by ID +method: GET +url: '{{baseUrl}}/api/v1/books/{{bookId}}' +order: 2000 diff --git a/postman/collections/Book-API/Books/List Books.request.yaml b/postman/collections/Book-API/Books/List Books.request.yaml new file mode 100644 index 0000000..f7945f7 --- /dev/null +++ b/postman/collections/Book-API/Books/List Books.request.yaml @@ -0,0 +1,6 @@ +$kind: http-request +name: List Books +description: Get all books +method: GET +url: '{{baseUrl}}/api/v1/books' +order: 1000 diff --git a/postman/collections/Book-API/Books/Update Book.request.yaml b/postman/collections/Book-API/Books/Update Book.request.yaml new file mode 100644 index 0000000..c0b3df5 --- /dev/null +++ b/postman/collections/Book-API/Books/Update Book.request.yaml @@ -0,0 +1,18 @@ +$kind: http-request +name: Update Book +description: Update an existing book +method: PUT +url: '{{baseUrl}}/api/v1/books/{{bookId}}' +order: 4000 +headers: + - key: Content-Type + value: application/json +body: + type: json + content: |- + { + "title": "Updated Title", + "author": "Updated Author", + "year": 2024, + "publisher": "Updated Publisher" + } diff --git a/postman/collections/Book-API/System/.resources/definition.yaml b/postman/collections/Book-API/System/.resources/definition.yaml new file mode 100644 index 0000000..4a8e43d --- /dev/null +++ b/postman/collections/Book-API/System/.resources/definition.yaml @@ -0,0 +1,4 @@ +$kind: collection +name: System +description: System endpoints for health checks and API information +order: 1000 diff --git a/postman/collections/Book-API/System/API Info.request.yaml b/postman/collections/Book-API/System/API Info.request.yaml new file mode 100644 index 0000000..235b508 --- /dev/null +++ b/postman/collections/Book-API/System/API Info.request.yaml @@ -0,0 +1,6 @@ +$kind: http-request +name: API Info +description: Get API information +method: GET +url: '{{baseUrl}}/' +order: 2000 diff --git a/postman/collections/Book-API/System/Health Check.request.yaml b/postman/collections/Book-API/System/Health Check.request.yaml new file mode 100644 index 0000000..35c2b9a --- /dev/null +++ b/postman/collections/Book-API/System/Health Check.request.yaml @@ -0,0 +1,6 @@ +$kind: http-request +name: Health Check +description: Check API health status +method: GET +url: '{{baseUrl}}/health' +order: 1000 diff --git a/postman/globals/workspace.globals.yaml b/postman/globals/workspace.globals.yaml new file mode 100644 index 0000000..e96c6d6 --- /dev/null +++ b/postman/globals/workspace.globals.yaml @@ -0,0 +1,2 @@ +name: Globals +values: []