Users
Users are the team members of your account.
Me
GET /me.xml
Returns your user details and all the tenants you have access to.
Note that this endpoint is the one exception to token authentication: you can use a username and password to authenticate against this action. This allows developers to obtain the token for a user in a tenant, given that user’s username and password, which makes it easier for users to authenticate on mobile platforms and the like.
Request
curl -u TOKEN:x -X GET https://dashboard.kpilibrary.com/api/v2/me.xml
Response
Status: 200
<?xml version="1.0" encoding="UTF-8"?>
<users type="array">
<user>
<id type="integer">593</id>
<name>John Brezinski</name>
<email>john.brezinski@example.com</email>
<role>Administrator</role>
<api-token>cksmxydsuwltfuf</api-token>
<tenant-name>ABC Company</tenant-name>
</user>
</users>
Show
GET /users/#{id}.xml
Returns a single user.
To include all the indicators the user is the owner of add ?include_indicators=1.
Request
curl -u TOKEN:x -X GET https://dashboard.kpilibrary.com/api/v2/users/USER_ID.xml
Response
Status: 200
<?xml version="1.0" encoding="UTF-8"?>
<user>
<id type="integer">593</id>
<name>John Brezinski</name>
<email>john.brezinski@example.com</email>
<role>Administrator</role>
<indicators type="array">
<indicator-id type="integer">128</indicator-id>
<indicator-id type="integer">129</indicator-id>
<indicator-id type="integer">139</indicator-id>
</indicators>
</user>
List
GET /users.xml
Returns a list of users.
Request
curl -u TOKEN:x -X GET https://dashboard.kpilibrary.com/api/v2/users.xml
Response
Status: 200
<?xml version="1.0" encoding="UTF-8"?>
<users type="array">
<user>
<id type="integer">593</id>
<name>John Brezinski</name>
<email>john.brezinski@example.com</email>
<role>Administrator</role>
</user>
<user>
<id type="integer">629</id>
<name>Jane Richardson</name>
<email>jane.richardson@example.com</email>
<role>Viewer</role>
</user>
<user>
<id type="integer">791</id>
<name>Bono Dvorak</name>
<email>bono.dvorak@example.com</email>
<role>Power User</role>
<suspended type="boolean">true</suspended>
</user>
</users>