API Method – test

    test
    Test redirection with targeting rules.
    Note: FuseClick provides both GET and POST methods to use ‘test’ interface.

API Category

    Tool

HTTP Method - GET

    GET

Request Call Example

    HTTP:
    GET /api/v2/test?key=yourapikey&country=CN&url=http%3a%2f%2fgnetwork6.fcstgtracking.com%2ftl%3fa%3d61858%26o%3d132812&os=Android&osv=7.1 HTTP/1.1
    Host: yournetworkapplicationdomain
 
    Java:
    Unirest.get("http://yournetworkapplicationdomain/api/v2/test?key=yourapikey&country=CN&url=https://www.fuseclick.com/&os=Android&osv=7.1”).asString();

Parameters


Name Type Description
url* String Encoded URL to test: “http%3a%2f%2fgnetwork6.fcstgtracking.com%2ftl%3fa%3d61858%26o%3d132812”
country* String Abb. of a targeting Country: CN/US/SG
os* String Full name of a targeting device OS: Android/iOS
osv* String Full string of a targeting decice OS version, e.g. “7.1” or “12.3.1”

Response

Name Type Description
result Integer 1:Test process completed without error; 0: Something wrong happened with “message”
redirects Array An array of redirect
    order Integer Index of the redirection
    method Integer Redirection method such like “302”, “301”; “-2”: out of test
    url String Entry url of current redirection
    redirect_to String Url where currenct redirection to
    latency_ms Integer Latency of current redirection; “-2”: out of test
    is_store Integer Is a store address or Not; 1: Is, 0: Is Not
    track_flag String Track flag of FuseClick tracking system. 0: Fine in FuseClick systen; -1: not through FuseClick system
 
Sample in JSON:

{
    “result”: 1,
“redirects”:[
    {
“order”:1,
”method”:”302”,
    “url”:” http://www.fuselinklink.com/tl?a=2&o=723”,   
    "redirect_to": "http://www.linklinkclick.com/tl?a=12&o=3943",
“latency_ms”:12,
“is_store”: 0,
“track_flag”: 164
},
{
“order”:2,
”method”:”200”,
“url”:” http://redirector.com/r?s=hdsbJSG2Dkd”,
"redirect_to":"http://www.linklinkclick.com/tl?a=12&o=3943",
“latency_ms”:169,
“is_store”: 0,
“track_flag”: -1
},
{
“order”:3,
”method”:”200”,
“url”:”http://www.linklinkclick.com/tl?a=12&o=3943”,
"redirect_to": "http://play.google.com",
“latency_ms”:15,
“is_store”: 1,
“track_flag”: 0
}
]
}
 
HTTP Method - POST

    POST

Request Call Example

    HTTP:
    GET /api/v2/test?key=yourapikey HTTP/1.1
    Host: yournetworkapplicationdomain
 
    Java:
    Unirest.get("http://yournetworkapplicationdomain/api/v2/test?key=yourapikey”) header("Host", " yournetworkapplicationdomain").header("Accept-Encoding", "gzip, deflate").header("cache-control", "no-cache").body("{\n\t\"url\": \"https://www.fuseclick.com\",\n\t\"country\": \"IT\",\n\t\"os\": \"iOS\",\n\t\"osv\": \"12\"\n}").asString();

Objects


Name Type Description
url* String RAW URL to test: “https://www.fuseclick.com”
country* String Abb. of a targeting Country: CN/US/SG
os* String Full name of a targeting device OS: Android/iOS
osv* String Full string of a targeting decice OS version, e.g. “7.1” or “12.3.1”
 
Sample in JSON:

{
"url": "https://www.fuseclick.com",
"country": "IT",
"os": "iOS",
"osv": "12"
}
 
Response


Name Type Description
result Integer 1:Test process completed without error; 0: Something wrong happened with “message”
redirects Array An array of redirect
    order Integer Index of the redirection
    method Integer Redirection method such like “302”, “301”; “-2”: out of test
    url String Entry url of current redirection
    redirect_to String Url where currenct redirection to
    latency_ms Integer Latency of current redirection; “-2”: out of test
    is_store Integer Is a store address or Not; 1: Is, 0: Is Not
    track_flag String Track flag of FuseClick tracking system. 0: Fine in FuseClick systen; -1: not through FuseClick system
 
Sample in JSON:

{
    “result”: 1,
“redirects”:[
    {
“order”:1,
”method”:”302”,
    “url”:” http://www.fuselinklink.com/tl?a=2&o=723”,   
    "redirect_to": "http://www.linklinkclick.com/tl?a=12&o=3943",
“latency_ms”:12,
“is_store”: 0,
“track_flag”: 164
},
{
“order”:2,
”method”:”200”,
“url”:” http://redirector.com/r?s=hdsbJSG2Dkd”,
"redirect_to":"http://www.linklinkclick.com/tl?a=12&o=3943",
“latency_ms”:169,
“is_store”: 0,
“track_flag”: -1
},
{
“order”:3,
”method”:”200”,
“url”:”http://www.linklinkclick.com/tl?a=12&o=3943”,
"redirect_to": "http://play.google.com",
“latency_ms”:15,
“is_store”: 1,
“track_flag”: 0
}
]
}