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" : "101964e9-6f3f-4b74-8ca2-565b26b558f2",
"created" : "2025-01-17T16:51:35.672291",
"lastModified" : "2025-01-17T16:51:35.672296",
"name" : "SIT-generated api key (2025-01-17T16:51:35.569646)",
"clientId" : "IvI0PFzcmdYqxQAqunOMvrjA1yqm5848",
"profileId" : "auth0|5eb0327cbfd7490bff55feeb",
"_links" : {
"self" : {
"href" : "https://app.matatika.com/api/apikeys/101964e9-6f3f-4b74-8ca2-565b26b558f2"
},
"update apikey" : {
"href" : "https://app.matatika.com/api/apikeys/101964e9-6f3f-4b74-8ca2-565b26b558f2"
},
"delete apikey" : {
"href" : "https://app.matatika.com/api/apikeys/101964e9-6f3f-4b74-8ca2-565b26b558f2"
},
"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" : "f6aa0dab-e027-4c49-8628-3eaa519601f7",
"created" : "2025-01-17T16:51:33.965422",
"lastModified" : "2025-01-17T16:51:33.965423",
"name" : "default",
"clientId" : "XzHHFeXmy0NLzGRKdXlSA0igBiNNj7Bq",
"profileId" : "auth0|5eb0327cbfd7490bff55feeb",
"accessToken" : "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6IlJFRkNRamczTlRRMk16QTROalpHT0RjNFFUWkJOemMyTkRGR1FUSkVOVEEyUkRkR1JrSkRPQSJ9.eyJpc3MiOiJodHRwczovL2lkZW50aXR5Lm1hdGF0aWthLmNvbS8iLCJzdWIiOiJYekhIRmVYbXkwTkx6R1JLZFhsU0EwaWdCaU5OajdCcUBjbGllbnRzIiwiYXVkIjoiaHR0cHM6Ly9hcHAubWF0YXRpa2EuY29tL2FwaSIsImlhdCI6MTczNzEzMjY5NSwiZXhwIjoxNzM3MjE5MDk1LCJndHkiOiJjbGllbnQtY3JlZGVudGlhbHMiLCJhenAiOiJYekhIRmVYbXkwTkx6R1JLZFhsU0EwaWdCaU5OajdCcSJ9.wu3NaGOZ5EUAoeVCWlUGoMoixpRNrFeacuz21Nsjm_8VD3PyA4FTWKWoRqQAR9-Hsjs78xJiAS9wvhNuXEOJEhVfvCgJNoKbmcpwLpK5O0hN3PDITWOCSZzNilNy3S24AVvUrjyYhR8fRYx-6WTODMM_nR2Zf87uLAHteWNH4O9oquEsYaG_tjfn69nyxb7bDMneTFRvoNpLVRXhvQbZOv1YfCtrUc0JLYXHVqmrpftUXaZOlwZx71ZPg4G-b1hnR8uF-kU4qCBtuO2nCPxRQmbhfqPzrdgiO_pozLmlLJwrUXNH5u4ffwsZQISqsgpkh5UQ_KbynnI3e4g0z3uiyA",
"_links" : {
"self" : {
"href" : "https://app.matatika.com/api/apikeys/f6aa0dab-e027-4c49-8628-3eaa519601f7"
},
"update apikey" : {
"href" : "https://app.matatika.com/api/apikeys/f6aa0dab-e027-4c49-8628-3eaa519601f7"
},
"delete apikey" : {
"href" : "https://app.matatika.com/api/apikeys/f6aa0dab-e027-4c49-8628-3eaa519601f7"
},
"profile" : {
"href" : "https://app.matatika.com/api/profiles/auth0%7C5eb0327cbfd7490bff55feeb"
}
}
}, {
"id" : "101964e9-6f3f-4b74-8ca2-565b26b558f2",
"created" : "2025-01-17T16:51:35.672291",
"lastModified" : "2025-01-17T16:51:35.672296",
"name" : "SIT-generated api key (2025-01-17T16:51:35.569646)",
"clientId" : "IvI0PFzcmdYqxQAqunOMvrjA1yqm5848",
"profileId" : "auth0|5eb0327cbfd7490bff55feeb",
"_links" : {
"self" : {
"href" : "https://app.matatika.com/api/apikeys/101964e9-6f3f-4b74-8ca2-565b26b558f2"
},
"update apikey" : {
"href" : "https://app.matatika.com/api/apikeys/101964e9-6f3f-4b74-8ca2-565b26b558f2"
},
"delete apikey" : {
"href" : "https://app.matatika.com/api/apikeys/101964e9-6f3f-4b74-8ca2-565b26b558f2"
},
"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/101964e9-6f3f-4b74-8ca2-565b26b558f2' -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/101964e9-6f3f-4b74-8ca2-565b26b558f2"
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" : "101964e9-6f3f-4b74-8ca2-565b26b558f2",
"created" : "2025-01-17T16:51:35.672291",
"lastModified" : "2025-01-17T16:51:35.672296",
"name" : "SIT-generated api key (2025-01-17T16:51:35.569646)",
"clientId" : "IvI0PFzcmdYqxQAqunOMvrjA1yqm5848",
"profileId" : "auth0|5eb0327cbfd7490bff55feeb",
"_links" : {
"self" : {
"href" : "https://app.matatika.com/api/apikeys/101964e9-6f3f-4b74-8ca2-565b26b558f2"
},
"update apikey" : {
"href" : "https://app.matatika.com/api/apikeys/101964e9-6f3f-4b74-8ca2-565b26b558f2"
},
"delete apikey" : {
"href" : "https://app.matatika.com/api/apikeys/101964e9-6f3f-4b74-8ca2-565b26b558f2"
},
"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" : "101964e9-6f3f-4b74-8ca2-565b26b558f2",
"created" : "2025-01-17T16:51:35.493700976",
"lastModified" : "2025-01-17T16:51:35.493701676",
"profileId" : "auth0|5eb0327cbfd7490bff55feeb",
"_links" : {
"create apikey" : {
"href" : "https://app.matatika.com/api/apikeys/101964e9-6f3f-4b74-8ca2-565b26b558f2"
}
}
}
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 (2025-01-17T16:51:35.569646)"
}
Example Snippets
cURL
curl -H "Authorization: Bearer $ACCESS_TOKEN" 'https://app.matatika.com/api/apikeys/101964e9-6f3f-4b74-8ca2-565b26b558f2' -i -X PUT \
-H 'Accept: application/json, application/javascript, text/javascript, text/json' \
-H 'Content-Type: application/json' \
-d '{
"name" : "SIT-generated api key (2025-01-17T16:51:35.569646)"
}'
Python (requests
)
import requests
url = "https://app.matatika.com/api/apikeys/101964e9-6f3f-4b74-8ca2-565b26b558f2"
data = {
"name" : "SIT-generated api key (2025-01-17T16:51:35.569646)"
}
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" : "101964e9-6f3f-4b74-8ca2-565b26b558f2",
"created" : "2025-01-17T16:51:35.672290539",
"lastModified" : "2025-01-17T16:51:35.672296439",
"name" : "SIT-generated api key (2025-01-17T16:51:35.569646)",
"clientId" : "IvI0PFzcmdYqxQAqunOMvrjA1yqm5848",
"clientSecret" : "rwP1oVA9x7quosFAHC5jDwh91xjFk5saYVGrZEN9osRJoNzuiA3v6X8hVoX-xYXG",
"profileId" : "auth0|5eb0327cbfd7490bff55feeb",
"_links" : {
"self" : {
"href" : "https://app.matatika.com/api/apikeys/101964e9-6f3f-4b74-8ca2-565b26b558f2"
},
"update apikey" : {
"href" : "https://app.matatika.com/api/apikeys/101964e9-6f3f-4b74-8ca2-565b26b558f2"
},
"delete apikey" : {
"href" : "https://app.matatika.com/api/apikeys/101964e9-6f3f-4b74-8ca2-565b26b558f2"
},
"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 (2025-01-17T16:51:35.569646) (updated)"
}
Example Snippets
cURL
curl -H "Authorization: Bearer $ACCESS_TOKEN" 'https://app.matatika.com/api/apikeys/101964e9-6f3f-4b74-8ca2-565b26b558f2' -i -X PUT \
-H 'Accept: application/json, application/javascript, text/javascript, text/json' \
-H 'Content-Type: application/json' \
-d '{
"name" : "SIT-generated api key (2025-01-17T16:51:35.569646) (updated)"
}'
Python (requests
)
import requests
url = "https://app.matatika.com/api/apikeys/101964e9-6f3f-4b74-8ca2-565b26b558f2"
data = {
"name" : "SIT-generated api key (2025-01-17T16:51:35.569646) (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" : "101964e9-6f3f-4b74-8ca2-565b26b558f2",
"created" : "2025-01-17T16:51:35.672291",
"lastModified" : "2025-01-17T16:51:37.612810916",
"name" : "SIT-generated api key (2025-01-17T16:51:35.569646) (updated)",
"clientId" : "IvI0PFzcmdYqxQAqunOMvrjA1yqm5848",
"profileId" : "auth0|5eb0327cbfd7490bff55feeb",
"_links" : {
"self" : {
"href" : "https://app.matatika.com/api/apikeys/101964e9-6f3f-4b74-8ca2-565b26b558f2"
},
"update apikey" : {
"href" : "https://app.matatika.com/api/apikeys/101964e9-6f3f-4b74-8ca2-565b26b558f2"
},
"delete apikey" : {
"href" : "https://app.matatika.com/api/apikeys/101964e9-6f3f-4b74-8ca2-565b26b558f2"
},
"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/101964e9-6f3f-4b74-8ca2-565b26b558f2' -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/101964e9-6f3f-4b74-8ca2-565b26b558f2"
headers = {
'Authorization': ACCESS_TOKEN
}
response = requests.request("DELETE", url, headers=headers)
print(response.text.encode('utf8'))
Response
204 No Content
No response body provided.