functionality | method | endpoint |
---|---|---|
create account | PUT | |
edit account | PUT | /account/<id> |
remove account | DELETE | |
edit account owner | PUT | /account/<id>/user/<id>/owner |
log in and authenticate | POST | /account/# |
create embed credentials | GET | /account/credential/<net-id>/embed |
delete embed credentials | DELETE | /account/credential/<net-id>/embed |
service agreement status | GET | /account/service_agreement |
agree to service agreement | PUT | /account/service_agreement |
get audit logs | GET | /account/<id>/auditlogs |
create account is currently a restricted API and is not documented here at this time.
PUT /account/<id>
Edit account information.
PUT https://api-v2.cloudtrax.com/account/123
{
"name" : "new account name"
}
HTTP 200
{
}
remove account is currently a restricted API and is not documented here at this time.
PUT /account/<id>/user/<id>/owner
Edit the account owner.
PUT https://api-v2.cloudtrax.com/account/123/user/2/owner
{
}
HTTP 200
{
}
POST /account/#
Allow a user to log in using a username and password. These are passed in via , and an account
or network
key and secret are returned. This endpoint requires use of an application
key (see the CloudTrax API document).
POST https://api.cloudtrax.com/account/#
{
"username" : "joe_blow",
"password" : "my-beloved-dead-dog-rufus"
}
Returns a key and secret or an appropriate error. The "expire" field if successful is a Unix timestamp.
{
"key": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"secret": "0032665e503e866e331408bdb1edf02041abc53d21f6b9d70ce4495bee1de31d",
"expire": 2145916800,
"type": "master",
"type_value": "BerlinCloudtrax",
"read_only": 0,
"last_network_name": "open mesh office lamai beach",
"last_network_id": 92200
}
GET /account/credential/<network id>/embed
Create 'embed' user credentials for a specific network. Returns a key and secret which provide limited access to sections of the CloudTrax Dashboard for embedding on a local website. The returned key and secret can be pasted into the HTML snippet that is accessible via the Dashboard's "External embeds" section under "Configure::Display".
GET https://api.cloudtrax.com/account/credential/12989/embed
{
"key": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"secret": "0032665e503e866e331408bdb1edf02041abc53d21f6b9d70ce4495bee1de31d"
}
DELETE /account/credential/<network id>/embed
Delete a previously created embed credential.
DELETE https://api.cloudtrax.com/account/credential/12989/embed
Code 14001 will be returned on a successful deletion; 14002 if the deletion failed.
{
"code": 14001,
"message": "Deletion of key/secret succeeded.",
"context": "account",
"details": "",
"values": {
}
}
GET /account/service_agreement
Check if an account
or network
keyholder has agreed to Open-Mesh's latest service agreement. Log in as either an account
or network
user to do so.
GET https://api.cloudtrax.com/account/service_agreement
The returned JSON package will indicate either "valid" : true
or "valid" : false
.
{
"valid" : true
}
PUT /account/service_agreement
Agree to a service agreement. Note that no JSON structure is required for this endpoint.
PUT https://api.cloudtrax.com/account/service_agreement
Code 1009 is returned on success.
{
"code": 1009,
"message": "Success.",
"context": "service_agreement_put",
"details": "",
"values": {
}
}
GET /account/<id>/auditlogs
Get a list of audit events. Audit events are a select set of fields that have changed for the specified account.
GET https://api-v2.cloudtrax.com/account/123/auditlogs
{
}
HTTP 200
{
"log_events":[
{
"event_id":"abc",
"date":"2017-06-09T00:00:00Z",
"remote_address":"192.168.1.1",
"account_id":123,
"user_id":1,
"user_email":"foo@bar.com",
"support":false, /* audit event spawned by a support person, not a normal user */
"network_id":456,
"network_name":"foo wifi",
"user_action":"create",
"target_type":"network",
"target_id":"456",
"fields":[
{
"field":"ssid.1.wifi_name",
"old_value":"old foo wifi",
"new_value":"new foo wifi"
}
]
}
]
}