Kepla API

Users

Access to your account is defined by users. You can invite and delete users with access to the account, update a user's role and list all users. Users are defined across Kepla with a unique ID.

Users Overview

{
  "createdAt": "2015-11-02T00:30:23.968Z",
String (Date-time)

Date the user was first created in Tempo (across all accounts)

  "email": "[email protected]",
String (Email)

Users will use this email to log in and receive invite notifications.

  "id": "77c8a907-40b7-40ab-91ad-8034df0fa7a0",
String (Uuid)
  "name": "Test User",
String
  roles: [
Array
    {
    { ... }
Object

Roles

      "accountId": "ad032f79-fa7e-45b6-a31d-10a4e43bd69b",
String
      "capabilities": {
      "capabilities": { ... }
Object
        "default": {
        "default": { ... }
Object
          "*": true
Boolean
        }
      },
      "createdAt": "2016-07-17T22:44:35.683Z",
String
      "id": "9ad68f5d-c4bb-4db4-870b-c688afcbb1f3",
String
      "name": "Admin",
String
      "system": "admin"
String
    }
  ]
  teams: [
Array
    {
    { ... }
Object

Teams

      "accountId": "ad032f79-fa7e-45b6-a31d-10a4e43bd69b",
String
      "createdAt": "2016-07-17T22:44:35.763Z",
String
      "id": "843cd093-a038-44a4-b1f2-6caad7cfe49a",
String
      "name": "Staff"
String
    }
  ]
}

List Users

Open in API Explorer
GET /users

Returns a list of all account users with their user role and the teams they are a member of.

Example Request

Format:
curl --request GET \
  --url https://api.kepla.com/v1/users \
  --header 'accept: application/json' \
  --header 'authorization: Bearer YOUR API KEY HERE'
require 'uri'
require 'net/http'

url = URI("https://api.kepla.com/v1/users")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
request["accept"] = 'application/json'
request["authorization"] = 'Bearer YOUR API KEY HERE'

response = http.request(request)
puts response.read_body
var http = require("https");

var options = {
  "method": "GET",
  "hostname": "api.kepla.com",
  "port": null,
  "path": "/v1/users",
  "headers": {
    "accept": "application/json",
    "authorization": "Bearer YOUR API KEY HERE"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
import http.client

conn = http.client.HTTPSConnection("api.kepla.com")

headers = {
    'accept': "application/json",
    'authorization': "Bearer YOUR API KEY HERE"
    }

conn.request("GET", "/v1/users", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.kepla.com/v1/users",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => array(
    "accept: application/json",
    "authorization: Bearer YOUR API KEY HERE"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://api.kepla.com/v1/users"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("accept", "application/json")
	req.Header.Add("authorization", "Bearer YOUR API KEY HERE")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}

Responses

200 Success Users List
[
  "createdAt": "2015-11-02T00:30:23.968Z",
String (Date-time)

Date the user was first created in Tempo (across all accounts)

  "email": "[email protected]",
String (Email)

Users will use this email to log in and receive invite notifications.

  "id": "77c8a907-40b7-40ab-91ad-8034df0fa7a0",
String (Uuid)
  "name": "Test User",
String
  roles: [
Array
    {
    { ... }
Object

Roles

      "accountId": "ad032f79-fa7e-45b6-a31d-10a4e43bd69b",
String
      "capabilities": {
      "capabilities": { ... }
Object
        "default": {
        "default": { ... }
Object
          "*": true
Boolean
        }
      },
      "createdAt": "2016-07-17T22:44:35.683Z",
String
      "id": "9ad68f5d-c4bb-4db4-870b-c688afcbb1f3",
String
      "name": "Admin",
String
      "system": "admin"
String
    }
  ]
  teams: [
Array
    {
    { ... }
Object

Teams

      "accountId": "ad032f79-fa7e-45b6-a31d-10a4e43bd69b",
String
      "createdAt": "2016-07-17T22:44:35.763Z",
String
      "id": "843cd093-a038-44a4-b1f2-6caad7cfe49a",
String
      "name": "Staff"
String
    }
  ]
]

Create a User

Open in API Explorer
POST /users

Invite a new user to your account

Example Request

Format:
curl --request POST \
  --url https://api.kepla.com/v1/users \
  --header 'accept: application/json' \
  --header 'authorization: Bearer YOUR API KEY HERE' \
  --header 'content-type: application/json' \
  --data '{"name":"Test User","email":"[email protected]","roleId":"9ad68f5d-c4bb-4db4-870b-c688afcbb1f3","teams":["0dd4e0e0-635f-4f07-8edd-d41de58af810","0dd4e0e0-635f-4f07-8edd-d41de58af810","0dd4e0e0-635f-4f07-8edd-d41de58af810"]}'
require 'uri'
require 'net/http'

url = URI("https://api.kepla.com/v1/users")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Post.new(url)
request["accept"] = 'application/json'
request["authorization"] = 'Bearer YOUR API KEY HERE'
request["content-type"] = 'application/json'
request.body = "{\"name\":\"Test User\",\"email\":\"[email protected]\",\"roleId\":\"9ad68f5d-c4bb-4db4-870b-c688afcbb1f3\",\"teams\":[\"0dd4e0e0-635f-4f07-8edd-d41de58af810\",\"0dd4e0e0-635f-4f07-8edd-d41de58af810\",\"0dd4e0e0-635f-4f07-8edd-d41de58af810\"]}"

response = http.request(request)
puts response.read_body
var http = require("https");

var options = {
  "method": "POST",
  "hostname": "api.kepla.com",
  "port": null,
  "path": "/v1/users",
  "headers": {
    "accept": "application/json",
    "authorization": "Bearer YOUR API KEY HERE",
    "content-type": "application/json"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.write(JSON.stringify({ name: 'Test User',
  email: '[email protected]',
  roleId: '9ad68f5d-c4bb-4db4-870b-c688afcbb1f3',
  teams: 
   [ '0dd4e0e0-635f-4f07-8edd-d41de58af810',
     '0dd4e0e0-635f-4f07-8edd-d41de58af810',
     '0dd4e0e0-635f-4f07-8edd-d41de58af810' ] }));
req.end();
import http.client

conn = http.client.HTTPSConnection("api.kepla.com")

payload = "{\"name\":\"Test User\",\"email\":\"[email protected]\",\"roleId\":\"9ad68f5d-c4bb-4db4-870b-c688afcbb1f3\",\"teams\":[\"0dd4e0e0-635f-4f07-8edd-d41de58af810\",\"0dd4e0e0-635f-4f07-8edd-d41de58af810\",\"0dd4e0e0-635f-4f07-8edd-d41de58af810\"]}"

headers = {
    'accept': "application/json",
    'authorization': "Bearer YOUR API KEY HERE",
    'content-type': "application/json"
    }

conn.request("POST", "/v1/users", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.kepla.com/v1/users",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "{\"name\":\"Test User\",\"email\":\"[email protected]\",\"roleId\":\"9ad68f5d-c4bb-4db4-870b-c688afcbb1f3\",\"teams\":[\"0dd4e0e0-635f-4f07-8edd-d41de58af810\",\"0dd4e0e0-635f-4f07-8edd-d41de58af810\",\"0dd4e0e0-635f-4f07-8edd-d41de58af810\"]}",
  CURLOPT_HTTPHEADER => array(
    "accept: application/json",
    "authorization: Bearer YOUR API KEY HERE",
    "content-type: application/json"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://api.kepla.com/v1/users"

	payload := strings.NewReader("{\"name\":\"Test User\",\"email\":\"[email protected]\",\"roleId\":\"9ad68f5d-c4bb-4db4-870b-c688afcbb1f3\",\"teams\":[\"0dd4e0e0-635f-4f07-8edd-d41de58af810\",\"0dd4e0e0-635f-4f07-8edd-d41de58af810\",\"0dd4e0e0-635f-4f07-8edd-d41de58af810\"]}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("accept", "application/json")
	req.Header.Add("authorization", "Bearer YOUR API KEY HERE")
	req.Header.Add("content-type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}

Request Body

Name Type Required Description Example
payload Object Required
{
  "name": "Test User",
String
  "email": "[email protected]",
String
  "roleId": "9ad68f5d-c4bb-4db4-870b-c688afcbb1f3",
String
  "teams": [
    "0dd4e0e0-635f-4f07-8edd-d41de58af810",
    "0dd4e0e0-635f-4f07-8edd-d41de58af810",
    "0dd4e0e0-635f-4f07-8edd-d41de58af810"
  ]
Array

An array of team IDs to add the user to.

}

Responses

201 Success Users Default
{
  "createdAt": "2015-11-02T00:30:23.968Z",
String (Date-time)

Date the user was first created in Tempo (across all accounts)

  "email": "[email protected]",
String (Email)

Users will use this email to log in and receive invite notifications.

  "id": "77c8a907-40b7-40ab-91ad-8034df0fa7a0",
String (Uuid)
  "name": "Test User",
String
  roles: [
Array
    {
    { ... }
Object

Roles

      "accountId": "ad032f79-fa7e-45b6-a31d-10a4e43bd69b",
String
      "capabilities": {
      "capabilities": { ... }
Object
        "default": {
        "default": { ... }
Object
          "*": true
Boolean
        }
      },
      "createdAt": "2016-07-17T22:44:35.683Z",
String
      "id": "9ad68f5d-c4bb-4db4-870b-c688afcbb1f3",
String
      "name": "Admin",
String
      "system": "admin"
String
    }
  ]
  teams: [
Array
    {
    { ... }
Object

Teams

      "accountId": "ad032f79-fa7e-45b6-a31d-10a4e43bd69b",
String
      "createdAt": "2016-07-17T22:44:35.763Z",
String
      "id": "843cd093-a038-44a4-b1f2-6caad7cfe49a",
String
      "name": "Staff"
String
    }
  ]
}

Update a User

Open in API Explorer
PUT /users/:user

Updates the specified user with the parameters passed, including their role and team memberships. Any data not sent will remain unchanged. You can't update a user's name or email address using this endpoint.

Example Request

Format:
curl --request PUT \
  --url https://api.kepla.com/v1/users/:user \
  --header 'accept: application/json' \
  --header 'authorization: Bearer YOUR API KEY HERE' \
  --header 'content-type: application/json' \
  --data '{"name":"Test User","email":"[email protected]","roleId":"9ad68f5d-c4bb-4db4-870b-c688afcbb1f3","teams":["0dd4e0e0-635f-4f07-8edd-d41de58af810","0dd4e0e0-635f-4f07-8edd-d41de58af810","0dd4e0e0-635f-4f07-8edd-d41de58af810"]}'
require 'uri'
require 'net/http'

url = URI("https://api.kepla.com/v1/users/:user")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Put.new(url)
request["accept"] = 'application/json'
request["authorization"] = 'Bearer YOUR API KEY HERE'
request["content-type"] = 'application/json'
request.body = "{\"name\":\"Test User\",\"email\":\"[email protected]\",\"roleId\":\"9ad68f5d-c4bb-4db4-870b-c688afcbb1f3\",\"teams\":[\"0dd4e0e0-635f-4f07-8edd-d41de58af810\",\"0dd4e0e0-635f-4f07-8edd-d41de58af810\",\"0dd4e0e0-635f-4f07-8edd-d41de58af810\"]}"

response = http.request(request)
puts response.read_body
var http = require("https");

var options = {
  "method": "PUT",
  "hostname": "api.kepla.com",
  "port": null,
  "path": "/v1/users/:user",
  "headers": {
    "accept": "application/json",
    "authorization": "Bearer YOUR API KEY HERE",
    "content-type": "application/json"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.write(JSON.stringify({ name: 'Test User',
  email: '[email protected]',
  roleId: '9ad68f5d-c4bb-4db4-870b-c688afcbb1f3',
  teams: 
   [ '0dd4e0e0-635f-4f07-8edd-d41de58af810',
     '0dd4e0e0-635f-4f07-8edd-d41de58af810',
     '0dd4e0e0-635f-4f07-8edd-d41de58af810' ] }));
req.end();
import http.client

conn = http.client.HTTPSConnection("api.kepla.com")

payload = "{\"name\":\"Test User\",\"email\":\"[email protected]\",\"roleId\":\"9ad68f5d-c4bb-4db4-870b-c688afcbb1f3\",\"teams\":[\"0dd4e0e0-635f-4f07-8edd-d41de58af810\",\"0dd4e0e0-635f-4f07-8edd-d41de58af810\",\"0dd4e0e0-635f-4f07-8edd-d41de58af810\"]}"

headers = {
    'accept': "application/json",
    'authorization': "Bearer YOUR API KEY HERE",
    'content-type': "application/json"
    }

conn.request("PUT", "/v1/users/:user", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.kepla.com/v1/users/:user",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "PUT",
  CURLOPT_POSTFIELDS => "{\"name\":\"Test User\",\"email\":\"[email protected]\",\"roleId\":\"9ad68f5d-c4bb-4db4-870b-c688afcbb1f3\",\"teams\":[\"0dd4e0e0-635f-4f07-8edd-d41de58af810\",\"0dd4e0e0-635f-4f07-8edd-d41de58af810\",\"0dd4e0e0-635f-4f07-8edd-d41de58af810\"]}",
  CURLOPT_HTTPHEADER => array(
    "accept: application/json",
    "authorization: Bearer YOUR API KEY HERE",
    "content-type: application/json"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://api.kepla.com/v1/users/:user"

	payload := strings.NewReader("{\"name\":\"Test User\",\"email\":\"[email protected]\",\"roleId\":\"9ad68f5d-c4bb-4db4-870b-c688afcbb1f3\",\"teams\":[\"0dd4e0e0-635f-4f07-8edd-d41de58af810\",\"0dd4e0e0-635f-4f07-8edd-d41de58af810\",\"0dd4e0e0-635f-4f07-8edd-d41de58af810\"]}")

	req, _ := http.NewRequest("PUT", url, payload)

	req.Header.Add("accept", "application/json")
	req.Header.Add("authorization", "Bearer YOUR API KEY HERE")
	req.Header.Add("content-type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}

Request Body

Name Type Required Description Example
payload Object Required
{
  "name": "Test User",
String
  "email": "[email protected]",
String
  "roleId": "9ad68f5d-c4bb-4db4-870b-c688afcbb1f3",
String
  "teams": [
    "0dd4e0e0-635f-4f07-8edd-d41de58af810",
    "0dd4e0e0-635f-4f07-8edd-d41de58af810",
    "0dd4e0e0-635f-4f07-8edd-d41de58af810"
  ]
Array

An array of team IDs to add the user to.

}

Path Parameters

Name Type Required Description Example
user String (uuid) Required

The user ID to update

04fe9a97-a579-43c5-bb1a-58ed29bf0a6a

Responses

200 Success Users Default
{
  "createdAt": "2015-11-02T00:30:23.968Z",
String (Date-time)

Date the user was first created in Tempo (across all accounts)

  "email": "[email protected]",
String (Email)

Users will use this email to log in and receive invite notifications.

  "id": "77c8a907-40b7-40ab-91ad-8034df0fa7a0",
String (Uuid)
  "name": "Test User",
String
  roles: [
Array
    {
    { ... }
Object

Roles

      "accountId": "ad032f79-fa7e-45b6-a31d-10a4e43bd69b",
String
      "capabilities": {
      "capabilities": { ... }
Object
        "default": {
        "default": { ... }
Object
          "*": true
Boolean
        }
      },
      "createdAt": "2016-07-17T22:44:35.683Z",
String
      "id": "9ad68f5d-c4bb-4db4-870b-c688afcbb1f3",
String
      "name": "Admin",
String
      "system": "admin"
String
    }
  ]
  teams: [
Array
    {
    { ... }
Object

Teams

      "accountId": "ad032f79-fa7e-45b6-a31d-10a4e43bd69b",
String
      "createdAt": "2016-07-17T22:44:35.763Z",
String
      "id": "843cd093-a038-44a4-b1f2-6caad7cfe49a",
String
      "name": "Staff"
String
    }
  ]
}

Delete a User

Open in API Explorer
DELETE /users/:user

Removes the specified user from your Kepla account.

Example Request

Format:
curl --request DELETE \
  --url https://api.kepla.com/v1/users/:user \
  --header 'accept: application/json' \
  --header 'authorization: Bearer YOUR API KEY HERE'
require 'uri'
require 'net/http'

url = URI("https://api.kepla.com/v1/users/:user")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Delete.new(url)
request["accept"] = 'application/json'
request["authorization"] = 'Bearer YOUR API KEY HERE'

response = http.request(request)
puts response.read_body
var http = require("https");

var options = {
  "method": "DELETE",
  "hostname": "api.kepla.com",
  "port": null,
  "path": "/v1/users/:user",
  "headers": {
    "accept": "application/json",
    "authorization": "Bearer YOUR API KEY HERE"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
import http.client

conn = http.client.HTTPSConnection("api.kepla.com")

headers = {
    'accept': "application/json",
    'authorization': "Bearer YOUR API KEY HERE"
    }

conn.request("DELETE", "/v1/users/:user", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.kepla.com/v1/users/:user",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "DELETE",
  CURLOPT_HTTPHEADER => array(
    "accept: application/json",
    "authorization: Bearer YOUR API KEY HERE"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://api.kepla.com/v1/users/:user"

	req, _ := http.NewRequest("DELETE", url, nil)

	req.Header.Add("accept", "application/json")
	req.Header.Add("authorization", "Bearer YOUR API KEY HERE")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}

Path Parameters

Name Type Required Description Example
user String (uuid) Required

The ID of the user to remove

04fe9a97-a579-43c5-bb1a-58ed29bf0a6a

Responses

204 Success (Empty Response)