> For the complete documentation index, see [llms.txt](https://liams-organization-5.gitbook.io/scottishglen/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://liams-organization-5.gitbook.io/scottishglen/api-routes/hardware.md).

# Hardware

## Get ALL Assets

<mark style="color:blue;">`GET`</mark> `/api/assets/hardware/view-all`

{% tabs %}
{% tab title="200: OK HardwareAsset\[]" %}
The response is an Array of [Hardware Asset](/scottishglen/types/hardware-asset.md).
{% endtab %}
{% endtabs %}

## Get ALL Assets by Supervising Employee

<mark style="color:blue;">`GET`</mark> `/api/assets/hardware/view-all/:id`

#### Path Parameters

| Name                                 | Type   | Description |
| ------------------------------------ | ------ | ----------- |
| id<mark style="color:red;">\*</mark> | String | Employee ID |

{% tabs %}
{% tab title="200: OK HardwareAsset\[]" %}
The response is an array of [Hardware Asset](/scottishglen/types/hardware-asset.md) objects.
{% endtab %}

{% tab title="404: Not Found " %}

{% endtab %}
{% endtabs %}

## Get Asset

<mark style="color:blue;">`GET`</mark> `/api/assets/hardware/:id`

#### Path Parameters

| Name                                 | Type   | Description                  |
| ------------------------------------ | ------ | ---------------------------- |
| id<mark style="color:red;">\*</mark> | String | The ID of the Hardware Asset |

{% tabs %}
{% tab title="200: OK HardwareAsset" %}
The response is a [Hardware Asset](/scottishglen/types/hardware-asset.md) object.
{% endtab %}

{% tab title="404: Not Found " %}

{% endtab %}
{% endtabs %}

## Insert Asset

<mark style="color:green;">`POST`</mark> `/api/assets/hardware/`

#### Request Body

| Name                                               | Type                | Description                           |
| -------------------------------------------------- | ------------------- | ------------------------------------- |
| name<mark style="color:red;">\*</mark>             | String              | The Name of the Asset                 |
| parent\_employee<mark style="color:red;">\*</mark> | String              | The ID of the Supervising Employee    |
| note                                               | String              | The Note attached to the Asset        |
| date                                               | String              | The Purchase Date of the Asset        |
| ip<mark style="color:red;">\*</mark>               | String \[IPV4/IPV6] | The IPV4 or IPV6 address of the Asset |
| manufacturer                                       | String              | The Manufacturer of the Asset         |
| model                                              | String              | The Model of the Asset                |
| type<mark style="color:red;">\*</mark>             | String              | The Type of the Asset                 |

{% tabs %}
{% tab title="200: OK { status: true, id: ObjectId }" %}

{% endtab %}

{% tab title="400: Bad Request " %}

{% endtab %}
{% endtabs %}

## Delete Asset

<mark style="color:red;">`DELETE`</mark> `/api/assets/hardware/:id`

#### Path Parameters

| Name                                 | Type   | Description                  |
| ------------------------------------ | ------ | ---------------------------- |
| id<mark style="color:red;">\*</mark> | String | The ID of the Hardware Asset |

{% tabs %}
{% tab title="200: OK " %}

{% endtab %}
{% endtabs %}

## Delete ALL Assets

<mark style="color:red;">`DELETE`</mark> `/api/assets/hardware/`

{% tabs %}
{% tab title="200: OK " %}

{% endtab %}
{% endtabs %}

## Edit Asset

<mark style="color:purple;">`PATCH`</mark> `/api/assets/hardware/:id`

#### Path Parameters

| Name                                 | Type   | Description                  |
| ------------------------------------ | ------ | ---------------------------- |
| id<mark style="color:red;">\*</mark> | String | The ID of the Hardware Asset |

#### Request Body

| Name                                               | Type                | Description                           |
| -------------------------------------------------- | ------------------- | ------------------------------------- |
| name<mark style="color:red;">\*</mark>             | String              | The Name of the Asset                 |
| note<mark style="color:red;">\*</mark>             | String              | The Note attached to the Asset        |
| date<mark style="color:red;">\*</mark>             | String              | The Purchase Date of the Asset        |
| manufacturer<mark style="color:red;">\*</mark>     | String              | The Manufacturer of the Asset         |
| model<mark style="color:red;">\*</mark>            | String              | The Model of the Asset                |
| parent\_employee<mark style="color:red;">\*</mark> | String              | The ID of the Supervising Employee    |
| ip<mark style="color:red;">\*</mark>               | String \[IPV4/IPV6] | The IPV4 or IPV6 address of the Asset |
| type<mark style="color:red;">\*</mark>             | String              | The Type of the Asset                 |

{% tabs %}
{% tab title="200: OK { status: true }" %}

{% endtab %}

{% tab title="400: Bad Request " %}

{% endtab %}
{% endtabs %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://liams-organization-5.gitbook.io/scottishglen/api-routes/hardware.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
