Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
68 changes: 68 additions & 0 deletions api.rest
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,74 @@ Authorization: Bearer {{authToken}}
# Set the absolute path of the archive, or relative to where VS Code was executed from
< ./.rest-client/responses/body/archive.tgz


# ============================================
# Botpress HITL API
# ============================================

# --------------------------------------------
# Get list of conversations (sessions)
# --------------------------------------------
###
GET {{baseUrl}}/api/v1/bots/{{botId}}/mod/hitl/sessions?archived=false
Authorization: Bearer {{authToken}}
Content-Type: application/json

# --------------------------------------------
# Get list of dialogs (sessions)
# --------------------------------------------
@sessionId = 13455
###
GET {{baseUrl}}/api/v1/bots/{{botId}}/mod/hitl/sessions/{{sessionId}}
Authorization: Bearer {{authToken}}
Content-Type: application/json

# --------------------------------------------
# Get list of session messages
# --------------------------------------------
###
POST {{baseUrl}}/api/v1/bots/{{botId}}/mod/hitl/sessions/{{sessionId}}/message
Authorization: Bearer {{authToken}}
Content-Type: application/json

{
"message": "Hello, just a bit more",
"sender": "agent"
}

# --------------------------------------------
# Pause the dialogue
# --------------------------------------------
###
POST {{baseUrl}}/api/v1/bots/{{botId}}/mod/hitl/sessions/{{sessionId}}/pause
Authorization: Bearer {{authToken}}
Content-Type: application/json

# --------------------------------------------
# Check pause status
# --------------------------------------------
###
POST {{baseUrl}}/api/v1/bots/{{botId}}/mod/hitl/sessions/{{sessionId}}/isPaused
Authorization: Bearer {{authToken}}
Content-Type: application/json

# --------------------------------------------
# Unpause the dialogue
# --------------------------------------------
###
POST {{baseUrl}}/api/v1/bots/{{botId}}/mod/hitl/sessions/{{sessionId}}/unpause
Authorization: Bearer {{authToken}}
Content-Type: application/json

# --------------------------------------------
# Get bot-wide HITL config
# --------------------------------------------
###
GET {{baseUrl}}/api/v1/bots/{{botId}}/mod/hitl/config/attributes
Authorization: Bearer {{authToken}}



### SETUP

# Use with https://marketplace.visualstudio.com/items?itemName=humao.rest-client
Expand Down