> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mileapp.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Read role by ID



## OpenAPI

````yaml /openapi/public/openapi-setting.json get /role/{roleId}
openapi: 3.0.0
info:
  title: MileApp API - Setting
  version: 3.0.0
  description: MileApp API Documentation - RESTful API for field operations management.
servers:
  - url: https://apiweb.mile.app/api/v3
security:
  - bearerAuth: []
tags:
  - name: User
    description: >-
      User data includes information contained within a user account, such as
      details that define a user's hub access and role within the system. Hub
      access determines the locations or areas of the application a user can
      access or the specific actions they can perform. User attributes consist
      of the user ID, name, email, and status.


      MileApp provides five predefined user roles, and you can create custom
      roles based on your organization's needs. The predefined roles are
      **Owner, Admin, Planner, and Field user**. A user can only hold one role
      at a time but can be granted access to multiple hubs.
  - name: Team
    description: >-
      This API allows you to manage teams. It serves as a tool to effectively
      manage and restrict user task assignments within your organization.


      **To see the details of team object, please follow [this
      link](#tag/team_model)**
  - name: Role
    description: >-
      This API enables you to retrieve a list of predefined roles and any custom
      roles associated with your account. By making a GET request to this API,
      you can obtain information about the available roles within the system.
      The predefined roles refer to a set of role types that are already defined
      by the system. In this particular case, the predefined roles include
      Finance, Owner, Planner, Admin, and Field User. Additionally, the API may
      also return any custom roles that have been created within your account.


      **To see the details of role object, please follow [this
      link](#tag/role_model)**
  - name: Hub
    description: >-
      In our system, a Hub is a fundamental entity within an organization,
      serving as the central point for managing various operational components.
      It acts as the parent structure for a wide range of resources and
      functionalities, including tasks, visits, users, vehicles, routing
      results, routing configurations, and data sources.


      **To see the details of hub object, please follow [this
      link](#tag/hub_model)**


      ## Conceptual Understanding of Hubs


      - **User Perspective:** For users, a Hub represents their headquarters or
      primary working area. It is where they carry out their daily activities
      and manage their tasks effectively. Each user interacts with the Hub to
      access resources and perform operations specific to their roles.


      - **Task Perspective:** From the perspective of task management, the Hub
      signifies the working area for tasks. It is the location where tasks are
      initiated, monitored, and completed. The Hub facilitates organization and
      efficiency in task execution.


      - **Routing Perspective:** In the context of routing and logistics, a Hub
      serves as a critical location for vehicles. It is where vehicles begin
      their routes, return after completing their journeys, and may make
      strategic stops along the way. The routing module relies on the Hub to
      optimize vehicle assignments and manage routes effectively.
  - name: App Integration
    description: >-
      This API allows you to manage Integration of enterprise app. Currently
      available for Azure.


      **To see the details of integration object, please follow [this
      link](#tag/app_integration_model)**
  - name: Plugin
    description: >-
      The Plugin API allows developers to create and manage custom add-ons
      within the Mile V3 platform. Plugins enable dynamic functionality through
      JavaScript resources and custom icons, allowing organizations to extend
      platform capabilities with custom features and integrations.


      **To see the details of plugin object, please follow [this
      link](#tag/plugin_model)**
paths:
  /role/{roleId}:
    get:
      tags:
        - Role
      summary: Read role by ID
      operationId: getRoleId
      parameters:
        - name: roleId
          in: path
          required: true
          description: |-
            Unique identifier for the role that generated by system.
            **Example**: `6449f8ef2c481b07d40ecfc3`
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GET_role_id'
        '404':
          description: Not dounf
          content:
            application/json:
              schema:
                type: object
                title: RoleGetBadrequest
                properties:
                  status:
                    description: Status of response.
                    type: string
                  message:
                    description: Message of API response.
                    type: string
                example:
                  status: false
                  message: >-
                    Data not found. Please check the ID/reference number and try
                    again.
        '500':
          description: Server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: boolean
                    description: Shows if the request was successful.
                  message:
                    type: string
                    description: A short message explaining what went wrong.
                example:
                  status: false
                  message: Internal server error, please contact support@mile.app.
      deprecated: false
      security:
        - bearerAuth: []
components:
  schemas:
    GET_role_id:
      type: object
      example:
        properties:
          status:
            description: Status of response.
            type: string
          data:
            description: Details object of role.
            type: object
            additionalProperties: true
        example:
          data:
            _id: 6449f8ef2c481b07d40ecfc3
            name: owner
            isAdmin: true
            isDefault: true
            isDeleted: false
            permissionList:
              - 6156d6475320c9679e337eba
              - 615ac4ab5c3c0b3d3e83dfc1
              - 615ac4ab5c3c0b3d3e83dfc2
              - 615ac5175c3c0b3d3e83dfc3
              - 615ac5185c3c0b3d3e83dfc5
              - 615ac5185c3c0b3d3e83dfc6
              - 615ac5185c3c0b3d3e83dfc7
              - 615ac5195c3c0b3d3e83dfc8
              - 615ac5195c3c0b3d3e83dfc9
              - 615ac5625c3c0b3d3e83dfca
              - 615ac5635c3c0b3d3e83dfcb
              - 615ac5635c3c0b3d3e83dfcc
              - 6163b9f723c7545255411653
              - 6163b9f823c7545255411655
              - 6163b9f823c7545255411656
              - 61699635faf2a008e491e117
              - 61699635faf2a008e491e118
              - 61699636faf2a008e491e119
              - 61710b3e83e2af47aa833dfd
              - 61725da59e28573f25d21433
              - 619df73f4b17064cfff6d3f1
              - 619df73f4b17064cfff6d3f2
              - 619df73f4b17064cfff6d3f3
              - 61a589a721d8e9691727abca
              - 61a589a721d8e9691727abcb
              - 61a589a821d8e9691727abcc
              - 61a589a821d8e9691727abcd
              - 61a589a921d8e9691727abcf
              - 61a589aa21d8e9691727abd0
              - 61a589aa21d8e9691727abd1
              - 61a589ab21d8e9691727abd2
              - 61d3f0a024406248b48614b3
              - 61d3f0d524406248b48615b9
              - 61d3f0fe24406248b48616ac
              - 61d3f12d24406248b48617d9
              - 61d3f19324406248b4861909
              - 61d3f1a224406248b4861991
              - 61d3f1b624406248b48619be
              - 61d3f24524406248b4861c20
              - 61d3f25424406248b4861ca1
              - 622578a0e9afc432da65dac1
              - 622578a0e9afc432da65dac2
              - 622578a0e9afc432da65dac3
              - 622578a0e9afc432da65dac4
              - 622b338c2edf688a1d57cdaa
              - 622b33af2edf688a1d57ce21
              - 622b3e492edf688a1d57f49a
              - 6257cc1e475945cff40aea6b
              - 62554e48475945cff4f7a7de
              - 627cb24e62e252387d3bd03d
              - 627cb24e62e252387d3bd03f
              - 627dfeadafaf4c30b52e62ad
              - 627dfeadafaf4c30b52e62af
              - 62c7eb1203c741efeeb6cc8c
              - 62c7eb1203c741efeeb6cc8d
              - 62c7eb1203c741efeeb6cc8e
              - 62c7eb1203c741efeeb6cc8f
              - 631025d1267dfb33da11f9dd
              - 631025d1267dfb33da11f9de
              - 63edc5a74dfe56be43b641c3
              - 63edc5a74dfe56be43b641c4
              - 63edc5a74dfe56be43b641c5
              - 63edc5a74dfe56be43b641c6
              - 63edc5a74dfe56be43b641c7
              - 63edc5a74dfe56be43b641c8
              - 63edc5a74dfe56be43b641c9
              - 63edc5a74dfe56be43b641ca
            permissionDetails:
              - permissionName: view/checkincheckout
                interval: null
                checkinRadius: null
                checkoutRadius: null
              - permissionName: view/task
                items:
                  - targetId: 6703914f77af81f98809701b
                    hiddenFields:
                      - requesterAddress
                      - signature1
              - permissionName: view/data
                items:
                  - targetId: 63db2fb476bc679c540369c4
                    hiddenFields:
                      - outletPhoneNumber
                      - outletGeolocation
            permission:
              - _id: 61d3f0d524406248b48615b9
                name: view/task
                module: mileField
                menu: task
                displayName: View task
                access: true
              - _id: 622b3e492edf688a1d57f49a
                name: view/tracking
                module: mileField
                menu: tracking
                displayName: View tracking
                access: true
              - _id: 61d3f0a024406248b48614b3
                name: add/task
                module: mileField
                menu: task
                displayName: Add task
                access: true
              - _id: 61d3f0fe24406248b48616ac
                name: edit/task
                module: mileField
                menu: task
                displayName: Edit task
                access: true
              - _id: 61d3f19324406248b4861909
                name: assign/task
                module: mileField
                menu: task
                displayName: Assign/Unassign task
                access: true
              - _id: 61d3f1b624406248b48619be
                name: move/task
                module: mileField
                menu: task
                displayName: Move task
                access: true
              - _id: 61d3f25424406248b4861ca1
                name: export/task
                module: mileField
                menu: task
                displayName: Export task
                access: true
              - _id: 61d3f12d24406248b48617d9
                name: delete/task
                module: mileField
                menu: task
                displayName: Delete task
                access: true
              - _id: 627dfeadafaf4c30b52e62ad
                name: view/schedule
                module: mileField
                menu: schedule
                displayName: View schedule
                access: true
              - _id: 627cb24e62e252387d3bd03d
                name: add/schedule
                module: mileField
                menu: schedule
                displayName: Add schedule
                access: true
              - _id: 627dfeadafaf4c30b52e62af
                name: edit/schedule
                module: mileField
                menu: schedule
                displayName: Edit schedule
                access: true
              - _id: 627cb24e62e252387d3bd03f
                name: delete/schedule
                module: mileField
                menu: schedule
                displayName: Delete schedule
                access: true
              - _id: 615ac5635c3c0b3d3e83dfcb
                name: view/vehicle
                module: mileRoute
                menu: vehicle
                displayName: View vehicle
                access: true
              - _id: 615ac5625c3c0b3d3e83dfca
                name: add/vehicle
                module: mileRoute
                menu: vehicle
                displayName: Add vehicle
                access: true
              - _id: 615ac5635c3c0b3d3e83dfcc
                name: edit/vehicle
                module: mileRoute
                menu: vehicle
                displayName: Edit vehicle
                access: true
              - _id: 61699636faf2a008e491e119
                name: delete/vehicle
                module: mileRoute
                menu: vehicle
                displayName: Delete vehicle
                access: true
              - _id: 615ac5185c3c0b3d3e83dfc5
                name: view/result
                module: mileRoute
                menu: result
                displayName: View result
                access: true
              - _id: 615ac5185c3c0b3d3e83dfc6
                name: edit/result
                module: mileRoute
                menu: result
                displayName: Edit result
                access: true
              - _id: 61725da59e28573f25d21433
                name: delete/result
                module: mileRoute
                menu: result
                displayName: Delete result
                access: true
              - _id: 6156d6475320c9679e337eba
                name: route-optimization
                module: mileRoute
                menu: result
                displayName: Route optimization
                access: true
              - _id: 615ac5195c3c0b3d3e83dfc8
                name: view/configuration
                module: mileRoute
                menu: configuration
                displayName: View configuration
                access: true
              - _id: 615ac5195c3c0b3d3e83dfc9
                name: edit/configuration
                module: mileRoute
                menu: configuration
                displayName: Edit configuration
                access: true
              - _id: 61a589aa21d8e9691727abd1
                name: view/plan
                module: mileBilling
                menu: billing
                displayName: View plan
                access: true
              - _id: 61a589a921d8e9691727abcf
                name: view/subscription
                module: mileBilling
                menu: billing
                displayName: View subscription
                access: true
              - _id: 61a589aa21d8e9691727abd0
                name: view/history
                module: mileBilling
                menu: billing
                displayName: View history
                access: true
              - _id: 61a589ab21d8e9691727abd2
                name: view/user
                module: mileSetting
                menu: user
                displayName: View user
                access: true
              - _id: 619df73f4b17064cfff6d3f3
                name: invite
                module: mileSetting
                menu: user
                displayName: Invite member
                access: true
              - _id: 619df73f4b17064cfff6d3f1
                name: edit/member
                module: mileSetting
                menu: user
                displayName: Edit member
                access: true
              - _id: 619df73f4b17064cfff6d3f2
                name: delete/member
                module: mileSetting
                menu: user
                displayName: Delete member
                access: true
              - _id: 6163b9f723c7545255411653
                name: view/permission
                module: mileSetting
                menu: permission
                displayName: View permission
                access: true
              - _id: 6163b9f823c7545255411655
                name: edit/permission
                module: mileSetting
                menu: permission
                displayName: Edit permission
                access: true
              - _id: 615ac5175c3c0b3d3e83dfc3
                name: view/hub
                module: mileSetting
                menu: hub
                displayName: View hub
                access: true
              - _id: 615ac4ab5c3c0b3d3e83dfc1
                name: add/hub
                module: mileSetting
                menu: hub
                displayName: Add hub
                access: true
              - _id: 615ac4ab5c3c0b3d3e83dfc2
                name: edit/hub
                module: mileSetting
                menu: hub
                displayName: Edit hub
                access: true
              - _id: 61699635faf2a008e491e117
                name: delete/hub
                module: mileSetting
                menu: hub
                displayName: Delete hub
                access: true
              - _id: 622578a0e9afc432da65dac3
                name: view/flow
                module: mileSetting
                menu: flow
                displayName: View flow
                access: true
              - _id: 622578a0e9afc432da65dac1
                name: add/flow
                module: mileSetting
                menu: flow
                displayName: Add flow
                access: true
              - _id: 622578a0e9afc432da65dac2
                name: edit/flow
                module: mileSetting
                menu: flow
                displayName: Edit flow
                access: true
              - _id: 622578a0e9afc432da65dac4
                name: delete/flow
                module: mileSetting
                menu: flow
                displayName: Delete flow
                access: true
              - _id: 6163b9f823c7545255411656
                name: view/role
                module: mileSetting
                menu: role
                displayName: View role
                access: true
              - _id: 631025d1267dfb33da11f9dd
                name: create/role
                module: mileSetting
                menu: role
                displayName: Add role
                access: true
              - _id: 61710b3e83e2af47aa833dfd
                name: edit/role
                module: mileSetting
                menu: role
                displayName: Edit role
                access: true
              - _id: 631025d1267dfb33da11f9de
                name: delete/role
                module: mileSetting
                menu: role
                displayName: Delete role
                access: true
              - _id: 6257cc1e475945cff40aea6b
                name: view/organization
                module: mileSetting
                menu: company
                displayName: View company
                access: true
              - _id: 62554e48475945cff4f7a7de
                name: edit/organization
                module: mileSetting
                menu: company
                displayName: Edit company
                access: true
              - _id: 62c7eb1203c741efeeb6cc8c
                name: view/automation
                module: mileSetting
                menu: automation
                displayName: View automation
                access: true
              - _id: 62c7eb1203c741efeeb6cc8d
                name: add/automation
                module: mileSetting
                menu: automation
                displayName: Add automation
                access: true
              - _id: 62c7eb1203c741efeeb6cc8e
                name: edit/automation
                module: mileSetting
                menu: automation
                displayName: Edit automation
                access: true
              - _id: 62c7eb1203c741efeeb6cc8f
                name: delete/automation
                module: mileSetting
                menu: automation
                displayName: Delete automation
                access: true
              - _id: 63edc5a74dfe56be43b641c3
                name: view/data
                module: mileSetting
                menu: data
                displayName: View data
                access: true
              - _id: 63edc5a74dfe56be43b641c4
                name: add/data
                module: mileSetting
                menu: data
                displayName: Add data
                access: true
              - _id: 63edc5a74dfe56be43b641c5
                name: edit/data
                module: mileSetting
                menu: data
                displayName: Edit data
                access: true
              - _id: 63edc5a74dfe56be43b641c6
                name: delete/data
                module: mileSetting
                menu: data
                displayName: Delete data
                access: true
              - _id: 63edc5a74dfe56be43b641c7
                name: view/dataType
                module: mileSetting
                menu: dataType
                displayName: View data type
                access: true
              - _id: 63edc5a74dfe56be43b641c8
                name: add/dataType
                module: mileSetting
                menu: dataType
                displayName: Add data type
                access: true
              - _id: 63edc5a74dfe56be43b641c9
                name: edit/dataType
                module: mileSetting
                menu: dataType
                displayName: Edit data type
                access: true
              - _id: 63edc5a74dfe56be43b641ca
                name: delete/dataType
                module: mileSetting
                menu: dataType
                displayName: Delete data type
                access: true
              - _id: 6257cc1e475945cff40bea1b
                name: view/checkincheckout
                module: mileAdvanced
                menu: Tracking
                displayName: Check in - Check out
                access: false
            organizationId: 6449f8ef2c481b07d40ecfc2
            updatedTime: '2023-04-27T04:24:15.217000Z'
            createdTime: '2023-04-27T04:24:15.217000Z'
          status: true
      additionalProperties: true
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Use a valid Bearer token to authenticate.

````