-
-

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

  • Status Codes:
    @@ -347,6 +348,7 @@ character “_” allowed

    { "data": { + "accepted_privacy_policy": "Sat, 25 Fev 2023 13:52:58 GMT", "admin": false, "bio": null, "birth_date": null, @@ -689,6 +691,7 @@ character “_” allowed

  • language (string) – language preferences

  • timezone (string) – user time zone

  • weekm (boolean) – does week start on Monday?

  • +
  • weekm – does week start on Monday?

  • Request Headers:
    @@ -1224,6 +1227,209 @@ for other reasons.

    +
    +
    +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:
    +
    +
    +
    Status Codes:
    +
    +
    +
    +
    + +
    +
    +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 and errored)

    • +
    • 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:
    +
    +
    +
    Status Codes:
    +
      +
    • 200 OK – success

    • +
    • 401 Unauthorized

        +
      • 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:
    +
    +
    +
    Status Codes:
    +
    +
    +
    +
    + +
    +
    +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:
    +
    +
    +
    Status Codes:
    +
      +
    • 200 OK – success

    • +
    • 401 Unauthorized

        +
      • provide a valid auth token

      • +
      • signature expired, please log in again

      • +
      • invalid token, please log in again

      • +
      +

    • +
    • 404 Not Found – file not found

    • +
    +
    +
    +
    +
    @@ -1239,7 +1445,7 @@ for other reasons.

    © Copyright 2018 - 2022, SamR1 . - Last updated on Feb 20, 2023.
    + Last updated on Mar 05, 2023.
    Created using Sphinx 5.3.0.