API Keys
API keys offer an alternate method of authentication to the Matatika API using a client ID and secret. Access using API key credentials is supported by the Matatika CLI and SDK, which allows a user to remain authenticated permanently.
Objects
API Key
Path | Type | Format | Description |
---|---|---|---|
id |
String |
Version 4 UUID | The API key ID |
created |
String |
ISO 8601 timestamp | The instant when the API key was created |
lastModified |
String |
ISO 8601 timestamp | The instant when the API key was last modified |
name |
String |
The API key name | |
clientId |
String |
The API key client ID | |
profileId |
String |
The API key owner profile ID |
{
"id" : "b5100aaa-6404-422f-8d30-2ee0b1f51f8e",
"created" : "2024-07-23T11:32:42.538775",
"lastModified" : "2024-07-23T11:32:42.538776",
"name" : "SIT-generated api key (2024-07-23T12:32:42.407918)",
"clientId" : "EZ4oVUCacs1n7M2hxJS4EznI4xfiyaJ1",
"profileId" : "auth0|5eb0327cbfd7490bff55feeb",
"_links" : {
"self" : {
"href" : "https://app.matatika.com/api/apikeys/b5100aaa-6404-422f-8d30-2ee0b1f51f8e"
},
"update apikey" : {
"href" : "https://app.matatika.com/api/apikeys/b5100aaa-6404-422f-8d30-2ee0b1f51f8e"
},
"delete apikey" : {
"href" : "https://app.matatika.com/api/apikeys/b5100aaa-6404-422f-8d30-2ee0b1f51f8e"
},
"profile" : {
"href" : "https://app.matatika.com/api/profiles/auth0%7C5eb0327cbfd7490bff55feeb"
}
}
}
Requests
- View all API keys
- View an API key
- Initialise an API key
- Create an API key
- Update an API key
- Delete an API key
View all API keys
GET
/api/apikeys
Returns all API keys owned by the authenticated user profile.
Prerequisites
- The authenticated user must own a Matatika account
- The API key
{apikey-id}
must exist
Request
Example Snippets
cURL
curl -H "Authorization: Bearer $ACCESS_TOKEN" 'https://app.matatika.com/api/apikeys/' -i -X GET \
-H 'Accept: application/json, application/javascript, text/javascript, text/json' \
-H 'Content-Type: application/json'
Python (requests
)
import requests
url = "https://app.matatika.com/api/apikeys/"
headers = {
'Authorization': ACCESS_TOKEN
}
response = requests.request("GET", url, headers=headers)
print(response.text.encode('utf8'))
Response
200 OK
API key collection with HAL links.
{
"_embedded" : {
"apikeys" : [ {
"id" : "b5100aaa-6404-422f-8d30-2ee0b1f51f8e",
"created" : "2024-07-23T11:32:42.538775",
"lastModified" : "2024-07-23T11:32:42.538776",
"name" : "SIT-generated api key (2024-07-23T12:32:42.407918)",
"clientId" : "EZ4oVUCacs1n7M2hxJS4EznI4xfiyaJ1",
"profileId" : "auth0|5eb0327cbfd7490bff55feeb",
"_links" : {
"self" : {
"href" : "https://app.matatika.com/api/apikeys/b5100aaa-6404-422f-8d30-2ee0b1f51f8e"
},
"update apikey" : {
"href" : "https://app.matatika.com/api/apikeys/b5100aaa-6404-422f-8d30-2ee0b1f51f8e"
},
"delete apikey" : {
"href" : "https://app.matatika.com/api/apikeys/b5100aaa-6404-422f-8d30-2ee0b1f51f8e"
},
"profile" : {
"href" : "https://app.matatika.com/api/profiles/auth0%7C5eb0327cbfd7490bff55feeb"
}
}
}, {
"id" : "8015bd06-df68-47e2-b928-77e718ef044b",
"created" : "2024-07-23T11:32:39.829879",
"lastModified" : "2024-07-23T11:32:39.829879",
"name" : "default",
"clientId" : "5BdAngDebn33QnAQWuRmEbFZj5F7snKm",
"profileId" : "auth0|5eb0327cbfd7490bff55feeb",
"accessToken" : "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6IlJFRkNRamczTlRRMk16QTROalpHT0RjNFFUWkJOemMyTkRGR1FUSkVOVEEyUkRkR1JrSkRPQSJ9.eyJpc3MiOiJodHRwczovL2lkZW50aXR5Lm1hdGF0aWthLmNvbS8iLCJzdWIiOiI1QmRBbmdEZWJuMzNRbkFRV3VSbUViRlpqNUY3c25LbUBjbGllbnRzIiwiYXVkIjoiaHR0cHM6Ly9hcHAubWF0YXRpa2EuY29tL2FwaSIsImlhdCI6MTcyMTczNDM2MSwiZXhwIjoxNzIxODIwNzYxLCJndHkiOiJjbGllbnQtY3JlZGVudGlhbHMiLCJhenAiOiI1QmRBbmdEZWJuMzNRbkFRV3VSbUViRlpqNUY3c25LbSJ9.Tka4TKfEU8CP_qUAd2Mg0FZtrYM6Hr5Rjaw9wncxzqxAXyIoId21XEL3_kCz3k7wSxaGCjvlyUbRxB6amHapjk0TVZGQb44AyXI-ZdJUX4yl0YElwryQsVMrlU0aa_Ak7PAtkGr0xTKxH9LNlMkieB6W-6j2Wt9i-b1gFr9yerUyqFt0gq_2cGhxHo8kbHsK0CVbBcT7eNTTLK068j3X3SSvcs89SjY-U-4Ua4JI4D2DpDNH4bb3vz0dvoMjUv955oottUmH3lzKiKUSkZPkl_YLQzTZ072eyIW96QH0xl3SN5bkcfK_KlPinuf4WI4xNXx176bhkmC0rjJ-yqyxYQ",
"_links" : {
"self" : {
"href" : "https://app.matatika.com/api/apikeys/8015bd06-df68-47e2-b928-77e718ef044b"
},
"update apikey" : {
"href" : "https://app.matatika.com/api/apikeys/8015bd06-df68-47e2-b928-77e718ef044b"
},
"delete apikey" : {
"href" : "https://app.matatika.com/api/apikeys/8015bd06-df68-47e2-b928-77e718ef044b"
},
"profile" : {
"href" : "https://app.matatika.com/api/profiles/auth0%7C5eb0327cbfd7490bff55feeb"
}
}
} ]
},
"_links" : {
"self" : {
"href" : "https://app.matatika.com/api/apikeys/?page=0&size=20"
}
},
"page" : {
"size" : 20,
"totalElements" : 2,
"totalPages" : 1,
"number" : 0
}
}
View an API key
GET
/api/apikeys/{apikey-id}
Returns the API key {apikey-id}
.
Prerequisites
- The authenticated user must own a Matatika account
- The API key
{apikey-id}
must exist
Request
Example Snippets
cURL
curl -H "Authorization: Bearer $ACCESS_TOKEN" 'https://app.matatika.com/api/apikeys/b5100aaa-6404-422f-8d30-2ee0b1f51f8e' -i -X GET \
-H 'Accept: application/json, application/javascript, text/javascript, text/json' \
-H 'Content-Type: application/json'
Python (requests
)
import requests
url = "https://app.matatika.com/api/apikeys/b5100aaa-6404-422f-8d30-2ee0b1f51f8e"
headers = {
'Authorization': ACCESS_TOKEN
}
response = requests.request("GET", url, headers=headers)
print(response.text.encode('utf8'))
Response
200 OK
API key with HAL links.
{
"id" : "b5100aaa-6404-422f-8d30-2ee0b1f51f8e",
"created" : "2024-07-23T11:32:42.538775",
"lastModified" : "2024-07-23T11:32:42.538776",
"name" : "SIT-generated api key (2024-07-23T12:32:42.407918)",
"clientId" : "EZ4oVUCacs1n7M2hxJS4EznI4xfiyaJ1",
"profileId" : "auth0|5eb0327cbfd7490bff55feeb",
"_links" : {
"self" : {
"href" : "https://app.matatika.com/api/apikeys/b5100aaa-6404-422f-8d30-2ee0b1f51f8e"
},
"update apikey" : {
"href" : "https://app.matatika.com/api/apikeys/b5100aaa-6404-422f-8d30-2ee0b1f51f8e"
},
"delete apikey" : {
"href" : "https://app.matatika.com/api/apikeys/b5100aaa-6404-422f-8d30-2ee0b1f51f8e"
},
"profile" : {
"href" : "https://app.matatika.com/api/profiles/auth0%7C5eb0327cbfd7490bff55feeb"
}
}
}
Initialise an API key
POST
/api/apikeys
Initialises a new API key.
Prerequisites
- The authenticated user must own a Matatika account
Request
Example Snippets
cURL
curl -H "Authorization: Bearer $ACCESS_TOKEN" 'https://app.matatika.com/api/apikeys/' -i -X POST \
-H 'Accept: application/json, application/javascript, text/javascript, text/json' \
-H 'Content-Type: application/json'
Python (requests
)
import requests
url = "https://app.matatika.com/api/apikeys/"
headers = {
'Authorization': ACCESS_TOKEN
}
response = requests.request("POST", url, headers=headers)
print(response.text.encode('utf8'))
Response
200 OK
API key with HAL links.
{
"id" : "b5100aaa-6404-422f-8d30-2ee0b1f51f8e",
"created" : "2024-07-23T11:32:42.318627776",
"lastModified" : "2024-07-23T11:32:42.318628376",
"profileId" : "auth0|5eb0327cbfd7490bff55feeb",
"_links" : {
"create apikey" : {
"href" : "https://app.matatika.com/api/apikeys/b5100aaa-6404-422f-8d30-2ee0b1f51f8e"
}
}
}
Create an API key
PUT
/api/apikeys/{apikey-id}
Creates the API key {apikey-id}
.
Prerequisites
- The authenticated user must own a Matatika account
Request
Body
API key resource.
{
"name" : "SIT-generated api key (2024-07-23T12:32:42.407918)"
}
Example Snippets
cURL
curl -H "Authorization: Bearer $ACCESS_TOKEN" 'https://app.matatika.com/api/apikeys/b5100aaa-6404-422f-8d30-2ee0b1f51f8e' -i -X PUT \
-H 'Accept: application/json, application/javascript, text/javascript, text/json' \
-H 'Content-Type: application/json' \
-d '{
"name" : "SIT-generated api key (2024-07-23T12:32:42.407918)"
}'
Python (requests
)
import requests
url = "https://app.matatika.com/api/apikeys/b5100aaa-6404-422f-8d30-2ee0b1f51f8e"
data = {
"name" : "SIT-generated api key (2024-07-23T12:32:42.407918)"
}
headers = {
'Authorization': ACCESS_TOKEN
}
response = requests.request("PUT", url, headers=headers, data=data)
print(response.text.encode('utf8'))
Response
201 Created
API key with HAL links.
{
"id" : "b5100aaa-6404-422f-8d30-2ee0b1f51f8e",
"created" : "2024-07-23T11:32:42.53877515",
"lastModified" : "2024-07-23T11:32:42.53877555",
"name" : "SIT-generated api key (2024-07-23T12:32:42.407918)",
"clientId" : "EZ4oVUCacs1n7M2hxJS4EznI4xfiyaJ1",
"clientSecret" : "XfGwhpcQXgwqJSvXOvJ59Ro7qeoL3ztu-sXIu4TKChi0HocfIkQjhZZrULgWlei6",
"profileId" : "auth0|5eb0327cbfd7490bff55feeb",
"_links" : {
"self" : {
"href" : "https://app.matatika.com/api/apikeys/b5100aaa-6404-422f-8d30-2ee0b1f51f8e"
},
"update apikey" : {
"href" : "https://app.matatika.com/api/apikeys/b5100aaa-6404-422f-8d30-2ee0b1f51f8e"
},
"delete apikey" : {
"href" : "https://app.matatika.com/api/apikeys/b5100aaa-6404-422f-8d30-2ee0b1f51f8e"
},
"profile" : {
"href" : "https://app.matatika.com/api/profiles/auth0%7C5eb0327cbfd7490bff55feeb"
}
}
}
Update an API key
PUT
/api/apikeys/{apikey-id}
Updates the API key {apikey-id}
.
Prerequisites
- The authenticated user must own a Matatika account
Request
Body
API key resource.
{
"name" : "SIT-generated api key (2024-07-23T12:32:42.407918) (updated)"
}
Example Snippets
cURL
curl -H "Authorization: Bearer $ACCESS_TOKEN" 'https://app.matatika.com/api/apikeys/b5100aaa-6404-422f-8d30-2ee0b1f51f8e' -i -X PUT \
-H 'Accept: application/json, application/javascript, text/javascript, text/json' \
-H 'Content-Type: application/json' \
-d '{
"name" : "SIT-generated api key (2024-07-23T12:32:42.407918) (updated)"
}'
Python (requests
)
import requests
url = "https://app.matatika.com/api/apikeys/b5100aaa-6404-422f-8d30-2ee0b1f51f8e"
data = {
"name" : "SIT-generated api key (2024-07-23T12:32:42.407918) (updated)"
}
headers = {
'Authorization': ACCESS_TOKEN
}
response = requests.request("PUT", url, headers=headers, data=data)
print(response.text.encode('utf8'))
Response
200 OK
API key with HAL links.
{
"id" : "b5100aaa-6404-422f-8d30-2ee0b1f51f8e",
"created" : "2024-07-23T11:32:42.538775",
"lastModified" : "2024-07-23T11:32:44.232391507",
"name" : "SIT-generated api key (2024-07-23T12:32:42.407918) (updated)",
"clientId" : "EZ4oVUCacs1n7M2hxJS4EznI4xfiyaJ1",
"profileId" : "auth0|5eb0327cbfd7490bff55feeb",
"_links" : {
"self" : {
"href" : "https://app.matatika.com/api/apikeys/b5100aaa-6404-422f-8d30-2ee0b1f51f8e"
},
"update apikey" : {
"href" : "https://app.matatika.com/api/apikeys/b5100aaa-6404-422f-8d30-2ee0b1f51f8e"
},
"delete apikey" : {
"href" : "https://app.matatika.com/api/apikeys/b5100aaa-6404-422f-8d30-2ee0b1f51f8e"
},
"profile" : {
"href" : "https://app.matatika.com/api/profiles/auth0%7C5eb0327cbfd7490bff55feeb"
}
}
}
Delete an API key
DELETE
/api/apikeys/{apikey-id}
Deletes the API key {apikey-id}
.
Prerequisites
- The authenticated user must own a Matatika account
- The API key
{apikey-id}
must exist
Request
Example Snippets
cURL
curl -H "Authorization: Bearer $ACCESS_TOKEN" 'https://app.matatika.com/api/apikeys/b5100aaa-6404-422f-8d30-2ee0b1f51f8e' -i -X DELETE \
-H 'Accept: application/json, application/javascript, text/javascript, text/json' \
-H 'Content-Type: application/json'
Python (requests
)
import requests
url = "https://app.matatika.com/api/apikeys/b5100aaa-6404-422f-8d30-2ee0b1f51f8e"
headers = {
'Authorization': ACCESS_TOKEN
}
response = requests.request("DELETE", url, headers=headers)
print(response.text.encode('utf8'))
Response
204 No Content
No response body provided.