Retrieve a list of Commands from your account.
Machine-to-machine commands sent to/from devices
Retrieve a list of Commands from your account.
Query parameters
-
The
sid
orunique_name
of the Sim resources to read. -
The status of the resources to read. Can be:
queued
,sent
,delivered
,received
, orfailed
.Values are
queued
,sent
,delivered
,received
, orfailed
. -
Only return Commands with this direction value.
Values are
from_sim
orto_sim
. -
Only return Commands with this transport value. Can be:
sms
orip
.Values are
sms
orip
. -
How many resources to return in each list page. The default is 50, and the maximum is 1000.
Minimum value is
1
, maximum value is1000
. -
The page index. This value is simply for client state.
Minimum value is
0
. -
The page token. This is provided by the API.
GET
/v1/Commands
curl \
--request GET 'https://wireless.twilio.com/v1/Commands' \
--user "username:password"
Response examples (200)
Read empty
{
"meta": {
"key": "commands",
"url": "https://wireless.twilio.com/v1/Commands?Status=queued&Direction=from_sim&Sim=sim&PageSize=50&Page=0",
"page": 0,
"page_size": 50,
"next_page_url": null,
"first_page_url": "https://wireless.twilio.com/v1/Commands?Status=queued&Direction=from_sim&Sim=sim&PageSize=50&Page=0",
"previous_page_url": null
},
"commands": []
}
{
"meta": {
"key": "commands",
"url": "https://wireless.twilio.com/v1/Commands?Status=queued&Direction=from_sim&Sim=sim&PageSize=50&Page=0",
"page": 0,
"page_size": 50,
"next_page_url": null,
"first_page_url": "https://wireless.twilio.com/v1/Commands?Status=queued&Direction=from_sim&Sim=sim&PageSize=50&Page=0",
"previous_page_url": null
},
"commands": [
{
"sid": "DCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"url": "https://wireless.twilio.com/v1/Commands/DCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"status": "queued",
"command": "command",
"sim_sid": "DEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"direction": "from_sim",
"transport": "sms",
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"command_mode": "text",
"date_created": "2015-07-30T20:00:00Z",
"date_updated": "2015-07-30T20:00:00Z",
"delivery_receipt_requested": true
}
]
}
{
"meta": {
"key": "commands",
"url": "https://wireless.twilio.com/v1/Commands?Status=queued&Direction=to_sim&Transport=ip&Sim=sim&PageSize=50&Page=0",
"page": 0,
"page_size": 50,
"next_page_url": null,
"first_page_url": "https://wireless.twilio.com/v1/Commands?Status=queued&Direction=to_sim&Transport=ip&Sim=sim&PageSize=50&Page=0",
"previous_page_url": null
},
"commands": [
{
"sid": "DCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"url": "https://wireless.twilio.com/v1/Commands/DCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"status": "queued",
"command": "command",
"sim_sid": "DEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"direction": "to_sim",
"transport": "ip",
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"command_mode": "binary",
"date_created": "2015-07-30T20:00:00Z",
"date_updated": "2015-07-30T20:00:00Z",
"delivery_receipt_requested": true
}
]
}