# API: Equipamentos

---

- [Index](#index)
- [Show](#show)
- [Store](#store)
- [Update](#update)
- [Destroy](#destroy)

<a name="index"></a>
## Index

### Endpoint
|Método|URI|Headers|
|:|:-|:|
|GET|`/equipamentos`|Default|

### Body
```json
Empty
```

### Responses
<larecipe-badge type="success" rounded><i class="fa fa-check" style="margin-right:9px"></i>200 - OK</larecipe-badge>
```json
[
    {
        "id": <id>,
        "code": <id>,
        "tipo": <id>,
        "modelo": <id>,
        "versao_hardware": <id>,
        "versao_software": <id>,
        "is_allocated": false
    },
    //...
]
```

<larecipe-badge type="danger" rounded><i class="fa fa-lock" style="margin-right:9px"></i>401 - Unauthorized</larecipe-badge>
```json
{
    "message": "Unauthenticated."
}
```

<a name="show"></a>
## Show

### Endpoint
|Método|URI|Headers|
|:|:-|:|
|GET|`/equipamentos`|Default|

### Body
```json
Empty
```

### Responses
<larecipe-badge type="success" rounded><i class="fa fa-check" style="margin-right:9px"></i>200 - OK</larecipe-badge>
```json
{
    "id": <id>,
    "code": <id>,
    "tipo": <id>,
    "modelo": <id>,
    "versao_hardware": <id>,
    "versao_software": <id>,
    "is_allocated": false
}
```

<larecipe-badge type="danger" rounded><i class="fa fa-lock" style="margin-right:9px"></i>401 - Unauthorized</larecipe-badge>
```json
{
    "message": "Unauthenticated."
}
```

<a name="store"></a>
## Store

### Endpoint
|Método|URI|Headers|
|:|:-|:|
|POST|`/equipamentos`|Default|

### Body
```json
{
    "code":  string,
    "tipo": string(enum(['CONCENTRADOR', 'SONDA', 'REPETIDOR', 'MODULOS'])),
    "modelo": string,
    "versao_hardware": string(#.#.#),
    "versao_software": string(#.#.#)
}
```

### Responses
<larecipe-badge type="success" rounded><i class="fa fa-check" style="margin-right:9px"></i>200 - OK</larecipe-badge>
```json
{
    "code":  <id>,
    "tipo": <tipo>,
    "modelo": <tipo>,
    "versao_hardware": <versao_hardware>,
    "versao_software": <versao_software>
}
```

<larecipe-badge type="danger" rounded><i class="fa fa-lock" style="margin-right:9px"></i>401 - Unauthorized</larecipe-badge>
```json
{
    "message": "Unauthenticated."
}
```

<a name="update"></a>
## Update

### Endpoint
|Método|URI|Headers|
|:|:-|:|
|PUT|`/equipamentos/{equipamento}`|Default|

### Body
```json
{
    "code":  string,
    "tipo": string(enum(['CONCENTRADOR', 'SONDA', 'REPETIDOR', 'MODULOS'])),
    "modelo": string,
    "versao_hardware": string(#.#.#),
    "versao_software": string(#.#.#)
}
```

### Responses
<larecipe-badge type="success" rounded><i class="fa fa-check" style="margin-right:9px"></i>200 - OK</larecipe-badge>
```json
{
    "code":  <id>,
    "tipo": <tipo>,
    "modelo": <tipo>,
    "versao_hardware": <versao_hardware>,
    "versao_software": <versao_software>
}
```

<larecipe-badge type="danger" rounded><i class="fa fa-lock" style="margin-right:9px"></i>401 - Unauthorized</larecipe-badge>
```json
{
    "message": "Unauthenticated."
}
```

<a name="destroy"></a>
## Destroy

### Endpoint
|Método|URI|Headers|
|:|:-|:|
|DELETE|`/equipamentos/{equipamento}`|Default|

### Body
```json
Empty
```

### Responses
<larecipe-badge type="success" rounded><i class="fa fa-check" style="margin-right:9px"></i>204 - No Content</larecipe-badge>
```json
Empty
```

<larecipe-badge type="danger" rounded><i class="fa fa-lock" style="margin-right:9px"></i>401 - Unauthorized</larecipe-badge>
```json
{
    "message": "Unauthenticated."
}
```