# Telas

## Endpoints

* ### Lista de telas por local

**URL:** \<seuprojeto>.edgecontents.com/ds/api/screen

**Método:** GET

**Autenticação:** Basic Auth

**Parâmetros de Consulta:**

| Parâmetro  | Tipo | Obrigatório | Descrição   |
| ---------- | ---- | ----------- | ----------- |
| id         | int  | Não         | ID do local |
| screen\_id | int  | Não         | ID da tela  |

**Exemplo de retorno:**

```json
{
    "5": {
        "name": "P5 LED",
        "abbreviation": "",
        "licenced": "false",
        "enabled": "true",
        "browser": "TB 2 HOMOLOGAÇÃO",
        "browser_id": 7,
        "internalid": "",
        "groups": [],
        "screen_images": [],
        "site_id": 1
    },
    "6": {
        "name": "TV Entrada",
        "abbreviation": "",
        "licenced": "true",
        "enabled": "true",
        "browser": "TV Entrada",
        "browser_id": 13,
        "internalid": "",
        "groups": [],
        "screen_images": [],
        "site_id": 6
    }
}
```

* ### Cadastro de telas

**URL:** \<seuprojeto>.edgecontents.com/ds/api/screen/add

**Método:** POST

**Autenticação:** Basic Auth

**Corpo da Requisição:**

| Campo        | Tipo   | Obrigatório | Descrição               |
| ------------ | ------ | ----------- | ----------------------- |
| name         | string | Sim         | Nome do player          |
| site         | int    | Sim         | ID do local             |
| browser      | int    | Sim         | ID do browser           |
| abbreviation | string | Não         | Abreviação do nome      |
| monitors     | int    | Não         | Quantidade de monitores |
| internalid   | string | Não         | ID interno              |
| licensed     | bool   | Não         | Player licenciado       |
| maintenance  | bool   | Não         | Player em manutenção    |

**Exemplo de requisição:**

```postman_json
[
    {
        "name": "Novo player",
        "site": 7,
        "browser": 28,
        "monitors": 2
    },
    {
        "name": "Novo player 2",
        "site": 7,
        "browser": 31,
        "abbreviation": "Nov. P2"
    }
]
```

**Exemplo de retorno:**

```json
{
    "successes": [
        {
            "id": "15",
            "name": "Novo player"
        },
        {
            "id": "16",
            "name": "Novo player 2"
        }
    ],
    "errors": []
}
```

* ### Edição de telas

**URL:** \<seuprojeto>.edgecontents.com/ds/api/screen/update

**Método:** POST

**Autenticação:** Basic Auth

**Corpo da Requisição:**

| Campo        | Tipo   | Obrigatório | Descrição               |
| ------------ | ------ | ----------- | ----------------------- |
| id           | int    | Sim         | ID do player            |
| name         | string | Não         | Nome do player          |
| browser      | int    | Não         | ID do browser           |
| abbreviation | string | Não         | Abreviação do nome      |
| monitors     | int    | Não         | Quantidade de monitores |
| internalid   | string | Não         | ID interno              |
| licensed     | bool   | Não         | Player licenciado       |
| maintenance  | bool   | Não         | Player em manutenção    |

**Exemplo de requisição:**

```postman_json
[
    {
        "id": 15,
        "licensed": true,
        "name": "Player P1"
    },
    {
        "id": 16,
        "maitenance": true
    }
]
```

**Exemplo de retorno:**

```json
{
    "successes": [
        {
            "id": "15",
            "name": "Player P1"
        },
        {
            "id": "16",
            "name": "Novo player 2"
        }
    ],
    "errors": []
}
```


---

# Agent Instructions: 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://help.edgecontents.com/edgecontents/apis/telas.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.
