From 11a72671ee019cb1d578983c83077170c235fbdd Mon Sep 17 00:00:00 2001 From: Khushbu Borole Date: Mon, 8 Jun 2026 14:22:45 +0530 Subject: [PATCH] Added tutorial topics Added Tutorial topics * Create a collection * Create an item --- api/keepit-source.json | 15 ++++++ docs/articles/Tutorials.md | 36 ++++++++++++++ docs/articles/create-a-collection.md | 72 +++++++++++++++++++++++++++ docs/articles/create-an-item.md | 74 ++++++++++++++++++++++++++++ docs/index.md | 8 ++- 5 files changed, 204 insertions(+), 1 deletion(-) create mode 100644 docs/articles/Tutorials.md create mode 100644 docs/articles/create-a-collection.md create mode 100644 docs/articles/create-an-item.md diff --git a/api/keepit-source.json b/api/keepit-source.json index 3990363..53f6a92 100644 --- a/api/keepit-source.json +++ b/api/keepit-source.json @@ -27,6 +27,13 @@ "description": "Audio recordings of interviews with Texas residents.", "location": "Server C, Folder /tx-oral-histories/", "itemCount": 22 + }, + { + "name": "Van Gogh Photographs", + "description": "Works of Vincent van Gogh in the Museum Square in Amsterdam.", + "location": "Server K, Folder /VanGogh/", + "itemCount": 3, + "id": 5 } ], "items": [ @@ -61,6 +68,14 @@ "accessionDate": "2018-08-22", "format": "MP3", "collection": "Texas Oral Histories" + }, + { + "title": "Photo of The Starry Night", + "creationDate": "1996-09-23", + "accessionDate": "2026-06-08", + "format": "JPG", + "collection": "Van Gogh Photographs", + "id": 5 } ] } \ No newline at end of file diff --git a/docs/articles/Tutorials.md b/docs/articles/Tutorials.md new file mode 100644 index 0000000..ecd039a --- /dev/null +++ b/docs/articles/Tutorials.md @@ -0,0 +1,36 @@ +--- +# markdownlint-disable +# vale off +# tags used by just-the-docs theme +layout: default +title: Tutorials +parent: KeepIT API +nav_order: 3 +has_children: true +has_toc: true +# tags used by AI files +description: Lists the tutorial articles available in the documentation +topic_type: overview +tags: + - introduction +categories: + - tutorial +ai_relevance: high +importance: 8 +prerequisites: [] +related_pages: + - /create-a-collection + - /create-an-item +examples: [] +api_endpoints: [] +version: "v1.0" +last_updated: "2026-03-01" +# vale on +# markdownlint-enable +--- + + + +# Tutorials + +These tutorial articles are available to help you start using the **Keepit Service API**. diff --git a/docs/articles/create-a-collection.md b/docs/articles/create-a-collection.md new file mode 100644 index 0000000..535fa26 --- /dev/null +++ b/docs/articles/create-a-collection.md @@ -0,0 +1,72 @@ +--- +# markdownlint-disable +# vale off +# tags used by just-the-docs theme +layout: default +title: Create a collection +parent: Tutorials +nav_order: 1 +grand_parent: KeepIT API +# tags used by AI files +description: Create a `collection` resource to the service +topic_type: tutorial +ai_relevance: high +importance: 6 +api_endpoints: /collections +version: "v1.0" +last_updated: "2026-03-01" +# vale on +# markdownlint-enable +--- + +# Create a collection + +In this tutorial, you learn the operations to call to add a new collection. + +Expect this tutorial to take about 15 minutes to complete. + +## Create a new collection using Postman + +Creating a new collection to the service requires you to use `POST` method to store the details of the new collection resource in the service. + +To add a new collection: + +1. Make sure your local service is running, or start it by using this command, if it's not. + + ```shell + cd /Keepit/api + json-server -w Keepit-source.json + ``` + +1. Open the Postman app on your desktop. +1. In the Postman app, create a new request with these values: + * **METHOD**: POST + * **URL**: `{base_url}/collections` + * **Headers**: + * `Content-Type: application/json` + * **Request body**: + You can change the values of each property as you'd like. + + ```json + { + "name": "Van Gogh Photographs", + "description": "Work of Vincent van Gogh in the Museum of Amsterdam.", + "location": "Server K, Folder /VanGogh/", + "itemCount": 3 + } + ``` + +1. In the Postman app, choose **Send** to make the request. +1. Watch for the response body, which should look something like this. + Note that the names should be the same as you used in + your **Request body** and the response should include the new `id`. + + ```json + { + "name": "Van Gogh Photographs", + "description": "Work of Vincent van Gogh in the Museum of Amsterdam.", + "location": "Server K, Folder /VanGogh/", + "itemCount": 3, + "id": 5 + } + ``` diff --git a/docs/articles/create-an-item.md b/docs/articles/create-an-item.md new file mode 100644 index 0000000..9fd3ed2 --- /dev/null +++ b/docs/articles/create-an-item.md @@ -0,0 +1,74 @@ +--- +# markdownlint-disable +# vale off +# tags used by just-the-docs theme +layout: default +title: Create an item +parent: Tutorials +nav_order: 2 +grand_parent: KeepIT API +# tags used by AI files +description: Create an `items` resource to the service +topic_type: tutorial +ai_relevance: high +importance: 6 +api_endpoints: /items +version: "v1.0" +last_updated: "2026-03-01" +# vale on +# markdownlint-enable +--- + +# Create an item + +In this tutorial, you learn the operations to call to add a new item. + +Expect this tutorial to take about 15 minutes to complete. + +## Create a new item using Postman + +Creating a new item to the service requires you to use `POST` method to store the details of the new collection resource in the service. + +To add a new item: + +1. Make sure your local service is running, or start it by using this command, if it's not. + + ```shell + cd /Keepit/api + json-server -w Keepit-source.json + ``` + +1. Open the Postman app on your desktop. +1. In the Postman app, create a new request with these values: + * **METHOD**: POST + * **URL**: `{base_url}/items` + * **Headers**: + * `Content-Type: application/json` + * **Request body**: + You can change the values of each property as you'd like. + + ```json + { + "title": "Photo of The Starry Night", + "creationDate": "1996-09-23", + "accessionDate": "2026-06-08", + "format": "JPG", + "collection": "Van Gogh Photographs" + } + ``` + +1. In the Postman app, choose **Send** to make the request. +1. Watch for the response body, which should look something like this. + Note that the names should be the same as you used in + your **Request body** and the response should include the new `id`. + + ```json + { + "title": "Photo of The Starry Night", + "creationDate": "1996-09-23", + "accessionDate": "2026-06-08", + "format": "JPG", + "collection": "Van Gogh Photographs", + "id": 5 + } + ``` diff --git a/docs/index.md b/docs/index.md index b07c1b0..627b560 100644 --- a/docs/index.md +++ b/docs/index.md @@ -58,12 +58,18 @@ Use this API to manage your digital archive - organize collections, add items, a ## Learn more +### Reference topics + * [Get all collections](articles/get-all-collection.md) * [Get collections by ID](articles/get-collection-by-id.md) -* [Create a collection](articles/create-a-collection.md) * [Get all items](articles/get-all-items.md) * [Get items by ID](articles/get-items-by-id.md) +### Tutorial topics + +* [Create a collection](articles/create-a-collection.md) +* [Create an item](articles/create-an-item.md) + ## References - [To-Do API Service](https://uwc2-apidoc.github.io/to-do-service-sp26/)