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" : "f29ad14e-ced7-4b8e-b34d-91935562fe51",
"created" : "2024-03-17T20:53:49.151913",
"lastModified" : "2024-03-17T20:53:49.151914",
"name" : "SIT-generated api key (2024-03-17T20:53:48.898524)",
"clientId" : "2TxmuUE1c21zY7rYx9rePGPhD6EUl7Xi",
"profileId" : "auth0|5eb0327cbfd7490bff55feeb",
"_links" : {
"self" : {
"href" : "https://catalog.matatika.com/api/apikeys/f29ad14e-ced7-4b8e-b34d-91935562fe51"
},
"update apikey" : {
"href" : "https://catalog.matatika.com/api/apikeys/f29ad14e-ced7-4b8e-b34d-91935562fe51"
},
"delete apikey" : {
"href" : "https://catalog.matatika.com/api/apikeys/f29ad14e-ced7-4b8e-b34d-91935562fe51"
},
"profile" : {
"href" : "https://catalog.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://catalog.matatika.com:443/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://catalog.matatika.com:443/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" : "182bc716-f55d-4e7f-a389-907ffc50c8c9",
"created" : "2024-03-17T20:53:46.482107",
"lastModified" : "2024-03-17T20:53:46.482107",
"name" : "default",
"clientId" : "zWASb3njqDYIXluPcSuSKTcdJuzK7kxb",
"profileId" : "auth0|5eb0327cbfd7490bff55feeb",
"accessToken" : "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6IlJFRkNRamczTlRRMk16QTROalpHT0RjNFFUWkJOemMyTkRGR1FUSkVOVEEyUkRkR1JrSkRPQSJ9.eyJpc3MiOiJodHRwczovL2lkZW50aXR5Lm1hdGF0aWthLmNvbS8iLCJzdWIiOiJ6V0FTYjNuanFEWUlYbHVQY1N1U0tUY2RKdXpLN2t4YkBjbGllbnRzIiwiYXVkIjoiaHR0cHM6Ly9jYXRhbG9nLm1hdGF0aWthLmNvbS9hcGkiLCJpYXQiOjE3MTA3MDg4MjgsImV4cCI6MTcxMDc5NTIyOCwiYXpwIjoieldBU2IzbmpxRFlJWGx1UGNTdVNLVGNkSnV6SzdreGIiLCJndHkiOiJjbGllbnQtY3JlZGVudGlhbHMifQ.niZjwCBpxpElEPoWcve8NZjgn85ZVQ3JqNxejxIRJeqpzqnGelTam_qWuzp-FmTGgsrHBd8mAZcutrUM280WOa_itA76ve8bIkLn8tFTka56rL5RwEzEJnX-Sg-isR7bWgDZ5eo6HM6jF5goDk3gD0JkTfHEhL75ywAosX0e5o9QXXXgBqGv4UMVn0gkG_4_jm-z-cJP64Ked8FoWwH2s3ihJ9W5fekoRzhZlBfMet8bZ1QwyL3K_wJszfSCiIBmc5E64cciWhmtRPQFVu2PK6z9dhpxbFU-F8qB6vLwv1nRWHHf9_k-EIEuy05emjjouWoY4UOlp5AZ-wo77RO_7w",
"_links" : {
"self" : {
"href" : "https://catalog.matatika.com/api/apikeys/182bc716-f55d-4e7f-a389-907ffc50c8c9"
},
"update apikey" : {
"href" : "https://catalog.matatika.com/api/apikeys/182bc716-f55d-4e7f-a389-907ffc50c8c9"
},
"delete apikey" : {
"href" : "https://catalog.matatika.com/api/apikeys/182bc716-f55d-4e7f-a389-907ffc50c8c9"
},
"profile" : {
"href" : "https://catalog.matatika.com/api/profiles/auth0%7C5eb0327cbfd7490bff55feeb"
}
}
}, {
"id" : "f29ad14e-ced7-4b8e-b34d-91935562fe51",
"created" : "2024-03-17T20:53:49.151913",
"lastModified" : "2024-03-17T20:53:49.151914",
"name" : "SIT-generated api key (2024-03-17T20:53:48.898524)",
"clientId" : "2TxmuUE1c21zY7rYx9rePGPhD6EUl7Xi",
"profileId" : "auth0|5eb0327cbfd7490bff55feeb",
"_links" : {
"self" : {
"href" : "https://catalog.matatika.com/api/apikeys/f29ad14e-ced7-4b8e-b34d-91935562fe51"
},
"update apikey" : {
"href" : "https://catalog.matatika.com/api/apikeys/f29ad14e-ced7-4b8e-b34d-91935562fe51"
},
"delete apikey" : {
"href" : "https://catalog.matatika.com/api/apikeys/f29ad14e-ced7-4b8e-b34d-91935562fe51"
},
"profile" : {
"href" : "https://catalog.matatika.com/api/profiles/auth0%7C5eb0327cbfd7490bff55feeb"
}
}
} ]
},
"_links" : {
"self" : {
"href" : "https://catalog.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://catalog.matatika.com:443/api/apikeys/f29ad14e-ced7-4b8e-b34d-91935562fe51' -i -X GET \
-H 'Accept: application/json, application/javascript, text/javascript, text/json' \
-H 'Content-Type: application/json'
Python (requests
)
import requests
url = "https://catalog.matatika.com:443/api/apikeys/f29ad14e-ced7-4b8e-b34d-91935562fe51"
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" : "f29ad14e-ced7-4b8e-b34d-91935562fe51",
"created" : "2024-03-17T20:53:49.151913",
"lastModified" : "2024-03-17T20:53:49.151914",
"name" : "SIT-generated api key (2024-03-17T20:53:48.898524)",
"clientId" : "2TxmuUE1c21zY7rYx9rePGPhD6EUl7Xi",
"profileId" : "auth0|5eb0327cbfd7490bff55feeb",
"_links" : {
"self" : {
"href" : "https://catalog.matatika.com/api/apikeys/f29ad14e-ced7-4b8e-b34d-91935562fe51"
},
"update apikey" : {
"href" : "https://catalog.matatika.com/api/apikeys/f29ad14e-ced7-4b8e-b34d-91935562fe51"
},
"delete apikey" : {
"href" : "https://catalog.matatika.com/api/apikeys/f29ad14e-ced7-4b8e-b34d-91935562fe51"
},
"profile" : {
"href" : "https://catalog.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://catalog.matatika.com:443/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://catalog.matatika.com:443/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" : "f29ad14e-ced7-4b8e-b34d-91935562fe51",
"created" : "2024-03-17T20:53:48.819331015",
"lastModified" : "2024-03-17T20:53:48.819331615",
"profileId" : "auth0|5eb0327cbfd7490bff55feeb",
"_links" : {
"create apikey" : {
"href" : "https://catalog.matatika.com/api/apikeys/f29ad14e-ced7-4b8e-b34d-91935562fe51"
}
}
}
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-03-17T20:53:48.898524)"
}
Example Snippets
cURL
curl -H "Authorization: Bearer $ACCESS_TOKEN" 'https://catalog.matatika.com:443/api/apikeys/f29ad14e-ced7-4b8e-b34d-91935562fe51' -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-03-17T20:53:48.898524)"
}'
Python (requests
)
import requests
url = "https://catalog.matatika.com:443/api/apikeys/f29ad14e-ced7-4b8e-b34d-91935562fe51"
data = {
"name" : "SIT-generated api key (2024-03-17T20:53:48.898524)"
}
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" : "f29ad14e-ced7-4b8e-b34d-91935562fe51",
"created" : "2024-03-17T20:53:49.151913202",
"lastModified" : "2024-03-17T20:53:49.151913602",
"name" : "SIT-generated api key (2024-03-17T20:53:48.898524)",
"clientId" : "2TxmuUE1c21zY7rYx9rePGPhD6EUl7Xi",
"clientSecret" : "6WxE0cLRgnMHrlgGTsEPtTZRHQsaq0VcKjjqNaLJvZr2dtiat2sjYQEh9NJp6MK6",
"profileId" : "auth0|5eb0327cbfd7490bff55feeb",
"_links" : {
"self" : {
"href" : "https://catalog.matatika.com/api/apikeys/f29ad14e-ced7-4b8e-b34d-91935562fe51"
},
"update apikey" : {
"href" : "https://catalog.matatika.com/api/apikeys/f29ad14e-ced7-4b8e-b34d-91935562fe51"
},
"delete apikey" : {
"href" : "https://catalog.matatika.com/api/apikeys/f29ad14e-ced7-4b8e-b34d-91935562fe51"
},
"profile" : {
"href" : "https://catalog.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-03-17T20:53:48.898524) (updated)"
}
Example Snippets
cURL
curl -H "Authorization: Bearer $ACCESS_TOKEN" 'https://catalog.matatika.com:443/api/apikeys/f29ad14e-ced7-4b8e-b34d-91935562fe51' -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-03-17T20:53:48.898524) (updated)"
}'
Python (requests
)
import requests
url = "https://catalog.matatika.com:443/api/apikeys/f29ad14e-ced7-4b8e-b34d-91935562fe51"
data = {
"name" : "SIT-generated api key (2024-03-17T20:53:48.898524) (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" : "f29ad14e-ced7-4b8e-b34d-91935562fe51",
"created" : "2024-03-17T20:53:49.151913",
"lastModified" : "2024-03-17T20:53:50.824302075",
"name" : "SIT-generated api key (2024-03-17T20:53:48.898524) (updated)",
"clientId" : "2TxmuUE1c21zY7rYx9rePGPhD6EUl7Xi",
"profileId" : "auth0|5eb0327cbfd7490bff55feeb",
"_links" : {
"self" : {
"href" : "https://catalog.matatika.com/api/apikeys/f29ad14e-ced7-4b8e-b34d-91935562fe51"
},
"update apikey" : {
"href" : "https://catalog.matatika.com/api/apikeys/f29ad14e-ced7-4b8e-b34d-91935562fe51"
},
"delete apikey" : {
"href" : "https://catalog.matatika.com/api/apikeys/f29ad14e-ced7-4b8e-b34d-91935562fe51"
},
"profile" : {
"href" : "https://catalog.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://catalog.matatika.com:443/api/apikeys/f29ad14e-ced7-4b8e-b34d-91935562fe51' -i -X DELETE \
-H 'Accept: application/json, application/javascript, text/javascript, text/json' \
-H 'Content-Type: application/json'
Python (requests
)
import requests
url = "https://catalog.matatika.com:443/api/apikeys/f29ad14e-ced7-4b8e-b34d-91935562fe51"
headers = {
'Authorization': ACCESS_TOKEN
}
response = requests.request("DELETE", url, headers=headers)
print(response.text.encode('utf8'))
Response
204 No Content
No response body provided.