Skip to content

Latest commit

 

History

History
141 lines (107 loc) · 2.28 KB

documentation.md

File metadata and controls

141 lines (107 loc) · 2.28 KB

Sign-up

POST to /users/

Content-Type: application/json

Body:

{
  "user": {
    "email": "[email protected]",
    "password": "12345678",
    "podcasters": {
    	"forename": "Michi"
    }
  }
}

Returns:

{
  "data": {
    "id": 38,
    "email": "[email protected]"
  }
}

Sends email with confirm key, e.g. [URL]/confirm?key=SFMyNTY.eyJzaWduZWQiOjE1MzE2MTM0NDksImRhdGEiOnsiZW1haWwiOiJtaWNoaUA0MS5kZSJ9fQ.ObL0R3R-racHK4H21AgJeJboKF1ubfT3lJakdENywQ8

Confirm Sign-up

GET to [URL]/confirm?key=SFMyNTY.eyJzaWduZWQiOjE1MzE2MTM0NDksImRhdGEiOnsiZW1haWwiOiJtaWNoaUA0MS5kZSJ9fQ.ObL0R3R-racHK4H21AgJeJboKF1ubfT3lJakdENywQ8

Returns:

{
  "info": {
    "detail": "Your account has been confirmed"
  }
}

Sends mail with content, e.g. "Your account has been confirmed."

Log-in

POST to /sessions/

Content-Type: application/json

Body:

{
  "session": {
    "email": "[email protected]",
    "password": "12345678"
  }
}

Returns:

{
  "access_token": "SFMyNTY.eyJzaWduZWQiOjE1MzE2MTQ5NzIsImRhdGEiOjM4fQ.2HsszP3_8XqKSvQIYpghJ3d3Nx8O688PxyZzIPT344Y"
}

Log-out

TODO: Wie kann ich mich ausloggen? Frontend-seitig?

Edit Profile

TODO: Wie muss ich den Token Key senden, damit id_check oder user_check erfüllt sind?

PUT to /podcasters/:id

Content-Type: application/json

Body:

{
  
}

Request Reset Password

POST to /password_resets/

Content-Type: application/json

Body:

{
  "password_reset": {
    "email": "[email protected]"
  }
}

Returns:

{
  "info": {
    "detail": "Check your inbox for instructions on how to reset your password"
  }
}

Sends email with password reset key, e.g. [url]/password_resets/edit?key=SFMyNTY.eyJzaWduZWQiOjE1MzE2MTUyMjEsImRhdGEiOnsiZW1haWwiOiJtaWNoaUA0MS5kZSJ9fQ.Y973cC6QkFqeMJfFzneHcNGTG46RMWOzn5465Aiqb-8

Reset Password

PUT to /password_resets/update/

Content-Type: application/json

Body:

{
  "password_reset": {
  	"key": "SFMyNTY.eyJzaWduZWQiOjE1MzE2MTUyMjEsImRhdGEiOnsiZW1haWwiOiJtaWNoaUA0MS5kZSJ9fQ.Y973cC6QkFqeMJfFzneHcNGTG46RMWOzn5465Aiqb-8",
    "email": "[email protected]",
    "password": "123456789"
  }
}

Returns:

{
  "info": {
    "detail": "Your password has been reset"
  }
}

Sends email with content, e.g. "Your password has been reset."