logs/v1

RESTful style

Get message logs. This is also the report format for /send/v1 reports and incoming messages.

Request

Host URL: https://api.tellustalk.com/logs/v1

Method supported: GET

Request Headers:

Accept: application/json (recommended) or application/xml or text/html

Authorization: Basic username:password (base64-encoded)

Request Parameters:

Common request parameters, used as search filters (similar to SQL 'WHERE' clause), and their description are given below:

Examples: see below.

Response

Response Headers:

Content-Type: application/json or application/xml

Link: <https://api.tellustalk.com/logs/v1/?cursor=abc12300ETC>; rel="next"; title="UTF-8'uk'Next" (Related Links)

X-Total-Count: nn (total number of records returned)

Response Data:

A list of logged messages.

Examples (abridged):

Request Header

Accept: application/json

Accept: application/xml

Retrieved Results

[{"id": "1000000123", "address": "sms:+46704000000", "name": "", "status": "success"},

{"id": "1000000456", "address": "sms:+46704000000", "name": "", "status": "blocked"}]

<root>

<item>

<address>sms:+46704000000</address>

<name />

<status>success</status>

</item>

<item>

<address>sms:+46704000000</address>

<name />

<status>blocked</status>

</item>

</root>

All Fields of a Logged Message

All these values are present in each log entry, but many are empty

Examples

Several of the message fields above can be used as request params, to search for specific kinds of traffic.

article_id=SMS_Reply

status=success -- successful messages only

status=failed -- failed messages only

conversation_id=123, job_id=123

id=123 -- to get a specific message (eg if you got empty status on a SMS_Sent, this is awaiting report

number_id=box.123abc -- your sendlist id

number_id=44100200300 -- your incoming Fax or SMS number

to_address=467301020304 -- a specific recipient

from_address=yourserver@mail.se

user_id=abc@se.se -- a specific user if your organisation has several users (and you have access rights to their traffic)

Any combination is valid, although many combinations return empty result.

NOTE: You get nothing from a list of values, eg

{ "article_id": ["SMS_Sent", "SMS_Reply"] }

is always empty,

but eg,

{ "article_id": "SMS_Reply", "job_id": "123" }

will return any replies to a send job.