Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extends API to auto create users and apps #1518

Open
carromeu opened this issue Apr 12, 2022 · 0 comments
Open

Extends API to auto create users and apps #1518

carromeu opened this issue Apr 12, 2022 · 0 comments

Comments

@carromeu
Copy link

carromeu commented Apr 12, 2022

In this moment has only one endpoint in ErrBit API (GET /stats). I want to use ErrBit has the bug tracker in a DevOp platform. So, my apps and users will be created by automatic proccess. Its possible to create bellow adicional endpoints in API?

  1. User Creation

Create user if not exists or change name if exists.

Authorization is a user admin 'username:password' encoded in Base64.

POST /user

Header:
Authorization: Basic Zm9vOmJhcg==

Request:
{
  "name": "User Test",
  "email": "user@test.com",
  "password": "a5/T3!]hG+S"
}

Response:
Code 200
  1. App Creation
POST /app

Header:
Authorization: Basic Zm9vOmJhcg==

Request:
{
  "name": "App Name"
}

Response:
Code 200 and:
{
  id: "552941336a756e4e71012345",
  "key": "6423d563e5285b34cb117f757b2bc7b1"
}
  1. Watchers

Update list of watchers in project.

POST /watchers/app?api_key=6423d563e5285b34cb117f757b2bc7b1

Request:
[ "user1@test.com", "user2@test.com" ]

Response:
Code 200
@carromeu carromeu changed the title Extends API to auto create users and projects Extends API to auto create users and apps Apr 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant