Chat - List Chat Threads
Obtém a lista de threads de chat de um usuário.
GET {endpoint}/chat/threads?api-version=2024-03-07
GET {endpoint}/chat/threads?maxPageSize={maxPageSize}&startTime={startTime}&api-version=2024-03-07
Parâmetros de URI
| Nome | Em | Obrigatório | Tipo | Description |
|---|---|---|---|---|
|
endpoint
|
path | True |
string |
O ponto de extremidade do recurso de Comunicação do Azure. |
|
api-version
|
query | True |
string |
Versão da API a ser invocada. |
|
max
|
query |
integer (int32) |
O número máximo de threads de chat retornados por página. |
|
|
start
|
query |
string (date-time) |
O ponto mais antigo no tempo para obter threads de chat. O carimbo de data/hora deve estar no formato RFC3339: |
Cabeçalho da solicitação
| Nome | Obrigatório | Tipo | Description |
|---|---|---|---|
| Authorization | True |
string |
Um token de acesso de usuário do ACS (Serviços de Comunicação do Azure). |
Respostas
| Nome | Tipo | Description |
|---|---|---|
| 200 OK |
Solicitação bem-sucedida. A ação retorna um recurso de |
|
| 401 Unauthorized |
Communication |
Desautorizado. |
| 403 Forbidden |
Communication |
Proibido. |
| 429 Too Many Requests |
Communication |
Muitas solicitações. |
| Other Status Codes |
Communication |
Serviço indisponível. |
Segurança
Authorization
Um token de acesso de usuário do ACS (Serviços de Comunicação do Azure).
Tipo:
apiKey
Em:
header
Exemplos
Get threads with pagination (Max Page Size)
Solicitação de exemplo
GET https://contoso.westus.communications.azure.com/chat/threads?maxPageSize=5&api-version=2024-03-07
Resposta de exemplo
{
"value": [
{
"id": "19:uni01_zbnh3nt2dfuffezc3sox7dog7wfhk6y5qe2rwlnfhlhdzirihdpq@thread.v2",
"topic": "Chat with Samantha",
"lastMessageReceivedOn": "2020-06-06T05:55:41.6460000Z"
},
{
"id": "19:a0dfe5fc10e04a7f8d8a64d455f4196d@thread.v2",
"topic": "Presentation Brainstorming",
"lastMessageReceivedOn": "2020-06-06T05:55:41.6460000Z"
},
{
"id": "19:uni01_n242d2bzammtwxiib7pbjtozeevjqzavzn654ku3dajocexfo2na@thread.v2",
"topic": "Chat with Alex",
"lastMessageReceivedOn": "2020-06-06T05:55:41.6460000Z"
},
{
"id": "19:0062022a28be4e0983734f7e45cd8566@thread.v2",
"topic": "Lunch",
"deletedOn": "2020-07-07T05:55:41.6460000Z",
"lastMessageReceivedOn": "2020-06-06T05:55:41.6460000Z"
},
{
"id": "19:uni01_zbnh3nt2dfuffezc3sox7dog7wfhk6y5qe2rwlnfhlhdzirihdpe@thread.v2",
"topic": "Chat with Bob",
"lastMessageReceivedOn": "2020-06-06T05:55:41.6460000Z"
}
],
"nextLink": "https://contoso.westus.communications.azure.com/chat/threads?syncState=W3sic3RhcnQiOiIyMDIwLTA2LTIzVDIzOjMyOjQ3LjMwNSswMDowMCIsImVuZCI6IjIwMjAtMDYtMjVUMDY6NTY6MjMuNjk2KzAwOjAwIn0seyJzdGFydCI6IjE5NzAtMDEtMDFUMDA6MDA6MDArMDA6MDAiLCJlbmQiOiIxOTcwLTAxLTAxVDAwOjAwOjAwKzAwOjAwIn1d&api-version=2024-03-07&maxPageSize=5"
}
{
"error": {
"code": "Unauthorized",
"message": "Request is not authorized."
}
}
{
"error": {
"code": "Forbidden",
"message": "User is not allowed to perform specified action."
}
}
{
"error": {
"code": "TooManyRequests",
"message": "Rate limit exceeded."
}
}
{
"error": {
"code": "ServiceUnavailable",
"message": "The server is currently unable to handle the request."
}
}
Definições
| Nome | Description |
|---|---|
|
Chat |
Informações resumidas de um thread de chat. |
|
Chat |
Coleção de threads de chat. |
ChatThreadItem
Informações resumidas de um thread de chat.
| Nome | Tipo | Description |
|---|---|---|
| deletedOn |
string (date-time) |
O carimbo de data/hora quando o thread de chat foi excluído. O carimbo de data/hora está no formato RFC3339: |
| id |
string |
ID do thread de chat. |
| lastMessageReceivedOn |
string (date-time) |
O carimbo de data/hora quando a última mensagem chegou ao servidor. O carimbo de data/hora está no formato RFC3339: |
| topic |
string |
Tópico do thread de chat. |
ChatThreadsItemCollection
Coleção de threads de chat.
| Nome | Tipo | Description |
|---|---|---|
| nextLink |
string |
Se houver mais threads de chat que podem ser recuperados, o próximo link será preenchido. |
| value |
Coleção de threads de chat. |