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

POST /platforms/:platform/groups #48

Open
davidraker opened this issue Mar 8, 2022 · 0 comments
Open

POST /platforms/:platform/groups #48

davidraker opened this issue Mar 8, 2022 · 0 comments

Comments

@davidraker
Copy link
Contributor

davidraker commented Mar 8, 2022

Create a new group on the specified platform.

The route to the new resource will be returned in the Location header of the response.

Note: Attempting to create a group with a name which already exists will return 409 Conflict with a Content-Location header pointing to the route of the conflicting record.

Request:

  • Authorization: BEARER <jwt_token>
    • Content Type: application/json
    • Body:
      {
          "group_name": "<group>",
          "roles": {
              <role>,
              <role>,
              ...
          }
      }
      

Response:

  • With valid BEARER token on success: 201 Created
    • Location: /platforms/:platform/groups/:group
  • With valid BEARER token if group name already exists: 409 Conflict
    • Content Type: application/json
    • Content-Location: /vui/platforms/:platform/groups/:group_name
    • Body:
      {
          "error": "Unable to create group: :group_name, as this group name already exists."
      }
      
  • With valid BEARER token on failure: 400 Bad Request
    • Content Type: application/json
    • Body:
      {
          "error": "<Error Message>"
      }
      
  • With invalid BEARER token: 401 Unauthorized
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