Authentication¶
+Authentication and account¶
- POST /api/auth/register¶ @@ -175,6 +175,7 @@ to activate it.
password (string) – password (8 characters required)
lang (string) – user language preferences (if not provided or invalid, fallback to ‘en’ (english))
accepted_policy (boolean) – true if user accepted privacy policy
language (string) – language preferences
timezone (string) – user time zone
weekm (boolean) – does week start on Monday?
weekm – does week start on Monday?
-
+
- +POST /api/auth/account/privacy-policy¶ +
The authenticated user accepts the privacy policy.
+Example request:
+++POST /auth/account/privacy-policy HTTP/1.1 +Content-Type: application/json +
Example response:
+++HTTP/1.1 200 OK +Content-Type: application/json + +{ + "status": "success" +} +
-
+
- Request JSON Object: +
-
+
accepted_policy (boolean) – true if user accepted privacy policy
+
+- Request Headers: +
-
+
Authorization – OAuth 2.0 Bearer Token
+
+- Status Codes: +
-
+
200 OK – success
+-
+
invalid payload
+
+-
+
provide a valid auth token
+signature expired, please log in again
+invalid token, please log in again
+
+500 Internal Server Error – internal server error
+
+
-
+
- +GET /api/auth/account/export¶ +
Get a data export info for authenticated user if a request exists.
+It returns:
+-
+
export creation date
+export status (
in_progress
,successful
anderrored
)
+file name and size (in bytes) when export is successful
+
Example request:
+++GET /auth/account/export HTTP/1.1 +Content-Type: application/json +
Example response:
+-
+
if a request exists
+
++HTTP/1.1 200 OK +Content-Type: application/json + +{ + "status": "success", + "request": { + "created_at": "Wed, 01 Mar 2023 12:31:17 GMT", + "status": "successful", + "file_name": "archive_rgjsR3fHt295ywNQr5Yp.zip", + "file_size": 924 + } +} +
-
+
if no request
+
++HTTP/1.1 200 OK +Content-Type: application/json + +{ + "status": "success", + "request": null +} +
-
+
- Request Headers: +
-
+
Authorization – OAuth 2.0 Bearer Token
+
+- Status Codes: +
-
+
200 OK – success
+-
+
provide a valid auth token
+signature expired, please log in again
+invalid token, please log in again
+
+
+
-
+
- +POST /api/auth/account/export/request¶ +
Request a data export for authenticated user.
+Example request:
+++POST /auth/account/export/request HTTP/1.1 +Content-Type: application/json +
Example response:
+++HTTP/1.1 200 OK +Content-Type: application/json + +{ + "status": "success", + "request": { + "created_at": "Wed, 01 Mar 2023 12:31:17 GMT", + "status": "in_progress", + "file_name": null, + "file_size": null + } +} +
-
+
- Request Headers: +
-
+
Authorization – OAuth 2.0 Bearer Token
+
+- Status Codes: +
-
+
200 OK – success
+-
+
ongoing request exists
+completed request already exists
+
+-
+
provide a valid auth token
+signature expired, please log in again
+invalid token, please log in again
+
+500 Internal Server Error – internal server error
+
+
-
+
- +GET /api/auth/account/export/(string: file_name)¶ +
Download a data export archive
+Example request:
+++GET /auth/account/export/download/archive_rgjsR3fHr5Yp.zip HTTP/1.1 +Content-Type: application/json +
Example response:
+++HTTP/1.1 200 OK +Content-Type: application/x-gzip +
-
+
- Parameters: +
-
+
file_name (string) – filename
+
+- Request Headers: +
-
+
Authorization – OAuth 2.0 Bearer Token
+
+- Status Codes: +
-
+
200 OK – success
+-
+
provide a valid auth token
+signature expired, please log in again
+invalid token, please log in again
+
+404 Not Found – file not found
+
+
© Copyright 2018 - 2022, SamR1 .
- Last updated on Feb 20, 2023.
+ Last updated on Mar 05, 2023.
Created using Sphinx 5.3.0.