Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 15 Next »

Introduction

  • The majority of actions that most users perform on Makerble will be related to a charity or a specific project of that charity

Relationships

  • A user can be part of many projects and many charities


API Documentation

Users

Desc: Create user

This API functionality resembles the Manage Colleagues functionality that is available in the front-end. Using the API you can:

  • Create a new user

  • Give that user a role in your organisation

    • Charity Editor

    • Charity Reporter

    • Charity Observer

  • Give that user a role in one or more of your projects. Roles you can give are

    • Project Editor

    • Project Reporter

    • Project Observer

  • Decide whether that newly created user is an Organisation-controlled User or a User-controlled User (Note: that you can only select Organisation-controlled User if your organisation has turned on Organisation-controlled Users: Organisation-controlled User Accounts )

    • If the user is going to be Organisation-controlled, input true in the charity_controlled part; otherwise input false

  • If you set the newly created user as an Organisation-controlled User, you can choose whether their Email Notifications are turned on or off.

    • If you want emails to be disabled for the user, then in the disable_email_notification field, input true; otherwise input false

Example

url: api/v2/users

method: POST

params:

{
"auth_code": “qspehLnbRlUS0uiA2mNwwXTDpZkg/3pOHko=--/Z7U95nqfvPfyQ2l--dA/nDJzKY98PHnQMl85uDQ==",
"user": {
"email": "user103@example.com",
"first_name": "User101",
"last_name": "100",
"password": "changeme",
"password_confirmation": "changeme"

},

"charity_controlled": "true",
"disable_email_notification": "false",

"charity_id": 31

}

response:

{
"user": {
"id": 557,
"email": "user104@example.com"
},
"message": "Sign up successfully!!!"
}

Example with screenshots

First you create the user, then you get the user, then you can assign the user to a project

Desc: Get users

url: /users

params: default params

response example: default response example (multiple records)

 

Desc: Get a single user

url: /users/:id

response example: default response example (single record)

 

Desc: Get user permissions (not merged)

url: /users/permissions

 

Desc: Reset password (not merged)

url: /users/reset_password

method: POST

body: {

email: my_email@gmail.com,

reset_code: DD3CB5B7C260,

password: new_password

}

 

Desc: make reset password request - sends reset code to the user email (not merged)

url: /users/request_password_reset_code

method: GET

params: {

email: my_email

}

 

Desc: check if reset code is correct (not merged)

url: /users/check_password_reset_code

method: GET

params: {

email: my_email,

reset_code: code

}

response: {

is_reset_code_correct: true

}


  • No labels