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 | JSON 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" : "5b4002f0-9695-4aa9-a59f-d4329dfa0542",
"created" : "2025-01-30T17:03:17.796303",
"lastModified" : "2025-01-30T17:03:17.796303",
"name" : "SIT-generated api key (2025-01-30T17:03:17.687821)",
"clientId" : "VJmJ04HzMNoTzZybxwHP96J98py9E8ob",
"profileId" : "auth0|5eb0327cbfd7490bff55feeb",
"_links" : {
"self" : {
"href" : "https://app.matatika.com/api/apikeys/5b4002f0-9695-4aa9-a59f-d4329dfa0542"
},
"update apikey" : {
"href" : "https://app.matatika.com/api/apikeys/5b4002f0-9695-4aa9-a59f-d4329dfa0542"
},
"delete apikey" : {
"href" : "https://app.matatika.com/api/apikeys/5b4002f0-9695-4aa9-a59f-d4329dfa0542"
},
"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" : "af1b0b6b-535f-4c7c-a5cc-80bcd6baedef",
"created" : "2025-01-30T17:03:16.037796",
"lastModified" : "2025-01-30T17:03:16.037797",
"name" : "default",
"clientId" : "dFRC0WNHLvkzjyQjokMLUDKdM378buG5",
"profileId" : "auth0|5eb0327cbfd7490bff55feeb",
"accessToken" : "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6IlJFRkNRamczTlRRMk16QTROalpHT0RjNFFUWkJOemMyTkRGR1FUSkVOVEEyUkRkR1JrSkRPQSJ9.eyJpc3MiOiJodHRwczovL2lkZW50aXR5Lm1hdGF0aWthLmNvbS8iLCJzdWIiOiJkRlJDMFdOSEx2a3pqeVFqb2tNTFVES2RNMzc4YnVHNUBjbGllbnRzIiwiYXVkIjoiaHR0cHM6Ly9hcHAubWF0YXRpa2EuY29tL2FwaSIsImlhdCI6MTczODI1NjU5NywiZXhwIjoxNzM4MzQyOTk3LCJndHkiOiJjbGllbnQtY3JlZGVudGlhbHMiLCJhenAiOiJkRlJDMFdOSEx2a3pqeVFqb2tNTFVES2RNMzc4YnVHNSJ9.s6XCoaB7UkYS1LYCC-iysuBpnwnJ6SZgUFXa6aZjb5lbbu5KB1sc772dvBrMk12-fo6zb4fjpUBOLqFuCEtPRcKdpO2-f4sWu46n-4zpgufADXoeSFiyM5WETmBOkUTQNba1W5K7NweIdvIiBEFKrMifBCEzVlXYlbNRknWvONaH7I8cLaDC1NWDaFmMjLHWHaeAGM2-bvnL7lVRrpMG7B_H-1GFdk2pXDpgoBYz8r3QHxCrmnmTxOfZTZnu9SMyuLm23DzMXCd0aMsLJk_W7Lh3HIJ9slukUO-AQXrfWdHNAEe3kYwgDpMveuTpZkcoa3bht_ZqSntUEsoldQ1HNQ",
"_links" : {
"self" : {
"href" : "https://app.matatika.com/api/apikeys/af1b0b6b-535f-4c7c-a5cc-80bcd6baedef"
},
"update apikey" : {
"href" : "https://app.matatika.com/api/apikeys/af1b0b6b-535f-4c7c-a5cc-80bcd6baedef"
},
"delete apikey" : {
"href" : "https://app.matatika.com/api/apikeys/af1b0b6b-535f-4c7c-a5cc-80bcd6baedef"
},
"profile" : {
"href" : "https://app.matatika.com/api/profiles/auth0%7C5eb0327cbfd7490bff55feeb"
}
}
}, {
"id" : "5b4002f0-9695-4aa9-a59f-d4329dfa0542",
"created" : "2025-01-30T17:03:17.796303",
"lastModified" : "2025-01-30T17:03:17.796303",
"name" : "SIT-generated api key (2025-01-30T17:03:17.687821)",
"clientId" : "VJmJ04HzMNoTzZybxwHP96J98py9E8ob",
"profileId" : "auth0|5eb0327cbfd7490bff55feeb",
"_links" : {
"self" : {
"href" : "https://app.matatika.com/api/apikeys/5b4002f0-9695-4aa9-a59f-d4329dfa0542"
},
"update apikey" : {
"href" : "https://app.matatika.com/api/apikeys/5b4002f0-9695-4aa9-a59f-d4329dfa0542"
},
"delete apikey" : {
"href" : "https://app.matatika.com/api/apikeys/5b4002f0-9695-4aa9-a59f-d4329dfa0542"
},
"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/5b4002f0-9695-4aa9-a59f-d4329dfa0542' -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/5b4002f0-9695-4aa9-a59f-d4329dfa0542"
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" : "5b4002f0-9695-4aa9-a59f-d4329dfa0542",
"created" : "2025-01-30T17:03:17.796303",
"lastModified" : "2025-01-30T17:03:17.796303",
"name" : "SIT-generated api key (2025-01-30T17:03:17.687821)",
"clientId" : "VJmJ04HzMNoTzZybxwHP96J98py9E8ob",
"profileId" : "auth0|5eb0327cbfd7490bff55feeb",
"_links" : {
"self" : {
"href" : "https://app.matatika.com/api/apikeys/5b4002f0-9695-4aa9-a59f-d4329dfa0542"
},
"update apikey" : {
"href" : "https://app.matatika.com/api/apikeys/5b4002f0-9695-4aa9-a59f-d4329dfa0542"
},
"delete apikey" : {
"href" : "https://app.matatika.com/api/apikeys/5b4002f0-9695-4aa9-a59f-d4329dfa0542"
},
"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" : "5b4002f0-9695-4aa9-a59f-d4329dfa0542",
"created" : "2025-01-30T17:03:17.577245317",
"lastModified" : "2025-01-30T17:03:17.577246217",
"profileId" : "auth0|5eb0327cbfd7490bff55feeb",
"_links" : {
"create apikey" : {
"href" : "https://app.matatika.com/api/apikeys/5b4002f0-9695-4aa9-a59f-d4329dfa0542"
}
}
}
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-30T17:03:17.687821)"
}
Example Snippets
cURL
curl -H "Authorization: Bearer $ACCESS_TOKEN" 'https://app.matatika.com/api/apikeys/5b4002f0-9695-4aa9-a59f-d4329dfa0542' -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-30T17:03:17.687821)"
}'
Python (requests
)
import requests
url = "https://app.matatika.com/api/apikeys/5b4002f0-9695-4aa9-a59f-d4329dfa0542"
data = {
"name" : "SIT-generated api key (2025-01-30T17:03:17.687821)"
}
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" : "5b4002f0-9695-4aa9-a59f-d4329dfa0542",
"created" : "2025-01-30T17:03:17.796302519",
"lastModified" : "2025-01-30T17:03:17.796303219",
"name" : "SIT-generated api key (2025-01-30T17:03:17.687821)",
"clientId" : "VJmJ04HzMNoTzZybxwHP96J98py9E8ob",
"clientSecret" : "hm4lgpDmWkGzbmJnvkfQTrev4tHLq4tadlUMpBFscvJL8hVq_MKmmZJG32wqz-tK",
"profileId" : "auth0|5eb0327cbfd7490bff55feeb",
"_links" : {
"self" : {
"href" : "https://app.matatika.com/api/apikeys/5b4002f0-9695-4aa9-a59f-d4329dfa0542"
},
"update apikey" : {
"href" : "https://app.matatika.com/api/apikeys/5b4002f0-9695-4aa9-a59f-d4329dfa0542"
},
"delete apikey" : {
"href" : "https://app.matatika.com/api/apikeys/5b4002f0-9695-4aa9-a59f-d4329dfa0542"
},
"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-30T17:03:17.687821) (updated)"
}
Example Snippets
cURL
curl -H "Authorization: Bearer $ACCESS_TOKEN" 'https://app.matatika.com/api/apikeys/5b4002f0-9695-4aa9-a59f-d4329dfa0542' -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-30T17:03:17.687821) (updated)"
}'
Python (requests
)
import requests
url = "https://app.matatika.com/api/apikeys/5b4002f0-9695-4aa9-a59f-d4329dfa0542"
data = {
"name" : "SIT-generated api key (2025-01-30T17:03:17.687821) (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" : "5b4002f0-9695-4aa9-a59f-d4329dfa0542",
"created" : "2025-01-30T17:03:17.796303",
"lastModified" : "2025-01-30T17:03:19.418727509",
"name" : "SIT-generated api key (2025-01-30T17:03:17.687821) (updated)",
"clientId" : "VJmJ04HzMNoTzZybxwHP96J98py9E8ob",
"profileId" : "auth0|5eb0327cbfd7490bff55feeb",
"_links" : {
"self" : {
"href" : "https://app.matatika.com/api/apikeys/5b4002f0-9695-4aa9-a59f-d4329dfa0542"
},
"update apikey" : {
"href" : "https://app.matatika.com/api/apikeys/5b4002f0-9695-4aa9-a59f-d4329dfa0542"
},
"delete apikey" : {
"href" : "https://app.matatika.com/api/apikeys/5b4002f0-9695-4aa9-a59f-d4329dfa0542"
},
"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/5b4002f0-9695-4aa9-a59f-d4329dfa0542' -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/5b4002f0-9695-4aa9-a59f-d4329dfa0542"
headers = {
'Authorization': ACCESS_TOKEN
}
response = requests.request("DELETE", url, headers=headers)
print(response.text.encode('utf8'))
Response
204 No Content
No response body provided.