TOSIT-IO / tdp-server

REST API for tdp-lib orchestration
2 stars 2 forks source link

Canonical deploy logs endpoints return too many infos #119

Open PaulFarault opened 1 year ago

PaulFarault commented 1 year ago

As stated in #118 for services, canonical logs endpoint return too many infos.

GET /api/v1/deploy/ endpoint
// `DeploymentLogWithOperations` schema:
[
  {
    id: string
-   sources: [ string ]
-   targets: [ string ]
    start_time: string
    end_time: string
-   restart: boolean
    state: enum
-   operations: [ operationId: string ]
    user: string
  }
]
GET /api/v1/deploy/{deployment_id} endpoint
//  `DeploymentLogWithOperations` schema:
{
  id: string
  sources: [ string ]
  targets: [ string ]
  start_time: string
  end_time: string
  restart: boolean
  state: enum
  operations: [
    operation: string
    start_time: string
    end_time: string
    state: enum
-   logs: string // big string
  ]
  user: string
}

GET /api/v1/deploy/{deployment_id}/operation/{operation} endpoint

Actual schema seems ok:

// `OperationLog` schema:
{
  operation: string
  start_time: string
  end_time: string
  state: enum
  logs: string // big string
}