import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: 'My API Key',
});
const actions = await client.simCards.actions.list();
console.log(actions.data);{
"data": [
{
"id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
"record_type": "sim_card_action",
"sim_card_id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
"action_type": "enable",
"status": {
"value": "completed",
"reason": "The data limit was exceeded."
},
"settings": {},
"created_at": "2018-02-02T22:25:27.521Z",
"updated_at": "2018-02-02T22:25:27.521Z"
}
],
"meta": {
"page_number": 2,
"page_size": 25,
"total_pages": 3,
"total_results": 55
}
}This API lists a paginated collection of SIM card actions. It enables exploring a collection of existing asynchronous operations using specific filters.
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: 'My API Key',
});
const actions = await client.simCards.actions.list();
console.log(actions.data);{
"data": [
{
"id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
"record_type": "sim_card_action",
"sim_card_id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
"action_type": "enable",
"status": {
"value": "completed",
"reason": "The data limit was exceeded."
},
"settings": {},
"created_at": "2018-02-02T22:25:27.521Z",
"updated_at": "2018-02-02T22:25:27.521Z"
}
],
"meta": {
"page_number": 2,
"page_size": 25,
"total_pages": 3,
"total_results": 55
}
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Consolidated filter parameter for SIM card actions (deepObject style). Originally: filter[sim_card_id], filter[status], filter[bulk_sim_card_action_id], filter[action_type]
Show child attributes
A valid SIM card ID.
"47a1c2b0-cc7b-4ab1-bb98-b33fb0fc61b9"
Filter by a specific status of the resource's lifecycle.
in-progress, completed, failed "in-progress"
Filter by a bulk SIM card action ID.
"47a1c2b0-cc7b-4ab1-bb98-b33fb0fc61b9"
Filter by action type.
enable, enable_standby_sim_card, disable, set_standby, remove_public_ip, set_public_ip "disable"
Successful Response
Show child attributes
Identifies the resource.
"6a09cdc3-8948-47f0-aa62-74ac943d6c58"
"sim_card_action"
The related SIM card identifier.
"6a09cdc3-8948-47f0-aa62-74ac943d6c58"
The operation type. It can be one of the following: <br/>
<ul> <li><code>enable</code> - move the SIM card to the <code>enabled</code> status</li> <li><code>enable_standby_sim_card</code> - move a SIM card previously on the <code>standby</code> status to the <code>enabled</code> status after it consumes data.</li> <li><code>disable</code> - move the SIM card to the <code>disabled</code> status</li> <li><code>set_standby</code> - move the SIM card to the <code>standby</code> status</li> </ul>enable, enable_standby_sim_card, disable, set_standby "enable"
Show child attributes
The current status of the SIM card action.
in-progress, completed, failed, interrupted "completed"
It describes why the SIM card action is in the current status. This will be <code>null</code> for self-explanatory statuses, such as <code>in-progress</code> and <code>completed</code> but will include further information on statuses like <code>interrupted</code> and <code>failed</code>.
"The data limit was exceeded."
A JSON object representation of the action params.
{}ISO 8601 formatted date-time indicating when the resource was created.
"2018-02-02T22:25:27.521Z"
ISO 8601 formatted date-time indicating when the resource was updated.
"2018-02-02T22:25:27.521Z"
Was this page helpful?