Skip to content

anaLydiaMA/InfoMan

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 

Repository files navigation

InfoMan

Available Requests:

  1. Get Form
  2. Update Form
  3. All Questions
  4. Ask Watson
  5. Authentication
  6. User Creation
  7. User Removal
  8. All Users

1. Get Form:

Method Path Description
POST /conversation/form Returns conversation updatable values

Request Body:

{
	"username": "name",
	"password": "pass"
}

Response Status:

Issue Status
Successful 201
Failed 400
Unauthorized 403

2. Update Form

Method Path Description
POST /conversation/update Update specified values on conversation

Request Body:

{
  "username": "name",
  "password": "pass",
  "area": "new area",
  "variables": 
  [
    { 
      "field":"new field name",
      "currentValue": "new field value"
    },
    ...
  ]
}

Response Status:

Issue Status
Successful 200
Failed 400
Unauthorized 403

3. All Questions

Method Path Description
GET /conversation/questions Returns all the conversation available questions

Response Status:

Issue Status
Successful 200
Failed 400

4. Ask Watson

Method Path Description
POST /conversation/askWatson Returns Watson response to the specified question on body

Request Body:

{
  "text": "question sample?"
}

Response Status:

Issue Status
Successful 200
Failed 400

5. Authentication

Method Path Description
POST /user/login Authenticates a user on Database

Request Body:

{
	"username": "name",
	"password": "pass"
}

Response Status:

Issue Status
Successful 201
Unauthorized 403

6. User Creation

Method Path Description
POST /user/create Creates a user on Database

Request Body:

{
	"username": "admin name",
	"password": "admin pass",
	"new_username: "new user's username",
	"new_password": "new user's password"
}

Response Status:

Issue Status
Successful 201
Failed 400
Unauthorized 403

7. User Removal

Method Path Description
POST /user/delete/{id} Deletes a user on Database

Request on Route:

id : Username to delete from database

Request Body:

{
	"username": "name",
	"password": "pass"
}

Response Status:

Issue Status
Successful 201
Failed 400
Unauthorized 403

8. All Users

Method Path Description
POST /user/list Returns the list of usernames registered on Database

Request Body:

{
	"username": "name",
	"password": "pass"
}

Response Status:

Issue Status
Successful 201
Failed 400
Unauthorized 403

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •