diff --git a/docs/articles/Resources.md b/docs/articles/Resources.md index f449eb6..c8a19a1 100644 --- a/docs/articles/Resources.md +++ b/docs/articles/Resources.md @@ -34,6 +34,3 @@ last_updated: "2026-03-01" # Resources These resource reference articles are available to help you start using the **Keepit Service API**. - -* [Get all collections](get-all-collection.md) -* [Get collections by ID](get-collection-by-id.md) diff --git a/docs/articles/get-all-items.md b/docs/articles/get-all-items.md new file mode 100644 index 0000000..a4af4a8 --- /dev/null +++ b/docs/articles/get-all-items.md @@ -0,0 +1,111 @@ +--- +# markdownlint-disable +# vale off +# tags used by just-the-docs theme +layout: default +title: Get all items +parent: Resources +grand_parent: KeepIT API +nav_order: 4 +# tags used by AI files +description: GET all `item` resources from the service +topic_type: reference +ai_relevance: high +importance: 7 +api_endpoints: /items +version: "v1.0" +last_updated: "2026-03-01" +# vale on +# markdownlint-enable +--- + + + +# Get all items + +Returns all the items archived with the service. + +## Endpoint + +```shell +{base_url}/items +``` + +## Parameters + +None + +## Request headers + +None + +## Request body + +None + +## Response body + +```json + { + "id": 1, + "title": "Photo of Congress Avenue, 1920", + "creationDate": "1920", + "accessionDate": "2019-05-14", + "format": "TIFF", + "collection": "Austin Photographs" + } +``` + +## Examples + +### `GET` example request + +```bash +curl http://localhost:3000/items +``` + +#### `GET` example response + +```json +[ + { + "id": 1, + "title": "Photo of Congress Avenue, 1920", + "creationDate": "1920", + "accessionDate": "2019-05-14", + "format": "TIFF", + "collection": "Austin Photographs" + }, + { + "id": 2, + "title": "Map of Austin, 1885", + "creationDate": "1885", + "accessionDate": "2020-02-03", + "format": "PDF", + "collection": "Austin Photographs" + }, + { + "id": 3, + "title": "Austin American-Statesman, June 1936", + "creationDate": "1936-06", + "accessionDate": "2021-09-15", + "format": "PDF", + "collection": "Texas Newspapers" + }, + { + "id": 4, + "title": "Oral history about Austin music scene", + "creationDate": "2005-04-12", + "accessionDate": "2018-08-22", + "format": "MP3", + "collection": "Texas Oral Histories" + } +] +``` + +## Response status + +| HTTP status value | Description | +| ------------- | ----------- | +| 200 | **Success:** Requested data returned successfully | +| ECONNREFUSED | Service is offline. Start, or restart the service and try again. | \ No newline at end of file diff --git a/docs/articles/get-items-by-id.md b/docs/articles/get-items-by-id.md new file mode 100644 index 0000000..05efc81 --- /dev/null +++ b/docs/articles/get-items-by-id.md @@ -0,0 +1,85 @@ +--- +# markdownlint-disable +# vale off +# tags used by just-the-docs theme +layout: default +title: Get items by ID +parent: Resources +grand_parent: KeepIT API +nav_order: 5 +# tags used by AI files +description: GET a `items` resource by ID from the service +topic_type: reference +ai_relevance: high +importance: 7 +api_endpoints: /items +version: "v1.0" +last_updated: "2026-03-01" +# vale on +# markdownlint-enable +--- + + + +# Get items by ID + +Returns a archived item by ID with the service. + +## Endpoint + +```shell +{base_url}/items/{id} +``` + +## Parameters + +- id - ID of the item you want to fetch from the Keepit service. + +## Request headers + +None + +## Request body + +None + +## Response body + +```json +{ + "id": 4, + "title": "Oral history about Austin music scene", + "creationDate": "2005-04-12", + "accessionDate": "2018-08-22", + "format": "MP3", + "collection": "Texas Oral Histories" +} +``` + +## Examples + +### `GET` example request + +```bash +curl http://localhost:3000/items/4 +``` + +#### `GET` example response + +```json +{ + "id": 4, + "title": "Oral history about Austin music scene", + "creationDate": "2005-04-12", + "accessionDate": "2018-08-22", + "format": "MP3", + "collection": "Texas Oral Histories" +} +``` + +## Response status + +| HTTP status value | Description | +| ------------- | ----------- | +| 200 | **Success:** Requested data returned successfully | +| ECONNREFUSED | Service is offline. Start, or restart the service and try again. | \ No newline at end of file diff --git a/docs/index.md b/docs/index.md index c26973f..b07c1b0 100644 --- a/docs/index.md +++ b/docs/index.md @@ -58,8 +58,11 @@ Use this API to manage your digital archive - organize collections, add items, a ## Learn more -* [Get all collections](get-all-collection.md) -* [Get collections by ID](get-collection-by-id.md) +* [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) ## References