
API Endpoints:
//evntsd.strikedeck.com/pa/api/log
//evntsd.strikedeck.com/pa/api/logBulk
Authentication: Authentication is done over HTTP using Basic Auth with your API credentials. API Key will be the username and your Secret will be the password
The API accepts POST requests with data in JSON format.
Partner
- external_partner_id (string)
- name (string)
- data (object)
Customer
- external_customer_id (string, required)
- name (string)
- license_id (string)
- license_type (string)
- license_edition (string)
- license_users (int)
- renewal_date (date)
- mrr (int) [ in dollars]
- data (object)
User
- external_user_id (string, strongly recommended)
- email (string, strongly recommended)
- first_name (string)
- last_name (string)
- data (object)
Event
- event_type (string)
- data (object)
Sample:
{
“partner”: {
“external_partner_id”: “p2”
},
“customer”: {
“external_customer_id”: “c2”
},
“user”: {
“external_user_id”: “u2”,
“email”: “[email protected]”,
“first_name”: “joe”,
“last_name”: “satriani”
},
“event”: {
“event_type”: “login”,
“event_time”: “2012-04-23T18:25:43.511-02:00”
}
}
Sample API Calls:
Single Event
curl -i –user key:secret -H “Content-Type: application/json” -H “Accept: application/json” -X POST -d ‘{“customer”:{“external_customer_id”:”tmp-123″,”name”:”acme inc.”,”license_edition”:”ENTERPRISE”,”license_type”:”NAMED”,”license_users”:25,”license_id”:”12883″,”data”:{}},”user”:{“external_user_id”:”u2″,”email”:”[email protected]”,”first_name”:”joe”,”last_name”:”satriani”,”data”:{}},”event”:{“event_type”:”testevent”,”event_time”:”2012-04-23T18:25:43.511-02:00″,”data”:{“x”:4,”y”:12,”z”:”abc”}}}’ //evntsd.strikedeck.com/pa/api/log
Multiple Events
curl -i –user key:secret -H “Content-Type: application/json” -H “Accept: application/json” -X POST -d ‘[{“ustomer”:{“external_customer_id”:”tmp-123″,”name”:”acme inc.”,”license_edition”:”ENTERPRISE”,”license_type”:”NAMED”,”license_users”:25,”license_id”:”12883″,”data”:{}},”user”:{“external_user_id”:”u2″,”email”:”[email protected]”,”first_name”:”joe”,”last_name”:”satriani”,”data”:{}},”event”:{“event_type”:”testevent”,”data”:{“x”:4,”y”:12,”z”:”abc”}}},{“customer”:{“external_customer_id”:”tmp-123″,”name”:”acme inc.”,”license_edition”:”ENTERPRISE”,”license_type”:”NAMED”,”license_users”:25,”license_id”:”12883″,”data”:{}},”user”:{“external_user_id”:”u3″,”email”:”[email protected]”,”first_name”:”jane”,”last_name”:”satriani”,”data”:{}},”event”:{“event_type”:”testevent”,”data”:{“x”:4,”y”:12,”z”:”abc”}}}]’ //evntsd.strikedeck.com/pa/api/logBulk
API Responses
The HTTP status code will always be 200 if the server receives and processes the request. Server returns a JSON response envelope that includes the “status” of the requested operation. This status should be used to determine the success/failure of the operation.
If status is true that means the operation was successful. When an operation is successful the code is always 0.
{
“status” : true,
“code” : 0
}
If the status is false that means the operation failed. When an operation fails the code is non-zero and there is human readable message in the response object.
{
“status” : false,
“message” : “System error”,
“code” : 100
}
Debugging:
To see what got saved in the Strikedeck system, login here using your API key and secret
//evntsd.strikedeck.com/pa/browse/login.jsp
Here are some APIs that can be used to download the data –
getEventCountByDay
- limit (days, optional, default 30)
curl -i –user key:secret -H “Content-Type: application/json” -H “Accept: application/json” -X POST //evntsd.strikedeck.com/pa/api/getEventCountByDay
getEventCountByTypeDay
- event_type
- limit (days, optional, default 30)
curl -i –user key:secret -H “Content-Type: application/json” -H “Accept: application/json” -X POST //evntsd.strikedeck.com/pa/api/getEventCountByTypeDay
getEventCountByCustomerTypeDay
- external_customer_id
- event_type
- limit (days, optional, default 30)
curl -i –user key:secret -H “Content-Type: application/json” -H “Accept: application/json” -X POST //evntsd.strikedeck.com/pa/api/getEventCountByCustomerTypeDay
getUsers
- external_customer_id
- limit
curl -i –user key:secret -H “Content-Type: application/json” -H “Accept: application/json” -X POST //evntsd.strikedeck.com/pa/api/getUsers
getCustomers
- limit
curl -i –user key:secret -H “Content-Type: application/json” -H “Accept: application/json” -X POST //evntsd.strikedeck.com/pa/api/getCustomers
getPartners
- external_customer_id
curl -i –user key:secret -H “Content-Type: application/json” -H “Accept: application/json” -X POST //evntsd.strikedeck.com/pa/api/getPartners