Keys
Get all your keys.
Number of keys to skip.
0Maximum number of keys to return.
10Field to sort by.
idPossible values: Sort order.
ascPossible values: Successful Response
Type of the object.
listTotal number of keys.
Offset of the keys list.
Limit of the keys list.
Invalid authentication scheme.
Invalid API key.
Your account has expired. Please contact support to renew your account.
Validation Error
GET /v1/keys HTTP/1.1
Host: albert.api.etalab.gouv.fr
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"object": "list",
"total": 1,
"offset": 1,
"limit": 1,
"data": [
{
"object": "key",
"id": 1,
"name": "text",
"value": "text",
"user_id": 1,
"expires": 1,
"created": 1,
"ANY_ADDITIONAL_PROPERTY": "anything"
}
],
"ANY_ADDITIONAL_PROPERTY": "anything"
}Create a new API key for the authenticated user.
The key creation request.
Name of the key.
key-1Expiration time, as Unix timestamp. If None, uses the configured maximum key lifetime when set, otherwise the key never expires.
Successful Response
Type of the object.
keyID of the key.
Name of the key.
Value of the key.
ID of the user that owns the key.
Time of expiration, as Unix timestamp. If None, the key never expires.
Time of creation, as Unix timestamp.
Key expiration timestamp cannot be greater than {max_expiration_days} days from now.
Invalid authentication scheme.
Invalid API key.
Your account has expired. Please contact support to renew your account.
User {user_id}|{email} not found.
Key {name} already exists.
Validation Error
POST /v1/keys HTTP/1.1
Host: albert.api.etalab.gouv.fr
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 65
{
"name": "key-1",
"expires": 1,
"ANY_ADDITIONAL_PROPERTY": "anything"
}{
"object": "key",
"id": 1,
"name": "text",
"value": "text",
"user_id": 1,
"expires": 1,
"created": 1,
"ANY_ADDITIONAL_PROPERTY": "anything"
}Get all your keys.
Number of keys to skip.
0Maximum number of keys to return.
10Field to sort by.
idPossible values: Sort order.
ascPossible values: Successful Response
Type of the object.
listTotal number of keys.
Offset of the keys list.
Limit of the keys list.
Invalid authentication scheme.
Invalid API key.
Your account has expired. Please contact support to renew your account.
Validation Error
GET /v1/me/keys HTTP/1.1
Host: albert.api.etalab.gouv.fr
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"object": "list",
"total": 1,
"offset": 1,
"limit": 1,
"data": [
{
"object": "key",
"id": 1,
"name": "text",
"value": "text",
"user_id": 1,
"expires": 1,
"created": 1,
"ANY_ADDITIONAL_PROPERTY": "anything"
}
],
"ANY_ADDITIONAL_PROPERTY": "anything"
}Create a new API key for the authenticated user.
The key creation request.
Name of the key.
key-1Expiration time, as Unix timestamp. If None, uses the configured maximum key lifetime when set, otherwise the key never expires.
Successful Response
Type of the object.
keyID of the key.
Name of the key.
Value of the key.
ID of the user that owns the key.
Time of expiration, as Unix timestamp. If None, the key never expires.
Time of creation, as Unix timestamp.
Key expiration timestamp cannot be greater than {max_expiration_days} days from now.
Invalid authentication scheme.
Invalid API key.
Your account has expired. Please contact support to renew your account.
User {user_id}|{email} not found.
Key {name} already exists.
Validation Error
POST /v1/me/keys HTTP/1.1
Host: albert.api.etalab.gouv.fr
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 65
{
"name": "key-1",
"expires": 1,
"ANY_ADDITIONAL_PROPERTY": "anything"
}{
"object": "key",
"id": 1,
"name": "text",
"value": "text",
"user_id": 1,
"expires": 1,
"created": 1,
"ANY_ADDITIONAL_PROPERTY": "anything"
}Get one of your API keys by ID.
The ID of the key to get.
Successful Response
Type of the object.
keyID of the key.
Name of the key.
Value of the key.
ID of the user that owns the key.
Time of expiration, as Unix timestamp. If None, the key never expires.
Time of creation, as Unix timestamp.
Invalid authentication scheme.
Invalid API key.
Your account has expired. Please contact support to renew your account.
Key {key_id} not found.
Validation Error
GET /v1/keys/{key_id} HTTP/1.1
Host: albert.api.etalab.gouv.fr
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"object": "key",
"id": 1,
"name": "text",
"value": "text",
"user_id": 1,
"expires": 1,
"created": 1,
"ANY_ADDITIONAL_PROPERTY": "anything"
}Delete an API key.
The ID of the key to delete.
Successful Response
Type of the object.
keyID of the key.
Name of the key.
Value of the key.
ID of the user that owns the key.
Time of expiration, as Unix timestamp. If None, the key never expires.
Time of creation, as Unix timestamp.
Invalid authentication scheme.
Invalid API key.
Your account has expired. Please contact support to renew your account.
Key {key_id} not found.
Validation Error
DELETE /v1/keys/{key_id} HTTP/1.1
Host: albert.api.etalab.gouv.fr
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"object": "key",
"id": 1,
"name": "text",
"value": "text",
"user_id": 1,
"expires": 1,
"created": 1,
"ANY_ADDITIONAL_PROPERTY": "anything"
}Get one of your API keys by ID.
The ID of the key to get.
Successful Response
Type of the object.
keyID of the key.
Name of the key.
Value of the key.
ID of the user that owns the key.
Time of expiration, as Unix timestamp. If None, the key never expires.
Time of creation, as Unix timestamp.
Invalid authentication scheme.
Invalid API key.
Your account has expired. Please contact support to renew your account.
Key {key_id} not found.
Validation Error
GET /v1/me/keys/{key_id} HTTP/1.1
Host: albert.api.etalab.gouv.fr
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"object": "key",
"id": 1,
"name": "text",
"value": "text",
"user_id": 1,
"expires": 1,
"created": 1,
"ANY_ADDITIONAL_PROPERTY": "anything"
}Delete an API key.
The ID of the key to delete.
Successful Response
Type of the object.
keyID of the key.
Name of the key.
Value of the key.
ID of the user that owns the key.
Time of expiration, as Unix timestamp. If None, the key never expires.
Time of creation, as Unix timestamp.
Invalid authentication scheme.
Invalid API key.
Your account has expired. Please contact support to renew your account.
Key {key_id} not found.
Validation Error
DELETE /v1/me/keys/{key_id} HTTP/1.1
Host: albert.api.etalab.gouv.fr
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"object": "key",
"id": 1,
"name": "text",
"value": "text",
"user_id": 1,
"expires": 1,
"created": 1,
"ANY_ADDITIONAL_PROPERTY": "anything"
}Last updated
Was this helpful?