Table of Contents
User authentication
To use the API you should be authorised via http authorization. For test needs API engine uses the user currently logged in to clickaider.com.
You can use all the following examples with proper results using demo account. To log into the demo account use the following login/password: demo/demo.
Table of Contents
User data management
- Signup
-
users.checkLogin ( login )
[ Example1, Example2 ]
-
users.checkEmail ( email )
[ Example1, Example2 ]
-
getTimezoneByIP ( ip )
[ Example ]
-
getTimezones ( )
[ Example ]
-
users.signup ( firstname, lastname, email, time_zone, login, pass[, no_confirm[, bReceiveNotices]] )
[ Example1, Example2 ]
-
users.confirmSignup ( unihash )
[ Example ]
-
users.forgotPassword ( email )
[ Example1, Example2, Example3 ]
-
users.del ( unihash )
[ Example ]
-
users.ban ( unihash )
[ Example ]
- Profile management
-
users.getList
( fields[, page[, num[, meta[, orderby]]]] )
[ Example1, Example2 ]
Fields list: login,unihash,firstname,lastname,email,time_zone,date_registered,date_lastlogin,type,site_count
-
userSettings.getProfile ( unihash )
[ Example ]
-
userSettings.setProfile ( unihash[, firstname[, lastname[, time_zone[, bReceiveNotices]]]] )
[ Example1, Example2 ]
-
userSettings.changePass ( unihash, pass )
[ Example ]
-
userSettings.changeEmail ( unihash, email )
[ Example1, Example2 ]
-
userSettings.confirmEmail ( unihash )
[ Example ]
Table of Contents
Sites management
- Site profile management
-
sites.getList ( unihash[, page[, num[, meta]]] )
[ Example1, Example2 ]
-
sites.add ( unihash, name, url, time_zone )
[ Example1, Example2 ]
-
sites.del ( unihash, sites_ids )
[ Example ]
-
sites.ban ( unihash, sites_ids )
[ Example ]
-
siteSettings.update ( unihash, site_id, name, url, time_zone )
[ Example ]
-
siteSettings.getProfile ( unihash, site_id )
[ Example ]
-
siteSettings.getTrackingCode
( unihash, site_id[,
track_links[,
track_forms[,
track_intellitxt[,
tags]]]]
)
[ Example1, Example2] Tracking code help
-
getLogos ( )
[ Example ]
- Clicks log subscription
-
siteSettings.getLogFilesubScriptionStatus ( unihash, site_id )
[ Example ]
-
siteSettings.subscribeLogFile ( unihash, site_id )
[ Example ]
-
siteSettings.setLogFileSubscriptionType ( unihash, site_id, type )
[ Example1, Example2 ]
-
siteSettings.unsubscribeLogFile ( unihash, site_id )
[ Example ]
Table of Contents
Reports
Whenever date/time is required, it should be provided in MM/DD/YYYY+HH:MM form.
To limit request with some date/time period use the following parameters:
&date_from=MM/DD/YYYY+HH:MM&date_to=MM/DD/YYYY+HH:MM
or
&date_from=MM/DD/YYYY+HH:MM&date_to=now
or
&date_from=MM/DD/YYYY+HH:MM
Alternative way to specify date/time period is to specify it relatively in date_relative parameter.
If request contains parameter date_relative, then parameters date_from and date_to are ignored.
Default value for date_relative is last7days if neither date_relative nor date_from/date_to are specified.
&date_relative=today | yesterday | last2days | this_week | last7days | last_week | this_month | last30days | last_month | all
For trend reports we have parameter group_by_date.
&group_by_date=hour | day | week | month | hourly_for_day | daily_for_week | hourly_for_week
Request can contain filters. There are 2 types of filters - regular and excluded. To use the filters you should specify prefix "f_", for excluded filters - prefix "fe_". You can also filter by one or several values that should be comma separated.
If you want to add filters on fields "ip" and "se" and excluded filter on field "country" the request should be like this:
&f_ip=[IPs in decimal format separated by comma]&f_se=[ids of Search Engine names in string table separated by comma]&fe_country=[ids of countries separated by comma]
How to retrieve values of Search Engine ID or page URL ID or country ID?
To do that you need to create report using function report.getTop() which get list of IDs and strings sorted by clicks count and grouped by those Search Engine field or page URL field or country field.
In general you can use result of any report that contains values IDs.
You can also filter by certain strings instead of their IDs.
To do that you should send API call by HTTP POST method and specify parameter bStringFilters. See function CAWS::call() in file class.CAXML.php from PHP code examples of API calls
Also you should change filter request rule like this:
&f_ip[]=[ip in string format]&f_ip[]=[another ip in string format]&f_se[]=[Search Engine name]&f_se[]=[another Search Engine name]&fe_country[]=[2 letter country id]&fe_country[]=[another 2 letter country id]
Fields for which lookups are specified in current API must be filtered only by their identifiers whenever HTTP method is used and bStingFilters specified or not. See section Fields' lookup data
Fields specification:
Report's fields (using following functions you can easily recreate structure of existing ClickAider reports and create new reports which are not currently added to GUI interface):
-
reportFields.getSimpleFields
( )
[ Example ]
-
reportFields.getCombinedFields
( )
[ Example ]
-
reportFields.getFieldsByCategories
( )
[ Example ]
-
reportFields.getMandatoryFilters
( )
[ Example ]
Fields' lookup data:
-
reportFieldsLookups.getAdvertisers
( )
[ Example ]
-
reportFieldsLookups.getCountries
( )
[ Example ]
-
reportFieldsLookups.getClickClasses
( )
[ Example ]
Reports:
-
report.getClick
( unihash, site_id, click_id[,
time_zone]
)
[ Example ]
-
report.getLog
( unihash, site_id[,
page[,
num[,
time_zone[,
date_relative[,
date_from[,
date_to[,
bStingFilters[, f_*[,
fe_*[,
type[,
fields]]]]]]]]]]]]
)
[ Example1, Example2]
-
report.getTop
( unihash, site_id,
group_by,
countfields[,
page[,
num[,
time_zone[,
date_relative[,
date_from[,
date_to[,
bStingFilters[, f_*[,
fe_*]]]]]]]]]]
)
[ Example1, Example2 ]
-
report.getTrend
( unihash, site_id,
group_by_date,
countfields[,
page[,
num[,
time_zone[,
date_relative[,
date_from[,
date_to[,
bStingFilters[, f_*[,
fe_*]]]]]]]]]]
)
[ Example1, Example2 ]
-
report.getTrendOfItems
( unihash, site_id,
group_by_date,
countfield,
group_by,
item_ids[,
page[,
num[,
time_zone[,
date_relative[,
date_from[,
date_to[,
bStingFilters[, f_*[,
fe_*[,
bIsPercent]]]]]]]]]]]]
)
[ Example1, Example2 ]
-
report.getTrendOfTopItems
( unihash, site_id,
group_by_date,
countfield,
group_by[,
page[,
num[,
time_zone[,
date_relative[,
date_from[,
date_to[,
bStingFilters[, f_*[,
fe_*
]]]]]]]]]
)
[ Example ]
Table of Contents
|