Create a new user token.
A JSON object containing user token information.
Successful operation
Unprocessable Content
{- "name": "Titan Token",
- "password": "WoWar1chUnsicher?",
- "ttl": null
}
{- "success": true,
- "hash": "9277088242b81018e6c6c713c7b1b21d917fe3db",
- "data": {
- "id": 12,
- "hash": "cb0761a1170831609c6a75138c27381a3a80039d",
- "name": "Titan Token",
- "secret": "VcFNZNLYdv46trReAv1ciKM7H9L7w64jTN9VcBkD",
- "secret_modified_time": "2022-09-05T09:55:54.000000Z",
- "secret_age": 0,
- "secret_age_relative_time": "1 second ago",
- "expiration_time": null,
- "remaining_days": null,
- "remaining_time": null,
- "status": 1,
- "model": "UserToken",
- "created_user": {
- "id": 1,
- "hash": "8db560a23013ff54838d45e59a3f3f39f6720c86",
- "name": "Olli Kahn",
- "first_name": "Olli",
- "last_name": "Kahn",
- "position": "CEO",
- "department": "Engine room",
- "organization": "Nordantech",
- "email": "titan@nordantech.com",
- "status": 1,
- "created_time": "2022-05-04T16:51:37.000000Z",
- "modified_time": "2022-05-23T12:18:17.000000Z",
- "modified_user_time": "2022-05-23T12:18:17.000000Z",
- "model": "User"
}, - "modified_user": {
- "id": 1,
- "hash": "8db560a23013ff54838d45e59a3f3f39f6720c86",
- "name": "Olli Kahn",
- "first_name": "Olli",
- "last_name": "Kahn",
- "position": "CEO",
- "department": "Engine room",
- "organization": "Nordantech",
- "email": "titan@nordantech.com",
- "status": 1,
- "created_time": "2022-05-04T16:51:37.000000Z",
- "modified_time": "2022-05-23T12:18:17.000000Z",
- "modified_user_time": "2022-05-23T12:18:17.000000Z",
- "model": "User"
}
}, - "timestamp": 1662371755915
}
Get all user tokens of the authenticated hub.
Successful operation
{- "success": true,
- "hash": "e9bacecdf0dff78433501490aea1dca70e6f8cbe",
- "data": [
- {
- "id": 1,
- "hash": "4358411807f0fb5063350f8b46ea3c551db0e065",
- "name": "Test Token",
- "secret_modified_time": "2022-08-08T13:08:42.000000Z",
- "secret_age": 27,
- "secret_age_relative_time": "3 weeks ago",
- "expiration_time": "2022-08-21T23:59:59.000000Z",
- "remaining_days": 0,
- "remaining_time": null,
- "status": 1,
- "model": "UserToken"
}, - {
- "id": 12,
- "hash": "cb0761a1170831609c6a75138c27381a3a80039d",
- "name": "Titan Token",
- "secret_modified_time": "2022-09-05T09:55:54.000000Z",
- "secret_age": 0,
- "secret_age_relative_time": "32 minutes ago",
- "expiration_time": null,
- "remaining_days": null,
- "remaining_time": null,
- "status": 1,
- "model": "UserToken"
}
], - "meta": {
- "page": 1,
- "first": 1,
- "last": 2,
- "total": 2,
- "limit": 1000,
- "pages": 1
}, - "timestamp": 1662373675954
}
{- "success": true,
- "hash": "c40095f487aa1fadee54f56220f0df6b3545eb1a",
- "data": {
- "id": 1,
- "hash": "4358411807f0fb5063350f8b46ea3c551db0e065",
- "name": "Test Token",
- "secret_modified_time": "2022-08-08T13:08:42.000000Z",
- "secret_age": 71,
- "secret_age_relative_time": "2 months ago",
- "expiration_time": "2022-08-21T23:59:59.000000Z",
- "remaining_days": 0,
- "remaining_time": null,
- "status": 1,
- "model": "UserToken"
}, - "timestamp": 1666105643386
}
Update a user token.
Successful operation
Not Found
Unprocessable Content
{- "name": "Token Titan"
}
{- "success": true,
- "hash": "00ac6710fe092dced127d65879e90433c41202e5",
- "data": {
- "id": 1,
- "hash": "4358411807f0fb5063350f8b46ea3c551db0e065",
- "name": "Titan Token",
- "secret_modified_time": "2022-08-08T13:08:42.000000Z",
- "secret_age": 27,
- "secret_age_relative_time": "3 weeks ago",
- "expiration_time": "2022-08-21T23:59:59.000000Z",
- "remaining_days": 0,
- "remaining_time": null,
- "status": 1,
- "model": "UserToken",
- "modified_user": {
- "id": 1,
- "hash": "8db560a23013ff54838d45e59a3f3f39f6720c86",
- "name": "Olli Kahn",
- "first_name": "Olli",
- "last_name": "Kahn",
- "position": "CEO",
- "department": "Engine room",
- "organization": "Nordantech",
- "email": "titan@nordantech.com",
- "status": 1,
- "created_time": "2022-05-04T16:51:37.000000Z",
- "modified_time": "2022-05-23T12:18:17.000000Z",
- "modified_user_time": "2022-05-23T12:18:17.000000Z",
- "model": "User"
}
}, - "timestamp": 1662473958844
}
Renew a user token.
A JSON object containing user token information.
Successful operation
Not Found
Unprocessable Content
{- "ttl": null,
- "password": "WoWar1chUnsicher?"
}
{- "success": true,
- "hash": "e5099b2eb08d3462c661551b8f8373b3f9ff0cc6",
- "data": {
- "id": 12,
- "hash": "cb0761a1170831609c6a75138c27381a3a80039d",
- "name": "Titan Token",
- "secret": "jzkGIMOQJvVRkumwUeUSNNlTP1D1jxRIRsvNWYiB",
- "secret_modified_time": "2022-09-05T10:41:28.000000Z",
- "secret_age": 0,
- "secret_age_relative_time": "just now",
- "expiration_time": null,
- "remaining_days": null,
- "remaining_time": null,
- "status": 1,
- "model": "UserToken",
- "modified_user": {
- "id": 1,
- "hash": "8db560a23013ff54838d45e59a3f3f39f6720c86",
- "name": "Olli Kahn",
- "first_name": "Olli",
- "last_name": "Kahn",
- "position": "CEO",
- "department": "Engine room",
- "organization": "Nordantech",
- "email": "titan@nordantech.com",
- "status": 1,
- "created_time": "2022-05-04T16:51:37.000000Z",
- "modified_time": "2022-05-23T12:18:17.000000Z",
- "modified_user_time": "2022-05-23T12:18:17.000000Z",
- "model": "User"
}
}, - "timestamp": 1662374488143
}
Disable a user token. Closes all user sessions of the user token.
Successful operation
Not Found
{- "success": true,
- "hash": "3ac02d38a2364813a0069fdc4bb8a2efdae95901",
- "data": {
- "id": 1,
- "hash": "4358411807f0fb5063350f8b46ea3c551db0e065",
- "name": "Test Token",
- "secret_modified_time": "2022-10-25T13:21:04.000000Z",
- "secret_age": 0,
- "secret_age_relative_time": "12 seconds ago",
- "expiration_time": "2022-11-01T23:59:59.000000Z",
- "remaining_days": 7,
- "remaining_time": "7 days",
- "status": 0,
- "model": "UserToken",
- "modified_user": {
- "id": 1,
- "hash": "8db560a23013ff54838d45e59a3f3f39f6720c86",
- "name": "Olli Kahn",
- "first_name": "Olli",
- "last_name": "Kahn",
- "position": "CEO",
- "department": "Engine room",
- "organization": "Nordantech",
- "email": "titan@nordantech.com",
- "status": 1,
- "created_time": "2022-05-04T16:51:37.000000Z",
- "modified_time": "2022-05-23T12:18:17.000000Z",
- "modified_user_time": "2022-05-23T12:18:17.000000Z",
- "model": "User"
}
}, - "timestamp": 1666704076971
}