PBX GUI - System Recordings module GraphQL APIs
Table of Contents
This wiki is to capture the System Recordings module provided GraphQL APIs.
Add System Recording
Add new system recording to the system.
API : addRecording
API Parameters:
Name | Required | Type | Default | Description |
|---|---|---|---|---|
name | Mandatory | string |
| Name of the recording |
description | Optional | string |
| Description of the recording |
fcode | Optional | id | 0 | Feature code |
fcode_pass | Optional | string |
| Feature code password |
language | Optional | string |
| Language of recording |
playback | Mandatory | list of strings |
| List of existing playback files in the system |
codecs | Optional | list of strings |
| List of allowed formats to which playback files to be converted |
Query Parameters
status
message
idAPI Request
API Request:
mutation {
addRecording(input:{
name: "rec2"
description: "rec2"
fcode: 0
fcode_pass: ""
language: "en"
playback: [
"1-yes-2-no"
]
codecs: [
"wav"
"sln"
]
})
{
status
message
id
}
}API Response
API Response:
{
"data": {
"addRecording": {
"status": true,
"message": "Recording added succefully",
"id": "2"
}
}
}Update System Recording
Update an existing system recording in the system.
API : updateRecording
API Parameters:
Name | Required | Type | Default | Description |
|---|---|---|---|---|
id | Mandatory | id |
| Id of the Recording |
name | Mandatory | string |
| Name of the recording |
description | Optional | string |
| Description of the recording |
fcode | Optional | id | 0 | Feature code |
fcode_pass | Optional | string |
| Feature code password |
language | Optional | string |
| Language of recording |
playback | Mandatory | list of strings |
| List of existing playback files in the system |
codecs | Optional | list of strings |
| List of allowed formats to which playback files to be converted |
Query Parameters
status
message
idAPI Request
API Request:
mutation {
updateRecording(input:{
id: 2
name: "rec2"
description: "rec2"
fcode: 0
fcode_pass: ""
language: "en"
playback: [
"1-yes-2-no"
]
codecs: [
"wav"
"sln"
]
})
{
status
message
id
}
}API Response
API Response:
{
"data": {
"updateRecording": {
"status": true,
"message": "Recording updated succefully",
"id": "2"
}
}
}
Fetch System Recordings
Fetch all system recordings exists in the system.
API : fetchAllRecordings
Query Parameters
status
message
recordings{
id
name
description
fcode
fcode_pass
languages
playback
}API Request
API Request:
query{
fetchAllRecordings{
status message recordings{
id
name
description
fcode
fcode_pass
languages
playback
}
}
}API Response
API Response:
{
"data": {
"fetchAllRecordings": {
"status": true,
"message": "List of system recordings",
"recordings": [
{
"id": "1",
"name": "rec1",
"description": "rec",
"fcode": "0",
"fcode_pass": "",
"languages": [
"en"
],
"playback": [
"1-yes-2-no",
"Randulo-allison",
"T-to-disable-ancmnt"
]
},
{
"id": "2",
"name": "rec3",
"description": "rec2",
"fcode": "0",
"fcode_pass": "",
"languages": [
"en"
],
"playback": [
"1-yes-2-no"
]
}
]
}
}
}Delete System Recording
Delete an existing system recording from the system.
API : deleteRecording
API Parameters:
Name | Required | Type | Description |
|---|---|---|---|
id | Mandatory | id | Id of the Recording |
Query Parameters
status
messageAPI Request
API Request:
mutation {
deleteRecording(input: {
id: "2"
}) {
status
message
}
}API Response
API Response:
{
"data": {
"deleteRecording": {
"status": true,
"message": "Recording deleted succefully"
}
}
}Fetch System Recording uploaded files
Fetch an system recording media files from the system.
API : fetchRecordingFiles
API Parameters:
Name | Required | Type | Description |
|---|---|---|---|
search | Mandatory | string | search string to fetch files with matching name |
Query Parameters
status
message
recodingFilesAPI Request
API Request:
query{
fetchRecordingFiles(search: "1-for-am-2-"){
status message recodingFiles
}
}API Response
API Response:
{
"data": {
"fetchRecordingFiles": {
"status": true,
"message": "List of system recording files",
"recodingFiles": [
"1-for-am-2-for-pm"
]
}
}
}