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

# Status das sincronizações

> Retorna o último evento de sincronização por fonte de dados. Requer role admin ou go:admin.



## OpenAPI

````yaml https://raw.githubusercontent.com/prefeitura-rio/app-catalogo/refs/heads/main/docs/openapi-v3.json get /api/v1/admin/sync/status
openapi: 3.0.0
info:
  description: >-
    Discovery layer unificada da Prefeitura do Rio de Janeiro. Indexa serviços
    públicos, cursos, vagas e oportunidades MEI com busca full-text e
    recomendação personalizada por perfil de cidadão.
  title: app-catalogo
  contact:
    name: Prefeitura do Rio de Janeiro
    url: https://github.com/prefeitura-rio/app-catalogo
  version: '1.0'
servers:
  - url: https://services.staging.app.dados.rio/catalogo
    description: Staging
  - url: https://services.pref.rio/catalogo
    description: Produção
security: []
paths:
  /api/v1/admin/sync/status:
    get:
      tags:
        - admin
      summary: Status das sincronizações
      description: >-
        Retorna o último evento de sincronização por fonte de dados. Requer role
        admin ou go:admin.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                additionalProperties:
                  type: array
                  items:
                    $ref: '#/components/schemas/models.SyncStatus'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                additionalProperties:
                  type: string
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                additionalProperties:
                  type: string
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                additionalProperties:
                  type: string
      security:
        - BearerAuth: []
components:
  schemas:
    models.SyncStatus:
      type: object
      properties:
        error_message:
          type: string
        items_failed:
          type: integer
        items_processed:
          type: integer
        last_completed_at:
          type: string
        last_event_type:
          $ref: '#/components/schemas/models.SyncEventType'
        last_started_at:
          type: string
        last_status:
          $ref: '#/components/schemas/models.SyncEventStatus'
        source:
          $ref: '#/components/schemas/models.ItemSource'
    models.SyncEventType:
      type: string
      enum:
        - full_sync
        - delta_sync
        - webhook
      x-enum-varnames:
        - SyncTypeFullSync
        - SyncTypeDeltaSync
        - SyncTypeWebhook
    models.SyncEventStatus:
      type: string
      enum:
        - started
        - completed
        - failed
      x-enum-varnames:
        - SyncStatusStarted
        - SyncStatusCompleted
        - SyncStatusFailed
    models.ItemSource:
      type: string
      enum:
        - salesforce
        - courses
        - jobs
        - mei
        - app-go-api
        - typesense
      x-enum-comments:
        SourceAppGoAPI: 'fonte composta: courses + jobs + mei'
        SourceTypesense: 'temporário: Carta de Serviços até migração para SalesForce'
      x-enum-descriptions:
        - ''
        - ''
        - ''
        - ''
        - 'fonte composta: courses + jobs + mei'
        - 'temporário: Carta de Serviços até migração para SalesForce'
      x-enum-varnames:
        - SourceSalesForce
        - SourceCourses
        - SourceJobs
        - SourceMEI
        - SourceAppGoAPI
        - SourceTypesense
  securitySchemes:
    BearerAuth:
      description: JWT injetado pelo Istio via header X-Auth-Request-Token
      type: apiKey
      name: Authorization
      in: header

````