Pular para o conteúdo

GET /v1/channels/{id}/history-import

GET
/v1/channels/{id}/history-import
curl --request GET \
--url https://seu-endereco-da-api/v1/channels/example/history-import \
--header 'Authorization: Bearer <token>'

Permissão que a Chave de acesso precisa: Gerenciar canais (channels:manage).

id
required
string

The channel’s latest import, or null when it never imported

Media typeapplication/json
object
id
required
string format: uuid
channelId
required
string format: uuid
source
required
string
Allowed values: gateway waba
status
required
string
Allowed values: running done failed
phase
required

Receiving: the source is still sending and every batch is only stored; importing: the stored batches are being written at a pace set by the database load

string
Allowed values: receiving importing
receivedBatches
required

Batches received and stored, including batches that arrive after the source’s end

number
totalBatches
required

Known only after the source’s end message

number
nullable
importedMessages
required
number
skippedChats
required

Chats without a resolvable phone: reported by the source in its end message plus those the importer received and could not resolve

number
duplicateMessages
required

Messages already present (received live or in an earlier batch)

number
progressPercent
required

Receiving: the source’s own percent; importing: stored messages already written; never goes back within a phase; 100 when done

number
<= 100
failureReason
required

Human-readable pt-BR sentence, shown as is

string
nullable
startedAt
required
string format: date-time
finishedAt
required
string format: date-time
nullable
stall
required

Lite import with no news from the phone for 30 minutes while receiving: waiting_first_batch when nothing arrived yet, no_end when batches stopped before the source’s end; null otherwise

string
nullable
Allowed values: waiting_first_batch no_end

Example

{
"source": "gateway",
"status": "running",
"phase": "receiving",
"stall": "waiting_first_batch"
}