140 lines
4.0 KiB
YAML
140 lines
4.0 KiB
YAML
Acessar usuário por ID
|
|
---
|
|
tags:
|
|
- Users
|
|
summary: Este endpoint permite recuperar todas as informações relacionadas a um usuário específico, incluindo seus dados pessoais, permissões, contatos, endereços e licenças.
|
|
parameters:
|
|
- name: user_id
|
|
in: path
|
|
required: true
|
|
type: integer
|
|
description: O ID do usuário cujas informações serão recuperadas.
|
|
responses:
|
|
200:
|
|
description: Dados do usuário recuperados com sucesso
|
|
schema:
|
|
type: object
|
|
properties:
|
|
user:
|
|
type: object
|
|
properties:
|
|
id:
|
|
type: integer
|
|
username:
|
|
type: string
|
|
email:
|
|
type: string
|
|
licenses:
|
|
type: array
|
|
items:
|
|
type: object
|
|
properties:
|
|
license_key:
|
|
type: string
|
|
service_id:
|
|
type: integer
|
|
service_name:
|
|
type: string
|
|
start_date:
|
|
type: string
|
|
format: date-time
|
|
end_date:
|
|
type: string
|
|
format: date-time
|
|
permissions:
|
|
type: array
|
|
items:
|
|
type: object
|
|
properties:
|
|
service_role_id:
|
|
type: integer
|
|
service_role_name:
|
|
type: string
|
|
service_instance_id:
|
|
type: integer
|
|
service_instance_name:
|
|
type: string
|
|
permissions:
|
|
type: array
|
|
items:
|
|
type: object
|
|
properties:
|
|
id:
|
|
type: integer
|
|
type:
|
|
type: string
|
|
contacts:
|
|
type: array
|
|
items:
|
|
type: object
|
|
properties:
|
|
phone:
|
|
type: integer
|
|
contact_type:
|
|
type: string
|
|
description:
|
|
type: string
|
|
addresses:
|
|
type: array
|
|
items:
|
|
type: object
|
|
properties:
|
|
street:
|
|
type: string
|
|
city:
|
|
type: string
|
|
state:
|
|
type: string
|
|
zip_code:
|
|
type: string
|
|
country:
|
|
type: string
|
|
type:
|
|
type: string
|
|
examples:
|
|
application/json:
|
|
user:
|
|
id: 1
|
|
username: "admin"
|
|
email: "admin@example.com"
|
|
licenses:
|
|
- license_key: "ABC123"
|
|
service_id: 1
|
|
service_name: "Service A"
|
|
start_date: "2024-01-01T00:00:00Z"
|
|
end_date: "2025-01-01T00:00:00Z"
|
|
permissions:
|
|
- service_role_id: 1
|
|
service_role_name: "Admin"
|
|
service_instance_id: 1
|
|
service_instance_name: "Instance A"
|
|
permissions:
|
|
- id: 1
|
|
type: "read"
|
|
- id: 2
|
|
type: "write"
|
|
contacts:
|
|
- phone: 123456789
|
|
contact_type: "pessoal"
|
|
description: "Maria"
|
|
- phone: 987654321
|
|
contact_type: "comercial"
|
|
description: "João"
|
|
addresses:
|
|
- street: "Rua Exemplo"
|
|
city: "Cidade"
|
|
state: "Estado"
|
|
zip_code: "12345"
|
|
country: "Brasil"
|
|
type: "residencial"
|
|
404:
|
|
description: Usuário não encontrado
|
|
schema:
|
|
type: object
|
|
properties:
|
|
msg:
|
|
type: string
|
|
examples:
|
|
application/json:
|
|
msg: "Usuário não encontrado"
|