YateOTA – JSON API for Control & Stats

Learn about OTA campaigns - YateOTA Requests, YateOTA Responses and YateOTA Errors

Request: query_campaigns

Retrieve aggregated information about OTA campaigns.
This request has multiple formats in which it can be sent:
{
    "request": "query_campaigns",
    "node": "ota",
    "params": {}
}
{
    "request": "query_campaigns",
    "node": "ota",
    "params": {
        "limit": "Number of campaigns to return",
        "offset": "The starting point to return campaigns"
    }
}
{
    "request": "query_campaigns",
    "node": "ota",
    "params": {
        "campaign_id": "Return a single campaign by specifying the campaign_id"
    }
}
Examples: query_campaigns
Retrieve status for each campaign.
{
    "request": "query_campaigns",
    "node": "ota",
    "params": {}
}
Retrieve status for a limited number of campaigns using parameters limit and offset.
{
    "request": "query_campaigns",
    "node": "ota",
    "params": {
        "limit": 3,
        "offset": 0
    }
}
Retrieve status for a single campaign by specifying campaign_id.
{
    "request": "query_campaigns",
    "node": "ota",
    "params": {
        "campaign_id": 147
    }
}

Request: action_campaign

Modify a RAM/RFM OTA campaign status
{
    "request": "action_campaign",
    "node": "ota",
    "params": {
        "campaign_id": "Id of the campaign. Required.",
        "action": "stop/pause/restart"
    }
}
Examples: action_campaign
Stop a running campaign.
{
    "request": "action_campaign",
    "node": "ota",
    "params": {
        "campaign_id": 144,
        "action": "stop"
    }
}
Pause a running campaign.
{
    "request": "action_campaign",
    "node": "ota",
    "params": {
        "campaign_id": 144,
        "action": "pause"
    }
}
Restart a campaign.
{
    "request": "action_campaign",
    "node": "ota",
    "params": {
        "campaign_id": 144,
        "action": "restart"
    }
}

Request: query_participants

Retrieve participants for an OTA campaign
This request has multiple formats in which it can be sent:
{
    "request": "query_participants",
    "node": "ota",
    "params": {
        "campaign_id": "Id of the campaign."
    }
}
{
    "request": "query_participants",
    "node": "ota",
    "params": {
        "campaign_id": "Id of the campaign.",
        "limit": "Number of participants to return",
        "offset": "The starting point to return participants from a campaign"
    }
}
{
    "request": "query_participants",
    "node": "ota",
    "params": {
        "campaign_id": "Id of the campaign.",
        "limit": "Number of participants to return",
        "offset": "The starting point to return participants from a campaign",
        "state": "pending_build/pending_send/failed/finished. Return participants from a campaign after state."
    }
}
Examples: query_participants
Retrieve number of participants set in a campaign.
{
    "request": "query_participants",
    "node": "ota",
    "params": {
        "campaign_id": "176"
    }
}
Retrieve a limited number of participants set in a campaign using parameters limit and offset.
{
    "request": "query_participants",
    "node": "ota",
    "params": {
        "campaign_id": 167,
        "offset": 0,
        "limit": 20
    }
}
Retrieve participants set in a campaign by specifying status.
{
    "request": "query_participants",
    "node": "ota",
    "params": {
        "campaign_id": 167,
        "offset": 0,
        "limit": 20,
        "state": "finished"
    }
}

Request: action_participant

Change participant status for an OTA campaign
{
    "request": "action_participant",
    "node": "ota",
    "params": {
        "participant_id": "Id of the participant.",
        "action": "cancel/hurry/retry. Action is based on participant status."
    }
}
Examples: action_participant
Hurry a pending message.
{
    "request": "action_participant",
    "node": "ota",
    "params": {
        "participant_id": "Id of the participant.",
        "action": "hurry",
        "comment__action": "Messages that have status failed/waiting_por can not be hurried."
    }
}
Retry to send a message.
{
    "request": "action_participant",
    "node": "ota",
    "params": {
        "participant_id": "195",
        "action": "retry"
    }
}
Cancel sending a message.
{
    "request": "action_participant",
    "node": "ota",
    "params": {
        "participant_id": "195",
        "action": "cancel"
    }
}

Request: trace

Trace participants from an OTA campaign.
Parameter campaign_id is mandatory.
One of the following parameters must pe specified: participant_id/msisdn/imsi
{
    "request": "trace",
    "node": "ota",
    "params": {
        "campaign_id": "Id of the campaign. Mandatory Parameter",
        "participant_id": "Id of the participant. Optional Parameter.",
        "msisdn": "Phone Number.  Optional Parameter",
        "imsi": "IMSI.  Optional Parameter"
    }
}
Examples: trace
Trace a participant from a campaign by specifying participant_id.
{
    "request": "trace",
    "node": "ota",
    "params": {
        "campaign_id": "142",
        "participant_id": "161"
    }
}