Edit this page on GitHub

Home > docs > api > User

User

A user represents an actual person using Concord to execute processes or adminstrate the server.

The REST API provides support for a number of operations:

Create or Update a User

Creates a new user with specified parameters or updates an existing one using the specified username.

  • URI /api/v1/user
  • Method POST
  • Headers Authorization, Content-Type: application/json
  • Body
      {
        "username": "myUser",
        "type": "LOCAL",
        "roles": ["testRole1", "testRole2"]
      }
    

    Allowed type value:

    • LOCAL - a local user, can be authenticated using an API key;
    • LDAP - a AD/LDAP user, can be authenticated using AD/LDAP credentials or an API key.
  • Success response
      Content-Type: application/json
    
      {
        "ok": true,
        "id" : "9be3c167-9d82-4bf6-91c8-9e28cfa34fbb",
        "created" : false
      }
    

    The created paratemer indicates whether the user was created or updated.

Find a User

Find an existing user by name.

  • URI /api/v1/user/${username}
  • Method GET
  • Headers Authorization
  • Body none
  • Success response
      Content-Type: application/json
    
      {
        "id" : "...",
        "name" : "myUser"
    
      }
    

    The created paratemer indicates whether the user was created or updated.