HTTP GET.Returns the list representation of all the Participant resources for this Account, including the properties above.
HTTP POST
Not supported
HTTP PUT.
Not supported
HTTP DELETE.
Not supported
Examples
You can Mute/unMute an inprogress call as shown bellow.
curl -X POST https://mycompany.restcomm.com/restcomm/2012-04-24/Accounts/ACCOUNT_SID/Conferences/CONFERENCE_SID/Participants/CALL_SID.json \
-d 'Mute=true' \
-u 'YourAccountSid:YourAuthToken'
const request = require('request');
// Provide your Account Sid and Auth Token from your Console Account page
const ACCOUNT_SID = 'my_ACCOUNT_SID';
const AUTH_TOKEN = 'my_AUTH_TOKEN';
// Provide additional path parameters if applicable
const CONFERENCE_SID = 'my_CONFERENCE_SID'
const CALL_SID = 'my_CALL_SID'
request.({
method: 'POST',
url: 'https://mycompany.restcomm.com/restcomm/2012-04-24/Accounts/' + ACCOUNT_SID + '/Conferences/' + CONFERENCE_SID + '/Participants/' + CALL_SID + '.json',
auth: { 'user': ACCOUNT_SID, 'pass': AUTH_TOKEN },
form: {
'Mute': 'true'
}
},
function (error, response, body) {
// Add your business logic below; status can be found at 'response.statusCode' and response body at 'body'
...
});
from http.client import HTTPSConnection
from base64 import b64encode
from urllib.parse import urlencode
# Provide your Account Sid and Auth Token from your Console Account page
ACCOUNT_SID = 'my_ACCOUNT_SID'
AUTH_TOKEN = 'my_AUTH_TOKEN'
// Provide additional path parameters if applicable
CONFERENCE_SID = 'my_CONFERENCE_SID'
CALL_SID = 'my_CALL_SID'
userAndPass = b64encode(bytes(ACCOUNT_SID + ':' + AUTH_TOKEN, 'utf-8')).decode("ascii")
headers = { 'Authorization' : 'Basic %s' % userAndPass,
'Content-type': 'application/x-www-form-urlencoded',
'Accept': 'text/plain' }
# Update POST parameters accordingly
params = urlencode({
'Mute': 'true'
})
conn = HTTPSConnection('mycompany.restcomm.com')
conn.request("POST", '/restcomm/2012-04-24/Accounts/' + ACCOUNT_SID + '/Conferences/' + CONFERENCE_SID + '/Participants/' + CALL_SID + '.json',
params, headers=headers)
res = conn.getresponse()
# Add your business logic below; status can be found at 'res.status', reason at 'res.reason' and response body can be retrieved with res.read()
...
import java.net.URL;
import javax.net.ssl.HttpsURLConnection;
import java.io.*;
import java.util.Base64;
public class JavaSampleClass {
// Provide your Account Sid and Auth Token from your Console Account page
public static final String ACCOUNT_SID = "my_ACCOUNT_SID";
public static final String AUTH_TOKEN = "my_AUTH_TOKEN";
// Provide additional path parameters if applicable
public static final String CONFERENCE_SID = "my_CONFERENCE_SID"
public static final String CALL_SID = "my_CALL_SID"
public static void main(String[] args) throws Exception {
String userAndPass = ACCOUNT_SID + ':' + AUTH_TOKEN;
String encoded = Base64.getEncoder().encodeToString(userAndPass.getBytes());
URL url = new URL(("https://mycompany.restcomm.com/restcomm/2012-04-24/Accounts/" + ACCOUNT_SID + "/Conferences/" + CONFERENCE_SID + "/Participants/" + CALL_SID + ".json");
HttpsURLConnection conn = (HttpsURLConnection)url.openConnection();
conn.setRequestProperty("Authorization", "Basic " + encoded);
conn.setRequestMethod("POST");
conn.setDoOutput(true);
DataOutputStream os = new DataOutputStream(conn.getOutputStream());
// Update POST parameters accordingly
os.writeBytes("Mute=true");
os.close();
// Add your business logic below; response code can be obtained from 'conn.getResponseCode()' and input stream from 'conn.getInputStream()'
...
}
}
curl -X POST https://mycompany.restcomm.com/restcomm/2012-04-24/Accounts/ACCOUNT_SID/Conferences/CONFERENCE_SID/Participants/CALL_SID.json \
-d 'Mute=false' \
-u 'YourAccountSid:YourAuthToken'
const request = require('request');
// Provide your Account Sid and Auth Token from your Console Account page
const ACCOUNT_SID = 'my_ACCOUNT_SID';
const AUTH_TOKEN = 'my_AUTH_TOKEN';
// Provide additional path parameters if applicable
const CONFERENCE_SID = 'my_CONFERENCE_SID'
const CALL_SID = 'my_CALL_SID'
request.({
method: 'POST',
url: 'https://mycompany.restcomm.com/restcomm/2012-04-24/Accounts/' + ACCOUNT_SID + '/Conferences/' + CONFERENCE_SID + '/Participants/' + CALL_SID + '.json',
auth: { 'user': ACCOUNT_SID, 'pass': AUTH_TOKEN },
form: {
'Mute': 'false'
}
},
function (error, response, body) {
// Add your business logic below; status can be found at 'response.statusCode' and response body at 'body'
...
});
from http.client import HTTPSConnection
from base64 import b64encode
from urllib.parse import urlencode
# Provide your Account Sid and Auth Token from your Console Account page
ACCOUNT_SID = 'my_ACCOUNT_SID'
AUTH_TOKEN = 'my_AUTH_TOKEN'
// Provide additional path parameters if applicable
CONFERENCE_SID = 'my_CONFERENCE_SID'
CALL_SID = 'my_CALL_SID'
userAndPass = b64encode(bytes(ACCOUNT_SID + ':' + AUTH_TOKEN, 'utf-8')).decode("ascii")
headers = { 'Authorization' : 'Basic %s' % userAndPass,
'Content-type': 'application/x-www-form-urlencoded',
'Accept': 'text/plain' }
# Update POST parameters accordingly
params = urlencode({
'Mute': 'false'
})
conn = HTTPSConnection('mycompany.restcomm.com')
conn.request("POST", '/restcomm/2012-04-24/Accounts/' + ACCOUNT_SID + '/Conferences/' + CONFERENCE_SID + '/Participants/' + CALL_SID + '.json',
params, headers=headers)
res = conn.getresponse()
# Add your business logic below; status can be found at 'res.status', reason at 'res.reason' and response body can be retrieved with res.read()
...
import java.net.URL;
import javax.net.ssl.HttpsURLConnection;
import java.io.*;
import java.util.Base64;
public class JavaSampleClass {
// Provide your Account Sid and Auth Token from your Console Account page
public static final String ACCOUNT_SID = "my_ACCOUNT_SID";
public static final String AUTH_TOKEN = "my_AUTH_TOKEN";
// Provide additional path parameters if applicable
public static final String CONFERENCE_SID = "my_CONFERENCE_SID"
public static final String CALL_SID = "my_CALL_SID"
public static void main(String[] args) throws Exception {
String userAndPass = ACCOUNT_SID + ':' + AUTH_TOKEN;
String encoded = Base64.getEncoder().encodeToString(userAndPass.getBytes());
URL url = new URL(("https://mycompany.restcomm.com/restcomm/2012-04-24/Accounts/" + ACCOUNT_SID + "/Conferences/" + CONFERENCE_SID + "/Participants/" + CALL_SID + ".json");
HttpsURLConnection conn = (HttpsURLConnection)url.openConnection();
conn.setRequestProperty("Authorization", "Basic " + encoded);
conn.setRequestMethod("POST");
conn.setDoOutput(true);
DataOutputStream os = new DataOutputStream(conn.getOutputStream());
// Update POST parameters accordingly
os.writeBytes("Mute=false");
os.close();
// Add your business logic below; response code can be obtained from 'conn.getResponseCode()' and input stream from 'conn.getInputStream()'
...
}
}