Index Service API Specifications

Background

We receive a lot of requests from service providers to integrate their services into our software. As time goes by, the user interface gets really cluttered and we have to reject integration requests.

We feel that this isn't good for our users as we are limiting their choices.

As such, we came up with an idea. Instead of having us to integrate new services, we decided to release an API standard that service providers can conform to and our software will be able to support their service.

If you are an Index Service Provider and would like our software to support your service, you can refer to this API document to develop an API that is compatible with our tools.

 

API URL Structure

Our software will always perform a HTTP post to a service endpoint URL. Service providers decide how their endpoint URL will be.

Here is an example of how you, as a service provider can have your service endpoint located:

http://myindexservice.com/api/ping

 

API Parameters (HTTP POST)

Your service API has to accept HTTP POST request and support the following parameters:

Parameter Name Description
key API key provided by service provider to their user.

 

sender Contain the value that will inform the service provider on who is the sending party (software).

E.g. "edwinsoft" (without quotes)

 

cmd Contain the command that will be performed on the service provider.

 

Value Description Response Returned (JSON Formatted)
test Connection test to ensure the supplied API key is able to connect to the service. Sample:

{

"status_code": "1000",

"quota": "980"

}

quota Retrieve the balance of the submission quota. Sample:

{

"status_code": "1000",

"quota": "356"

}

submit Submit a list of line separated URLs to the service. Sample:

{

"status_code": "1000",

"quota": "356"

}

 

urls Line separated list of URLs that are submitted by the user.

 

Response Returned

The API must always return the result in JSON format. The result must contain an array with the following keys:

Key Description
status_code Contain a numeric number that describe the result that is returned from the API call.

See below for a list of codes, mapping and description.

 

quota Return the current quota balance the user has with the service provider.

 

What does the status code mean?

Status Code Description
500 General error

 

501 Connection error

 

502 Invalid API key

 

503 Insufficient URL

 

504 Invalid command

 

505 Exceed quota

 

1000 Success