VTEX · Capability

VTex License Manager API — Roles

VTex License Manager API — Roles. 4 operations. Lead operation: VTex Get list of roles. Self-contained Naftiko capability covering one Vtex business surface.

Run with Naftiko VtexRoles

What You Can Do

GET
Getlistroles — VTex Get list of roles
/v1/api/license-manager/site/pvt/roles/list/paged
PUT
Putrolesinuser — VTex Add roles to user or appKey
/v1/api/license-manager/users/{userid}/roles
GET
Getrolesbyuser — VTex Get roles by user or appKey
/v1/api/license-manager/users/{userid}/roles
DELETE
Removerolefromuser — VTex Remove role from user or appKey
/v1/api/license-manager/users/{userid}/roles/{roleid}

MCP Tools

vtex-get-list-roles

VTex Get list of roles

read-only idempotent
vtex-add-roles-user-appkey

VTex Add roles to user or appKey

idempotent
vtex-get-roles-user-appkey

VTex Get roles by user or appKey

read-only idempotent
vtex-remove-role-user-appkey

VTex Remove role from user or appKey

idempotent

Capability Spec

license-manager-roles.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: VTex License Manager API — Roles
  description: 'VTex License Manager API — Roles. 4 operations. Lead operation: VTex Get list of roles. Self-contained Naftiko
    capability covering one Vtex business surface.'
  tags:
  - Vtex
  - Roles
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    VTEX_API_KEY: VTEX_API_KEY
capability:
  consumes:
  - type: http
    namespace: license-manager-roles
    baseUri: https://{accountName}.{environment}.com.br
    description: VTex License Manager API — Roles business capability. Self-contained, no shared references.
    resources:
    - name: api-license-manager-site-pvt-roles-list-paged
      path: /api/license-manager/site/pvt/roles/list/paged
      operations:
      - name: getlistroles
        method: GET
        description: VTex Get list of roles
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: numItems
          in: query
          type: integer
          description: Number of items in the returned page.
        - name: pageNumber
          in: query
          type: integer
          description: Which page from the whole list will be returned.
        - name: sort
          in: query
          type: string
          description: Chooses the field that the list will be sorted by.
        - name: sortType
          in: query
          type: string
          description: Defines the sorting order. `ASC` is used for ascendant order. `DSC` is used for descendant order.
    - name: api-license-manager-users-userId-roles
      path: /api/license-manager/users/{userId}/roles
      operations:
      - name: putrolesinuser
        method: PUT
        description: VTex Add roles to user or appKey
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: userId
          in: path
          type: string
          description: ID of the user.
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
      - name: getrolesbyuser
        method: GET
        description: VTex Get roles by user or appKey
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: userId
          in: path
          type: string
          description: ID of the user.
          required: true
    - name: api-license-manager-users-userId-roles-roleId
      path: /api/license-manager/users/{userId}/roles/{roleId}
      operations:
      - name: removerolefromuser
        method: DELETE
        description: VTex Remove role from user or appKey
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: userId
          in: path
          type: string
          description: ID of the user.
          required: true
        - name: roleId
          in: path
          type: string
          description: ID of the role which will be removed from the user.
          required: true
    authentication:
      type: apikey
      key: X-VTEX-API-AppKey
      value: '{{env.VTEX_API_KEY}}'
      placement: header
  exposes:
  - type: rest
    namespace: license-manager-roles-rest
    port: 8080
    description: REST adapter for VTex License Manager API — Roles. One Spectral-compliant resource per consumed operation,
      prefixed with /v1.
    resources:
    - path: /v1/api/license-manager/site/pvt/roles/list/paged
      name: api-license-manager-site-pvt-roles-list-paged
      description: REST surface for api-license-manager-site-pvt-roles-list-paged.
      operations:
      - method: GET
        name: getlistroles
        description: VTex Get list of roles
        call: license-manager-roles.getlistroles
        with:
          numItems: rest.numItems
          pageNumber: rest.pageNumber
          sort: rest.sort
          sortType: rest.sortType
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/api/license-manager/users/{userid}/roles
      name: api-license-manager-users-userid-roles
      description: REST surface for api-license-manager-users-userId-roles.
      operations:
      - method: PUT
        name: putrolesinuser
        description: VTex Add roles to user or appKey
        call: license-manager-roles.putrolesinuser
        with:
          userId: rest.userId
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
      - method: GET
        name: getrolesbyuser
        description: VTex Get roles by user or appKey
        call: license-manager-roles.getrolesbyuser
        with:
          userId: rest.userId
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/api/license-manager/users/{userid}/roles/{roleid}
      name: api-license-manager-users-userid-roles-roleid
      description: REST surface for api-license-manager-users-userId-roles-roleId.
      operations:
      - method: DELETE
        name: removerolefromuser
        description: VTex Remove role from user or appKey
        call: license-manager-roles.removerolefromuser
        with:
          userId: rest.userId
          roleId: rest.roleId
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: license-manager-roles-mcp
    port: 9090
    transport: http
    description: MCP adapter for VTex License Manager API — Roles. One tool per consumed operation, routed inline through
      this capability's consumes block.
    tools:
    - name: vtex-get-list-roles
      description: VTex Get list of roles
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: license-manager-roles.getlistroles
      with:
        numItems: tools.numItems
        pageNumber: tools.pageNumber
        sort: tools.sort
        sortType: tools.sortType
      outputParameters:
      - type: object
        mapping: $.
    - name: vtex-add-roles-user-appkey
      description: VTex Add roles to user or appKey
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: license-manager-roles.putrolesinuser
      with:
        userId: tools.userId
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: vtex-get-roles-user-appkey
      description: VTex Get roles by user or appKey
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: license-manager-roles.getrolesbyuser
      with:
        userId: tools.userId
      outputParameters:
      - type: object
        mapping: $.
    - name: vtex-remove-role-user-appkey
      description: VTex Remove role from user or appKey
      hints:
        readOnly: false
        destructive: true
        idempotent: true
      call: license-manager-roles.removerolefromuser
      with:
        userId: tools.userId
        roleId: tools.roleId
      outputParameters:
      - type: object
        mapping: $.