Cyclops 4 HPC is the purpose built stack to support large HPC centers with resource accounting and billing of cluster as well as cloud resources.
 
 
cyclops-4-hpc/services/eventsengine/restapi/embedded_spec.go

1696 lines
40 KiB

// Code generated by go-swagger; DO NOT EDIT.
package restapi
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"encoding/json"
)
var (
// SwaggerJSON embedded version of the swagger document used at generation time
SwaggerJSON json.RawMessage
// FlatSwaggerJSON embedded flattened version of the swagger document used at generation time
FlatSwaggerJSON json.RawMessage
)
func init() {
SwaggerJSON = json.RawMessage([]byte(`{
"schemes": [
"http",
"https"
],
"swagger": "2.0",
"info": {
"description": "An API which supports creation, deletion, listing etc of Event Engine",
"title": "Event Engine Management API",
"contact": {
"email": "diego@cyclops-labs.io"
},
"license": {
"name": "Apache 2.0",
"url": "http://www.apache.org/licenses/LICENSE-2.0.html"
},
"version": "1.0.0"
},
"host": "localhost:8000",
"basePath": "/api/v1.0",
"paths": {
"/event": {
"post": {
"security": [
{
"Keycloak": [
"admin"
]
},
{
"APIKeyHeader": []
},
{
"APIKeyParam": []
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"eventManagement"
],
"summary": "Takes into the system the provided event",
"operationId": "addEvent",
"parameters": [
{
"description": "Event to be added to the system",
"name": "event",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/Event"
}
}
],
"responses": {
"201": {
"description": "Item added successfully",
"schema": {
"$ref": "#/definitions/ItemCreatedResponse"
}
},
"400": {
"description": "Invalid input, object invalid"
},
"500": {
"description": "Something unexpected happend, error raised",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
}
}
},
"/event/history/{account}": {
"get": {
"security": [
{
"Keycloak": [
"user"
]
},
{
"APIKeyHeader": []
},
{
"APIKeyParam": []
}
],
"produces": [
"application/json"
],
"tags": [
"eventManagement"
],
"summary": "Provides the events for the id provided",
"operationId": "getHistory",
"parameters": [
{
"type": "string",
"description": "Id of the account to be checked",
"name": "account",
"in": "path",
"required": true
},
{
"type": "integer",
"description": "Datetime from which to get the usage report",
"name": "from",
"in": "query"
},
{
"type": "integer",
"description": "Datetime until which to get the usage report",
"name": "to",
"in": "query"
},
{
"type": "string",
"description": "Resource type to filter the usage",
"name": "resource",
"in": "query"
},
{
"type": "string",
"description": "Resource region to filter the usage",
"name": "region",
"in": "query"
}
],
"responses": {
"200": {
"description": "Description of a successfully operation",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/Event"
}
}
},
"404": {
"description": "Item not found in the system",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
},
"500": {
"description": "Something unexpected happend, error raised",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
}
}
},
"/event/status": {
"get": {
"security": [
{
"Keycloak": [
"user"
]
},
{
"APIKeyHeader": []
},
{
"APIKeyParam": []
}
],
"produces": [
"application/json"
],
"tags": [
"eventManagement"
],
"summary": "Provides the list of states in not terminated state",
"operationId": "listStates",
"parameters": [
{
"type": "string",
"description": "Resource type to filter the usage",
"name": "resource",
"in": "query"
},
{
"type": "string",
"description": "Resource region to filter the usage",
"name": "region",
"in": "query"
}
],
"responses": {
"200": {
"description": "Description of a successfully operation",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/MinimalState"
}
}
},
"500": {
"description": "Something unexpected happend, error raised",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
}
}
},
"/event/status/{account}": {
"get": {
"security": [
{
"Keycloak": [
"user"
]
},
{
"APIKeyHeader": []
},
{
"APIKeyParam": []
}
],
"produces": [
"application/json"
],
"tags": [
"eventManagement"
],
"summary": "Provides the events for the id provided",
"operationId": "getState",
"parameters": [
{
"type": "string",
"description": "Id of the account to be checked",
"name": "account",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "Description of a successfully operation",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/State"
}
}
},
"404": {
"description": "Item not found in the system",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
},
"500": {
"description": "Something unexpected happend, error raised",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
}
}
},
"/status": {
"get": {
"security": [
{
"Keycloak": [
"user"
]
},
{
"APIKeyHeader": []
},
{
"APIKeyParam": []
}
],
"produces": [
"application/json"
],
"tags": [
"statusManagement"
],
"summary": "Basic status of the system",
"operationId": "showStatus",
"responses": {
"200": {
"description": "Status information of the system",
"schema": {
"$ref": "#/definitions/Status"
}
},
"500": {
"description": "Something unexpected happend, error raised",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
}
}
},
"/status/{id}": {
"get": {
"security": [
{
"Keycloak": [
"user"
]
},
{
"APIKeyHeader": []
},
{
"APIKeyParam": []
}
],
"produces": [
"application/json"
],
"tags": [
"statusManagement"
],
"summary": "Basic status of the system",
"operationId": "getStatus",
"parameters": [
{
"enum": [
"status",
"kafka-receiver",
"kafka-sender",
"trigger",
"usage",
"event"
],
"type": "string",
"description": "Id of the endpoint to be checked",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "Status information of the system",
"schema": {
"$ref": "#/definitions/Status"
}
},
"404": {
"description": "The endpoint provided doesn't exist",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
}
}
},
"/trigger/sample": {
"get": {
"security": [
{
"Keycloak": [
"user"
]
},
{
"APIKeyHeader": []
},
{
"APIKeyParam": []
}
],
"produces": [
"application/json"
],
"tags": [
"triggerManagement"
],
"summary": "Sample task trigger",
"operationId": "execSample",
"responses": {
"200": {
"description": "Sample task executed successfully"
},
"500": {
"description": "Something unexpected happend, error raised",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
}
}
},
"/usage": {
"get": {
"security": [
{
"Keycloak": [
"user"
]
},
{
"APIKeyHeader": []
},
{
"APIKeyParam": []
}
],
"produces": [
"application/json"
],
"tags": [
"usageManagement"
],
"summary": "Generates an aggregated response by account of the usage recorded in the system during the time-window specified",
"operationId": "getSystemUsage",
"parameters": [
{
"type": "integer",
"description": "Datetime from which to get the usage report",
"name": "from",
"in": "query"
},
{
"type": "integer",
"description": "Datetime until which to get the usage report",
"name": "to",
"in": "query"
},
{
"type": "string",
"description": "Resource type to filter the usage",
"name": "resource",
"in": "query"
},
{
"type": "string",
"description": "Resource region to filter the usage",
"name": "region",
"in": "query"
}
],
"responses": {
"200": {
"description": "Description of a successfully operation",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/Usage"
}
}
},
"500": {
"description": "Something unexpected happend, error raised",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
}
}
},
"/usage/{id}": {
"get": {
"security": [
{
"Keycloak": [
"user"
]
},
{
"APIKeyHeader": []
},
{
"APIKeyParam": []
}
],
"produces": [
"application/json"
],
"tags": [
"usageManagement"
],
"summary": "Generates an aggregated response of the usage recorded in the system during the time-window specified for the selected account",
"operationId": "getUsage",
"parameters": [
{
"type": "string",
"description": "Id of the account to be checked",
"name": "id",
"in": "path",
"required": true
},
{
"type": "integer",
"description": "Datetime from which to get the usage report",
"name": "from",
"in": "query"
},
{
"type": "integer",
"description": "Datetime until which to get the usage report",
"name": "to",
"in": "query"
},
{
"type": "string",
"description": "Resource type to filter the usage",
"name": "resource",
"in": "query"
},
{
"type": "string",
"description": "Resource region to filter the usage",
"name": "region",
"in": "query"
}
],
"responses": {
"200": {
"description": "Description of a successfully operation",
"schema": {
"$ref": "#/definitions/Usage"
}
},
"404": {
"description": "Item not found in the system",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
},
"500": {
"description": "Something unexpected happend, error raised",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
}
}
}
},
"definitions": {
"ErrorResponse": {
"type": "object",
"required": [
"errorString"
],
"properties": {
"errorString": {
"type": "string"
}
}
},
"Event": {
"type": "object",
"required": [
"EventTime",
"LastEvent"
],
"properties": {
"Account": {
"type": "string",
"x-go-custom-tag": "gorm:\"index\""
},
"EventTime": {
"type": "integer"
},
"ID": {
"type": "integer",
"x-go-custom-tag": "gorm:\"primary_key;auto_increment\""
},
"LastEvent": {
"type": "string",
"enum": [
"active",
"error",
"inactive",
"terminated",
"suspended"
]
},
"MetaData": {
"x-go-custom-tag": "gorm:\"type:jsonb\"",
"$ref": "#/definitions/Metadata"
},
"Region": {
"type": "string"
},
"ResourceId": {
"type": "string"
},
"ResourceName": {
"type": "string"
},
"ResourceType": {
"type": "string"
},
"TimeFrom": {
"type": "integer",
"x-go-custom-tag": "gorm:\"index\""
},
"TimeTo": {
"type": "integer",
"x-go-custom-tag": "gorm:\"index\""
}
}
},
"ItemCreatedResponse": {
"properties": {
"ApiLink": {
"type": "string"
},
"Message": {
"type": "string"
}
}
},
"Metadata": {
"type": "object",
"x-go-type": {
"import": {
"package": "gitlab.com/cyclops-utilities/datamodels"
},
"type": "JSONdb"
}
},
"MinimalState": {
"type": "object",
"properties": {
"Account": {
"type": "string"
},
"MetaData": {
"x-go-custom-tag": "gorm:\"type:jsonb\"",
"$ref": "#/definitions/Metadata"
},
"ResourceId": {
"type": "string"
},
"ResourceName": {
"type": "string"
}
}
},
"State": {
"type": "object",
"required": [
"EventTime",
"LastEvent"
],
"properties": {
"Account": {
"type": "string",
"x-go-custom-tag": "gorm:\"index\""
},
"EventTime": {
"type": "integer"
},
"ID": {
"type": "integer",
"x-go-custom-tag": "gorm:\"primary_key;auto_increment\""
},
"LastEvent": {
"type": "string",
"enum": [
"active",
"error",
"inactive",
"terminated",
"suspended"
]
},
"MetaData": {
"x-go-custom-tag": "gorm:\"type:jsonb\"",
"$ref": "#/definitions/Metadata"
},
"Region": {
"type": "string"
},
"ResourceId": {
"type": "string"
},
"ResourceName": {
"type": "string"
},
"ResourceType": {
"type": "string"
},
"TimeFrom": {
"type": "integer",
"x-go-custom-tag": "gorm:\"index\""
},
"TimeTo": {
"type": "integer",
"x-go-custom-tag": "gorm:\"index\""
}
}
},
"Status": {
"type": "object",
"required": [
"SystemState"
],
"properties": {
"AverageResponseTime": {
"type": "number",
"format": "double"
},
"DBState": {
"type": "string"
},
"LastRequest": {
"type": "string"
},
"RequestsBoT": {
"type": "integer"
},
"RequestsLastHour": {
"type": "integer"
},
"RequestsToday": {
"type": "integer"
},
"SystemState": {
"type": "string"
}
}
},
"Usage": {
"type": "object",
"properties": {
"AccountId": {
"type": "string"
},
"TimeFrom": {
"type": "integer"
},
"TimeTo": {
"type": "integer"
},
"Usage": {
"type": "array",
"items": {
"$ref": "#/definitions/Use"
}
}
}
},
"Use": {
"type": "object",
"properties": {
"MetaData": {
"$ref": "#/definitions/Metadata"
},
"Region": {
"type": "string"
},
"ResourceId": {
"type": "string"
},
"ResourceName": {
"type": "string"
},
"ResourceType": {
"type": "string"
},
"Unit": {
"type": "string"
},
"UsageBreakup": {
"$ref": "#/definitions/Metadata"
}
}
}
},
"securityDefinitions": {
"APIKeyHeader": {
"type": "apiKey",
"name": "X-API-KEY",
"in": "header"
},
"APIKeyParam": {
"type": "apiKey",
"name": "api_key",
"in": "query"
},
"Keycloak": {
"type": "oauth2",
"flow": "accessCode",
"authorizationUrl": "http://localhost:8080/auth/realms/Dev/protocol/openid-connect/auth",
"tokenUrl": "http://localhost:8080/auth/realms/Dev/protocol/openid-connect/token",
"scopes": {
"admin": "Admin scope",
"user": "User scope"
}
}
},
"security": [
{
"Keycloak": [
"user",
"admin"
]
},
{
"APIKeyHeader": []
},
{
"APIKeyParam": []
}
],
"tags": [
{
"description": "Actions relating to the reporting of the state of the service",
"name": "statusManagement"
},
{
"description": "Actions relating to the periodics actions to be triggered in the system",
"name": "triggerManagement"
},
{
"description": "Actions relating to the adquisition of events in the system",
"name": "eventManagement"
},
{
"description": "Actions relating to the reporting of the usages in the system",
"name": "usageManagement"
}
]
}`))
FlatSwaggerJSON = json.RawMessage([]byte(`{
"schemes": [
"http",
"https"
],
"swagger": "2.0",
"info": {
"description": "An API which supports creation, deletion, listing etc of Event Engine",
"title": "Event Engine Management API",
"contact": {
"email": "diego@cyclops-labs.io"
},
"license": {
"name": "Apache 2.0",
"url": "http://www.apache.org/licenses/LICENSE-2.0.html"
},
"version": "1.0.0"
},
"host": "localhost:8000",
"basePath": "/api/v1.0",
"paths": {
"/event": {
"post": {
"security": [
{
"Keycloak": [
"admin"
]
},
{
"APIKeyHeader": []
},
{
"APIKeyParam": []
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"eventManagement"
],
"summary": "Takes into the system the provided event",
"operationId": "addEvent",
"parameters": [
{
"description": "Event to be added to the system",
"name": "event",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/Event"
}
}
],
"responses": {
"201": {
"description": "Item added successfully",
"schema": {
"$ref": "#/definitions/ItemCreatedResponse"
}
},
"400": {
"description": "Invalid input, object invalid"
},
"500": {
"description": "Something unexpected happend, error raised",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
}
}
},
"/event/history/{account}": {
"get": {
"security": [
{
"Keycloak": [
"user"
]
},
{
"APIKeyHeader": []
},
{
"APIKeyParam": []
}
],
"produces": [
"application/json"
],
"tags": [
"eventManagement"
],
"summary": "Provides the events for the id provided",
"operationId": "getHistory",
"parameters": [
{
"type": "string",
"description": "Id of the account to be checked",
"name": "account",
"in": "path",
"required": true
},
{
"type": "integer",
"description": "Datetime from which to get the usage report",
"name": "from",
"in": "query"
},
{
"type": "integer",
"description": "Datetime until which to get the usage report",
"name": "to",
"in": "query"
},
{
"type": "string",
"description": "Resource type to filter the usage",
"name": "resource",
"in": "query"
},
{
"type": "string",
"description": "Resource region to filter the usage",
"name": "region",
"in": "query"
}
],
"responses": {
"200": {
"description": "Description of a successfully operation",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/Event"
}
}
},
"404": {
"description": "Item not found in the system",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
},
"500": {
"description": "Something unexpected happend, error raised",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
}
}
},
"/event/status": {
"get": {
"security": [
{
"Keycloak": [
"user"
]
},
{
"APIKeyHeader": []
},
{
"APIKeyParam": []
}
],
"produces": [
"application/json"
],
"tags": [
"eventManagement"
],
"summary": "Provides the list of states in not terminated state",
"operationId": "listStates",
"parameters": [
{
"type": "string",
"description": "Resource type to filter the usage",
"name": "resource",
"in": "query"
},
{
"type": "string",
"description": "Resource region to filter the usage",
"name": "region",
"in": "query"
}
],
"responses": {
"200": {
"description": "Description of a successfully operation",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/MinimalState"
}
}
},
"500": {
"description": "Something unexpected happend, error raised",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
}
}
},
"/event/status/{account}": {
"get": {
"security": [
{
"Keycloak": [
"user"
]
},
{
"APIKeyHeader": []
},
{
"APIKeyParam": []
}
],
"produces": [
"application/json"
],
"tags": [
"eventManagement"
],
"summary": "Provides the events for the id provided",
"operationId": "getState",
"parameters": [
{
"type": "string",
"description": "Id of the account to be checked",
"name": "account",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "Description of a successfully operation",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/State"
}
}
},
"404": {
"description": "Item not found in the system",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
},
"500": {
"description": "Something unexpected happend, error raised",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
}
}
},
"/status": {
"get": {
"security": [
{
"Keycloak": [
"user"
]
},
{
"APIKeyHeader": []
},
{
"APIKeyParam": []
}
],
"produces": [
"application/json"
],
"tags": [
"statusManagement"
],
"summary": "Basic status of the system",
"operationId": "showStatus",
"responses": {
"200": {
"description": "Status information of the system",
"schema": {
"$ref": "#/definitions/Status"
}
},
"500": {
"description": "Something unexpected happend, error raised",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
}
}
},
"/status/{id}": {
"get": {
"security": [
{
"Keycloak": [
"user"
]
},
{
"APIKeyHeader": []
},
{
"APIKeyParam": []
}
],
"produces": [
"application/json"
],
"tags": [
"statusManagement"
],
"summary": "Basic status of the system",
"operationId": "getStatus",
"parameters": [
{
"enum": [
"status",
"kafka-receiver",
"kafka-sender",
"trigger",
"usage",
"event"
],
"type": "string",
"description": "Id of the endpoint to be checked",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "Status information of the system",
"schema": {
"$ref": "#/definitions/Status"
}
},
"404": {
"description": "The endpoint provided doesn't exist",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
}
}
},
"/trigger/sample": {
"get": {
"security": [
{
"Keycloak": [
"user"
]
},
{
"APIKeyHeader": []
},
{
"APIKeyParam": []
}
],
"produces": [
"application/json"
],
"tags": [
"triggerManagement"
],
"summary": "Sample task trigger",
"operationId": "execSample",
"responses": {
"200": {
"description": "Sample task executed successfully"
},
"500": {
"description": "Something unexpected happend, error raised",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
}
}
},
"/usage": {
"get": {
"security": [
{
"Keycloak": [
"user"
]
},
{
"APIKeyHeader": []
},
{
"APIKeyParam": []
}
],
"produces": [
"application/json"
],
"tags": [
"usageManagement"
],
"summary": "Generates an aggregated response by account of the usage recorded in the system during the time-window specified",
"operationId": "getSystemUsage",
"parameters": [
{
"type": "integer",
"description": "Datetime from which to get the usage report",
"name": "from",
"in": "query"
},
{
"type": "integer",
"description": "Datetime until which to get the usage report",
"name": "to",
"in": "query"
},
{
"type": "string",
"description": "Resource type to filter the usage",
"name": "resource",
"in": "query"
},
{
"type": "string",
"description": "Resource region to filter the usage",
"name": "region",
"in": "query"
}
],
"responses": {
"200": {
"description": "Description of a successfully operation",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/Usage"
}
}
},
"500": {
"description": "Something unexpected happend, error raised",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
}
}
},
"/usage/{id}": {
"get": {
"security": [
{
"Keycloak": [
"user"
]
},
{
"APIKeyHeader": []
},
{
"APIKeyParam": []
}
],
"produces": [
"application/json"
],
"tags": [
"usageManagement"
],
"summary": "Generates an aggregated response of the usage recorded in the system during the time-window specified for the selected account",
"operationId": "getUsage",
"parameters": [
{
"type": "string",
"description": "Id of the account to be checked",
"name": "id",
"in": "path",
"required": true
},
{
"type": "integer",
"description": "Datetime from which to get the usage report",
"name": "from",
"in": "query"
},
{
"type": "integer",
"description": "Datetime until which to get the usage report",
"name": "to",
"in": "query"
},
{
"type": "string",
"description": "Resource type to filter the usage",
"name": "resource",
"in": "query"
},
{
"type": "string",
"description": "Resource region to filter the usage",
"name": "region",
"in": "query"
}
],
"responses": {
"200": {
"description": "Description of a successfully operation",
"schema": {
"$ref": "#/definitions/Usage"
}
},
"404": {
"description": "Item not found in the system",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
},
"500": {
"description": "Something unexpected happend, error raised",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
}
}
}
},
"definitions": {
"ErrorResponse": {
"type": "object",
"required": [
"errorString"
],
"properties": {
"errorString": {
"type": "string"
}
}
},
"Event": {
"type": "object",
"required": [
"EventTime",
"LastEvent"
],
"properties": {
"Account": {
"type": "string",
"x-go-custom-tag": "gorm:\"index\""
},
"EventTime": {
"type": "integer"
},
"ID": {
"type": "integer",
"x-go-custom-tag": "gorm:\"primary_key;auto_increment\""
},
"LastEvent": {
"type": "string",
"enum": [
"active",
"error",
"inactive",
"terminated",
"suspended"
]
},
"MetaData": {
"x-go-custom-tag": "gorm:\"type:jsonb\"",
"$ref": "#/definitions/Metadata"
},
"Region": {
"type": "string"
},
"ResourceId": {
"type": "string"
},
"ResourceName": {
"type": "string"
},
"ResourceType": {
"type": "string"
},
"TimeFrom": {
"type": "integer",
"x-go-custom-tag": "gorm:\"index\""
},
"TimeTo": {
"type": "integer",
"x-go-custom-tag": "gorm:\"index\""
}
}
},
"ItemCreatedResponse": {
"properties": {
"ApiLink": {
"type": "string"
},
"Message": {
"type": "string"
}
}
},
"Metadata": {
"type": "object",
"x-go-type": {
"import": {
"package": "gitlab.com/cyclops-utilities/datamodels"
},
"type": "JSONdb"
}
},
"MinimalState": {
"type": "object",
"properties": {
"Account": {
"type": "string"
},
"MetaData": {
"x-go-custom-tag": "gorm:\"type:jsonb\"",
"$ref": "#/definitions/Metadata"
},
"ResourceId": {
"type": "string"
},
"ResourceName": {
"type": "string"
}
}
},
"State": {
"type": "object",
"required": [
"EventTime",
"LastEvent"
],
"properties": {
"Account": {
"type": "string",
"x-go-custom-tag": "gorm:\"index\""
},
"EventTime": {
"type": "integer"
},
"ID": {
"type": "integer",
"x-go-custom-tag": "gorm:\"primary_key;auto_increment\""
},
"LastEvent": {
"type": "string",
"enum": [
"active",
"error",
"inactive",
"terminated",
"suspended"
]
},
"MetaData": {
"x-go-custom-tag": "gorm:\"type:jsonb\"",
"$ref": "#/definitions/Metadata"
},
"Region": {
"type": "string"
},
"ResourceId": {
"type": "string"
},
"ResourceName": {
"type": "string"
},
"ResourceType": {
"type": "string"
},
"TimeFrom": {
"type": "integer",
"x-go-custom-tag": "gorm:\"index\""
},
"TimeTo": {
"type": "integer",
"x-go-custom-tag": "gorm:\"index\""
}
}
},
"Status": {
"type": "object",
"required": [
"SystemState"
],
"properties": {
"AverageResponseTime": {
"type": "number",
"format": "double"
},
"DBState": {
"type": "string"
},
"LastRequest": {
"type": "string"
},
"RequestsBoT": {
"type": "integer"
},
"RequestsLastHour": {
"type": "integer"
},
"RequestsToday": {
"type": "integer"
},
"SystemState": {
"type": "string"
}
}
},
"Usage": {
"type": "object",
"properties": {
"AccountId": {
"type": "string"
},
"TimeFrom": {
"type": "integer"
},
"TimeTo": {
"type": "integer"
},
"Usage": {
"type": "array",
"items": {
"$ref": "#/definitions/Use"
}
}
}
},
"Use": {
"type": "object",
"properties": {
"MetaData": {
"$ref": "#/definitions/Metadata"
},
"Region": {
"type": "string"
},
"ResourceId": {
"type": "string"
},
"ResourceName": {
"type": "string"
},
"ResourceType": {
"type": "string"
},
"Unit": {
"type": "string"
},
"UsageBreakup": {
"$ref": "#/definitions/Metadata"
}
}
}
},
"securityDefinitions": {
"APIKeyHeader": {
"type": "apiKey",
"name": "X-API-KEY",
"in": "header"
},
"APIKeyParam": {
"type": "apiKey",
"name": "api_key",
"in": "query"
},
"Keycloak": {
"type": "oauth2",
"flow": "accessCode",
"authorizationUrl": "http://localhost:8080/auth/realms/Dev/protocol/openid-connect/auth",
"tokenUrl": "http://localhost:8080/auth/realms/Dev/protocol/openid-connect/token",
"scopes": {
"admin": "Admin scope",
"user": "User scope"
}
}
},
"security": [
{
"Keycloak": [
"user",
"admin"
]
},
{
"APIKeyHeader": []
},
{
"APIKeyParam": []
}
],
"tags": [
{
"description": "Actions relating to the reporting of the state of the service",
"name": "statusManagement"
},
{
"description": "Actions relating to the periodics actions to be triggered in the system",
"name": "triggerManagement"
},
{
"description": "Actions relating to the adquisition of events in the system",
"name": "eventManagement"
},
{
"description": "Actions relating to the reporting of the usages in the system",
"name": "usageManagement"
}
]
}`))
}