Buk

Buk Users and profiles API

The Users and profiles API from Buk — 2 operation(s) for users and profiles.

OpenAPI Specification

buk-users-and-profiles-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Buk Users and profiles API
  version: '1.0'
  description: 'Operations tagged Users and profiles across 5 of this provider''s published API definitions: buk-data-access-api-brasil-openapi.yml, buk-data-access-api-chile-openapi.yml, buk-data-access-api-colombia-openapi.yml, buk-data-access-api-mexico-openapi.yml, buk-data-access-api-peru-openapi.yml. Each path carries the servers of the definition it was published in.'
host: demo.buk.cl
tags:
- name: Users and profiles
paths:
  /users:
    get:
      summary: Show users
      description: "Delivers the information of all users.\n\n**Permisos requeridos para utilizar este endpoint:** \n* User and profile permissions en: 'Lectura' o 'Lectura y Modificación'.\n"
      tags:
      - Users and profiles
      parameters:
      - name: name
        in: query
        type: string
        description: Name
      - name: email
        in: query
        type: string
        description: Email
      - name: person_id
        in: query
        type: integer
        description: Employee ID (Found in the employee endpoint)
      - name: permission_role_id
        in: query
        type: integer
        description: Profile ID
      - name: limit_areas
        in: query
        type: boolean
        enum:
        - true
        - false
        description: Limited by areas?
      - name: limit_realms
        in: query
        type: boolean
        enum:
        - true
        - false
        description: Limited by Data set?
      - name: realm_name
        in: query
        type: boolean
        enum:
        - true
        - false
        description: Name of the data set
      - name: limited_by_area_id
        in: query
        type: integer
        description: ID of the Area for which the users are limited
      - name: activated
        in: query
        type: boolean
        enum:
        - true
        - false
        description: Active user?
      - name: rol_visible
        in: query
        type: string
        enum:
        - ve_publico
        - ve_privado
        - ve_ambos
        description: Role Limits
      responses:
        '200':
          description: A list of users that meet the search criteria
          schema:
            $ref: '#/definitions/User'
    post:
      summary: Create users
      description: "Create a user and send the invitation to them.\nEach record consists of: - person_id: ID of the person to link with the user (If this parameter is sent, the name and corporate email of the person are used)\n  It can be found in the Colaboradores API.\n\n- name: Name of the user - email: Email of the user (If person_id is sent, uses the person's email if they have one) - activated: Determines whether the user can log in to the application - area_ids: List of area IDs to limit the user - limit_areas: Whether the user will be limited by areas - permission_role_id: ID of the profile to assign to the user.\n  (If this field is left empty, the user will have the Normal Profile)\n\n(Only available if the general 'Enable data sets' is active) - realm_ids: List of IDs of data sets to limit - limit_realms: Whether the user is limited by data set\n(Only available if the general 'Enable Private Role' is active) - rol_visible: Allows limiting whether the user can see private profiles, public profiles, or both (see_public, see_private, see_both)\n\n\n**Permisos requeridos para utilizar este endpoint:** \n* User and profile permissions en: 'Lectura y Modificación'.\n"
      tags:
      - Users and profiles
      parameters:
      - name: User
        in: body
        description: User type object
        required: true
        schema:
          $ref: '#/definitions/User'
      responses:
        '201':
          description: User created.
          schema:
            title: ResponseBody
            properties:
              user:
                $ref: '#/definitions/User'
  /users/{id}:
    get:
      summary: Show user
      description: "Delivers a user's information.\n\n**Permisos requeridos para utilizar este endpoint:** \n* User and profile permissions en: 'Lectura' o 'Lectura y Modificación'.\n"
      parameters:
      - name: id
        in: path
        description: User ID
        required: true
        type: string
      tags:
      - Users and profiles
      responses:
        '200':
          description: A user with the corresponding ID
          schema:
            $ref: '#/definitions/User'
    put:
      summary: Edit user
      description: "Edit a user\nThe fields that we can edit are the following (It is not necessary to send the fields that are not going to be modified): - person_id: ID of the person to relate to the user (If this parameter is sent, the person's name and corporate email is used).\n\n  It can be found in the Colaboradores api.\n\n\n- name: User’s name - email: User's email (If person_id is sent, it uses the person's email if available) - area_ids: List of area ids to limit the user - activated: Determines whether the user can log in to the application - limit_areas: Whether the user will be limited by areas or not - permission_role_id: ID of the profile to be assigned to the user.\n\n  (If this field is left empty, the user will have a Normal Profile).\n\n\n(Only available if General parameters 'Enable Data Sets' is active) - realm_ids: List of Data set IDs to limit - limit_realms: If the user is limited by data set\n(Only available if the general parameters 'Enable Private Role' is active) - visible_role: Allows to limit whether the user can view private, public or both profiles (view_public, view_private, ve_both).\n\n\n**Permisos requeridos para utilizar este endpoint:** \n* User and profile permissions en: 'Lectura y Modificación'.\n"
      tags:
      - Users and profiles
      parameters:
      - name: id
        in: path
        description: ID of the user to edit
        required: true
        type: string
      - name: User
        in: body
        description_user: User type object
        required: true
        schema:
          $ref: '#/definitions/User'
      responses:
        '200':
          description: User edited.
          schema:
            title: ResponseBody
            properties:
              user:
                $ref: '#/definitions/User'
definitions:
  User:
    properties:
      email:
        type: string
      name:
        type: string
      person_id:
        type: integer
      activated:
        type: boolean
      permission_role_id:
        type: integer
      limit_areas:
        type: boolean
      area_ids:
        type: array
        items:
          type: integer
      limit_realms:
        type: boolean
      realm_ids:
        type: array
        items:
          type: integer
      rol_visible:
        type: string
securityDefinitions:
  auth_token:
    type: apiKey
    name: auth_token
    in: header
x-refined-from:
- buk-data-access-api-brasil-openapi.yml
- buk-data-access-api-chile-openapi.yml
- buk-data-access-api-colombia-openapi.yml
- buk-data-access-api-mexico-openapi.yml
- buk-data-access-api-peru-openapi.yml