Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

UNDER CONSTRUCTION

The Appoxee API allows you to access major parts of Appoxee back-end functionality, both from the Server side and from the Device side.

This document describes the Service API, which is mainly used to send Push notifications to devices (see Push Message API).

Other operations are performed through the SDK API (see Android SDK API Usage and iOS SDK API Usage).

Service API Request

All request data must be sent as an HTTP POST request  in the JSON format (the data content type must be set to "applicaiton/json").

 Appoxee API variables and parameters consist of case-sensitive keys (alpha-numeric value, starting with a letter) and their length should be under 100 characters.

Request URL

POST

'http://saas.appoxee.com/api/

Request URL Arguments

NameSyntaxDescription
???

Request Body

Contains the following arguments:

Body Arguments

Parameter DescriptionSyntax
action

The action performed by this API.

  • “alias” –  specify “Alias API” actions
  • “tag” – specify the “Tag API” actions
  • “key-value” – specify “Alias API” actions
  • “attribute” – specify “Attribute API” actions
  • “segment” –  specify “Segmentation API” actions
  • “push” – specify “Push API” actions

signature

Appoxee's API security model ensures that every request has a unique secret signature.

This signature is passed as a parameter inside the “auth” JSON object (along with additional authentication-related information).

The signature is created using the MD5 hash function with the concatenation of the following parameters:
timestamp, AppSDKKey and SECRET (see below).

Note that the parameter order is important!

Signature syntax in PHP format (for server-side usage):

$signature = md5($auth['timestamp'] . SECRET . AppSDKKey . random);

 

timestamp

The current time in seconds, in a Unix timestamp format.

1330607184

 

AppSDKKey

An Appoxee secret code that is unique per-app.
The SDK key is defined on the Appoxee website:
Apps tab> select your app> Application Information page> SDK Key field.

xxxxxxxxxxxxxx.xxxxxxxx

 

SECRET

An Appoxee secret code that is unique per-app, used by the Appoxee API to authenticate the app.
The secret key is defined on the Appoxee website:
Apps tab> select your app> Application Information page> Secret Key field.

 

xxxxxxxxxxxxxx.xxxxxxxx

random

 

A security parameter that is unigue per-request, and ensures that no request is sent twice.
The developer must ensure that this parameter is random for every request.
The Appoxee server checks each request's signature and random parameter, and rejects duplicated requests.

Note: You can either use "random()" or "uniqid()".

4f5cc37a93463

Response

The API response has the following format:

HTTP Response Header

HTTP Header FieldValue
Status Code
  • Upon success – 200 OK 
  • Upon failure  the failure status code (for example: "400 Bad Request")
Location?The URL of the newly created object?

HTTP Response Body

The response body includes a description of the request result in JSON format. 
The API call has one of the following results:

Response ResultReturnsExample
SuccessA "Success" parameter

{

    "response": "Success"

}

Success with data retrieval
  • A "Success" parameter
  • A "result" parameter containing the result in the specified protocol
    (for example: an array of return values).

{

    "response": "Success",

    "result": [“tag1”, “tag2”]

}

Failure
  • An "Error" parameter
  • The error code number ("code": "[number]")
  • A message describing the error ("message": "[description]")

{

    "response": "Error",

    "code": 0,

    "message": "Invalid request"

}

Example Request

Request URL

POST

???

Request Body

???

HTTP Response Header

200 OK

HTTP Response Body

{

    "response": "Success"

}

  • No labels