Search
This returns a list of records for whatever resource you are querying for e.g. messages or contacts.
Messages
Method:
GET
Url
This API is available in both JSON and XML formats
JSON
https://ongair.im/api/v1/search/messages.json
XML
https://ongair.im/api/v1/search/messages.xml
Response
JSON
[
{
"id": 1,
"text": "hey",
"created_at": "2015-04-17T14:49:35.000Z",
"contact": {
"name": "John",
"id": 1,
"phone_number": "254703336224"
}
},
{
"id": 2,
"text": "Hi",
"created_at": "2015-05-05T03:40:22.000Z",
"contact": {
"name": "Jane",
"id": 2,
"phone_number": "254704755453"
}
}
]
XML
<?xml version="1.0" encoding="UTF-8"?>
<messages>
<message>
<id>1</id>
<text>hey</text>
<created_at>2015-04-17 14:49:35 UTC</created_at>
<contact>
<id>1</id>
<phone_number>254703336224</phone_number>
<name>John</name>
</contact>
</message>
<message>
<id>2</id>
<text>Hi</text>
<created_at>2015-05-05 03:40:22 UTC</created_at>
<contact>
<id>2</id>
<phone_number>254704755453</phone_number>
<name>Jane</name>
</contact>
</message>
</messages>
Contacts
Method:
GET
This API is available in both JSON and XML formats
JSON
https://app.ongair.im/api/v1/search/contacts.json
XML
https://app.ongair.im/api/v1/search/contacts.xml
Response
JSON
[
{
"id": 1,
"phone_number": "254703336224",
"name": "John",
"country": "Kenya",
"created_at": "2015-04-17T14:49:35.000Z"
},
{
"id": 2,
"phone_number": "254704755453",
"name": "Jane",
"country": "Kenya",
"created_at": "2015-05-11T13:41:49.000Z"
}
]
XML
<?xml version="1.0" encoding="UTF-8"?>
<contacts>
<contact>
<id>1</id>
<name>John</name>
<phone_number>254703336224</phone_number>
<country>Kenya</country>
<created_at>2015-04-17 14:49:35 UTC</created_at>
</contact>
<contact>
<id>2</id>
<name>Jane</name>
<phone_number>254704755453</phone_number>
<country>Kenya</country>
<created_at>2015-05-11 13:41:49 UTC</created_at>
</contact>
</contacts>