# Playlist

## Endpoints

* ### Lista de players por playlist

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

**Método:** GET

**Autenticação:** Basic Auth

**Parâmetros de Consulta:**

| Parâmetro | Tipo | Obrigatório | Descrição      |
| --------- | ---- | ----------- | -------------- |
| id        | int  | Sim         | ID da playlist |

**Exemplo de retorno:**

```json
{
    "26": {
        "name": "TV Entrada",
        "sys": "tv_entrada",
        "screenformat": 12,
        "playlistitems": [
            {
                "id": 263,
                "name": "Comercial - 1",
                "sys": "comercial_tv_entrada_1",
                "commercial": true
            },
            {
                "id": 264,
                "name": "Comercial - 2",
                "sys": "comercial_tv_entrada_2",
                "commercial": true
            },
            {
                "id": 265,
                "name": "Comercial - 3",
                "sys": "comercial_tv_entrada_3",
                "commercial": true
            },
            {
                "id": 266,
                "name": "Comercial - 4",
                "sys": "comercial_tv_entrada_4",
                "commercial": true
            }
        ],
        "screens": [
            {
                "id": 6,
                "name": "Paulista Corporate - TV Entrada"
            },
            {
                "id": 14,
                "name": "Paulista Corporate - PC UBUNTU 24.04"
            }
        ]
    }
}
```

* ### Lista de playlists por player

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

**Método:** GET

**Autenticação:** Basic Auth

**Parâmetros de Consulta:**

| Parâmetro | Tipo | Obrigatório | Descrição    |
| --------- | ---- | ----------- | ------------ |
| screen    | int  | Sim         | ID do player |

**Exemplo de retorno:**

```json
{
    "6": {
        "playlists": [
            {
                "id": "26",
                "name": "TV Entrada",
                "sys": "tv_entrada",
                "screenformat": "12",
                "playlistitems": [
                    {
                        "id": "263",
                        "name": "Comercial - 1",
                        "sys": "comercial_tv_entrada_1",
                        "commercial": true
                    },
                    {
                        "id": "264",
                        "name": "Comercial - 2",
                        "sys": "comercial_tv_entrada_2",
                        "commercial": true
                    },
                    {
                        "id": "265",
                        "name": "Comercial - 3",
                        "sys": "comercial_tv_entrada_3",
                        "commercial": true
                    },
                    {
                        "id": "266",
                        "name": "Comercial - 4",
                        "sys": "comercial_tv_entrada_4",
                        "commercial": true
                    }   
                ]
            },
            {
                "id": "112",
                "name": "Black - TV Entrada",
                "sys": "black_tv_entrada",
                "screenformat": "12",
                "playlistitems": [
                    {
                        "id": "275",
                        "name": "Black - TV Entrada",
                        "sys": "black_tv_entrada",
                        "commercial": false
                    }
                ]
            }
        ]
    }
}
```


---

# 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/playlist.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.
