Cloudmigration: swagger for the cloudmigration api (#85255)

* swagger for create token

* tried to fix errors

* update swagger annotations

* update swagger annotations

* update api GetMigrationList to return the *Response directly

* clean up previous commit

---------

Co-authored-by: joshhunt <josh@trtr.co>
This commit is contained in:
Leonard Gram
2024-04-02 13:57:42 +02:00
committed by GitHub
parent bc77745da6
commit 4e89267603
5 changed files with 1077 additions and 1 deletions

View File

@@ -51,6 +51,15 @@ func (cma *CloudMigrationAPI) registerEndpoints() {
}, middleware.ReqGrafanaAdmin)
}
// swagger:route POST /cloudmigration/token migrations createCloudMigrationToken
//
// Create gcom access token.
//
// Responses:
// 200: cloudMigrationCreateTokenResponse
// 401: unauthorisedError
// 403: forbiddenError
// 500: internalServerError
func (cma *CloudMigrationAPI) CreateToken(c *contextmodel.ReqContext) response.Response {
ctx, span := cma.tracer.Start(c.Req.Context(), "MigrationAPI.CreateAccessToken")
defer span.End()
@@ -66,14 +75,35 @@ func (cma *CloudMigrationAPI) CreateToken(c *contextmodel.ReqContext) response.R
return response.JSON(http.StatusOK, cloudmigration.CreateAccessTokenResponseDTO(resp))
}
// swagger:route GET /cloudmigration/migration migrations getMigrationList
//
// Get a list of all cloud migrations.
//
// Responses:
// 200: cloudMigrationListResponse
// 401: unauthorisedError
// 403: forbiddenError
// 500: internalServerError
func (cma *CloudMigrationAPI) GetMigrationList(c *contextmodel.ReqContext) response.Response {
cloudMigrations, err := cma.cloudMigrationsService.GetMigrationList(c.Req.Context())
if err != nil {
return response.Error(http.StatusInternalServerError, "migration list error", err)
}
return response.JSON(http.StatusOK, cloudMigrations)
}
// swagger:route GET /cloudmigration/migration/{id} migrations getCloudMigration
//
// Get a cloud migration.
//
// It returns migrations that has been created.
//
// Responses:
// 200: cloudMigrationResponse
// 401: unauthorisedError
// 403: forbiddenError
// 500: internalServerError
func (cma *CloudMigrationAPI) GetMigration(c *contextmodel.ReqContext) response.Response {
id, err := strconv.ParseInt(web.Params(c.Req)[":id"], 10, 64)
if err != nil {
@@ -86,6 +116,23 @@ func (cma *CloudMigrationAPI) GetMigration(c *contextmodel.ReqContext) response.
return response.JSON(http.StatusOK, cloudMigration)
}
// swagger:parameters getCloudMigration
type GetCloudMigrationRequest struct {
// ID of an migration
//
// in: path
ID int64 `json:"id"`
}
// swagger:route POST /cloudmigration/migration migrations createMigration
//
// Create a migration.
//
// Responses:
// 200: cloudMigrationResponse
// 401: unauthorisedError
// 403: forbiddenError
// 500: internalServerError
func (cma *CloudMigrationAPI) CreateMigration(c *contextmodel.ReqContext) response.Response {
cmd := cloudmigration.CloudMigrationRequest{}
if err := web.Bind(c.Req, &cmd); err != nil {
@@ -98,6 +145,17 @@ func (cma *CloudMigrationAPI) CreateMigration(c *contextmodel.ReqContext) respon
return response.JSON(http.StatusOK, cloudMigration)
}
// swagger:route GET /cloudmigration/migration/{id}/run migrations runCloudMigration
//
// Trigger the run of a migration to the Grafana Cloud.
//
// It returns migrations that has been created.
//
// Responses:
// 200: cloudMigrationRunResponse
// 401: unauthorisedError
// 403: forbiddenError
// 500: internalServerError
func (cma *CloudMigrationAPI) RunMigration(c *contextmodel.ReqContext) response.Response {
cloudMigrationRun, err := cma.cloudMigrationsService.RunMigration(c.Req.Context(), web.Params(c.Req)[":id"])
if err != nil {
@@ -106,6 +164,23 @@ func (cma *CloudMigrationAPI) RunMigration(c *contextmodel.ReqContext) response.
return response.JSON(http.StatusOK, cloudMigrationRun)
}
// swagger:parameters runCloudMigration
type RunCloudMigrationRequest struct {
// ID of an migration
//
// in: path
ID int64 `json:"id"`
}
// swagger:route GET /cloudmigration/migration/{id}/run/{runID} migrations getCloudMigrationRun
//
// Get the result of a single migration run.
//
// Responses:
// 200: cloudMigrationRunResponse
// 401: unauthorisedError
// 403: forbiddenError
// 500: internalServerError
func (cma *CloudMigrationAPI) GetMigrationRun(c *contextmodel.ReqContext) response.Response {
migrationStatus, err := cma.cloudMigrationsService.GetMigrationStatus(c.Req.Context(), web.Params(c.Req)[":id"], web.Params(c.Req)[":runID"])
if err != nil {
@@ -114,14 +189,55 @@ func (cma *CloudMigrationAPI) GetMigrationRun(c *contextmodel.ReqContext) respon
return response.JSON(http.StatusOK, migrationStatus)
}
// swagger:parameters getCloudMigrationRun
type GetMigrationRunParams struct {
// ID of an migration
//
// in: path
ID int64 `json:"id"`
// Run ID of a migration run
//
// in: path
RunID int64 `json:"runID"`
}
// swagger:route GET /cloudmigration/migration/{id}/run migrations getCloudMigrationRunList
//
// Get a list of migration runs for a migration.
//
// Responses:
// 200: cloudMigrationRunListResponse
// 401: unauthorisedError
// 403: forbiddenError
// 500: internalServerError
func (cma *CloudMigrationAPI) GetMigrationRunList(c *contextmodel.ReqContext) response.Response {
migrationStatus, err := cma.cloudMigrationsService.GetMigrationStatusList(c.Req.Context(), web.Params(c.Req)[":id"])
if err != nil {
return response.Error(http.StatusInternalServerError, "migration status error", err)
}
return response.JSON(http.StatusOK, migrationStatus)
runList := cloudmigration.CloudMigrationRunList{Runs: migrationStatus}
return response.JSON(http.StatusOK, runList)
}
// swagger:parameters getCloudMigrationRunList
type GetCloudMigrationRunList struct {
// ID of an migration
//
// in: path
ID int64 `json:"id"`
}
// swagger:route DELETE /cloudmigration/migration/{id} migrations deleteCloudMigration
//
// Delete a migration.
//
// Responses:
// 200
// 401: unauthorisedError
// 403: forbiddenError
// 500: internalServerError
func (cma *CloudMigrationAPI) DeleteMigration(c *contextmodel.ReqContext) response.Response {
err := cma.cloudMigrationsService.DeleteMigration(c.Req.Context(), web.Params(c.Req)[":id"])
if err != nil {
@@ -129,3 +245,41 @@ func (cma *CloudMigrationAPI) DeleteMigration(c *contextmodel.ReqContext) respon
}
return response.Empty(http.StatusOK)
}
// swagger:parameters deleteCloudMigration
type DeleteMigrationRequest struct {
// ID of an migration
//
// in: path
ID int64 `json:"id"`
}
// swagger:response cloudMigrationRunResponse
type CloudMigrationRunResponse struct {
// in: body
Body cloudmigration.CloudMigrationRun
}
// swagger:response cloudMigrationListResponse
type CloudMigrationListResponse struct {
// in: body
Body cloudmigration.CloudMigrationListResponse
}
// swagger:response cloudMigrationResponse
type CloudMigrationResponse struct {
// in: body
Body cloudmigration.CloudMigrationResponse
}
// swagger:response cloudMigrationRunListResponse
type CloudMigrationRunListResponse struct {
// in: body
Body cloudmigration.CloudMigrationRunList
}
// swagger:response cloudMigrationCreateTokenResponse
type CloudMigrationCreateTokenResponse struct {
// in: body
Body cloudmigration.CreateAccessTokenResponseDTO
}

View File

@@ -50,6 +50,11 @@ type CloudMigrationRun struct {
Finished time.Time `json:"finished"`
}
type CloudMigrationRunList struct {
Runs []CloudMigrationRun `json:"runs"`
}
// swagger:parameters createMigration
type CloudMigrationRequest struct {
AuthToken string `json:"authToken"`
}

View File

@@ -2765,6 +2765,81 @@
}
}
},
"CloudMigrationListResponse": {
"type": "object",
"properties": {
"migrations": {
"type": "array",
"items": {
"$ref": "#/definitions/CloudMigrationResponse"
}
}
}
},
"CloudMigrationResponse": {
"type": "object",
"properties": {
"created": {
"type": "string",
"format": "date-time"
},
"id": {
"type": "integer",
"format": "int64"
},
"stack": {
"type": "string"
},
"updated": {
"type": "string",
"format": "date-time"
}
}
},
"CloudMigrationRun": {
"type": "object",
"properties": {
"created": {
"type": "string",
"format": "date-time"
},
"finished": {
"type": "string",
"format": "date-time"
},
"id": {
"type": "integer",
"format": "int64"
},
"items": {
"type": "array",
"items": {
"$ref": "#/definitions/MigratedResource"
}
},
"result": {
"$ref": "#/definitions/MigrationResult"
},
"uid": {
"type": "string"
},
"updated": {
"type": "string",
"format": "date-time"
}
}
},
"CloudMigrationRunList": {
"type": "object",
"properties": {
"runs": {
"type": "array",
"items": {
"$ref": "#/definitions/CloudMigrationRun"
}
}
}
},
"ConfFloat64": {
"description": "ConfFloat64 is a float64. It Marshals float64 values of NaN of Inf\nto null.",
"type": "number",
@@ -2907,6 +2982,14 @@
}
}
},
"CreateAccessTokenResponseDTO": {
"type": "object",
"properties": {
"token": {
"type": "string"
}
}
},
"CreateCorrelationCommand": {
"description": "CreateCorrelationCommand is the command for creating a correlation",
"type": "object",
@@ -4826,6 +4909,48 @@
}
}
},
"MigratedResource": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"refID": {
"type": "string"
},
"result": {
"$ref": "#/definitions/MigratedResourceResult"
},
"type": {
"type": "string"
}
}
},
"MigratedResourceResult": {
"type": "object",
"properties": {
"message": {
"type": "string"
},
"status": {
"type": "string"
}
}
},
"MigrationResult": {
"type": "object",
"properties": {
"message": {
"type": "string"
},
"status": {
"type": "string"
}
}
},
"MoveFolderCommand": {
"description": "MoveFolderCommand captures the information required by the folder service\nto move a folder.",
"type": "object",
@@ -7789,6 +7914,36 @@
}
}
},
"cloudMigrationCreateTokenResponse": {
"description": "",
"schema": {
"$ref": "#/definitions/CreateAccessTokenResponseDTO"
}
},
"cloudMigrationListResponse": {
"description": "",
"schema": {
"$ref": "#/definitions/CloudMigrationListResponse"
}
},
"cloudMigrationResponse": {
"description": "",
"schema": {
"$ref": "#/definitions/CloudMigrationResponse"
}
},
"cloudMigrationRunListResponse": {
"description": "",
"schema": {
"$ref": "#/definitions/CloudMigrationRunList"
}
},
"cloudMigrationRunResponse": {
"description": "",
"schema": {
"$ref": "#/definitions/CloudMigrationRun"
}
},
"conflictError": {
"description": "ConflictError",
"schema": {

View File

@@ -2289,6 +2289,216 @@
}
}
},
"/cloudmigration/migration": {
"get": {
"tags": [
"migrations"
],
"summary": "Get a list of all cloud migrations.",
"operationId": "getMigrationList",
"responses": {
"200": {
"$ref": "#/responses/cloudMigrationListResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
},
"post": {
"tags": [
"migrations"
],
"summary": "Create a migration.",
"operationId": "createMigration",
"parameters": [
{
"type": "string",
"name": "authToken",
"in": "query"
}
],
"responses": {
"200": {
"$ref": "#/responses/cloudMigrationResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/cloudmigration/migration/{id}": {
"get": {
"description": "It returns migrations that has been created.",
"tags": [
"migrations"
],
"summary": "Get a cloud migration.",
"operationId": "getCloudMigration",
"parameters": [
{
"type": "integer",
"format": "int64",
"description": "ID of an migration",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/responses/cloudMigrationResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
},
"delete": {
"tags": [
"migrations"
],
"summary": "Delete a migration.",
"operationId": "deleteCloudMigration",
"parameters": [
{
"type": "integer",
"format": "int64",
"description": "ID of an migration",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/cloudmigration/migration/{id}/run": {
"get": {
"tags": [
"migrations"
],
"summary": "Get a list of migration runs for a migration.",
"operationId": "getCloudMigrationRunList",
"parameters": [
{
"type": "integer",
"format": "int64",
"description": "ID of an migration",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/responses/cloudMigrationRunListResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/cloudmigration/migration/{id}/run/{runID}": {
"get": {
"tags": [
"migrations"
],
"summary": "Get the result of a single migration run.",
"operationId": "getCloudMigrationRun",
"parameters": [
{
"type": "integer",
"format": "int64",
"description": "ID of an migration",
"name": "id",
"in": "path",
"required": true
},
{
"type": "integer",
"format": "int64",
"description": "Run ID of a migration run",
"name": "runID",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/responses/cloudMigrationRunResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/cloudmigration/token": {
"post": {
"tags": [
"migrations"
],
"summary": "Create gcom access token.",
"operationId": "createCloudMigrationToken",
"responses": {
"200": {
"$ref": "#/responses/cloudMigrationCreateTokenResponse"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/dashboard/snapshots": {
"get": {
"tags": [
@@ -12498,6 +12708,81 @@
}
}
},
"CloudMigrationListResponse": {
"type": "object",
"properties": {
"migrations": {
"type": "array",
"items": {
"$ref": "#/definitions/CloudMigrationResponse"
}
}
}
},
"CloudMigrationResponse": {
"type": "object",
"properties": {
"created": {
"type": "string",
"format": "date-time"
},
"id": {
"type": "integer",
"format": "int64"
},
"stack": {
"type": "string"
},
"updated": {
"type": "string",
"format": "date-time"
}
}
},
"CloudMigrationRun": {
"type": "object",
"properties": {
"created": {
"type": "string",
"format": "date-time"
},
"finished": {
"type": "string",
"format": "date-time"
},
"id": {
"type": "integer",
"format": "int64"
},
"items": {
"type": "array",
"items": {
"$ref": "#/definitions/MigratedResource"
}
},
"result": {
"$ref": "#/definitions/MigrationResult"
},
"uid": {
"type": "string"
},
"updated": {
"type": "string",
"format": "date-time"
}
}
},
"CloudMigrationRunList": {
"type": "object",
"properties": {
"runs": {
"type": "array",
"items": {
"$ref": "#/definitions/CloudMigrationRun"
}
}
}
},
"ConfFloat64": {
"description": "ConfFloat64 is a float64. It Marshals float64 values of NaN of Inf\nto null.",
"type": "number",
@@ -12708,6 +12993,14 @@
"format": "uint8",
"title": "CounterResetHint contains the known information about a counter reset,"
},
"CreateAccessTokenResponseDTO": {
"type": "object",
"properties": {
"token": {
"type": "string"
}
}
},
"CreateCorrelationCommand": {
"description": "CreateCorrelationCommand is the command for creating a correlation",
"type": "object",
@@ -15631,6 +15924,48 @@
}
}
},
"MigratedResource": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"refID": {
"type": "string"
},
"result": {
"$ref": "#/definitions/MigratedResourceResult"
},
"type": {
"type": "string"
}
}
},
"MigratedResourceResult": {
"type": "object",
"properties": {
"message": {
"type": "string"
},
"status": {
"type": "string"
}
}
},
"MigrationResult": {
"type": "object",
"properties": {
"message": {
"type": "string"
},
"status": {
"type": "string"
}
}
},
"MoveFolderCommand": {
"description": "MoveFolderCommand captures the information required by the folder service\nto move a folder.",
"type": "object",
@@ -21311,6 +21646,36 @@
}
}
},
"cloudMigrationCreateTokenResponse": {
"description": "(empty)",
"schema": {
"$ref": "#/definitions/CreateAccessTokenResponseDTO"
}
},
"cloudMigrationListResponse": {
"description": "(empty)",
"schema": {
"$ref": "#/definitions/CloudMigrationListResponse"
}
},
"cloudMigrationResponse": {
"description": "(empty)",
"schema": {
"$ref": "#/definitions/CloudMigrationResponse"
}
},
"cloudMigrationRunListResponse": {
"description": "(empty)",
"schema": {
"$ref": "#/definitions/CloudMigrationRunList"
}
},
"cloudMigrationRunResponse": {
"description": "(empty)",
"schema": {
"$ref": "#/definitions/CloudMigrationRun"
}
},
"conflictError": {
"description": "ConflictError",
"schema": {

View File

@@ -173,6 +173,56 @@
},
"description": "(empty)"
},
"cloudMigrationCreateTokenResponse": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CreateAccessTokenResponseDTO"
}
}
},
"description": "(empty)"
},
"cloudMigrationListResponse": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CloudMigrationListResponse"
}
}
},
"description": "(empty)"
},
"cloudMigrationResponse": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CloudMigrationResponse"
}
}
},
"description": "(empty)"
},
"cloudMigrationRunListResponse": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CloudMigrationRunList"
}
}
},
"description": "(empty)"
},
"cloudMigrationRunResponse": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CloudMigrationRun"
}
}
},
"description": "(empty)"
},
"conflictError": {
"content": {
"application/json": {
@@ -3471,6 +3521,81 @@
},
"type": "object"
},
"CloudMigrationListResponse": {
"properties": {
"migrations": {
"items": {
"$ref": "#/components/schemas/CloudMigrationResponse"
},
"type": "array"
}
},
"type": "object"
},
"CloudMigrationResponse": {
"properties": {
"created": {
"format": "date-time",
"type": "string"
},
"id": {
"format": "int64",
"type": "integer"
},
"stack": {
"type": "string"
},
"updated": {
"format": "date-time",
"type": "string"
}
},
"type": "object"
},
"CloudMigrationRun": {
"properties": {
"created": {
"format": "date-time",
"type": "string"
},
"finished": {
"format": "date-time",
"type": "string"
},
"id": {
"format": "int64",
"type": "integer"
},
"items": {
"items": {
"$ref": "#/components/schemas/MigratedResource"
},
"type": "array"
},
"result": {
"$ref": "#/components/schemas/MigrationResult"
},
"uid": {
"type": "string"
},
"updated": {
"format": "date-time",
"type": "string"
}
},
"type": "object"
},
"CloudMigrationRunList": {
"properties": {
"runs": {
"items": {
"$ref": "#/components/schemas/CloudMigrationRun"
},
"type": "array"
}
},
"type": "object"
},
"ConfFloat64": {
"description": "ConfFloat64 is a float64. It Marshals float64 values of NaN of Inf\nto null.",
"format": "double",
@@ -3681,6 +3806,14 @@
"title": "CounterResetHint contains the known information about a counter reset,",
"type": "integer"
},
"CreateAccessTokenResponseDTO": {
"properties": {
"token": {
"type": "string"
}
},
"type": "object"
},
"CreateCorrelationCommand": {
"description": "CreateCorrelationCommand is the command for creating a correlation",
"properties": {
@@ -6604,6 +6737,48 @@
],
"type": "object"
},
"MigratedResource": {
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"refID": {
"type": "string"
},
"result": {
"$ref": "#/components/schemas/MigratedResourceResult"
},
"type": {
"type": "string"
}
},
"type": "object"
},
"MigratedResourceResult": {
"properties": {
"message": {
"type": "string"
},
"status": {
"type": "string"
}
},
"type": "object"
},
"MigrationResult": {
"properties": {
"message": {
"type": "string"
},
"status": {
"type": "string"
}
},
"type": "object"
},
"MoveFolderCommand": {
"description": "MoveFolderCommand captures the information required by the folder service\nto move a folder.",
"properties": {
@@ -14643,6 +14818,228 @@
]
}
},
"/cloudmigration/migration": {
"get": {
"operationId": "getMigrationList",
"responses": {
"200": {
"$ref": "#/components/responses/cloudMigrationListResponse"
},
"401": {
"$ref": "#/components/responses/unauthorisedError"
},
"403": {
"$ref": "#/components/responses/forbiddenError"
},
"500": {
"$ref": "#/components/responses/internalServerError"
}
},
"summary": "Get a list of all cloud migrations.",
"tags": [
"migrations"
]
},
"post": {
"operationId": "createMigration",
"parameters": [
{
"in": "query",
"name": "authToken",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"$ref": "#/components/responses/cloudMigrationResponse"
},
"401": {
"$ref": "#/components/responses/unauthorisedError"
},
"403": {
"$ref": "#/components/responses/forbiddenError"
},
"500": {
"$ref": "#/components/responses/internalServerError"
}
},
"summary": "Create a migration.",
"tags": [
"migrations"
]
}
},
"/cloudmigration/migration/{id}": {
"delete": {
"operationId": "deleteCloudMigration",
"parameters": [
{
"description": "ID of an migration",
"in": "path",
"name": "id",
"required": true,
"schema": {
"format": "int64",
"type": "integer"
}
}
],
"responses": {
"401": {
"$ref": "#/components/responses/unauthorisedError"
},
"403": {
"$ref": "#/components/responses/forbiddenError"
},
"500": {
"$ref": "#/components/responses/internalServerError"
}
},
"summary": "Delete a migration.",
"tags": [
"migrations"
]
},
"get": {
"description": "It returns migrations that has been created.",
"operationId": "getCloudMigration",
"parameters": [
{
"description": "ID of an migration",
"in": "path",
"name": "id",
"required": true,
"schema": {
"format": "int64",
"type": "integer"
}
}
],
"responses": {
"200": {
"$ref": "#/components/responses/cloudMigrationResponse"
},
"401": {
"$ref": "#/components/responses/unauthorisedError"
},
"403": {
"$ref": "#/components/responses/forbiddenError"
},
"500": {
"$ref": "#/components/responses/internalServerError"
}
},
"summary": "Get a cloud migration.",
"tags": [
"migrations"
]
}
},
"/cloudmigration/migration/{id}/run": {
"get": {
"operationId": "getCloudMigrationRunList",
"parameters": [
{
"description": "ID of an migration",
"in": "path",
"name": "id",
"required": true,
"schema": {
"format": "int64",
"type": "integer"
}
}
],
"responses": {
"200": {
"$ref": "#/components/responses/cloudMigrationRunListResponse"
},
"401": {
"$ref": "#/components/responses/unauthorisedError"
},
"403": {
"$ref": "#/components/responses/forbiddenError"
},
"500": {
"$ref": "#/components/responses/internalServerError"
}
},
"summary": "Get a list of migration runs for a migration.",
"tags": [
"migrations"
]
}
},
"/cloudmigration/migration/{id}/run/{runID}": {
"get": {
"operationId": "getCloudMigrationRun",
"parameters": [
{
"description": "ID of an migration",
"in": "path",
"name": "id",
"required": true,
"schema": {
"format": "int64",
"type": "integer"
}
},
{
"description": "Run ID of a migration run",
"in": "path",
"name": "runID",
"required": true,
"schema": {
"format": "int64",
"type": "integer"
}
}
],
"responses": {
"200": {
"$ref": "#/components/responses/cloudMigrationRunResponse"
},
"401": {
"$ref": "#/components/responses/unauthorisedError"
},
"403": {
"$ref": "#/components/responses/forbiddenError"
},
"500": {
"$ref": "#/components/responses/internalServerError"
}
},
"summary": "Get the result of a single migration run.",
"tags": [
"migrations"
]
}
},
"/cloudmigration/token": {
"post": {
"operationId": "createCloudMigrationToken",
"responses": {
"200": {
"$ref": "#/components/responses/cloudMigrationCreateTokenResponse"
},
"401": {
"$ref": "#/components/responses/unauthorisedError"
},
"403": {
"$ref": "#/components/responses/forbiddenError"
},
"500": {
"$ref": "#/components/responses/internalServerError"
}
},
"summary": "Create gcom access token.",
"tags": [
"migrations"
]
}
},
"/dashboard/snapshots": {
"get": {
"operationId": "searchDashboardSnapshots",