From d703ceaa621ba06f9a1c69ace0b11729b0103de2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A1chym=20Tou=C5=A1ek?= Date: Thu, 6 Jun 2024 15:46:23 +0200 Subject: [PATCH] feat: Generate stream API --- .../gen/http/stream/server/encode_decode.go | 170 +++ .../api/gen/http/stream/server/paths.go | 5 + .../api/gen/http/stream/server/server.go | 58 + .../api/gen/http/stream/server/types.go | 102 +- .../service/stream/api/gen/stream/client.go | 15 +- .../stream/api/gen/stream/endpoints.go | 23 + .../service/stream/api/gen/stream/service.go | 82 +- .../service/stream/api/openapi/openapi.json | 2 +- .../service/stream/api/openapi/openapi.yaml | 1114 ++++++++++++++- .../service/stream/api/openapi/openapi3.json | 2 +- .../service/stream/api/openapi/openapi3.yaml | 1194 ++++++++++++++++- 11 files changed, 2706 insertions(+), 61 deletions(-) diff --git a/internal/pkg/service/stream/api/gen/http/stream/server/encode_decode.go b/internal/pkg/service/stream/api/gen/http/stream/server/encode_decode.go index 82426d4ba9..d254444205 100644 --- a/internal/pkg/service/stream/api/gen/http/stream/server/encode_decode.go +++ b/internal/pkg/service/stream/api/gen/http/stream/server/encode_decode.go @@ -1797,6 +1797,73 @@ func EncodeGetTaskError(encoder func(context.Context, http.ResponseWriter) goaht } } +// EncodeAggregateSourcesResponse returns an encoder for responses returned by +// the stream AggregateSources endpoint. +func EncodeAggregateSourcesResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, any) error { + return func(ctx context.Context, w http.ResponseWriter, v any) error { + res, _ := v.(*stream.AggregationSourcesResult) + enc := encoder(ctx, w) + body := NewAggregateSourcesResponseBody(res) + w.WriteHeader(http.StatusOK) + return enc.Encode(body) + } +} + +// DecodeAggregateSourcesRequest returns a decoder for requests sent to the +// stream AggregateSources endpoint. +func DecodeAggregateSourcesRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder) func(*http.Request) (any, error) { + return func(r *http.Request) (any, error) { + var ( + branchID string + sinceID string + limit int + storageAPIToken string + err error + + params = mux.Vars(r) + ) + branchID = params["branchId"] + qp := r.URL.Query() + sinceIDRaw := qp.Get("sinceId") + if sinceIDRaw != "" { + sinceID = sinceIDRaw + } + { + limitRaw := qp.Get("limit") + if limitRaw == "" { + limit = 100 + } else { + v, err2 := strconv.ParseInt(limitRaw, 10, strconv.IntSize) + if err2 != nil { + err = goa.MergeErrors(err, goa.InvalidFieldTypeError("limit", limitRaw, "integer")) + } + limit = int(v) + } + } + if limit < 1 { + err = goa.MergeErrors(err, goa.InvalidRangeError("limit", limit, 1, true)) + } + if limit > 100 { + err = goa.MergeErrors(err, goa.InvalidRangeError("limit", limit, 100, false)) + } + storageAPIToken = r.Header.Get("X-StorageApi-Token") + if storageAPIToken == "" { + err = goa.MergeErrors(err, goa.MissingFieldError("X-StorageApi-Token", "header")) + } + if err != nil { + return nil, err + } + payload := NewAggregateSourcesPayload(branchID, sinceID, limit, storageAPIToken) + if strings.Contains(payload.StorageAPIToken, " ") { + // Remove authorization scheme prefix (e.g. "Bearer") + cred := strings.SplitN(payload.StorageAPIToken, " ", 2)[1] + payload.StorageAPIToken = cred + } + + return payload, nil + } +} + // marshalStreamTaskOutputsToTaskOutputsResponseBody builds a value of type // *TaskOutputsResponseBody from a value of type *stream.TaskOutputs. func marshalStreamTaskOutputsToTaskOutputsResponseBody(v *stream.TaskOutputs) *TaskOutputsResponseBody { @@ -2281,6 +2348,9 @@ func marshalStreamSinkFileToSinkFileResponseBody(v *stream.SinkFile) *SinkFileRe // value of type *SinkFileStatisticsResponseBody from a value of type // *stream.SinkFileStatistics. func marshalStreamSinkFileStatisticsToSinkFileStatisticsResponseBody(v *stream.SinkFileStatistics) *SinkFileStatisticsResponseBody { + if v == nil { + return nil + } res := &SinkFileStatisticsResponseBody{} if v.Total != nil { res.Total = marshalStreamLevelToLevelResponseBody(v.Total) @@ -2291,3 +2361,103 @@ func marshalStreamSinkFileStatisticsToSinkFileStatisticsResponseBody(v *stream.S return res } + +// marshalStreamAggregationSourceToAggregationSourceResponseBody builds a value +// of type *AggregationSourceResponseBody from a value of type +// *stream.AggregationSource. +func marshalStreamAggregationSourceToAggregationSourceResponseBody(v *stream.AggregationSource) *AggregationSourceResponseBody { + res := &AggregationSourceResponseBody{ + ProjectID: int(v.ProjectID), + BranchID: int(v.BranchID), + SourceID: string(v.SourceID), + Type: string(v.Type), + Name: v.Name, + Description: v.Description, + } + if v.HTTP != nil { + res.HTTP = marshalStreamHTTPSourceToHTTPSourceResponseBody(v.HTTP) + } + if v.Created != nil { + res.Created = marshalStreamCreatedEntityToCreatedEntityResponseBody(v.Created) + } + if v.Version != nil { + res.Version = marshalStreamVersionToVersionResponseBody(v.Version) + } + if v.Deleted != nil { + res.Deleted = marshalStreamDeletedEntityToDeletedEntityResponseBody(v.Deleted) + } + if v.Disabled != nil { + res.Disabled = marshalStreamDisabledEntityToDisabledEntityResponseBody(v.Disabled) + } + if v.Sinks != nil { + res.Sinks = make([]*AggregationSinkResponseBody, len(v.Sinks)) + for i, val := range v.Sinks { + res.Sinks[i] = marshalStreamAggregationSinkToAggregationSinkResponseBody(val) + } + } else { + res.Sinks = []*AggregationSinkResponseBody{} + } + + return res +} + +// marshalStreamAggregationSinkToAggregationSinkResponseBody builds a value of +// type *AggregationSinkResponseBody from a value of type +// *stream.AggregationSink. +func marshalStreamAggregationSinkToAggregationSinkResponseBody(v *stream.AggregationSink) *AggregationSinkResponseBody { + res := &AggregationSinkResponseBody{ + ProjectID: int(v.ProjectID), + BranchID: int(v.BranchID), + SourceID: string(v.SourceID), + SinkID: string(v.SinkID), + Type: string(v.Type), + Name: v.Name, + Description: v.Description, + } + if v.Table != nil { + res.Table = marshalStreamTableSinkToTableSinkResponseBody(v.Table) + } + if v.Created != nil { + res.Created = marshalStreamCreatedEntityToCreatedEntityResponseBody(v.Created) + } + if v.Version != nil { + res.Version = marshalStreamVersionToVersionResponseBody(v.Version) + } + if v.Deleted != nil { + res.Deleted = marshalStreamDeletedEntityToDeletedEntityResponseBody(v.Deleted) + } + if v.Disabled != nil { + res.Disabled = marshalStreamDisabledEntityToDisabledEntityResponseBody(v.Disabled) + } + if v.Statistics != nil { + res.Statistics = marshalStreamAggregationStatisticsToAggregationStatisticsResponseBody(v.Statistics) + } + + return res +} + +// marshalStreamAggregationStatisticsToAggregationStatisticsResponseBody builds +// a value of type *AggregationStatisticsResponseBody from a value of type +// *stream.AggregationStatistics. +func marshalStreamAggregationStatisticsToAggregationStatisticsResponseBody(v *stream.AggregationStatistics) *AggregationStatisticsResponseBody { + if v == nil { + return nil + } + res := &AggregationStatisticsResponseBody{} + if v.Total != nil { + res.Total = marshalStreamLevelToLevelResponseBody(v.Total) + } + if v.Levels != nil { + res.Levels = marshalStreamLevelsToLevelsResponseBody(v.Levels) + } + if v.Files != nil { + res.Files = make([]*SinkFileResponseBody, len(v.Files)) + for i, val := range v.Files { + res.Files[i] = marshalStreamSinkFileToSinkFileResponseBody(val) + } + } else { + res.Files = []*SinkFileResponseBody{} + } + + return res +} diff --git a/internal/pkg/service/stream/api/gen/http/stream/server/paths.go b/internal/pkg/service/stream/api/gen/http/stream/server/paths.go index aa56a0f54a..73319bed5c 100644 --- a/internal/pkg/service/stream/api/gen/http/stream/server/paths.go +++ b/internal/pkg/service/stream/api/gen/http/stream/server/paths.go @@ -116,3 +116,8 @@ func SinkStatisticsFilesStreamPath(branchID string, sourceID string, sinkID stri func GetTaskStreamPath(taskID string) string { return fmt.Sprintf("/v1/tasks/%v", taskID) } + +// AggregateSourcesStreamPath returns the URL path to the stream service AggregateSources HTTP endpoint. +func AggregateSourcesStreamPath(branchID string) string { + return fmt.Sprintf("/v1/branches/%v/aggregation/sources", branchID) +} diff --git a/internal/pkg/service/stream/api/gen/http/stream/server/server.go b/internal/pkg/service/stream/api/gen/http/stream/server/server.go index 2f7dc846ef..121e56ca4d 100644 --- a/internal/pkg/service/stream/api/gen/http/stream/server/server.go +++ b/internal/pkg/service/stream/api/gen/http/stream/server/server.go @@ -42,6 +42,7 @@ type Server struct { SinkStatisticsTotal http.Handler SinkStatisticsFiles http.Handler GetTask http.Handler + AggregateSources http.Handler CORS http.Handler OpenapiJSON http.Handler OpenapiYaml http.Handler @@ -118,6 +119,7 @@ func New( {"SinkStatisticsTotal", "GET", "/v1/branches/{branchId}/sources/{sourceId}/sinks/{sinkId}/statistics/total"}, {"SinkStatisticsFiles", "GET", "/v1/branches/{branchId}/sources/{sourceId}/sinks/{sinkId}/statistics/files"}, {"GetTask", "GET", "/v1/tasks/{*taskId}"}, + {"AggregateSources", "GET", "/v1/branches/{branchId}/aggregation/sources"}, {"CORS", "OPTIONS", "/"}, {"CORS", "OPTIONS", "/v1"}, {"CORS", "OPTIONS", "/health-check"}, @@ -131,6 +133,7 @@ func New( {"CORS", "OPTIONS", "/v1/branches/{branchId}/sources/{sourceId}/sinks/{sinkId}/statistics/total"}, {"CORS", "OPTIONS", "/v1/branches/{branchId}/sources/{sourceId}/sinks/{sinkId}/statistics/files"}, {"CORS", "OPTIONS", "/v1/tasks/{*taskId}"}, + {"CORS", "OPTIONS", "/v1/branches/{branchId}/aggregation/sources"}, {"CORS", "OPTIONS", "/v1/documentation/openapi.json"}, {"CORS", "OPTIONS", "/v1/documentation/openapi.yaml"}, {"CORS", "OPTIONS", "/v1/documentation/openapi3.json"}, @@ -163,6 +166,7 @@ func New( SinkStatisticsTotal: NewSinkStatisticsTotalHandler(e.SinkStatisticsTotal, mux, decoder, encoder, errhandler, formatter), SinkStatisticsFiles: NewSinkStatisticsFilesHandler(e.SinkStatisticsFiles, mux, decoder, encoder, errhandler, formatter), GetTask: NewGetTaskHandler(e.GetTask, mux, decoder, encoder, errhandler, formatter), + AggregateSources: NewAggregateSourcesHandler(e.AggregateSources, mux, decoder, encoder, errhandler, formatter), CORS: NewCORSHandler(), OpenapiJSON: http.FileServer(fileSystemOpenapiJSON), OpenapiYaml: http.FileServer(fileSystemOpenapiYaml), @@ -198,6 +202,7 @@ func (s *Server) Use(m func(http.Handler) http.Handler) { s.SinkStatisticsTotal = m(s.SinkStatisticsTotal) s.SinkStatisticsFiles = m(s.SinkStatisticsFiles) s.GetTask = m(s.GetTask) + s.AggregateSources = m(s.AggregateSources) s.CORS = m(s.CORS) } @@ -227,6 +232,7 @@ func Mount(mux goahttp.Muxer, h *Server) { MountSinkStatisticsTotalHandler(mux, h.SinkStatisticsTotal) MountSinkStatisticsFilesHandler(mux, h.SinkStatisticsFiles) MountGetTaskHandler(mux, h.GetTask) + MountAggregateSourcesHandler(mux, h.AggregateSources) MountCORSHandler(mux, h.CORS) MountOpenapiJSON(mux, goahttp.Replace("", "/openapi.json", h.OpenapiJSON)) MountOpenapiYaml(mux, goahttp.Replace("", "/openapi.yaml", h.OpenapiYaml)) @@ -1277,6 +1283,57 @@ func NewGetTaskHandler( }) } +// MountAggregateSourcesHandler configures the mux to serve the "stream" +// service "AggregateSources" endpoint. +func MountAggregateSourcesHandler(mux goahttp.Muxer, h http.Handler) { + f, ok := HandleStreamOrigin(h).(http.HandlerFunc) + if !ok { + f = func(w http.ResponseWriter, r *http.Request) { + h.ServeHTTP(w, r) + } + } + mux.Handle("GET", "/v1/branches/{branchId}/aggregation/sources", f) +} + +// NewAggregateSourcesHandler creates a HTTP handler which loads the HTTP +// request and calls the "stream" service "AggregateSources" endpoint. +func NewAggregateSourcesHandler( + endpoint goa.Endpoint, + mux goahttp.Muxer, + decoder func(*http.Request) goahttp.Decoder, + encoder func(context.Context, http.ResponseWriter) goahttp.Encoder, + errhandler func(context.Context, http.ResponseWriter, error), + formatter func(ctx context.Context, err error) goahttp.Statuser, +) http.Handler { + var ( + decodeRequest = DecodeAggregateSourcesRequest(mux, decoder) + encodeResponse = EncodeAggregateSourcesResponse(encoder) + encodeError = goahttp.ErrorEncoder(encoder, formatter) + ) + return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + ctx := context.WithValue(r.Context(), goahttp.AcceptTypeKey, r.Header.Get("Accept")) + ctx = context.WithValue(ctx, goa.MethodKey, "AggregateSources") + ctx = context.WithValue(ctx, goa.ServiceKey, "stream") + payload, err := decodeRequest(r) + if err != nil { + if err := encodeError(ctx, w, err); err != nil { + errhandler(ctx, w, err) + } + return + } + res, err := endpoint(ctx, payload) + if err != nil { + if err := encodeError(ctx, w, err); err != nil { + errhandler(ctx, w, err) + } + return + } + if err := encodeResponse(ctx, w, res); err != nil { + errhandler(ctx, w, err) + } + }) +} + // MountOpenapiJSON configures the mux to serve GET request made to // "/v1/documentation/openapi.json". func MountOpenapiJSON(mux goahttp.Muxer, h http.Handler) { @@ -1325,6 +1382,7 @@ func MountCORSHandler(mux goahttp.Muxer, h http.Handler) { mux.Handle("OPTIONS", "/v1/branches/{branchId}/sources/{sourceId}/sinks/{sinkId}/statistics/total", h.ServeHTTP) mux.Handle("OPTIONS", "/v1/branches/{branchId}/sources/{sourceId}/sinks/{sinkId}/statistics/files", h.ServeHTTP) mux.Handle("OPTIONS", "/v1/tasks/{*taskId}", h.ServeHTTP) + mux.Handle("OPTIONS", "/v1/branches/{branchId}/aggregation/sources", h.ServeHTTP) mux.Handle("OPTIONS", "/v1/documentation/openapi.json", h.ServeHTTP) mux.Handle("OPTIONS", "/v1/documentation/openapi.yaml", h.ServeHTTP) mux.Handle("OPTIONS", "/v1/documentation/openapi3.json", h.ServeHTTP) diff --git a/internal/pkg/service/stream/api/gen/http/stream/server/types.go b/internal/pkg/service/stream/api/gen/http/stream/server/types.go index 23ccce4f1d..c983cb9f70 100644 --- a/internal/pkg/service/stream/api/gen/http/stream/server/types.go +++ b/internal/pkg/service/stream/api/gen/http/stream/server/types.go @@ -395,6 +395,15 @@ type GetTaskResponseBody struct { Outputs *TaskOutputsResponseBody `form:"outputs,omitempty" json:"outputs,omitempty" xml:"outputs,omitempty"` } +// AggregateSourcesResponseBody is the type of the "stream" service +// "AggregateSources" endpoint HTTP response body. +type AggregateSourcesResponseBody struct { + ProjectID int `form:"projectId" json:"projectId" xml:"projectId"` + BranchID int `form:"branchId" json:"branchId" xml:"branchId"` + Page *PaginatedResponseResponseBody `form:"page" json:"page" xml:"page"` + Sources []*AggregationSourceResponseBody `form:"sources" json:"sources" xml:"sources"` +} + // CreateSourceStreamAPISourceAlreadyExistsResponseBody is the type of the // "stream" service "CreateSource" endpoint HTTP response body for the // "stream.api.sourceAlreadyExists" error. @@ -942,10 +951,13 @@ type SinkResponseBody struct { // LevelResponseBody is used to define fields on response body types. type LevelResponseBody struct { - FirstRecordAt *string `form:"firstRecordAt,omitempty" json:"firstRecordAt,omitempty" xml:"firstRecordAt,omitempty"` - LastRecordAt *string `form:"lastRecordAt,omitempty" json:"lastRecordAt,omitempty" xml:"lastRecordAt,omitempty"` - RecordsCount uint64 `form:"recordsCount" json:"recordsCount" xml:"recordsCount"` - UncompressedSize uint64 `form:"uncompressedSize" json:"uncompressedSize" xml:"uncompressedSize"` + // Timestamp of the first received record. + FirstRecordAt *string `form:"firstRecordAt,omitempty" json:"firstRecordAt,omitempty" xml:"firstRecordAt,omitempty"` + // Timestamp of the last received record. + LastRecordAt *string `form:"lastRecordAt,omitempty" json:"lastRecordAt,omitempty" xml:"lastRecordAt,omitempty"` + RecordsCount uint64 `form:"recordsCount" json:"recordsCount" xml:"recordsCount"` + // Uncompressed size of data in bytes. + UncompressedSize uint64 `form:"uncompressedSize" json:"uncompressedSize" xml:"uncompressedSize"` } // LevelsResponseBody is used to define fields on response body types. @@ -968,7 +980,7 @@ type SinkFileResponseBody struct { RetryReason *string `form:"retryReason,omitempty" json:"retryReason,omitempty" xml:"retryReason,omitempty"` // Next attempt time. RetryAfter *string `form:"retryAfter,omitempty" json:"retryAfter,omitempty" xml:"retryAfter,omitempty"` - Statistics *SinkFileStatisticsResponseBody `form:"statistics" json:"statistics" xml:"statistics"` + Statistics *SinkFileStatisticsResponseBody `form:"statistics,omitempty" json:"statistics,omitempty" xml:"statistics,omitempty"` } // SinkFileStatisticsResponseBody is used to define fields on response body @@ -978,6 +990,53 @@ type SinkFileStatisticsResponseBody struct { Levels *LevelsResponseBody `form:"levels" json:"levels" xml:"levels"` } +// AggregationSourceResponseBody is used to define fields on response body +// types. +type AggregationSourceResponseBody struct { + ProjectID int `form:"projectId" json:"projectId" xml:"projectId"` + BranchID int `form:"branchId" json:"branchId" xml:"branchId"` + SourceID string `form:"sourceId" json:"sourceId" xml:"sourceId"` + Type string `form:"type" json:"type" xml:"type"` + // Human readable name of the source. + Name string `form:"name" json:"name" xml:"name"` + // Description of the source. + Description string `form:"description" json:"description" xml:"description"` + // HTTP source details for "type" = "http". + HTTP *HTTPSourceResponseBody `form:"http,omitempty" json:"http,omitempty" xml:"http,omitempty"` + Created *CreatedEntityResponseBody `form:"created" json:"created" xml:"created"` + Version *VersionResponseBody `form:"version" json:"version" xml:"version"` + Deleted *DeletedEntityResponseBody `form:"deleted,omitempty" json:"deleted,omitempty" xml:"deleted,omitempty"` + Disabled *DisabledEntityResponseBody `form:"disabled,omitempty" json:"disabled,omitempty" xml:"disabled,omitempty"` + Sinks []*AggregationSinkResponseBody `form:"sinks" json:"sinks" xml:"sinks"` +} + +// AggregationSinkResponseBody is used to define fields on response body types. +type AggregationSinkResponseBody struct { + ProjectID int `form:"projectId" json:"projectId" xml:"projectId"` + BranchID int `form:"branchId" json:"branchId" xml:"branchId"` + SourceID string `form:"sourceId" json:"sourceId" xml:"sourceId"` + SinkID string `form:"sinkId" json:"sinkId" xml:"sinkId"` + Type string `form:"type" json:"type" xml:"type"` + // Human readable name of the sink. + Name string `form:"name" json:"name" xml:"name"` + // Description of the source. + Description string `form:"description" json:"description" xml:"description"` + Table *TableSinkResponseBody `form:"table,omitempty" json:"table,omitempty" xml:"table,omitempty"` + Created *CreatedEntityResponseBody `form:"created" json:"created" xml:"created"` + Version *VersionResponseBody `form:"version" json:"version" xml:"version"` + Deleted *DeletedEntityResponseBody `form:"deleted,omitempty" json:"deleted,omitempty" xml:"deleted,omitempty"` + Disabled *DisabledEntityResponseBody `form:"disabled,omitempty" json:"disabled,omitempty" xml:"disabled,omitempty"` + Statistics *AggregationStatisticsResponseBody `form:"statistics,omitempty" json:"statistics,omitempty" xml:"statistics,omitempty"` +} + +// AggregationStatisticsResponseBody is used to define fields on response body +// types. +type AggregationStatisticsResponseBody struct { + Total *LevelResponseBody `form:"total" json:"total" xml:"total"` + Levels *LevelsResponseBody `form:"levels" json:"levels" xml:"levels"` + Files []*SinkFileResponseBody `form:"files" json:"files" xml:"files"` +} + // SettingPatchRequestBody is used to define fields on request body types. type SettingPatchRequestBody struct { // Key path. @@ -1399,6 +1458,27 @@ func NewGetTaskResponseBody(res *stream.Task) *GetTaskResponseBody { return body } +// NewAggregateSourcesResponseBody builds the HTTP response body from the +// result of the "AggregateSources" endpoint of the "stream" service. +func NewAggregateSourcesResponseBody(res *stream.AggregationSourcesResult) *AggregateSourcesResponseBody { + body := &AggregateSourcesResponseBody{ + ProjectID: int(res.ProjectID), + BranchID: int(res.BranchID), + } + if res.Page != nil { + body.Page = marshalStreamPaginatedResponseToPaginatedResponseResponseBody(res.Page) + } + if res.Sources != nil { + body.Sources = make([]*AggregationSourceResponseBody, len(res.Sources)) + for i, val := range res.Sources { + body.Sources[i] = marshalStreamAggregationSourceToAggregationSourceResponseBody(val) + } + } else { + body.Sources = []*AggregationSourceResponseBody{} + } + return body +} + // NewCreateSourceStreamAPISourceAlreadyExistsResponseBody builds the HTTP // response body from the result of the "CreateSource" endpoint of the "stream" // service. @@ -1981,6 +2061,18 @@ func NewGetTaskPayload(taskID string, storageAPIToken string) *stream.GetTaskPay return v } +// NewAggregateSourcesPayload builds a stream service AggregateSources endpoint +// payload. +func NewAggregateSourcesPayload(branchID string, sinceID string, limit int, storageAPIToken string) *stream.AggregateSourcesPayload { + v := &stream.AggregateSourcesPayload{} + v.BranchID = stream.BranchIDOrDefault(branchID) + v.SinceID = sinceID + v.Limit = limit + v.StorageAPIToken = storageAPIToken + + return v +} + // ValidateCreateSourceRequestBody runs the validations defined on // CreateSourceRequestBody func ValidateCreateSourceRequestBody(body *CreateSourceRequestBody, errContext []string) (err error) { diff --git a/internal/pkg/service/stream/api/gen/stream/client.go b/internal/pkg/service/stream/api/gen/stream/client.go index 78924bef44..fb7b76361e 100644 --- a/internal/pkg/service/stream/api/gen/stream/client.go +++ b/internal/pkg/service/stream/api/gen/stream/client.go @@ -38,10 +38,11 @@ type Client struct { SinkStatisticsTotalEndpoint goa.Endpoint SinkStatisticsFilesEndpoint goa.Endpoint GetTaskEndpoint goa.Endpoint + AggregateSourcesEndpoint goa.Endpoint } // NewClient initializes a "stream" service client given the endpoints. -func NewClient(aPIRootIndex, aPIVersionIndex, healthCheck, createSource, updateSource, listSources, getSource, deleteSource, getSourceSettings, updateSourceSettings, testSource, createSink, getSink, getSinkSettings, updateSinkSettings, listSinks, updateSink, deleteSink, sinkStatisticsTotal, sinkStatisticsFiles, getTask goa.Endpoint) *Client { +func NewClient(aPIRootIndex, aPIVersionIndex, healthCheck, createSource, updateSource, listSources, getSource, deleteSource, getSourceSettings, updateSourceSettings, testSource, createSink, getSink, getSinkSettings, updateSinkSettings, listSinks, updateSink, deleteSink, sinkStatisticsTotal, sinkStatisticsFiles, getTask, aggregateSources goa.Endpoint) *Client { return &Client{ APIRootIndexEndpoint: aPIRootIndex, APIVersionIndexEndpoint: aPIVersionIndex, @@ -64,6 +65,7 @@ func NewClient(aPIRootIndex, aPIVersionIndex, healthCheck, createSource, updateS SinkStatisticsTotalEndpoint: sinkStatisticsTotal, SinkStatisticsFilesEndpoint: sinkStatisticsFiles, GetTaskEndpoint: getTask, + AggregateSourcesEndpoint: aggregateSources, } } @@ -340,3 +342,14 @@ func (c *Client) GetTask(ctx context.Context, p *GetTaskPayload) (res *Task, err } return ires.(*Task), nil } + +// AggregateSources calls the "AggregateSources" endpoint of the "stream" +// service. +func (c *Client) AggregateSources(ctx context.Context, p *AggregateSourcesPayload) (res *AggregationSourcesResult, err error) { + var ires any + ires, err = c.AggregateSourcesEndpoint(ctx, p) + if err != nil { + return + } + return ires.(*AggregationSourcesResult), nil +} diff --git a/internal/pkg/service/stream/api/gen/stream/endpoints.go b/internal/pkg/service/stream/api/gen/stream/endpoints.go index 93bf412b70..98c168a513 100644 --- a/internal/pkg/service/stream/api/gen/stream/endpoints.go +++ b/internal/pkg/service/stream/api/gen/stream/endpoints.go @@ -40,6 +40,7 @@ type Endpoints struct { SinkStatisticsTotal goa.Endpoint SinkStatisticsFiles goa.Endpoint GetTask goa.Endpoint + AggregateSources goa.Endpoint } // TestSourceRequestData holds both the payload and the HTTP request body @@ -77,6 +78,7 @@ func NewEndpoints(s Service) *Endpoints { SinkStatisticsTotal: NewSinkStatisticsTotalEndpoint(s, a.APIKeyAuth), SinkStatisticsFiles: NewSinkStatisticsFilesEndpoint(s, a.APIKeyAuth), GetTask: NewGetTaskEndpoint(s, a.APIKeyAuth), + AggregateSources: NewAggregateSourcesEndpoint(s, a.APIKeyAuth), } } @@ -103,6 +105,7 @@ func (e *Endpoints) Use(m func(goa.Endpoint) goa.Endpoint) { e.SinkStatisticsTotal = m(e.SinkStatisticsTotal) e.SinkStatisticsFiles = m(e.SinkStatisticsFiles) e.GetTask = m(e.GetTask) + e.AggregateSources = m(e.AggregateSources) } // NewAPIRootIndexEndpoint returns an endpoint function that calls the method @@ -491,3 +494,23 @@ func NewGetTaskEndpoint(s Service, authAPIKeyFn security.AuthAPIKeyFunc) goa.End return s.GetTask(ctx, deps, p) } } + +// NewAggregateSourcesEndpoint returns an endpoint function that calls the +// method "AggregateSources" of service "stream". +func NewAggregateSourcesEndpoint(s Service, authAPIKeyFn security.AuthAPIKeyFunc) goa.Endpoint { + return func(ctx context.Context, req any) (any, error) { + p := req.(*AggregateSourcesPayload) + var err error + sc := security.APIKeyScheme{ + Name: "storage-api-token", + Scopes: []string{}, + RequiredScopes: []string{}, + } + ctx, err = authAPIKeyFn(ctx, p.StorageAPIToken, &sc) + if err != nil { + return nil, err + } + deps := ctx.Value(dependencies.BranchRequestScopeCtxKey).(dependencies.BranchRequestScope) + return s.AggregateSources(ctx, deps, p) + } +} diff --git a/internal/pkg/service/stream/api/gen/stream/service.go b/internal/pkg/service/stream/api/gen/stream/service.go index 4b2c87b4d0..5a7aca7bcb 100644 --- a/internal/pkg/service/stream/api/gen/stream/service.go +++ b/internal/pkg/service/stream/api/gen/stream/service.go @@ -66,6 +66,8 @@ type Service interface { SinkStatisticsFiles(context.Context, dependencies.SinkRequestScope, *SinkStatisticsFilesPayload) (res *SinkStatisticsFilesResult, err error) // Get details of a task. GetTask(context.Context, dependencies.ProjectRequestScope, *GetTaskPayload) (res *Task, err error) + // Details about sources for the UI. + AggregateSources(context.Context, dependencies.BranchRequestScope, *AggregateSourcesPayload) (res *AggregationSourcesResult, err error) } // Auther defines the authorization functions to be implemented by the service. @@ -88,7 +90,76 @@ const ServiceName = "stream" // MethodNames lists the service method names as defined in the design. These // are the same values that are set in the endpoint request contexts under the // MethodKey key. -var MethodNames = [21]string{"ApiRootIndex", "ApiVersionIndex", "HealthCheck", "CreateSource", "UpdateSource", "ListSources", "GetSource", "DeleteSource", "GetSourceSettings", "UpdateSourceSettings", "TestSource", "CreateSink", "GetSink", "GetSinkSettings", "UpdateSinkSettings", "ListSinks", "UpdateSink", "DeleteSink", "SinkStatisticsTotal", "SinkStatisticsFiles", "GetTask"} +var MethodNames = [22]string{"ApiRootIndex", "ApiVersionIndex", "HealthCheck", "CreateSource", "UpdateSource", "ListSources", "GetSource", "DeleteSource", "GetSourceSettings", "UpdateSourceSettings", "TestSource", "CreateSink", "GetSink", "GetSinkSettings", "UpdateSinkSettings", "ListSinks", "UpdateSink", "DeleteSink", "SinkStatisticsTotal", "SinkStatisticsFiles", "GetTask", "AggregateSources"} + +// AggregateSourcesPayload is the payload type of the stream service +// AggregateSources method. +type AggregateSourcesPayload struct { + StorageAPIToken string + BranchID BranchIDOrDefault + // Request records after the ID. + SinceID string + // Maximum number of returned records. + Limit int +} + +// A mapping from imported data to a destination table. +type AggregationSink struct { + ProjectID ProjectID + BranchID BranchID + SourceID SourceID + SinkID SinkID + Type SinkType + // Human readable name of the sink. + Name string + // Description of the source. + Description string + Table *TableSink + Created *CreatedEntity + Version *Version + Deleted *DeletedEntity + Disabled *DisabledEntity + Statistics *AggregationStatistics +} + +type AggregationSinks []*AggregationSink + +// Source of data for further processing, start of the stream, max 100 sources +// per a branch. +type AggregationSource struct { + ProjectID ProjectID + BranchID BranchID + SourceID SourceID + Type SourceType + // Human readable name of the source. + Name string + // Description of the source. + Description string + // HTTP source details for "type" = "http". + HTTP *HTTPSource + Created *CreatedEntity + Version *Version + Deleted *DeletedEntity + Disabled *DisabledEntity + Sinks AggregationSinks +} + +type AggregationSources []*AggregationSource + +// AggregationSourcesResult is the result type of the stream service +// AggregateSources method. +type AggregationSourcesResult struct { + ProjectID ProjectID + BranchID BranchID + Page *PaginatedResponse + Sources AggregationSources +} + +type AggregationStatistics struct { + Total *Level + Levels *Levels + Files SinkFiles +} // ID of the branch. type BranchID = keboola.BranchID @@ -242,9 +313,12 @@ type HTTPSource struct { } type Level struct { - FirstRecordAt *string - LastRecordAt *string - RecordsCount uint64 + // Timestamp of the first received record. + FirstRecordAt *string + // Timestamp of the last received record. + LastRecordAt *string + RecordsCount uint64 + // Uncompressed size of data in bytes. UncompressedSize uint64 } diff --git a/internal/pkg/service/stream/api/openapi/openapi.json b/internal/pkg/service/stream/api/openapi/openapi.json index 96bf19f95f..e1bcb48240 100644 --- a/internal/pkg/service/stream/api/openapi/openapi.json +++ b/internal/pkg/service/stream/api/openapi/openapi.json @@ -1 +1 @@ -{"swagger":"2.0","info":{"title":"Stream Service","description":"A service for continuously importing data to the Keboola platform.","version":"1.0"},"host":"stream.keboola.com","consumes":["application/json"],"produces":["application/json"],"paths":{"/":{"get":{"tags":["documentation"],"summary":"Redirect to /v1","description":"Redirect to /v1.","operationId":"ApiRootIndex","responses":{"301":{"description":"Moved Permanently response."}},"schemes":["https"]}},"/v1":{"get":{"tags":["documentation"],"summary":"List API name and link to documentation.","description":"List API name and link to documentation.","operationId":"ApiVersionIndex","responses":{"200":{"description":"OK response.","schema":{"$ref":"#/definitions/StreamAPIVersionIndexResponseBody","required":["api","documentation"]}}},"schemes":["https"]}},"/v1/branches/{branchId}/sources":{"get":{"tags":["configuration"],"summary":"List all sources","description":"List all sources in the branch.","operationId":"ListSources","parameters":[{"name":"sinceId","in":"query","description":"Request records after the ID.","required":false,"type":"string","default":""},{"name":"limit","in":"query","description":"Maximum number of returned records.","required":false,"type":"integer","default":100,"maximum":100,"minimum":1},{"name":"branchId","in":"path","description":"ID of the branch or \"default\".","required":true,"type":"string"}],"responses":{"200":{"description":"OK response.","schema":{"$ref":"#/definitions/StreamListSourcesResponseBody","required":["projectId","branchId","page","sources"]}}},"schemes":["https"],"security":[{"storage-api-token":[]}]},"post":{"tags":["configuration"],"summary":"Create source","description":"Create a new source in the branch.","operationId":"CreateSource","parameters":[{"name":"branchId","in":"path","description":"ID of the branch or \"default\".","required":true,"type":"string"},{"name":"CreateSourceRequestBody","in":"body","required":true,"schema":{"$ref":"#/definitions/StreamCreateSourceRequestBody","required":["type","name"]}}],"responses":{"202":{"description":"Accepted response.","schema":{"$ref":"#/definitions/StreamCreateSourceResponseBody","required":["taskId","type","url","status","isFinished","createdAt"]}},"409":{"description":"Conflict response.","schema":{"$ref":"#/definitions/StreamCreateSourceStreamAPISourceAlreadyExistsResponseBody","required":["statusCode","error","message"]}},"422":{"description":"Unprocessable Entity response.","schema":{"$ref":"#/definitions/StreamCreateSourceStreamAPIResourceLimitReachedResponseBody","required":["statusCode","error","message"]}}},"schemes":["https"],"security":[{"storage-api-token":[]}]}},"/v1/branches/{branchId}/sources/{sourceId}":{"get":{"tags":["configuration"],"summary":"Get source","description":"Get the source definition.","operationId":"GetSource","parameters":[{"name":"branchId","in":"path","description":"ID of the branch or \"default\".","required":true,"type":"string"},{"name":"sourceId","in":"path","description":"Unique ID of the source.","required":true,"type":"string"}],"responses":{"200":{"description":"OK response.","schema":{"$ref":"#/definitions/StreamGetSourceResponseBody","required":["projectId","branchId","sourceId","type","name","description","created","version"]}},"404":{"description":"Not Found response.","schema":{"$ref":"#/definitions/StreamGetSourceStreamAPISourceNotFoundResponseBody","required":["statusCode","error","message"]}}},"schemes":["https"],"security":[{"storage-api-token":[]}]},"delete":{"tags":["configuration"],"summary":"Delete source","description":"Delete the source.","operationId":"DeleteSource","parameters":[{"name":"branchId","in":"path","description":"ID of the branch or \"default\".","required":true,"type":"string"},{"name":"sourceId","in":"path","description":"Unique ID of the source.","required":true,"type":"string"}],"responses":{"202":{"description":"Accepted response.","schema":{"$ref":"#/definitions/StreamDeleteSourceResponseBody","required":["taskId","type","url","status","isFinished","createdAt"]}},"404":{"description":"Not Found response.","schema":{"$ref":"#/definitions/StreamDeleteSourceStreamAPISourceNotFoundResponseBody","required":["statusCode","error","message"]}}},"schemes":["https"],"security":[{"storage-api-token":[]}]},"patch":{"tags":["configuration"],"summary":"Update source","description":"Update the source.","operationId":"UpdateSource","parameters":[{"name":"branchId","in":"path","description":"ID of the branch or \"default\".","required":true,"type":"string"},{"name":"sourceId","in":"path","description":"Unique ID of the source.","required":true,"type":"string"},{"name":"UpdateSourceRequestBody","in":"body","required":true,"schema":{"$ref":"#/definitions/StreamUpdateSourceRequestBody"}}],"responses":{"202":{"description":"Accepted response.","schema":{"$ref":"#/definitions/StreamUpdateSourceResponseBody","required":["taskId","type","url","status","isFinished","createdAt"]}},"404":{"description":"Not Found response.","schema":{"$ref":"#/definitions/StreamUpdateSourceStreamAPISourceNotFoundResponseBody","required":["statusCode","error","message"]}}},"schemes":["https"],"security":[{"storage-api-token":[]}]}},"/v1/branches/{branchId}/sources/{sourceId}/settings":{"get":{"tags":["configuration"],"summary":"Get source settings","description":"Get source settings.","operationId":"GetSourceSettings","parameters":[{"name":"branchId","in":"path","description":"ID of the branch or \"default\".","required":true,"type":"string"},{"name":"sourceId","in":"path","description":"Unique ID of the source.","required":true,"type":"string"}],"responses":{"200":{"description":"OK response.","schema":{"$ref":"#/definitions/StreamGetSourceSettingsResponseBody"}},"404":{"description":"Not Found response.","schema":{"$ref":"#/definitions/StreamGetSourceSettingsStreamAPISourceNotFoundResponseBody","required":["statusCode","error","message"]}}},"schemes":["https"],"security":[{"storage-api-token":[]}]},"patch":{"tags":["configuration"],"summary":"Update source settings","description":"Update source settings.","operationId":"UpdateSourceSettings","parameters":[{"name":"branchId","in":"path","description":"ID of the branch or \"default\".","required":true,"type":"string"},{"name":"sourceId","in":"path","description":"Unique ID of the source.","required":true,"type":"string"},{"name":"UpdateSourceSettingsRequestBody","in":"body","required":true,"schema":{"$ref":"#/definitions/StreamUpdateSourceSettingsRequestBody"}}],"responses":{"202":{"description":"Accepted response.","schema":{"$ref":"#/definitions/StreamUpdateSourceSettingsResponseBody","required":["taskId","type","url","status","isFinished","createdAt"]}},"404":{"description":"Not Found response.","schema":{"$ref":"#/definitions/StreamUpdateSourceSettingsStreamAPIForbiddenResponseBody","required":["statusCode","error","message"]}}},"schemes":["https"],"security":[{"storage-api-token":[]}]}},"/v1/branches/{branchId}/sources/{sourceId}/sinks":{"get":{"tags":["configuration"],"summary":"List sinks","description":"List all sinks in the source.","operationId":"ListSinks","parameters":[{"name":"sinceId","in":"query","description":"Request records after the ID.","required":false,"type":"string","default":""},{"name":"limit","in":"query","description":"Maximum number of returned records.","required":false,"type":"integer","default":100,"maximum":100,"minimum":1},{"name":"branchId","in":"path","description":"ID of the branch or \"default\".","required":true,"type":"string"},{"name":"sourceId","in":"path","description":"Unique ID of the source.","required":true,"type":"string"}],"responses":{"200":{"description":"OK response.","schema":{"$ref":"#/definitions/StreamListSinksResponseBody","required":["projectId","branchId","sourceId","page","sinks"]}},"404":{"description":"Not Found response.","schema":{"$ref":"#/definitions/StreamListSinksStreamAPISourceNotFoundResponseBody","required":["statusCode","error","message"]}}},"schemes":["https"],"security":[{"storage-api-token":[]}]},"post":{"tags":["configuration"],"summary":"Create sink","description":"Create a new sink in the source.","operationId":"CreateSink","parameters":[{"name":"branchId","in":"path","description":"ID of the branch or \"default\".","required":true,"type":"string"},{"name":"sourceId","in":"path","description":"Unique ID of the source.","required":true,"type":"string"},{"name":"CreateSinkRequestBody","in":"body","required":true,"schema":{"$ref":"#/definitions/StreamCreateSinkRequestBody","required":["type","name"]}}],"responses":{"202":{"description":"Accepted response.","schema":{"$ref":"#/definitions/StreamCreateSinkResponseBody","required":["taskId","type","url","status","isFinished","createdAt"]}},"404":{"description":"Not Found response.","schema":{"$ref":"#/definitions/StreamCreateSinkStreamAPISourceNotFoundResponseBody","required":["statusCode","error","message"]}},"409":{"description":"Conflict response.","schema":{"$ref":"#/definitions/StreamCreateSinkStreamAPISinkAlreadyExistsResponseBody","required":["statusCode","error","message"]}},"422":{"description":"Unprocessable Entity response.","schema":{"$ref":"#/definitions/StreamCreateSinkStreamAPIResourceLimitReachedResponseBody","required":["statusCode","error","message"]}}},"schemes":["https"],"security":[{"storage-api-token":[]}]}},"/v1/branches/{branchId}/sources/{sourceId}/sinks/{sinkId}":{"get":{"tags":["configuration"],"summary":"Get sink","description":"Get the sink definition.","operationId":"GetSink","parameters":[{"name":"branchId","in":"path","description":"ID of the branch or \"default\".","required":true,"type":"string"},{"name":"sourceId","in":"path","description":"Unique ID of the source.","required":true,"type":"string"},{"name":"sinkId","in":"path","description":"Unique ID of the sink.","required":true,"type":"string"}],"responses":{"200":{"description":"OK response.","schema":{"$ref":"#/definitions/StreamGetSinkResponseBody","required":["projectId","branchId","sourceId","sinkId","type","name","description","version","created"]}},"404":{"description":"Not Found response.","schema":{"$ref":"#/definitions/StreamGetSinkStreamAPISinkNotFoundResponseBody","required":["statusCode","error","message"]}}},"schemes":["https"],"security":[{"storage-api-token":[]}]},"delete":{"tags":["configuration"],"summary":"Delete sink","description":"Delete the sink.","operationId":"DeleteSink","parameters":[{"name":"branchId","in":"path","description":"ID of the branch or \"default\".","required":true,"type":"string"},{"name":"sourceId","in":"path","description":"Unique ID of the source.","required":true,"type":"string"},{"name":"sinkId","in":"path","description":"Unique ID of the sink.","required":true,"type":"string"}],"responses":{"202":{"description":"Accepted response.","schema":{"$ref":"#/definitions/StreamDeleteSinkResponseBody","required":["taskId","type","url","status","isFinished","createdAt"]}},"404":{"description":"Not Found response.","schema":{"$ref":"#/definitions/StreamDeleteSinkStreamAPISinkNotFoundResponseBody","required":["statusCode","error","message"]}}},"schemes":["https"],"security":[{"storage-api-token":[]}]},"patch":{"tags":["configuration"],"summary":"Update sink","description":"Update the sink.","operationId":"UpdateSink","parameters":[{"name":"branchId","in":"path","description":"ID of the branch or \"default\".","required":true,"type":"string"},{"name":"sourceId","in":"path","description":"Unique ID of the source.","required":true,"type":"string"},{"name":"sinkId","in":"path","description":"Unique ID of the sink.","required":true,"type":"string"},{"name":"UpdateSinkRequestBody","in":"body","required":true,"schema":{"$ref":"#/definitions/StreamUpdateSinkRequestBody"}}],"responses":{"202":{"description":"Accepted response.","schema":{"$ref":"#/definitions/StreamUpdateSinkResponseBody","required":["taskId","type","url","status","isFinished","createdAt"]}},"404":{"description":"Not Found response.","schema":{"$ref":"#/definitions/StreamUpdateSinkStreamAPISinkNotFoundResponseBody","required":["statusCode","error","message"]}}},"schemes":["https"],"security":[{"storage-api-token":[]}]}},"/v1/branches/{branchId}/sources/{sourceId}/sinks/{sinkId}/settings":{"get":{"tags":["configuration"],"summary":"Get sink settings","description":"Get the sink settings.","operationId":"GetSinkSettings","parameters":[{"name":"branchId","in":"path","description":"ID of the branch or \"default\".","required":true,"type":"string"},{"name":"sourceId","in":"path","description":"Unique ID of the source.","required":true,"type":"string"},{"name":"sinkId","in":"path","description":"Unique ID of the sink.","required":true,"type":"string"}],"responses":{"200":{"description":"OK response.","schema":{"$ref":"#/definitions/StreamGetSinkSettingsResponseBody"}},"404":{"description":"Not Found response.","schema":{"$ref":"#/definitions/StreamGetSinkSettingsStreamAPISinkNotFoundResponseBody","required":["statusCode","error","message"]}}},"schemes":["https"],"security":[{"storage-api-token":[]}]},"patch":{"tags":["configuration"],"summary":"Update sink settings","description":"Update sink settings.","operationId":"UpdateSinkSettings","parameters":[{"name":"branchId","in":"path","description":"ID of the branch or \"default\".","required":true,"type":"string"},{"name":"sourceId","in":"path","description":"Unique ID of the source.","required":true,"type":"string"},{"name":"sinkId","in":"path","description":"Unique ID of the sink.","required":true,"type":"string"},{"name":"UpdateSinkSettingsRequestBody","in":"body","required":true,"schema":{"$ref":"#/definitions/StreamUpdateSinkSettingsRequestBody"}}],"responses":{"202":{"description":"Accepted response.","schema":{"$ref":"#/definitions/StreamUpdateSinkSettingsResponseBody","required":["taskId","type","url","status","isFinished","createdAt"]}},"404":{"description":"Not Found response.","schema":{"$ref":"#/definitions/StreamUpdateSinkSettingsStreamAPIForbiddenResponseBody","required":["statusCode","error","message"]}}},"schemes":["https"],"security":[{"storage-api-token":[]}]}},"/v1/branches/{branchId}/sources/{sourceId}/sinks/{sinkId}/statistics/files":{"get":{"tags":["configuration"],"summary":"Sink files statistics","description":"Get files statistics of the sink.","operationId":"SinkStatisticsFiles","parameters":[{"name":"branchId","in":"path","description":"ID of the branch or \"default\".","required":true,"type":"string"},{"name":"sourceId","in":"path","description":"Unique ID of the source.","required":true,"type":"string"},{"name":"sinkId","in":"path","description":"Unique ID of the sink.","required":true,"type":"string"}],"responses":{"200":{"description":"OK response.","schema":{"$ref":"#/definitions/StreamSinkStatisticsFilesResponseBody","required":["files"]}},"404":{"description":"Not Found response.","schema":{"$ref":"#/definitions/StreamSinkStatisticsFilesStreamAPISinkNotFoundResponseBody","required":["statusCode","error","message"]}}},"schemes":["https"],"security":[{"storage-api-token":[]}]}},"/v1/branches/{branchId}/sources/{sourceId}/sinks/{sinkId}/statistics/total":{"get":{"tags":["configuration"],"summary":"Sink statistics total","description":"Get total statistics of the sink.","operationId":"SinkStatisticsTotal","parameters":[{"name":"branchId","in":"path","description":"ID of the branch or \"default\".","required":true,"type":"string"},{"name":"sourceId","in":"path","description":"Unique ID of the source.","required":true,"type":"string"},{"name":"sinkId","in":"path","description":"Unique ID of the sink.","required":true,"type":"string"}],"responses":{"200":{"description":"OK response.","schema":{"$ref":"#/definitions/StreamSinkStatisticsTotalResponseBody","required":["total","levels"]}},"404":{"description":"Not Found response.","schema":{"$ref":"#/definitions/StreamSinkStatisticsTotalStreamAPISinkNotFoundResponseBody","required":["statusCode","error","message"]}}},"schemes":["https"],"security":[{"storage-api-token":[]}]}},"/v1/branches/{branchId}/sources/{sourceId}/test":{"post":{"tags":["test"],"summary":"Test source payload mapping.","description":"Tests configured mapping of the source and its sinks.","operationId":"TestSource","parameters":[{"name":"branchId","in":"path","description":"ID of the branch or \"default\".","required":true,"type":"string"},{"name":"sourceId","in":"path","description":"Unique ID of the source.","required":true,"type":"string"}],"responses":{"200":{"description":"OK response.","schema":{"$ref":"#/definitions/StreamTestSourceResponseBody","required":["projectId","branchId","sourceId","tables"]}},"404":{"description":"Not Found response.","schema":{"$ref":"#/definitions/StreamTestSourceStreamAPISourceNotFoundResponseBody","required":["statusCode","error","message"]}}},"schemes":["https"],"security":[{"storage-api-token":[]}]}},"/v1/documentation/openapi.json":{"get":{"tags":["documentation"],"summary":"Swagger 2.0 JSON Specification","operationId":"OpenapiJson","responses":{"200":{"description":"File downloaded","schema":{"type":"file"}}},"schemes":["http","https"]}},"/v1/documentation/openapi.yaml":{"get":{"tags":["documentation"],"summary":"Swagger 2.0 YAML Specification","operationId":"OpenapiYaml","responses":{"200":{"description":"File downloaded","schema":{"type":"file"}}},"schemes":["http","https"]}},"/v1/documentation/openapi3.json":{"get":{"tags":["documentation"],"summary":"OpenAPI 3.0 JSON Specification","operationId":"Openapi3Json","responses":{"200":{"description":"File downloaded","schema":{"type":"file"}}},"schemes":["http","https"]}},"/v1/documentation/openapi3.yaml":{"get":{"tags":["documentation"],"summary":"OpenAPI 3.0 YAML Specification","operationId":"Openapi3Yaml","responses":{"200":{"description":"File downloaded","schema":{"type":"file"}}},"schemes":["http","https"]}},"/v1/tasks/{taskId}":{"get":{"tags":["configuration"],"summary":"Get task","description":"Get details of a task.","operationId":"GetTask","parameters":[{"name":"taskId","in":"path","description":"Unique ID of the task.","required":true,"type":"string"}],"responses":{"200":{"description":"OK response.","schema":{"$ref":"#/definitions/StreamGetTaskResponseBody","required":["taskId","type","url","status","isFinished","createdAt"]}},"404":{"description":"Not Found response.","schema":{"$ref":"#/definitions/StreamGetTaskStreamAPITaskNotFoundResponseBody","required":["statusCode","error","message"]}}},"schemes":["https"],"security":[{"storage-api-token":[]}]}}},"definitions":{"ByResponseBody":{"title":"ByResponseBody","type":"object","properties":{"tokenDesc":{"type":"string","description":"Description of the token.","example":"john.green@company.com"},"tokenId":{"type":"string","description":"ID of the token.","example":"896455"},"type":{"type":"string","description":"Date and time of deletion.","example":"user","enum":["system","user"]},"userId":{"type":"string","description":"ID of the user.","example":"578621"},"userName":{"type":"string","description":"Name of the user.","example":"John Green"}},"description":"Information about the operation actor.","example":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"},"required":["type"]},"CreatedEntityResponseBody":{"title":"CreatedEntityResponseBody","type":"object","properties":{"at":{"type":"string","description":"Date and time of deletion.","example":"2022-04-28T14:20:04.000Z","format":"date-time"},"by":{"$ref":"#/definitions/ByResponseBody"}},"description":"Information about the entity creation.","example":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"required":["at","by"]},"DeletedEntityResponseBody":{"title":"DeletedEntityResponseBody","type":"object","properties":{"at":{"type":"string","description":"Date and time of deletion.","example":"2022-04-28T14:20:04.000Z","format":"date-time"},"by":{"$ref":"#/definitions/ByResponseBody"}},"description":"Information about the deleted entity.","example":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"required":["at","by"]},"DisabledEntityResponseBody":{"title":"DisabledEntityResponseBody","type":"object","properties":{"at":{"type":"string","description":"Date and time of disabling.","example":"2022-04-28T14:20:04.000Z","format":"date-time"},"by":{"$ref":"#/definitions/ByResponseBody"},"reason":{"type":"string","description":"Why was the entity disabled?","example":"Disabled for recurring problems."}},"description":"Information about the disabled entity.","example":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"},"reason":"Disabled for recurring problems."},"required":["at","by","reason"]},"HTTPSourceResponseBody":{"title":"HTTPSourceResponseBody","type":"object","properties":{"url":{"type":"string","description":"URL of the HTTP source. Contains secret used for authentication.","example":"https://stream-in.keboola.com/G0lpTbz0vhakDicfoDQQ3BCzGYdW3qewd1D3eUbqETygHKGb"}},"description":"HTTP source details for \"type\" = \"http\".","example":{"url":"https://stream-in.keboola.com/G0lpTbz0vhakDicfoDQQ3BCzGYdW3qewd1D3eUbqETygHKGb"},"required":["url"]},"LevelResponseBody":{"title":"LevelResponseBody","type":"object","properties":{"firstRecordAt":{"type":"string","example":"2022-04-28T14:20:04.000Z","format":"date-time"},"lastRecordAt":{"type":"string","example":"2022-04-28T14:20:04.000Z","format":"date-time"},"recordsCount":{"type":"integer","example":1,"format":"int64"},"uncompressedSize":{"type":"integer","example":1,"format":"int64"}},"example":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1},"required":["recordsCount","uncompressedSize"]},"LevelsResponseBody":{"title":"LevelsResponseBody","type":"object","properties":{"local":{"$ref":"#/definitions/LevelResponseBody"},"staging":{"$ref":"#/definitions/LevelResponseBody"},"target":{"$ref":"#/definitions/LevelResponseBody"}},"example":{"local":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1},"staging":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1},"target":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1}}},"PaginatedResponseResponseBody":{"title":"PaginatedResponseResponseBody","type":"object","properties":{"lastId":{"type":"string","description":"ID of the last record in the response.","example":"my-object-456"},"limit":{"type":"integer","description":"Current limit.","example":100,"format":"int64"},"sinceId":{"type":"string","description":"Current offset.","example":"my-object-123"},"totalCount":{"type":"integer","description":"Total count of all records.","example":1000,"format":"int64"}},"example":{"limit":100,"totalCount":1000,"sinceId":"my-object-123","lastId":"my-object-456"},"required":["sinceId","limit","lastId","totalCount"]},"SettingPatchRequestBody":{"title":"SettingPatchRequestBody","type":"object","properties":{"key":{"type":"string","description":"Key path.","example":"some.service.limit","minLength":1},"value":{"description":"A new key value. Use null to reset the value to the default value.","example":"1m20s"}},"description":"One setting key-value pair.","example":{"key":"some.service.limit","value":"1m20s"},"required":["key"]},"SettingResultResponseBody":{"title":"SettingResultResponseBody","type":"object","properties":{"defaultValue":{"description":"Default value.","example":"30s"},"description":{"type":"string","description":"Key description.","example":"Minimal interval between uploads."},"key":{"type":"string","description":"Key path.","example":"some.service.limit"},"overwritten":{"type":"boolean","description":"True, if the default value is locally overwritten.","example":true},"protected":{"type":"boolean","description":"True, if only a super admin can modify the key.","example":false},"type":{"type":"string","description":"Value type.","example":"string","enum":["string","int","float","bool","[]string","[]int","[]float"]},"validation":{"type":"string","description":"Validation rules as a string definition.","example":"minDuration=15s"},"value":{"description":"Actual value.","example":"1m20s"}},"description":"One setting key-value pair.","example":{"key":"some.service.limit","type":"string","description":"Minimal interval between uploads.","value":"1m20s","defaultValue":"30s","overwritten":true,"protected":false,"validation":"minDuration=15s"},"required":["key","type","description","value","defaultValue","overwritten","protected"]},"SinkFileResponseBody":{"title":"SinkFileResponseBody","type":"object","properties":{"closingAt":{"type":"string","example":"2022-04-28T14:20:04.000Z","format":"date-time"},"importedAt":{"type":"string","example":"2022-04-28T14:20:04.000Z","format":"date-time"},"importingAt":{"type":"string","example":"2022-04-28T14:20:04.000Z","format":"date-time"},"openedAt":{"type":"string","example":"2022-04-28T14:20:04.000Z","format":"date-time"},"retryAfter":{"type":"string","description":"Next attempt time.","example":"2022-04-28T14:20:04.000Z","format":"date-time"},"retryAttempt":{"type":"integer","description":"Number of failed attempts.","example":3,"format":"int64"},"retryReason":{"type":"string","description":"Reason of the last failed attempt.","example":"network problem"},"state":{"type":"string","example":"writing","enum":["writing","closing","importing","imported"]},"statistics":{"$ref":"#/definitions/SinkFileStatisticsResponseBody"}},"example":{"state":"writing","openedAt":"2022-04-28T14:20:04.000Z","closingAt":"2022-04-28T14:20:04.000Z","importingAt":"2022-04-28T14:20:04.000Z","importedAt":"2022-04-28T14:20:04.000Z","retryAttempt":3,"retryReason":"network problem","retryAfter":"2022-04-28T14:20:04.000Z","statistics":{"total":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1},"levels":{"local":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1},"staging":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1},"target":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1}}}},"required":["state","openedAt","statistics"]},"SinkFileStatisticsResponseBody":{"title":"SinkFileStatisticsResponseBody","type":"object","properties":{"levels":{"$ref":"#/definitions/LevelsResponseBody"},"total":{"$ref":"#/definitions/LevelResponseBody"}},"example":{"total":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1},"levels":{"local":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1},"staging":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1},"target":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1}}},"required":["total","levels"]},"SinkResponseBody":{"title":"SinkResponseBody","type":"object","properties":{"branchId":{"type":"integer","example":345,"format":"int64"},"created":{"$ref":"#/definitions/CreatedEntityResponseBody"},"deleted":{"$ref":"#/definitions/DeletedEntityResponseBody"},"description":{"type":"string","description":"Description of the source.","example":"The sink stores records to a table.","maxLength":4096},"disabled":{"$ref":"#/definitions/DisabledEntityResponseBody"},"name":{"type":"string","description":"Human readable name of the sink.","example":"Raw Data Sink","minLength":1,"maxLength":40},"projectId":{"type":"integer","example":123,"format":"int64"},"sinkId":{"type":"string","example":"github-pr-table-sink","minLength":1,"maxLength":48},"sourceId":{"type":"string","example":"github-webhook-source","minLength":1,"maxLength":48},"table":{"$ref":"#/definitions/TableSinkResponseBody"},"type":{"type":"string","example":"table","enum":["table"]},"version":{"$ref":"#/definitions/VersionResponseBody"}},"description":"A mapping from imported data to a destination table.","example":{"projectId":123,"branchId":345,"sourceId":"github-webhook-source","sinkId":"github-pr-table-sink","type":"table","name":"Raw Data Sink","description":"The sink stores records to a table.","table":{"type":"keboola","tableId":"in.c-bucket.table","mapping":{"columns":[{"type":"uuid-v7","name":"id-col","primaryKey":true},{"type":"datetime","name":"datetime-col"},{"type":"ip","name":"ip-col"},{"type":"headers","name":"headers-col"},{"type":"body","name":"body-col"},{"type":"template","name":"template-col","template":{"language":"jsonnet","content":"body.foo + \"-\" + body.bar"}}]}},"version":{"number":3,"hash":"f43e93acd97eceb3","description":"The reason for the last change was...","at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"created":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"deleted":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"disabled":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"},"reason":"Disabled for recurring problems."}},"required":["projectId","branchId","sourceId","sinkId","type","name","description","version","created"]},"SourceResponseBody":{"title":"SourceResponseBody","type":"object","properties":{"branchId":{"type":"integer","example":345,"format":"int64"},"created":{"$ref":"#/definitions/CreatedEntityResponseBody"},"deleted":{"$ref":"#/definitions/DeletedEntityResponseBody"},"description":{"type":"string","description":"Description of the source.","example":"The source receives events from Github.","maxLength":4096},"disabled":{"$ref":"#/definitions/DisabledEntityResponseBody"},"http":{"$ref":"#/definitions/HTTPSourceResponseBody"},"name":{"type":"string","description":"Human readable name of the source.","example":"Github Webhook Source","minLength":1,"maxLength":40},"projectId":{"type":"integer","example":123,"format":"int64"},"sourceId":{"type":"string","example":"github-webhook-source","minLength":1,"maxLength":48},"type":{"type":"string","example":"http","enum":["http"]},"version":{"$ref":"#/definitions/VersionResponseBody"}},"description":"Source of data for further processing, start of the stream, max 100 sources per a branch.","example":{"projectId":123,"branchId":345,"sourceId":"github-webhook-source","type":"http","name":"Github Webhook Source","description":"The source receives events from Github.","http":{"url":"https://stream-in.keboola.com/G0lpTbz0vhakDicfoDQQ3BCzGYdW3qewd1D3eUbqETygHKGb"},"created":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"version":{"number":3,"hash":"f43e93acd97eceb3","description":"The reason for the last change was...","at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"deleted":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"disabled":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"},"reason":"Disabled for recurring problems."}},"required":["projectId","branchId","sourceId","type","name","description","created","version"]},"StreamAPIVersionIndexResponseBody":{"title":"StreamAPIVersionIndexResponseBody","type":"object","properties":{"api":{"type":"string","description":"Name of the API","example":"stream"},"documentation":{"type":"string","description":"URL of the API documentation.","example":"https://stream.keboola.com/v1/documentation"}},"example":{"api":"stream","documentation":"https://stream.keboola.com/v1/documentation"},"required":["api","documentation"]},"StreamCreateSinkRequestBody":{"title":"StreamCreateSinkRequestBody","type":"object","properties":{"description":{"type":"string","description":"Description of the source.","example":"The sink stores records to a table.","maxLength":4096},"name":{"type":"string","description":"Human readable name of the sink.","example":"Raw Data Sink","minLength":1,"maxLength":40},"sinkId":{"type":"string","description":"Optional ID, if not filled in, it will be generated from name. Cannot be changed later.","example":"github-pr-table-sink","minLength":1,"maxLength":48},"table":{"$ref":"#/definitions/TableSinkCreateRequestBody"},"type":{"type":"string","example":"table","enum":["table"]}},"example":{"sinkId":"github-pr-table-sink","type":"table","name":"Raw Data Sink","description":"The sink stores records to a table.","table":{"type":"keboola","tableId":"in.c-bucket.table","mapping":{"columns":[{"type":"uuid-v7","name":"id-col","primaryKey":true},{"type":"datetime","name":"datetime-col"},{"type":"ip","name":"ip-col"},{"type":"headers","name":"headers-col"},{"type":"body","name":"body-col"},{"type":"template","name":"template-col","template":{"language":"jsonnet","content":"body.foo + \"-\" + body.bar"}}]}}},"required":["type","name"]},"StreamCreateSinkResponseBody":{"title":"StreamCreateSinkResponseBody","type":"object","properties":{"createdAt":{"type":"string","description":"Date and time of the task creation.","example":"2022-04-28T14:20:04.000Z","format":"date-time"},"duration":{"type":"integer","description":"Duration of the task in milliseconds.","example":123456789,"format":"int64"},"error":{"type":"string","example":"abc123"},"finishedAt":{"type":"string","description":"Date and time of the task end.","example":"2022-04-28T14:20:04.000Z","format":"date-time"},"isFinished":{"type":"boolean","description":"Shortcut for status != \"processing\".","example":false},"outputs":{"$ref":"#/definitions/TaskOutputsResponseBody"},"result":{"type":"string","example":"abc123"},"status":{"type":"string","description":"Task status, one of: processing, success, error","example":"success","enum":["processing","success","error"]},"taskId":{"type":"string","example":"task_1234"},"type":{"type":"string","description":"Task type.","example":"abc123"},"url":{"type":"string","description":"URL of the task.","example":"abc123"}},"example":{"taskId":"task_1234","type":"abc123","url":"abc123","status":"success","isFinished":false,"createdAt":"2022-04-28T14:20:04.000Z","finishedAt":"2022-04-28T14:20:04.000Z","duration":123456789,"result":"abc123","error":"abc123","outputs":{"url":"abc123","projectId":123,"branchId":345,"sourceId":"github-webhook-source","sinkId":"github-pr-table-sink"}},"required":["taskId","type","url","status","isFinished","createdAt"]},"StreamCreateSinkStreamAPIResourceLimitReachedResponseBody":{"title":"StreamCreateSinkStreamAPIResourceLimitReachedResponseBody","type":"object","properties":{"error":{"type":"string","description":"Name of error.","example":"stream.internalError"},"message":{"type":"string","description":"Error message.","example":"Internal Error"},"statusCode":{"type":"integer","description":"HTTP status code.","example":500,"format":"int64"}},"description":"Resource limit reached.","example":{"statusCode":422,"error":"stream.api.resourceLimitReached","message":"Maximum number of sources per project is 100."},"required":["statusCode","error","message"]},"StreamCreateSinkStreamAPISinkAlreadyExistsResponseBody":{"title":"StreamCreateSinkStreamAPISinkAlreadyExistsResponseBody","type":"object","properties":{"error":{"type":"string","description":"Name of error.","example":"stream.internalError"},"message":{"type":"string","description":"Error message.","example":"Internal Error"},"statusCode":{"type":"integer","description":"HTTP status code.","example":500,"format":"int64"}},"description":"Sink already exists in the source.","example":{"statusCode":409,"error":"stream.api.sinkAlreadyExists","message":"Sink already exists in the source."},"required":["statusCode","error","message"]},"StreamCreateSinkStreamAPISourceNotFoundResponseBody":{"title":"StreamCreateSinkStreamAPISourceNotFoundResponseBody","type":"object","properties":{"error":{"type":"string","description":"Name of error.","example":"stream.internalError"},"message":{"type":"string","description":"Error message.","example":"Internal Error"},"statusCode":{"type":"integer","description":"HTTP status code.","example":500,"format":"int64"}},"description":"Source not found error.","example":{"statusCode":404,"error":"stream.api.sourceNotFound","message":"Source \"github-pull-requests\" not found."},"required":["statusCode","error","message"]},"StreamCreateSourceRequestBody":{"title":"StreamCreateSourceRequestBody","type":"object","properties":{"description":{"type":"string","description":"Description of the source.","example":"The source receives events from Github.","maxLength":4096},"name":{"type":"string","description":"Human readable name of the source.","example":"Github Webhook Source","minLength":1,"maxLength":40},"sourceId":{"type":"string","description":"Optional ID, if not filled in, it will be generated from name. Cannot be changed later.","example":"github-webhook-source","minLength":1,"maxLength":48},"type":{"type":"string","example":"http","enum":["http"]}},"example":{"sourceId":"github-webhook-source","type":"http","name":"Github Webhook Source","description":"The source receives events from Github."},"required":["type","name"]},"StreamCreateSourceResponseBody":{"title":"StreamCreateSourceResponseBody","type":"object","properties":{"createdAt":{"type":"string","description":"Date and time of the task creation.","example":"2022-04-28T14:20:04.000Z","format":"date-time"},"duration":{"type":"integer","description":"Duration of the task in milliseconds.","example":123456789,"format":"int64"},"error":{"type":"string","example":"abc123"},"finishedAt":{"type":"string","description":"Date and time of the task end.","example":"2022-04-28T14:20:04.000Z","format":"date-time"},"isFinished":{"type":"boolean","description":"Shortcut for status != \"processing\".","example":false},"outputs":{"$ref":"#/definitions/TaskOutputsResponseBody"},"result":{"type":"string","example":"abc123"},"status":{"type":"string","description":"Task status, one of: processing, success, error","example":"success","enum":["processing","success","error"]},"taskId":{"type":"string","example":"task_1234"},"type":{"type":"string","description":"Task type.","example":"abc123"},"url":{"type":"string","description":"URL of the task.","example":"abc123"}},"example":{"taskId":"task_1234","type":"abc123","url":"abc123","status":"success","isFinished":false,"createdAt":"2022-04-28T14:20:04.000Z","finishedAt":"2022-04-28T14:20:04.000Z","duration":123456789,"result":"abc123","error":"abc123","outputs":{"url":"abc123","projectId":123,"branchId":345,"sourceId":"github-webhook-source","sinkId":"github-pr-table-sink"}},"required":["taskId","type","url","status","isFinished","createdAt"]},"StreamCreateSourceStreamAPIResourceLimitReachedResponseBody":{"title":"StreamCreateSourceStreamAPIResourceLimitReachedResponseBody","type":"object","properties":{"error":{"type":"string","description":"Name of error.","example":"stream.internalError"},"message":{"type":"string","description":"Error message.","example":"Internal Error"},"statusCode":{"type":"integer","description":"HTTP status code.","example":500,"format":"int64"}},"description":"Resource limit reached.","example":{"statusCode":422,"error":"stream.api.resourceLimitReached","message":"Maximum number of sources per project is 100."},"required":["statusCode","error","message"]},"StreamCreateSourceStreamAPISourceAlreadyExistsResponseBody":{"title":"StreamCreateSourceStreamAPISourceAlreadyExistsResponseBody","type":"object","properties":{"error":{"type":"string","description":"Name of error.","example":"stream.internalError"},"message":{"type":"string","description":"Error message.","example":"Internal Error"},"statusCode":{"type":"integer","description":"HTTP status code.","example":500,"format":"int64"}},"description":"Source already exists in the branch.","example":{"statusCode":409,"error":"stream.api.sourceAlreadyExists","message":"Source already exists in the branch."},"required":["statusCode","error","message"]},"StreamDeleteSinkResponseBody":{"title":"StreamDeleteSinkResponseBody","type":"object","properties":{"createdAt":{"type":"string","description":"Date and time of the task creation.","example":"2022-04-28T14:20:04.000Z","format":"date-time"},"duration":{"type":"integer","description":"Duration of the task in milliseconds.","example":123456789,"format":"int64"},"error":{"type":"string","example":"abc123"},"finishedAt":{"type":"string","description":"Date and time of the task end.","example":"2022-04-28T14:20:04.000Z","format":"date-time"},"isFinished":{"type":"boolean","description":"Shortcut for status != \"processing\".","example":false},"outputs":{"$ref":"#/definitions/TaskOutputsResponseBody"},"result":{"type":"string","example":"abc123"},"status":{"type":"string","description":"Task status, one of: processing, success, error","example":"success","enum":["processing","success","error"]},"taskId":{"type":"string","example":"task_1234"},"type":{"type":"string","description":"Task type.","example":"abc123"},"url":{"type":"string","description":"URL of the task.","example":"abc123"}},"example":{"taskId":"task_1234","type":"abc123","url":"abc123","status":"success","isFinished":false,"createdAt":"2022-04-28T14:20:04.000Z","finishedAt":"2022-04-28T14:20:04.000Z","duration":123456789,"result":"abc123","error":"abc123","outputs":{"url":"abc123","projectId":123,"branchId":345,"sourceId":"github-webhook-source","sinkId":"github-pr-table-sink"}},"required":["taskId","type","url","status","isFinished","createdAt"]},"StreamDeleteSinkStreamAPISinkNotFoundResponseBody":{"title":"StreamDeleteSinkStreamAPISinkNotFoundResponseBody","type":"object","properties":{"error":{"type":"string","description":"Name of error.","example":"stream.internalError"},"message":{"type":"string","description":"Error message.","example":"Internal Error"},"statusCode":{"type":"integer","description":"HTTP status code.","example":500,"format":"int64"}},"description":"Sink not found error.","example":{"statusCode":404,"error":"stream.api.sinkNotFound","message":"Sink \"github-changed-files\" not found."},"required":["statusCode","error","message"]},"StreamDeleteSinkStreamAPISourceNotFoundResponseBody":{"title":"StreamDeleteSinkStreamAPISourceNotFoundResponseBody","type":"object","properties":{"error":{"type":"string","description":"Name of error.","example":"stream.internalError"},"message":{"type":"string","description":"Error message.","example":"Internal Error"},"statusCode":{"type":"integer","description":"HTTP status code.","example":500,"format":"int64"}},"description":"Source not found error.","example":{"statusCode":404,"error":"stream.api.sourceNotFound","message":"Source \"github-pull-requests\" not found."},"required":["statusCode","error","message"]},"StreamDeleteSourceResponseBody":{"title":"StreamDeleteSourceResponseBody","type":"object","properties":{"createdAt":{"type":"string","description":"Date and time of the task creation.","example":"2022-04-28T14:20:04.000Z","format":"date-time"},"duration":{"type":"integer","description":"Duration of the task in milliseconds.","example":123456789,"format":"int64"},"error":{"type":"string","example":"abc123"},"finishedAt":{"type":"string","description":"Date and time of the task end.","example":"2022-04-28T14:20:04.000Z","format":"date-time"},"isFinished":{"type":"boolean","description":"Shortcut for status != \"processing\".","example":false},"outputs":{"$ref":"#/definitions/TaskOutputsResponseBody"},"result":{"type":"string","example":"abc123"},"status":{"type":"string","description":"Task status, one of: processing, success, error","example":"success","enum":["processing","success","error"]},"taskId":{"type":"string","example":"task_1234"},"type":{"type":"string","description":"Task type.","example":"abc123"},"url":{"type":"string","description":"URL of the task.","example":"abc123"}},"example":{"taskId":"task_1234","type":"abc123","url":"abc123","status":"success","isFinished":false,"createdAt":"2022-04-28T14:20:04.000Z","finishedAt":"2022-04-28T14:20:04.000Z","duration":123456789,"result":"abc123","error":"abc123","outputs":{"url":"abc123","projectId":123,"branchId":345,"sourceId":"github-webhook-source","sinkId":"github-pr-table-sink"}},"required":["taskId","type","url","status","isFinished","createdAt"]},"StreamDeleteSourceStreamAPISourceNotFoundResponseBody":{"title":"StreamDeleteSourceStreamAPISourceNotFoundResponseBody","type":"object","properties":{"error":{"type":"string","description":"Name of error.","example":"stream.internalError"},"message":{"type":"string","description":"Error message.","example":"Internal Error"},"statusCode":{"type":"integer","description":"HTTP status code.","example":500,"format":"int64"}},"description":"Source not found error.","example":{"statusCode":404,"error":"stream.api.sourceNotFound","message":"Source \"github-pull-requests\" not found."},"required":["statusCode","error","message"]},"StreamGetSinkResponseBody":{"title":"StreamGetSinkResponseBody","type":"object","properties":{"branchId":{"type":"integer","example":345,"format":"int64"},"created":{"$ref":"#/definitions/CreatedEntityResponseBody"},"deleted":{"$ref":"#/definitions/DeletedEntityResponseBody"},"description":{"type":"string","description":"Description of the source.","example":"The sink stores records to a table.","maxLength":4096},"disabled":{"$ref":"#/definitions/DisabledEntityResponseBody"},"name":{"type":"string","description":"Human readable name of the sink.","example":"Raw Data Sink","minLength":1,"maxLength":40},"projectId":{"type":"integer","example":123,"format":"int64"},"sinkId":{"type":"string","example":"github-pr-table-sink","minLength":1,"maxLength":48},"sourceId":{"type":"string","example":"github-webhook-source","minLength":1,"maxLength":48},"table":{"$ref":"#/definitions/TableSinkResponseBody"},"type":{"type":"string","example":"table","enum":["table"]},"version":{"$ref":"#/definitions/VersionResponseBody"}},"example":{"projectId":123,"branchId":345,"sourceId":"github-webhook-source","sinkId":"github-pr-table-sink","type":"table","name":"Raw Data Sink","description":"The sink stores records to a table.","table":{"type":"keboola","tableId":"in.c-bucket.table","mapping":{"columns":[{"type":"uuid-v7","name":"id-col","primaryKey":true},{"type":"datetime","name":"datetime-col"},{"type":"ip","name":"ip-col"},{"type":"headers","name":"headers-col"},{"type":"body","name":"body-col"},{"type":"template","name":"template-col","template":{"language":"jsonnet","content":"body.foo + \"-\" + body.bar"}}]}},"version":{"number":3,"hash":"f43e93acd97eceb3","description":"The reason for the last change was...","at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"created":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"deleted":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"disabled":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"},"reason":"Disabled for recurring problems."}},"required":["projectId","branchId","sourceId","sinkId","type","name","description","version","created"]},"StreamGetSinkSettingsResponseBody":{"title":"StreamGetSinkSettingsResponseBody","type":"object","properties":{"settings":{"type":"array","items":{"$ref":"#/definitions/SettingResultResponseBody"},"example":[{"key":"some.service.limit","type":"string","description":"Minimal interval between uploads.","value":"1m20s","defaultValue":"30s","overwritten":true,"protected":false,"validation":"minDuration=15s"}]}},"example":{"settings":[{"key":"some.service.limit","type":"string","description":"Minimal interval between uploads.","value":"1m20s","defaultValue":"30s","overwritten":true,"protected":false,"validation":"minDuration=15s"}]}},"StreamGetSinkSettingsStreamAPISinkNotFoundResponseBody":{"title":"StreamGetSinkSettingsStreamAPISinkNotFoundResponseBody","type":"object","properties":{"error":{"type":"string","description":"Name of error.","example":"stream.internalError"},"message":{"type":"string","description":"Error message.","example":"Internal Error"},"statusCode":{"type":"integer","description":"HTTP status code.","example":500,"format":"int64"}},"description":"Sink not found error.","example":{"statusCode":404,"error":"stream.api.sinkNotFound","message":"Sink \"github-changed-files\" not found."},"required":["statusCode","error","message"]},"StreamGetSinkSettingsStreamAPISourceNotFoundResponseBody":{"title":"StreamGetSinkSettingsStreamAPISourceNotFoundResponseBody","type":"object","properties":{"error":{"type":"string","description":"Name of error.","example":"stream.internalError"},"message":{"type":"string","description":"Error message.","example":"Internal Error"},"statusCode":{"type":"integer","description":"HTTP status code.","example":500,"format":"int64"}},"description":"Source not found error.","example":{"statusCode":404,"error":"stream.api.sourceNotFound","message":"Source \"github-pull-requests\" not found."},"required":["statusCode","error","message"]},"StreamGetSinkStreamAPISinkNotFoundResponseBody":{"title":"StreamGetSinkStreamAPISinkNotFoundResponseBody","type":"object","properties":{"error":{"type":"string","description":"Name of error.","example":"stream.internalError"},"message":{"type":"string","description":"Error message.","example":"Internal Error"},"statusCode":{"type":"integer","description":"HTTP status code.","example":500,"format":"int64"}},"description":"Sink not found error.","example":{"statusCode":404,"error":"stream.api.sinkNotFound","message":"Sink \"github-changed-files\" not found."},"required":["statusCode","error","message"]},"StreamGetSinkStreamAPISourceNotFoundResponseBody":{"title":"StreamGetSinkStreamAPISourceNotFoundResponseBody","type":"object","properties":{"error":{"type":"string","description":"Name of error.","example":"stream.internalError"},"message":{"type":"string","description":"Error message.","example":"Internal Error"},"statusCode":{"type":"integer","description":"HTTP status code.","example":500,"format":"int64"}},"description":"Source not found error.","example":{"statusCode":404,"error":"stream.api.sourceNotFound","message":"Source \"github-pull-requests\" not found."},"required":["statusCode","error","message"]},"StreamGetSourceResponseBody":{"title":"StreamGetSourceResponseBody","type":"object","properties":{"branchId":{"type":"integer","example":345,"format":"int64"},"created":{"$ref":"#/definitions/CreatedEntityResponseBody"},"deleted":{"$ref":"#/definitions/DeletedEntityResponseBody"},"description":{"type":"string","description":"Description of the source.","example":"The source receives events from Github.","maxLength":4096},"disabled":{"$ref":"#/definitions/DisabledEntityResponseBody"},"http":{"$ref":"#/definitions/HTTPSourceResponseBody"},"name":{"type":"string","description":"Human readable name of the source.","example":"Github Webhook Source","minLength":1,"maxLength":40},"projectId":{"type":"integer","example":123,"format":"int64"},"sourceId":{"type":"string","example":"github-webhook-source","minLength":1,"maxLength":48},"type":{"type":"string","example":"http","enum":["http"]},"version":{"$ref":"#/definitions/VersionResponseBody"}},"example":{"projectId":123,"branchId":345,"sourceId":"github-webhook-source","type":"http","name":"Github Webhook Source","description":"The source receives events from Github.","http":{"url":"https://stream-in.keboola.com/G0lpTbz0vhakDicfoDQQ3BCzGYdW3qewd1D3eUbqETygHKGb"},"created":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"version":{"number":3,"hash":"f43e93acd97eceb3","description":"The reason for the last change was...","at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"deleted":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"disabled":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"},"reason":"Disabled for recurring problems."}},"required":["projectId","branchId","sourceId","type","name","description","created","version"]},"StreamGetSourceSettingsResponseBody":{"title":"StreamGetSourceSettingsResponseBody","type":"object","properties":{"settings":{"type":"array","items":{"$ref":"#/definitions/SettingResultResponseBody"},"example":[{"key":"some.service.limit","type":"string","description":"Minimal interval between uploads.","value":"1m20s","defaultValue":"30s","overwritten":true,"protected":false,"validation":"minDuration=15s"}]}},"example":{"settings":[{"key":"some.service.limit","type":"string","description":"Minimal interval between uploads.","value":"1m20s","defaultValue":"30s","overwritten":true,"protected":false,"validation":"minDuration=15s"}]}},"StreamGetSourceSettingsStreamAPISourceNotFoundResponseBody":{"title":"StreamGetSourceSettingsStreamAPISourceNotFoundResponseBody","type":"object","properties":{"error":{"type":"string","description":"Name of error.","example":"stream.internalError"},"message":{"type":"string","description":"Error message.","example":"Internal Error"},"statusCode":{"type":"integer","description":"HTTP status code.","example":500,"format":"int64"}},"description":"Source not found error.","example":{"statusCode":404,"error":"stream.api.sourceNotFound","message":"Source \"github-pull-requests\" not found."},"required":["statusCode","error","message"]},"StreamGetSourceStreamAPISourceNotFoundResponseBody":{"title":"StreamGetSourceStreamAPISourceNotFoundResponseBody","type":"object","properties":{"error":{"type":"string","description":"Name of error.","example":"stream.internalError"},"message":{"type":"string","description":"Error message.","example":"Internal Error"},"statusCode":{"type":"integer","description":"HTTP status code.","example":500,"format":"int64"}},"description":"Source not found error.","example":{"statusCode":404,"error":"stream.api.sourceNotFound","message":"Source \"github-pull-requests\" not found."},"required":["statusCode","error","message"]},"StreamGetTaskResponseBody":{"title":"StreamGetTaskResponseBody","type":"object","properties":{"createdAt":{"type":"string","description":"Date and time of the task creation.","example":"2022-04-28T14:20:04.000Z","format":"date-time"},"duration":{"type":"integer","description":"Duration of the task in milliseconds.","example":123456789,"format":"int64"},"error":{"type":"string","example":"abc123"},"finishedAt":{"type":"string","description":"Date and time of the task end.","example":"2022-04-28T14:20:04.000Z","format":"date-time"},"isFinished":{"type":"boolean","description":"Shortcut for status != \"processing\".","example":false},"outputs":{"$ref":"#/definitions/TaskOutputsResponseBody"},"result":{"type":"string","example":"abc123"},"status":{"type":"string","description":"Task status, one of: processing, success, error","example":"success","enum":["processing","success","error"]},"taskId":{"type":"string","example":"task_1234"},"type":{"type":"string","description":"Task type.","example":"abc123"},"url":{"type":"string","description":"URL of the task.","example":"abc123"}},"example":{"taskId":"task_1234","type":"abc123","url":"abc123","status":"success","isFinished":false,"createdAt":"2022-04-28T14:20:04.000Z","finishedAt":"2022-04-28T14:20:04.000Z","duration":123456789,"result":"abc123","error":"abc123","outputs":{"url":"abc123","projectId":123,"branchId":345,"sourceId":"github-webhook-source","sinkId":"github-pr-table-sink"}},"required":["taskId","type","url","status","isFinished","createdAt"]},"StreamGetTaskStreamAPITaskNotFoundResponseBody":{"title":"StreamGetTaskStreamAPITaskNotFoundResponseBody","type":"object","properties":{"error":{"type":"string","description":"Name of error.","example":"stream.internalError"},"message":{"type":"string","description":"Error message.","example":"Internal Error"},"statusCode":{"type":"integer","description":"HTTP status code.","example":500,"format":"int64"}},"description":"Task not found error.","example":{"statusCode":404,"error":"stream.api.taskNotFound","message":"Task \"001\" not found."},"required":["statusCode","error","message"]},"StreamListSinksResponseBody":{"title":"StreamListSinksResponseBody","type":"object","properties":{"branchId":{"type":"integer","example":345,"format":"int64"},"page":{"$ref":"#/definitions/PaginatedResponseResponseBody"},"projectId":{"type":"integer","example":123,"format":"int64"},"sinks":{"type":"array","items":{"$ref":"#/definitions/SinkResponseBody"},"example":[{"projectId":123,"branchId":345,"sourceId":"github-webhook-source","sinkId":"github-pr-table-sink","type":"table","name":"Raw Data Sink","description":"The sink stores records to a table.","table":{"type":"keboola","tableId":"in.c-bucket.table","mapping":{"columns":[{"type":"uuid-v7","name":"id-col","primaryKey":true},{"type":"datetime","name":"datetime-col"},{"type":"ip","name":"ip-col"},{"type":"headers","name":"headers-col"},{"type":"body","name":"body-col"},{"type":"template","name":"template-col","template":{"language":"jsonnet","content":"body.foo + \"-\" + body.bar"}}]}},"version":{"number":3,"hash":"f43e93acd97eceb3","description":"The reason for the last change was...","at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"created":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"deleted":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"disabled":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"},"reason":"Disabled for recurring problems."}}]},"sourceId":{"type":"string","example":"github-webhook-source","minLength":1,"maxLength":48}},"example":{"projectId":123,"branchId":345,"sourceId":"github-webhook-source","page":{"limit":100,"totalCount":1000,"sinceId":"my-object-123","lastId":"my-object-456"},"sinks":[{"projectId":123,"branchId":345,"sourceId":"github-webhook-source","sinkId":"github-pr-table-sink","type":"table","name":"Raw Data Sink","description":"The sink stores records to a table.","table":{"type":"keboola","tableId":"in.c-bucket.table","mapping":{"columns":[{"type":"uuid-v7","name":"id-col","primaryKey":true},{"type":"datetime","name":"datetime-col"},{"type":"ip","name":"ip-col"},{"type":"headers","name":"headers-col"},{"type":"body","name":"body-col"},{"type":"template","name":"template-col","template":{"language":"jsonnet","content":"body.foo + \"-\" + body.bar"}}]}},"version":{"number":3,"hash":"f43e93acd97eceb3","description":"The reason for the last change was...","at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"created":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"deleted":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"disabled":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"},"reason":"Disabled for recurring problems."}}]},"required":["projectId","branchId","sourceId","page","sinks"]},"StreamListSinksStreamAPISourceNotFoundResponseBody":{"title":"StreamListSinksStreamAPISourceNotFoundResponseBody","type":"object","properties":{"error":{"type":"string","description":"Name of error.","example":"stream.internalError"},"message":{"type":"string","description":"Error message.","example":"Internal Error"},"statusCode":{"type":"integer","description":"HTTP status code.","example":500,"format":"int64"}},"description":"Source not found error.","example":{"statusCode":404,"error":"stream.api.sourceNotFound","message":"Source \"github-pull-requests\" not found."},"required":["statusCode","error","message"]},"StreamListSourcesResponseBody":{"title":"StreamListSourcesResponseBody","type":"object","properties":{"branchId":{"type":"integer","example":345,"format":"int64"},"page":{"$ref":"#/definitions/PaginatedResponseResponseBody"},"projectId":{"type":"integer","example":123,"format":"int64"},"sources":{"type":"array","items":{"$ref":"#/definitions/SourceResponseBody"},"example":[{"projectId":123,"branchId":345,"sourceId":"github-webhook-source","type":"http","name":"Github Webhook Source","description":"The source receives events from Github.","http":{"url":"https://stream-in.keboola.com/G0lpTbz0vhakDicfoDQQ3BCzGYdW3qewd1D3eUbqETygHKGb"},"created":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"version":{"number":3,"hash":"f43e93acd97eceb3","description":"The reason for the last change was...","at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"deleted":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"disabled":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"},"reason":"Disabled for recurring problems."}}]}},"example":{"projectId":123,"branchId":345,"page":{"limit":100,"totalCount":1000,"sinceId":"my-object-123","lastId":"my-object-456"},"sources":[{"projectId":123,"branchId":345,"sourceId":"github-webhook-source","type":"http","name":"Github Webhook Source","description":"The source receives events from Github.","http":{"url":"https://stream-in.keboola.com/G0lpTbz0vhakDicfoDQQ3BCzGYdW3qewd1D3eUbqETygHKGb"},"created":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"version":{"number":3,"hash":"f43e93acd97eceb3","description":"The reason for the last change was...","at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"deleted":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"disabled":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"},"reason":"Disabled for recurring problems."}}]},"required":["projectId","branchId","page","sources"]},"StreamSinkStatisticsFilesResponseBody":{"title":"StreamSinkStatisticsFilesResponseBody","type":"object","properties":{"files":{"type":"array","items":{"$ref":"#/definitions/SinkFileResponseBody"},"example":[{"state":"writing","openedAt":"2022-04-28T14:20:04.000Z","closingAt":"2022-04-28T14:20:04.000Z","importingAt":"2022-04-28T14:20:04.000Z","importedAt":"2022-04-28T14:20:04.000Z","retryAttempt":3,"retryReason":"network problem","retryAfter":"2022-04-28T14:20:04.000Z","statistics":{"total":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1},"levels":{"local":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1},"staging":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1},"target":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1}}}}]}},"example":{"files":[{"state":"writing","openedAt":"2022-04-28T14:20:04.000Z","closingAt":"2022-04-28T14:20:04.000Z","importingAt":"2022-04-28T14:20:04.000Z","importedAt":"2022-04-28T14:20:04.000Z","retryAttempt":3,"retryReason":"network problem","retryAfter":"2022-04-28T14:20:04.000Z","statistics":{"total":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1},"levels":{"local":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1},"staging":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1},"target":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1}}}}]},"required":["files"]},"StreamSinkStatisticsFilesStreamAPISinkNotFoundResponseBody":{"title":"StreamSinkStatisticsFilesStreamAPISinkNotFoundResponseBody","type":"object","properties":{"error":{"type":"string","description":"Name of error.","example":"stream.internalError"},"message":{"type":"string","description":"Error message.","example":"Internal Error"},"statusCode":{"type":"integer","description":"HTTP status code.","example":500,"format":"int64"}},"description":"Sink not found error.","example":{"statusCode":404,"error":"stream.api.sinkNotFound","message":"Sink \"github-changed-files\" not found."},"required":["statusCode","error","message"]},"StreamSinkStatisticsFilesStreamAPISourceNotFoundResponseBody":{"title":"StreamSinkStatisticsFilesStreamAPISourceNotFoundResponseBody","type":"object","properties":{"error":{"type":"string","description":"Name of error.","example":"stream.internalError"},"message":{"type":"string","description":"Error message.","example":"Internal Error"},"statusCode":{"type":"integer","description":"HTTP status code.","example":500,"format":"int64"}},"description":"Source not found error.","example":{"statusCode":404,"error":"stream.api.sourceNotFound","message":"Source \"github-pull-requests\" not found."},"required":["statusCode","error","message"]},"StreamSinkStatisticsTotalResponseBody":{"title":"StreamSinkStatisticsTotalResponseBody","type":"object","properties":{"levels":{"$ref":"#/definitions/LevelsResponseBody"},"total":{"$ref":"#/definitions/LevelResponseBody"}},"example":{"total":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1},"levels":{"local":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1},"staging":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1},"target":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1}}},"required":["total","levels"]},"StreamSinkStatisticsTotalStreamAPISinkNotFoundResponseBody":{"title":"StreamSinkStatisticsTotalStreamAPISinkNotFoundResponseBody","type":"object","properties":{"error":{"type":"string","description":"Name of error.","example":"stream.internalError"},"message":{"type":"string","description":"Error message.","example":"Internal Error"},"statusCode":{"type":"integer","description":"HTTP status code.","example":500,"format":"int64"}},"description":"Sink not found error.","example":{"statusCode":404,"error":"stream.api.sinkNotFound","message":"Sink \"github-changed-files\" not found."},"required":["statusCode","error","message"]},"StreamSinkStatisticsTotalStreamAPISourceNotFoundResponseBody":{"title":"StreamSinkStatisticsTotalStreamAPISourceNotFoundResponseBody","type":"object","properties":{"error":{"type":"string","description":"Name of error.","example":"stream.internalError"},"message":{"type":"string","description":"Error message.","example":"Internal Error"},"statusCode":{"type":"integer","description":"HTTP status code.","example":500,"format":"int64"}},"description":"Source not found error.","example":{"statusCode":404,"error":"stream.api.sourceNotFound","message":"Source \"github-pull-requests\" not found."},"required":["statusCode","error","message"]},"StreamTestSourceResponseBody":{"title":"StreamTestSourceResponseBody","type":"object","properties":{"branchId":{"type":"integer","example":345,"format":"int64"},"projectId":{"type":"integer","example":123,"format":"int64"},"sourceId":{"type":"string","example":"github-webhook-source","minLength":1,"maxLength":48},"tables":{"type":"array","items":{"$ref":"#/definitions/TestResultTableResponseBody"},"description":"Table for each configured sink.","example":[{"sinkId":"github-pr-table-sink","tableId":"in.c-bucket.table","rows":[{"columns":[{"name":"id","value":"12345"}]}]}]}},"example":{"projectId":123,"branchId":345,"sourceId":"github-webhook-source","tables":[{"sinkId":"github-pr-table-sink","tableId":"in.c-bucket.table","rows":[{"columns":[{"name":"id","value":"12345"}]}]}]},"required":["projectId","branchId","sourceId","tables"]},"StreamTestSourceStreamAPISourceNotFoundResponseBody":{"title":"StreamTestSourceStreamAPISourceNotFoundResponseBody","type":"object","properties":{"error":{"type":"string","description":"Name of error.","example":"stream.internalError"},"message":{"type":"string","description":"Error message.","example":"Internal Error"},"statusCode":{"type":"integer","description":"HTTP status code.","example":500,"format":"int64"}},"description":"Source not found error.","example":{"statusCode":404,"error":"stream.api.sourceNotFound","message":"Source \"github-pull-requests\" not found."},"required":["statusCode","error","message"]},"StreamUpdateSinkRequestBody":{"title":"StreamUpdateSinkRequestBody","type":"object","properties":{"changeDescription":{"type":"string","description":"Description of the modification, description of the version.","example":"Renamed."},"description":{"type":"string","description":"Description of the source.","example":"The sink stores records to a table.","maxLength":4096},"name":{"type":"string","description":"Human readable name of the sink.","example":"Raw Data Sink","minLength":1,"maxLength":40},"table":{"$ref":"#/definitions/TableSinkUpdateRequestBody"},"type":{"type":"string","example":"table","enum":["table"]}},"example":{"changeDescription":"Renamed.","type":"table","name":"Raw Data Sink","description":"The sink stores records to a table.","table":{"type":"keboola","tableId":"in.c-bucket.table","mapping":{"columns":[{"type":"uuid-v7","name":"id-col","primaryKey":true},{"type":"datetime","name":"datetime-col"},{"type":"ip","name":"ip-col"},{"type":"headers","name":"headers-col"},{"type":"body","name":"body-col"},{"type":"template","name":"template-col","template":{"language":"jsonnet","content":"body.foo + \"-\" + body.bar"}}]}}}},"StreamUpdateSinkResponseBody":{"title":"StreamUpdateSinkResponseBody","type":"object","properties":{"createdAt":{"type":"string","description":"Date and time of the task creation.","example":"2022-04-28T14:20:04.000Z","format":"date-time"},"duration":{"type":"integer","description":"Duration of the task in milliseconds.","example":123456789,"format":"int64"},"error":{"type":"string","example":"abc123"},"finishedAt":{"type":"string","description":"Date and time of the task end.","example":"2022-04-28T14:20:04.000Z","format":"date-time"},"isFinished":{"type":"boolean","description":"Shortcut for status != \"processing\".","example":false},"outputs":{"$ref":"#/definitions/TaskOutputsResponseBody"},"result":{"type":"string","example":"abc123"},"status":{"type":"string","description":"Task status, one of: processing, success, error","example":"success","enum":["processing","success","error"]},"taskId":{"type":"string","example":"task_1234"},"type":{"type":"string","description":"Task type.","example":"abc123"},"url":{"type":"string","description":"URL of the task.","example":"abc123"}},"example":{"taskId":"task_1234","type":"abc123","url":"abc123","status":"success","isFinished":false,"createdAt":"2022-04-28T14:20:04.000Z","finishedAt":"2022-04-28T14:20:04.000Z","duration":123456789,"result":"abc123","error":"abc123","outputs":{"url":"abc123","projectId":123,"branchId":345,"sourceId":"github-webhook-source","sinkId":"github-pr-table-sink"}},"required":["taskId","type","url","status","isFinished","createdAt"]},"StreamUpdateSinkSettingsRequestBody":{"title":"StreamUpdateSinkSettingsRequestBody","type":"object","properties":{"changeDescription":{"type":"string","description":"Description of the modification, description of the version.","example":"Updated settings."},"settings":{"type":"array","items":{"$ref":"#/definitions/SettingPatchRequestBody"},"example":[{"key":"some.service.limit","value":"1m20s"}]}},"example":{"changeDescription":"Updated settings.","settings":[{"key":"some.service.limit","value":"1m20s"}]}},"StreamUpdateSinkSettingsResponseBody":{"title":"StreamUpdateSinkSettingsResponseBody","type":"object","properties":{"createdAt":{"type":"string","description":"Date and time of the task creation.","example":"2022-04-28T14:20:04.000Z","format":"date-time"},"duration":{"type":"integer","description":"Duration of the task in milliseconds.","example":123456789,"format":"int64"},"error":{"type":"string","example":"abc123"},"finishedAt":{"type":"string","description":"Date and time of the task end.","example":"2022-04-28T14:20:04.000Z","format":"date-time"},"isFinished":{"type":"boolean","description":"Shortcut for status != \"processing\".","example":false},"outputs":{"$ref":"#/definitions/TaskOutputsResponseBody"},"result":{"type":"string","example":"abc123"},"status":{"type":"string","description":"Task status, one of: processing, success, error","example":"success","enum":["processing","success","error"]},"taskId":{"type":"string","example":"task_1234"},"type":{"type":"string","description":"Task type.","example":"abc123"},"url":{"type":"string","description":"URL of the task.","example":"abc123"}},"example":{"taskId":"task_1234","type":"abc123","url":"abc123","status":"success","isFinished":false,"createdAt":"2022-04-28T14:20:04.000Z","finishedAt":"2022-04-28T14:20:04.000Z","duration":123456789,"result":"abc123","error":"abc123","outputs":{"url":"abc123","projectId":123,"branchId":345,"sourceId":"github-webhook-source","sinkId":"github-pr-table-sink"}},"required":["taskId","type","url","status","isFinished","createdAt"]},"StreamUpdateSinkSettingsStreamAPIForbiddenResponseBody":{"title":"StreamUpdateSinkSettingsStreamAPIForbiddenResponseBody","type":"object","properties":{"error":{"type":"string","description":"Name of error.","example":"stream.internalError"},"message":{"type":"string","description":"Error message.","example":"Internal Error"},"statusCode":{"type":"integer","description":"HTTP status code.","example":500,"format":"int64"}},"description":"Modification of protected settings is forbidden.","example":{"statusCode":404,"error":"stream.api.forbidden","message":"Cannot modify protected keys: \"storage.level.local.compression.gzip.blockSize\"."},"required":["statusCode","error","message"]},"StreamUpdateSinkSettingsStreamAPISinkNotFoundResponseBody":{"title":"StreamUpdateSinkSettingsStreamAPISinkNotFoundResponseBody","type":"object","properties":{"error":{"type":"string","description":"Name of error.","example":"stream.internalError"},"message":{"type":"string","description":"Error message.","example":"Internal Error"},"statusCode":{"type":"integer","description":"HTTP status code.","example":500,"format":"int64"}},"description":"Sink not found error.","example":{"statusCode":404,"error":"stream.api.sinkNotFound","message":"Sink \"github-changed-files\" not found."},"required":["statusCode","error","message"]},"StreamUpdateSinkSettingsStreamAPISourceNotFoundResponseBody":{"title":"StreamUpdateSinkSettingsStreamAPISourceNotFoundResponseBody","type":"object","properties":{"error":{"type":"string","description":"Name of error.","example":"stream.internalError"},"message":{"type":"string","description":"Error message.","example":"Internal Error"},"statusCode":{"type":"integer","description":"HTTP status code.","example":500,"format":"int64"}},"description":"Source not found error.","example":{"statusCode":404,"error":"stream.api.sourceNotFound","message":"Source \"github-pull-requests\" not found."},"required":["statusCode","error","message"]},"StreamUpdateSinkStreamAPISinkNotFoundResponseBody":{"title":"StreamUpdateSinkStreamAPISinkNotFoundResponseBody","type":"object","properties":{"error":{"type":"string","description":"Name of error.","example":"stream.internalError"},"message":{"type":"string","description":"Error message.","example":"Internal Error"},"statusCode":{"type":"integer","description":"HTTP status code.","example":500,"format":"int64"}},"description":"Sink not found error.","example":{"statusCode":404,"error":"stream.api.sinkNotFound","message":"Sink \"github-changed-files\" not found."},"required":["statusCode","error","message"]},"StreamUpdateSinkStreamAPISourceNotFoundResponseBody":{"title":"StreamUpdateSinkStreamAPISourceNotFoundResponseBody","type":"object","properties":{"error":{"type":"string","description":"Name of error.","example":"stream.internalError"},"message":{"type":"string","description":"Error message.","example":"Internal Error"},"statusCode":{"type":"integer","description":"HTTP status code.","example":500,"format":"int64"}},"description":"Source not found error.","example":{"statusCode":404,"error":"stream.api.sourceNotFound","message":"Source \"github-pull-requests\" not found."},"required":["statusCode","error","message"]},"StreamUpdateSourceRequestBody":{"title":"StreamUpdateSourceRequestBody","type":"object","properties":{"changeDescription":{"type":"string","description":"Description of the modification, description of the version.","example":"Renamed."},"description":{"type":"string","description":"Description of the source.","example":"The source receives events from Github.","maxLength":4096},"name":{"type":"string","description":"Human readable name of the source.","example":"Github Webhook Source","minLength":1,"maxLength":40},"type":{"type":"string","example":"http","enum":["http"]}},"example":{"changeDescription":"Renamed.","type":"http","name":"Github Webhook Source","description":"The source receives events from Github."}},"StreamUpdateSourceResponseBody":{"title":"StreamUpdateSourceResponseBody","type":"object","properties":{"createdAt":{"type":"string","description":"Date and time of the task creation.","example":"2022-04-28T14:20:04.000Z","format":"date-time"},"duration":{"type":"integer","description":"Duration of the task in milliseconds.","example":123456789,"format":"int64"},"error":{"type":"string","example":"abc123"},"finishedAt":{"type":"string","description":"Date and time of the task end.","example":"2022-04-28T14:20:04.000Z","format":"date-time"},"isFinished":{"type":"boolean","description":"Shortcut for status != \"processing\".","example":false},"outputs":{"$ref":"#/definitions/TaskOutputsResponseBody"},"result":{"type":"string","example":"abc123"},"status":{"type":"string","description":"Task status, one of: processing, success, error","example":"success","enum":["processing","success","error"]},"taskId":{"type":"string","example":"task_1234"},"type":{"type":"string","description":"Task type.","example":"abc123"},"url":{"type":"string","description":"URL of the task.","example":"abc123"}},"example":{"taskId":"task_1234","type":"abc123","url":"abc123","status":"success","isFinished":false,"createdAt":"2022-04-28T14:20:04.000Z","finishedAt":"2022-04-28T14:20:04.000Z","duration":123456789,"result":"abc123","error":"abc123","outputs":{"url":"abc123","projectId":123,"branchId":345,"sourceId":"github-webhook-source","sinkId":"github-pr-table-sink"}},"required":["taskId","type","url","status","isFinished","createdAt"]},"StreamUpdateSourceSettingsRequestBody":{"title":"StreamUpdateSourceSettingsRequestBody","type":"object","properties":{"changeDescription":{"type":"string","description":"Description of the modification, description of the version.","example":"Updated settings."},"settings":{"type":"array","items":{"$ref":"#/definitions/SettingPatchRequestBody"},"example":[{"key":"some.service.limit","value":"1m20s"}]}},"example":{"changeDescription":"Updated settings.","settings":[{"key":"some.service.limit","value":"1m20s"}]}},"StreamUpdateSourceSettingsResponseBody":{"title":"StreamUpdateSourceSettingsResponseBody","type":"object","properties":{"createdAt":{"type":"string","description":"Date and time of the task creation.","example":"2022-04-28T14:20:04.000Z","format":"date-time"},"duration":{"type":"integer","description":"Duration of the task in milliseconds.","example":123456789,"format":"int64"},"error":{"type":"string","example":"abc123"},"finishedAt":{"type":"string","description":"Date and time of the task end.","example":"2022-04-28T14:20:04.000Z","format":"date-time"},"isFinished":{"type":"boolean","description":"Shortcut for status != \"processing\".","example":false},"outputs":{"$ref":"#/definitions/TaskOutputsResponseBody"},"result":{"type":"string","example":"abc123"},"status":{"type":"string","description":"Task status, one of: processing, success, error","example":"success","enum":["processing","success","error"]},"taskId":{"type":"string","example":"task_1234"},"type":{"type":"string","description":"Task type.","example":"abc123"},"url":{"type":"string","description":"URL of the task.","example":"abc123"}},"example":{"taskId":"task_1234","type":"abc123","url":"abc123","status":"success","isFinished":false,"createdAt":"2022-04-28T14:20:04.000Z","finishedAt":"2022-04-28T14:20:04.000Z","duration":123456789,"result":"abc123","error":"abc123","outputs":{"url":"abc123","projectId":123,"branchId":345,"sourceId":"github-webhook-source","sinkId":"github-pr-table-sink"}},"required":["taskId","type","url","status","isFinished","createdAt"]},"StreamUpdateSourceSettingsStreamAPIForbiddenResponseBody":{"title":"StreamUpdateSourceSettingsStreamAPIForbiddenResponseBody","type":"object","properties":{"error":{"type":"string","description":"Name of error.","example":"stream.internalError"},"message":{"type":"string","description":"Error message.","example":"Internal Error"},"statusCode":{"type":"integer","description":"HTTP status code.","example":500,"format":"int64"}},"description":"Modification of protected settings is forbidden.","example":{"statusCode":404,"error":"stream.api.forbidden","message":"Cannot modify protected keys: \"storage.level.local.compression.gzip.blockSize\"."},"required":["statusCode","error","message"]},"StreamUpdateSourceSettingsStreamAPISourceNotFoundResponseBody":{"title":"StreamUpdateSourceSettingsStreamAPISourceNotFoundResponseBody","type":"object","properties":{"error":{"type":"string","description":"Name of error.","example":"stream.internalError"},"message":{"type":"string","description":"Error message.","example":"Internal Error"},"statusCode":{"type":"integer","description":"HTTP status code.","example":500,"format":"int64"}},"description":"Source not found error.","example":{"statusCode":404,"error":"stream.api.sourceNotFound","message":"Source \"github-pull-requests\" not found."},"required":["statusCode","error","message"]},"StreamUpdateSourceStreamAPISourceNotFoundResponseBody":{"title":"StreamUpdateSourceStreamAPISourceNotFoundResponseBody","type":"object","properties":{"error":{"type":"string","description":"Name of error.","example":"stream.internalError"},"message":{"type":"string","description":"Error message.","example":"Internal Error"},"statusCode":{"type":"integer","description":"HTTP status code.","example":500,"format":"int64"}},"description":"Source not found error.","example":{"statusCode":404,"error":"stream.api.sourceNotFound","message":"Source \"github-pull-requests\" not found."},"required":["statusCode","error","message"]},"TableColumnRequestBody":{"title":"TableColumnRequestBody","type":"object","properties":{"name":{"type":"string","description":"Column name.","example":"id-col"},"primaryKey":{"type":"boolean","description":"Sets this column as a part of the primary key of the destination table.","default":false,"example":false},"template":{"$ref":"#/definitions/TableColumnTemplateRequestBody"},"type":{"type":"string","description":"Column mapping type. This represents a static mapping (e.g. `body` or `headers`), or a custom mapping using a template language (`template`).","example":"body","enum":["uuid-v7","datetime","ip","body","headers","template"]}},"description":"An output mapping defined by a template.","example":{"primaryKey":false,"type":"body","name":"id-col","template":{"language":"jsonnet","content":"body.foo + \"-\" + body.bar"}},"required":["type","name"]},"TableColumnResponseBody":{"title":"TableColumnResponseBody","type":"object","properties":{"name":{"type":"string","description":"Column name.","example":"id-col"},"primaryKey":{"type":"boolean","description":"Sets this column as a part of the primary key of the destination table.","default":false,"example":false},"template":{"$ref":"#/definitions/TableColumnTemplateResponseBody"},"type":{"type":"string","description":"Column mapping type. This represents a static mapping (e.g. `body` or `headers`), or a custom mapping using a template language (`template`).","example":"body","enum":["uuid-v7","datetime","ip","body","headers","template"]}},"description":"An output mapping defined by a template.","example":{"primaryKey":false,"type":"body","name":"id-col","template":{"language":"jsonnet","content":"body.foo + \"-\" + body.bar"}},"required":["type","name"]},"TableColumnTemplateRequestBody":{"title":"TableColumnTemplateRequestBody","type":"object","properties":{"content":{"type":"string","example":"body.foo + \"-\" + body.bar","minLength":1,"maxLength":4096},"language":{"type":"string","example":"jsonnet","enum":["jsonnet"]}},"description":"Template column definition, for \"type\" = \"template\".","example":{"language":"jsonnet","content":"body.foo + \"-\" + body.bar"},"required":["language","content"]},"TableColumnTemplateResponseBody":{"title":"TableColumnTemplateResponseBody","type":"object","properties":{"content":{"type":"string","example":"body.foo + \"-\" + body.bar","minLength":1,"maxLength":4096},"language":{"type":"string","example":"jsonnet","enum":["jsonnet"]}},"description":"Template column definition, for \"type\" = \"template\".","example":{"language":"jsonnet","content":"body.foo + \"-\" + body.bar"},"required":["language","content"]},"TableMappingRequestBody":{"title":"TableMappingRequestBody","type":"object","properties":{"columns":{"type":"array","items":{"$ref":"#/definitions/TableColumnRequestBody"},"example":[{"type":"uuid-v7","name":"id-col","primaryKey":true},{"type":"datetime","name":"datetime-col"},{"type":"ip","name":"ip-col"},{"type":"headers","name":"headers-col"},{"type":"body","name":"body-col"},{"type":"template","name":"template-col","template":{"language":"jsonnet","content":"body.foo + \"-\" + body.bar"}}],"minItems":1,"maxItems":100}},"description":"Table mapping definition.","example":{"columns":[{"type":"uuid-v7","name":"id-col","primaryKey":true},{"type":"datetime","name":"datetime-col"},{"type":"ip","name":"ip-col"},{"type":"headers","name":"headers-col"},{"type":"body","name":"body-col"},{"type":"template","name":"template-col","template":{"language":"jsonnet","content":"body.foo + \"-\" + body.bar"}}]},"required":["columns"]},"TableMappingResponseBody":{"title":"TableMappingResponseBody","type":"object","properties":{"columns":{"type":"array","items":{"$ref":"#/definitions/TableColumnResponseBody"},"example":[{"type":"uuid-v7","name":"id-col","primaryKey":true},{"type":"datetime","name":"datetime-col"},{"type":"ip","name":"ip-col"},{"type":"headers","name":"headers-col"},{"type":"body","name":"body-col"},{"type":"template","name":"template-col","template":{"language":"jsonnet","content":"body.foo + \"-\" + body.bar"}}],"minItems":1,"maxItems":100}},"description":"Table mapping definition.","example":{"columns":[{"type":"uuid-v7","name":"id-col","primaryKey":true},{"type":"datetime","name":"datetime-col"},{"type":"ip","name":"ip-col"},{"type":"headers","name":"headers-col"},{"type":"body","name":"body-col"},{"type":"template","name":"template-col","template":{"language":"jsonnet","content":"body.foo + \"-\" + body.bar"}}]},"required":["columns"]},"TableSinkCreateRequestBody":{"title":"TableSinkCreateRequestBody","type":"object","properties":{"mapping":{"$ref":"#/definitions/TableMappingRequestBody"},"tableId":{"type":"string","example":"in.c-bucket.table"},"type":{"type":"string","example":"keboola","enum":["keboola"]}},"description":"Table sink configuration for \"type\" = \"table\".","example":{"type":"keboola","tableId":"in.c-bucket.table","mapping":{"columns":[{"type":"uuid-v7","name":"id-col","primaryKey":true},{"type":"datetime","name":"datetime-col"},{"type":"ip","name":"ip-col"},{"type":"headers","name":"headers-col"},{"type":"body","name":"body-col"},{"type":"template","name":"template-col","template":{"language":"jsonnet","content":"body.foo + \"-\" + body.bar"}}]}},"required":["type","tableId","mapping"]},"TableSinkResponseBody":{"title":"TableSinkResponseBody","type":"object","properties":{"mapping":{"$ref":"#/definitions/TableMappingResponseBody"},"tableId":{"type":"string","example":"in.c-bucket.table"},"type":{"type":"string","example":"keboola","enum":["keboola"]}},"description":"Table sink configuration for \"type\" = \"table\".","example":{"type":"keboola","tableId":"in.c-bucket.table","mapping":{"columns":[{"type":"uuid-v7","name":"id-col","primaryKey":true},{"type":"datetime","name":"datetime-col"},{"type":"ip","name":"ip-col"},{"type":"headers","name":"headers-col"},{"type":"body","name":"body-col"},{"type":"template","name":"template-col","template":{"language":"jsonnet","content":"body.foo + \"-\" + body.bar"}}]}},"required":["type","tableId","mapping"]},"TableSinkUpdateRequestBody":{"title":"TableSinkUpdateRequestBody","type":"object","properties":{"mapping":{"$ref":"#/definitions/TableMappingRequestBody"},"tableId":{"type":"string","example":"in.c-bucket.table"},"type":{"type":"string","example":"keboola","enum":["keboola"]}},"description":"Table sink configuration for \"type\" = \"table\".","example":{"type":"keboola","tableId":"in.c-bucket.table","mapping":{"columns":[{"type":"uuid-v7","name":"id-col","primaryKey":true},{"type":"datetime","name":"datetime-col"},{"type":"ip","name":"ip-col"},{"type":"headers","name":"headers-col"},{"type":"body","name":"body-col"},{"type":"template","name":"template-col","template":{"language":"jsonnet","content":"body.foo + \"-\" + body.bar"}}]}}},"TaskOutputsResponseBody":{"title":"TaskOutputsResponseBody","type":"object","properties":{"branchId":{"type":"integer","description":"ID of the parent branch.","example":345,"format":"int64"},"projectId":{"type":"integer","description":"ID of the parent project.","example":123,"format":"int64"},"sinkId":{"type":"string","description":"ID of the created/updated sink.","example":"github-pr-table-sink","minLength":1,"maxLength":48},"sourceId":{"type":"string","description":"ID of the created/updated source.","example":"github-webhook-source","minLength":1,"maxLength":48},"url":{"type":"string","description":"Absolute URL of the entity.","example":"abc123"}},"description":"Outputs generated by the task.","example":{"url":"abc123","projectId":123,"branchId":345,"sourceId":"github-webhook-source","sinkId":"github-pr-table-sink"}},"TestResultColumnResponseBody":{"title":"TestResultColumnResponseBody","type":"object","properties":{"name":{"type":"string","description":"Column name.","example":"id"},"value":{"type":"string","description":"Column value.","example":"12345"}},"description":"Generated table column value, part of the test result.","example":{"name":"id","value":"12345"},"required":["name","value"]},"TestResultRowResponseBody":{"title":"TestResultRowResponseBody","type":"object","properties":{"columns":{"type":"array","items":{"$ref":"#/definitions/TestResultColumnResponseBody"},"description":"Generated columns.","example":[{"name":"id","value":"12345"}]}},"description":"Generated table row, part of the test result.","example":{"columns":[{"name":"id","value":"12345"}]},"required":["columns"]},"TestResultTableResponseBody":{"title":"TestResultTableResponseBody","type":"object","properties":{"rows":{"type":"array","items":{"$ref":"#/definitions/TestResultRowResponseBody"},"description":"Generated rows.","example":[{"columns":[{"name":"id","value":"12345"}]}]},"sinkId":{"type":"string","example":"github-pr-table-sink","minLength":1,"maxLength":48},"tableId":{"type":"string","example":"in.c-bucket.table"}},"description":"Generated table rows, part of the test result.","example":{"sinkId":"github-pr-table-sink","tableId":"in.c-bucket.table","rows":[{"columns":[{"name":"id","value":"12345"}]}]},"required":["sinkId","tableId","rows"]},"VersionResponseBody":{"title":"VersionResponseBody","type":"object","properties":{"at":{"type":"string","description":"Date and time of the modification.","example":"2022-04-28T14:20:04.000Z","format":"date-time"},"by":{"$ref":"#/definitions/ByResponseBody"},"description":{"type":"string","description":"Description of the change.","example":"The reason for the last change was..."},"hash":{"type":"string","description":"Hash of the entity state.","example":"f43e93acd97eceb3"},"number":{"type":"integer","description":"Version number counted from 1.","example":3,"format":"int64","minimum":1}},"description":"Version of the entity.","example":{"number":3,"hash":"f43e93acd97eceb3","description":"The reason for the last change was...","at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"required":["number","hash","at","by","description"]}},"securityDefinitions":{"storage-api-token":{"type":"apiKey","description":"Storage Api Token Authentication.","name":"X-StorageApi-Token","in":"header"}}} \ No newline at end of file +{"swagger":"2.0","info":{"title":"Stream Service","description":"A service for continuously importing data to the Keboola platform.","version":"1.0"},"host":"stream.keboola.com","consumes":["application/json"],"produces":["application/json"],"paths":{"/":{"get":{"tags":["documentation"],"summary":"Redirect to /v1","description":"Redirect to /v1.","operationId":"ApiRootIndex","responses":{"301":{"description":"Moved Permanently response."}},"schemes":["https"]}},"/v1":{"get":{"tags":["documentation"],"summary":"List API name and link to documentation.","description":"List API name and link to documentation.","operationId":"ApiVersionIndex","responses":{"200":{"description":"OK response.","schema":{"$ref":"#/definitions/StreamAPIVersionIndexResponseBody","required":["api","documentation"]}}},"schemes":["https"]}},"/v1/branches/{branchId}/aggregation/sources":{"get":{"tags":["internal"],"summary":"Aggregation endpoint for sources","description":"Details about sources for the UI.","operationId":"AggregateSources","parameters":[{"name":"sinceId","in":"query","description":"Request records after the ID.","required":false,"type":"string","default":""},{"name":"limit","in":"query","description":"Maximum number of returned records.","required":false,"type":"integer","default":100,"maximum":100,"minimum":1},{"name":"branchId","in":"path","description":"ID of the branch or \"default\".","required":true,"type":"string"}],"responses":{"200":{"description":"OK response.","schema":{"$ref":"#/definitions/StreamAggregateSourcesResponseBody","required":["projectId","branchId","page","sources"]}}},"schemes":["https"],"security":[{"storage-api-token":[]}]}},"/v1/branches/{branchId}/sources":{"get":{"tags":["configuration"],"summary":"List all sources","description":"List all sources in the branch.","operationId":"ListSources","parameters":[{"name":"sinceId","in":"query","description":"Request records after the ID.","required":false,"type":"string","default":""},{"name":"limit","in":"query","description":"Maximum number of returned records.","required":false,"type":"integer","default":100,"maximum":100,"minimum":1},{"name":"branchId","in":"path","description":"ID of the branch or \"default\".","required":true,"type":"string"}],"responses":{"200":{"description":"OK response.","schema":{"$ref":"#/definitions/StreamListSourcesResponseBody","required":["projectId","branchId","page","sources"]}}},"schemes":["https"],"security":[{"storage-api-token":[]}]},"post":{"tags":["configuration"],"summary":"Create source","description":"Create a new source in the branch.","operationId":"CreateSource","parameters":[{"name":"branchId","in":"path","description":"ID of the branch or \"default\".","required":true,"type":"string"},{"name":"CreateSourceRequestBody","in":"body","required":true,"schema":{"$ref":"#/definitions/StreamCreateSourceRequestBody","required":["type","name"]}}],"responses":{"202":{"description":"Accepted response.","schema":{"$ref":"#/definitions/StreamCreateSourceResponseBody","required":["taskId","type","url","status","isFinished","createdAt"]}},"409":{"description":"Conflict response.","schema":{"$ref":"#/definitions/StreamCreateSourceStreamAPISourceAlreadyExistsResponseBody","required":["statusCode","error","message"]}},"422":{"description":"Unprocessable Entity response.","schema":{"$ref":"#/definitions/StreamCreateSourceStreamAPIResourceLimitReachedResponseBody","required":["statusCode","error","message"]}}},"schemes":["https"],"security":[{"storage-api-token":[]}]}},"/v1/branches/{branchId}/sources/{sourceId}":{"get":{"tags":["configuration"],"summary":"Get source","description":"Get the source definition.","operationId":"GetSource","parameters":[{"name":"branchId","in":"path","description":"ID of the branch or \"default\".","required":true,"type":"string"},{"name":"sourceId","in":"path","description":"Unique ID of the source.","required":true,"type":"string"}],"responses":{"200":{"description":"OK response.","schema":{"$ref":"#/definitions/StreamGetSourceResponseBody","required":["projectId","branchId","sourceId","type","name","description","created","version"]}},"404":{"description":"Not Found response.","schema":{"$ref":"#/definitions/StreamGetSourceStreamAPISourceNotFoundResponseBody","required":["statusCode","error","message"]}}},"schemes":["https"],"security":[{"storage-api-token":[]}]},"delete":{"tags":["configuration"],"summary":"Delete source","description":"Delete the source.","operationId":"DeleteSource","parameters":[{"name":"branchId","in":"path","description":"ID of the branch or \"default\".","required":true,"type":"string"},{"name":"sourceId","in":"path","description":"Unique ID of the source.","required":true,"type":"string"}],"responses":{"202":{"description":"Accepted response.","schema":{"$ref":"#/definitions/StreamDeleteSourceResponseBody","required":["taskId","type","url","status","isFinished","createdAt"]}},"404":{"description":"Not Found response.","schema":{"$ref":"#/definitions/StreamDeleteSourceStreamAPISourceNotFoundResponseBody","required":["statusCode","error","message"]}}},"schemes":["https"],"security":[{"storage-api-token":[]}]},"patch":{"tags":["configuration"],"summary":"Update source","description":"Update the source.","operationId":"UpdateSource","parameters":[{"name":"branchId","in":"path","description":"ID of the branch or \"default\".","required":true,"type":"string"},{"name":"sourceId","in":"path","description":"Unique ID of the source.","required":true,"type":"string"},{"name":"UpdateSourceRequestBody","in":"body","required":true,"schema":{"$ref":"#/definitions/StreamUpdateSourceRequestBody"}}],"responses":{"202":{"description":"Accepted response.","schema":{"$ref":"#/definitions/StreamUpdateSourceResponseBody","required":["taskId","type","url","status","isFinished","createdAt"]}},"404":{"description":"Not Found response.","schema":{"$ref":"#/definitions/StreamUpdateSourceStreamAPISourceNotFoundResponseBody","required":["statusCode","error","message"]}}},"schemes":["https"],"security":[{"storage-api-token":[]}]}},"/v1/branches/{branchId}/sources/{sourceId}/settings":{"get":{"tags":["configuration"],"summary":"Get source settings","description":"Get source settings.","operationId":"GetSourceSettings","parameters":[{"name":"branchId","in":"path","description":"ID of the branch or \"default\".","required":true,"type":"string"},{"name":"sourceId","in":"path","description":"Unique ID of the source.","required":true,"type":"string"}],"responses":{"200":{"description":"OK response.","schema":{"$ref":"#/definitions/StreamGetSourceSettingsResponseBody"}},"404":{"description":"Not Found response.","schema":{"$ref":"#/definitions/StreamGetSourceSettingsStreamAPISourceNotFoundResponseBody","required":["statusCode","error","message"]}}},"schemes":["https"],"security":[{"storage-api-token":[]}]},"patch":{"tags":["configuration"],"summary":"Update source settings","description":"Update source settings.","operationId":"UpdateSourceSettings","parameters":[{"name":"branchId","in":"path","description":"ID of the branch or \"default\".","required":true,"type":"string"},{"name":"sourceId","in":"path","description":"Unique ID of the source.","required":true,"type":"string"},{"name":"UpdateSourceSettingsRequestBody","in":"body","required":true,"schema":{"$ref":"#/definitions/StreamUpdateSourceSettingsRequestBody"}}],"responses":{"202":{"description":"Accepted response.","schema":{"$ref":"#/definitions/StreamUpdateSourceSettingsResponseBody","required":["taskId","type","url","status","isFinished","createdAt"]}},"404":{"description":"Not Found response.","schema":{"$ref":"#/definitions/StreamUpdateSourceSettingsStreamAPIForbiddenResponseBody","required":["statusCode","error","message"]}}},"schemes":["https"],"security":[{"storage-api-token":[]}]}},"/v1/branches/{branchId}/sources/{sourceId}/sinks":{"get":{"tags":["configuration"],"summary":"List sinks","description":"List all sinks in the source.","operationId":"ListSinks","parameters":[{"name":"sinceId","in":"query","description":"Request records after the ID.","required":false,"type":"string","default":""},{"name":"limit","in":"query","description":"Maximum number of returned records.","required":false,"type":"integer","default":100,"maximum":100,"minimum":1},{"name":"branchId","in":"path","description":"ID of the branch or \"default\".","required":true,"type":"string"},{"name":"sourceId","in":"path","description":"Unique ID of the source.","required":true,"type":"string"}],"responses":{"200":{"description":"OK response.","schema":{"$ref":"#/definitions/StreamListSinksResponseBody","required":["projectId","branchId","sourceId","page","sinks"]}},"404":{"description":"Not Found response.","schema":{"$ref":"#/definitions/StreamListSinksStreamAPISourceNotFoundResponseBody","required":["statusCode","error","message"]}}},"schemes":["https"],"security":[{"storage-api-token":[]}]},"post":{"tags":["configuration"],"summary":"Create sink","description":"Create a new sink in the source.","operationId":"CreateSink","parameters":[{"name":"branchId","in":"path","description":"ID of the branch or \"default\".","required":true,"type":"string"},{"name":"sourceId","in":"path","description":"Unique ID of the source.","required":true,"type":"string"},{"name":"CreateSinkRequestBody","in":"body","required":true,"schema":{"$ref":"#/definitions/StreamCreateSinkRequestBody","required":["type","name"]}}],"responses":{"202":{"description":"Accepted response.","schema":{"$ref":"#/definitions/StreamCreateSinkResponseBody","required":["taskId","type","url","status","isFinished","createdAt"]}},"404":{"description":"Not Found response.","schema":{"$ref":"#/definitions/StreamCreateSinkStreamAPISourceNotFoundResponseBody","required":["statusCode","error","message"]}},"409":{"description":"Conflict response.","schema":{"$ref":"#/definitions/StreamCreateSinkStreamAPISinkAlreadyExistsResponseBody","required":["statusCode","error","message"]}},"422":{"description":"Unprocessable Entity response.","schema":{"$ref":"#/definitions/StreamCreateSinkStreamAPIResourceLimitReachedResponseBody","required":["statusCode","error","message"]}}},"schemes":["https"],"security":[{"storage-api-token":[]}]}},"/v1/branches/{branchId}/sources/{sourceId}/sinks/{sinkId}":{"get":{"tags":["configuration"],"summary":"Get sink","description":"Get the sink definition.","operationId":"GetSink","parameters":[{"name":"branchId","in":"path","description":"ID of the branch or \"default\".","required":true,"type":"string"},{"name":"sourceId","in":"path","description":"Unique ID of the source.","required":true,"type":"string"},{"name":"sinkId","in":"path","description":"Unique ID of the sink.","required":true,"type":"string"}],"responses":{"200":{"description":"OK response.","schema":{"$ref":"#/definitions/StreamGetSinkResponseBody","required":["projectId","branchId","sourceId","sinkId","type","name","description","version","created"]}},"404":{"description":"Not Found response.","schema":{"$ref":"#/definitions/StreamGetSinkStreamAPISinkNotFoundResponseBody","required":["statusCode","error","message"]}}},"schemes":["https"],"security":[{"storage-api-token":[]}]},"delete":{"tags":["configuration"],"summary":"Delete sink","description":"Delete the sink.","operationId":"DeleteSink","parameters":[{"name":"branchId","in":"path","description":"ID of the branch or \"default\".","required":true,"type":"string"},{"name":"sourceId","in":"path","description":"Unique ID of the source.","required":true,"type":"string"},{"name":"sinkId","in":"path","description":"Unique ID of the sink.","required":true,"type":"string"}],"responses":{"202":{"description":"Accepted response.","schema":{"$ref":"#/definitions/StreamDeleteSinkResponseBody","required":["taskId","type","url","status","isFinished","createdAt"]}},"404":{"description":"Not Found response.","schema":{"$ref":"#/definitions/StreamDeleteSinkStreamAPISinkNotFoundResponseBody","required":["statusCode","error","message"]}}},"schemes":["https"],"security":[{"storage-api-token":[]}]},"patch":{"tags":["configuration"],"summary":"Update sink","description":"Update the sink.","operationId":"UpdateSink","parameters":[{"name":"branchId","in":"path","description":"ID of the branch or \"default\".","required":true,"type":"string"},{"name":"sourceId","in":"path","description":"Unique ID of the source.","required":true,"type":"string"},{"name":"sinkId","in":"path","description":"Unique ID of the sink.","required":true,"type":"string"},{"name":"UpdateSinkRequestBody","in":"body","required":true,"schema":{"$ref":"#/definitions/StreamUpdateSinkRequestBody"}}],"responses":{"202":{"description":"Accepted response.","schema":{"$ref":"#/definitions/StreamUpdateSinkResponseBody","required":["taskId","type","url","status","isFinished","createdAt"]}},"404":{"description":"Not Found response.","schema":{"$ref":"#/definitions/StreamUpdateSinkStreamAPISinkNotFoundResponseBody","required":["statusCode","error","message"]}}},"schemes":["https"],"security":[{"storage-api-token":[]}]}},"/v1/branches/{branchId}/sources/{sourceId}/sinks/{sinkId}/settings":{"get":{"tags":["configuration"],"summary":"Get sink settings","description":"Get the sink settings.","operationId":"GetSinkSettings","parameters":[{"name":"branchId","in":"path","description":"ID of the branch or \"default\".","required":true,"type":"string"},{"name":"sourceId","in":"path","description":"Unique ID of the source.","required":true,"type":"string"},{"name":"sinkId","in":"path","description":"Unique ID of the sink.","required":true,"type":"string"}],"responses":{"200":{"description":"OK response.","schema":{"$ref":"#/definitions/StreamGetSinkSettingsResponseBody"}},"404":{"description":"Not Found response.","schema":{"$ref":"#/definitions/StreamGetSinkSettingsStreamAPISinkNotFoundResponseBody","required":["statusCode","error","message"]}}},"schemes":["https"],"security":[{"storage-api-token":[]}]},"patch":{"tags":["configuration"],"summary":"Update sink settings","description":"Update sink settings.","operationId":"UpdateSinkSettings","parameters":[{"name":"branchId","in":"path","description":"ID of the branch or \"default\".","required":true,"type":"string"},{"name":"sourceId","in":"path","description":"Unique ID of the source.","required":true,"type":"string"},{"name":"sinkId","in":"path","description":"Unique ID of the sink.","required":true,"type":"string"},{"name":"UpdateSinkSettingsRequestBody","in":"body","required":true,"schema":{"$ref":"#/definitions/StreamUpdateSinkSettingsRequestBody"}}],"responses":{"202":{"description":"Accepted response.","schema":{"$ref":"#/definitions/StreamUpdateSinkSettingsResponseBody","required":["taskId","type","url","status","isFinished","createdAt"]}},"404":{"description":"Not Found response.","schema":{"$ref":"#/definitions/StreamUpdateSinkSettingsStreamAPIForbiddenResponseBody","required":["statusCode","error","message"]}}},"schemes":["https"],"security":[{"storage-api-token":[]}]}},"/v1/branches/{branchId}/sources/{sourceId}/sinks/{sinkId}/statistics/files":{"get":{"tags":["configuration"],"summary":"Sink files statistics","description":"Get files statistics of the sink.","operationId":"SinkStatisticsFiles","parameters":[{"name":"branchId","in":"path","description":"ID of the branch or \"default\".","required":true,"type":"string"},{"name":"sourceId","in":"path","description":"Unique ID of the source.","required":true,"type":"string"},{"name":"sinkId","in":"path","description":"Unique ID of the sink.","required":true,"type":"string"}],"responses":{"200":{"description":"OK response.","schema":{"$ref":"#/definitions/StreamSinkStatisticsFilesResponseBody","required":["files"]}},"404":{"description":"Not Found response.","schema":{"$ref":"#/definitions/StreamSinkStatisticsFilesStreamAPISinkNotFoundResponseBody","required":["statusCode","error","message"]}}},"schemes":["https"],"security":[{"storage-api-token":[]}]}},"/v1/branches/{branchId}/sources/{sourceId}/sinks/{sinkId}/statistics/total":{"get":{"tags":["configuration"],"summary":"Sink statistics total","description":"Get total statistics of the sink.","operationId":"SinkStatisticsTotal","parameters":[{"name":"branchId","in":"path","description":"ID of the branch or \"default\".","required":true,"type":"string"},{"name":"sourceId","in":"path","description":"Unique ID of the source.","required":true,"type":"string"},{"name":"sinkId","in":"path","description":"Unique ID of the sink.","required":true,"type":"string"}],"responses":{"200":{"description":"OK response.","schema":{"$ref":"#/definitions/StreamSinkStatisticsTotalResponseBody","required":["total","levels"]}},"404":{"description":"Not Found response.","schema":{"$ref":"#/definitions/StreamSinkStatisticsTotalStreamAPISinkNotFoundResponseBody","required":["statusCode","error","message"]}}},"schemes":["https"],"security":[{"storage-api-token":[]}]}},"/v1/branches/{branchId}/sources/{sourceId}/test":{"post":{"tags":["test"],"summary":"Test source payload mapping.","description":"Tests configured mapping of the source and its sinks.","operationId":"TestSource","parameters":[{"name":"branchId","in":"path","description":"ID of the branch or \"default\".","required":true,"type":"string"},{"name":"sourceId","in":"path","description":"Unique ID of the source.","required":true,"type":"string"}],"responses":{"200":{"description":"OK response.","schema":{"$ref":"#/definitions/StreamTestSourceResponseBody","required":["projectId","branchId","sourceId","tables"]}},"404":{"description":"Not Found response.","schema":{"$ref":"#/definitions/StreamTestSourceStreamAPISourceNotFoundResponseBody","required":["statusCode","error","message"]}}},"schemes":["https"],"security":[{"storage-api-token":[]}]}},"/v1/documentation/openapi.json":{"get":{"tags":["documentation"],"summary":"Swagger 2.0 JSON Specification","operationId":"OpenapiJson","responses":{"200":{"description":"File downloaded","schema":{"type":"file"}}},"schemes":["http","https"]}},"/v1/documentation/openapi.yaml":{"get":{"tags":["documentation"],"summary":"Swagger 2.0 YAML Specification","operationId":"OpenapiYaml","responses":{"200":{"description":"File downloaded","schema":{"type":"file"}}},"schemes":["http","https"]}},"/v1/documentation/openapi3.json":{"get":{"tags":["documentation"],"summary":"OpenAPI 3.0 JSON Specification","operationId":"Openapi3Json","responses":{"200":{"description":"File downloaded","schema":{"type":"file"}}},"schemes":["http","https"]}},"/v1/documentation/openapi3.yaml":{"get":{"tags":["documentation"],"summary":"OpenAPI 3.0 YAML Specification","operationId":"Openapi3Yaml","responses":{"200":{"description":"File downloaded","schema":{"type":"file"}}},"schemes":["http","https"]}},"/v1/tasks/{taskId}":{"get":{"tags":["configuration"],"summary":"Get task","description":"Get details of a task.","operationId":"GetTask","parameters":[{"name":"taskId","in":"path","description":"Unique ID of the task.","required":true,"type":"string"}],"responses":{"200":{"description":"OK response.","schema":{"$ref":"#/definitions/StreamGetTaskResponseBody","required":["taskId","type","url","status","isFinished","createdAt"]}},"404":{"description":"Not Found response.","schema":{"$ref":"#/definitions/StreamGetTaskStreamAPITaskNotFoundResponseBody","required":["statusCode","error","message"]}}},"schemes":["https"],"security":[{"storage-api-token":[]}]}}},"definitions":{"AggregationSinkResponseBody":{"title":"AggregationSinkResponseBody","type":"object","properties":{"branchId":{"type":"integer","example":345,"format":"int64"},"created":{"$ref":"#/definitions/CreatedEntityResponseBody"},"deleted":{"$ref":"#/definitions/DeletedEntityResponseBody"},"description":{"type":"string","description":"Description of the source.","example":"The sink stores records to a table.","maxLength":4096},"disabled":{"$ref":"#/definitions/DisabledEntityResponseBody"},"name":{"type":"string","description":"Human readable name of the sink.","example":"Raw Data Sink","minLength":1,"maxLength":40},"projectId":{"type":"integer","example":123,"format":"int64"},"sinkId":{"type":"string","example":"github-pr-table-sink","minLength":1,"maxLength":48},"sourceId":{"type":"string","example":"github-webhook-source","minLength":1,"maxLength":48},"statistics":{"$ref":"#/definitions/AggregationStatisticsResponseBody"},"table":{"$ref":"#/definitions/TableSinkResponseBody"},"type":{"type":"string","example":"table","enum":["table"]},"version":{"$ref":"#/definitions/VersionResponseBody"}},"description":"A mapping from imported data to a destination table.","example":{"projectId":123,"branchId":345,"sourceId":"github-webhook-source","sinkId":"github-pr-table-sink","type":"table","name":"Raw Data Sink","description":"The sink stores records to a table.","table":{"type":"keboola","tableId":"in.c-bucket.table","mapping":{"columns":[{"type":"uuid-v7","name":"id-col","primaryKey":true},{"type":"datetime","name":"datetime-col"},{"type":"ip","name":"ip-col"},{"type":"headers","name":"headers-col"},{"type":"body","name":"body-col"},{"type":"template","name":"template-col","template":{"language":"jsonnet","content":"body.foo + \"-\" + body.bar"}}]}},"created":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"version":{"number":3,"hash":"f43e93acd97eceb3","description":"The reason for the last change was...","at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"deleted":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"disabled":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"},"reason":"Disabled for recurring problems."},"statistics":{"total":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1},"levels":{"local":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1},"staging":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1},"target":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1}},"files":[{"state":"writing","openedAt":"2022-04-28T14:20:04.000Z","closingAt":"2022-04-28T14:20:04.000Z","importingAt":"2022-04-28T14:20:04.000Z","importedAt":"2022-04-28T14:20:04.000Z","retryAttempt":3,"retryReason":"network problem","retryAfter":"2022-04-28T14:20:04.000Z","statistics":{"total":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1},"levels":{"local":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1},"staging":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1},"target":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1}}}}]}},"required":["projectId","branchId","sourceId","sinkId","type","name","description","version","created"]},"AggregationSourceResponseBody":{"title":"AggregationSourceResponseBody","type":"object","properties":{"branchId":{"type":"integer","example":345,"format":"int64"},"created":{"$ref":"#/definitions/CreatedEntityResponseBody"},"deleted":{"$ref":"#/definitions/DeletedEntityResponseBody"},"description":{"type":"string","description":"Description of the source.","example":"The source receives events from Github.","maxLength":4096},"disabled":{"$ref":"#/definitions/DisabledEntityResponseBody"},"http":{"$ref":"#/definitions/HTTPSourceResponseBody"},"name":{"type":"string","description":"Human readable name of the source.","example":"Github Webhook Source","minLength":1,"maxLength":40},"projectId":{"type":"integer","example":123,"format":"int64"},"sinks":{"type":"array","items":{"$ref":"#/definitions/AggregationSinkResponseBody"},"example":[{"projectId":123,"branchId":345,"sourceId":"github-webhook-source","sinkId":"github-pr-table-sink","type":"table","name":"Raw Data Sink","description":"The sink stores records to a table.","table":{"type":"keboola","tableId":"in.c-bucket.table","mapping":{"columns":[{"type":"uuid-v7","name":"id-col","primaryKey":true},{"type":"datetime","name":"datetime-col"},{"type":"ip","name":"ip-col"},{"type":"headers","name":"headers-col"},{"type":"body","name":"body-col"},{"type":"template","name":"template-col","template":{"language":"jsonnet","content":"body.foo + \"-\" + body.bar"}}]}},"created":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"version":{"number":3,"hash":"f43e93acd97eceb3","description":"The reason for the last change was...","at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"deleted":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"disabled":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"},"reason":"Disabled for recurring problems."},"statistics":{"total":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1},"levels":{"local":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1},"staging":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1},"target":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1}},"files":[{"state":"writing","openedAt":"2022-04-28T14:20:04.000Z","closingAt":"2022-04-28T14:20:04.000Z","importingAt":"2022-04-28T14:20:04.000Z","importedAt":"2022-04-28T14:20:04.000Z","retryAttempt":3,"retryReason":"network problem","retryAfter":"2022-04-28T14:20:04.000Z","statistics":{"total":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1},"levels":{"local":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1},"staging":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1},"target":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1}}}}]}}]},"sourceId":{"type":"string","example":"github-webhook-source","minLength":1,"maxLength":48},"type":{"type":"string","example":"http","enum":["http"]},"version":{"$ref":"#/definitions/VersionResponseBody"}},"description":"Source of data for further processing, start of the stream, max 100 sources per a branch.","example":{"projectId":123,"branchId":345,"sourceId":"github-webhook-source","type":"http","name":"Github Webhook Source","description":"The source receives events from Github.","http":{"url":"https://stream-in.keboola.com/G0lpTbz0vhakDicfoDQQ3BCzGYdW3qewd1D3eUbqETygHKGb"},"created":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"version":{"number":3,"hash":"f43e93acd97eceb3","description":"The reason for the last change was...","at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"deleted":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"disabled":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"},"reason":"Disabled for recurring problems."},"sinks":[{"projectId":123,"branchId":345,"sourceId":"github-webhook-source","sinkId":"github-pr-table-sink","type":"table","name":"Raw Data Sink","description":"The sink stores records to a table.","table":{"type":"keboola","tableId":"in.c-bucket.table","mapping":{"columns":[{"type":"uuid-v7","name":"id-col","primaryKey":true},{"type":"datetime","name":"datetime-col"},{"type":"ip","name":"ip-col"},{"type":"headers","name":"headers-col"},{"type":"body","name":"body-col"},{"type":"template","name":"template-col","template":{"language":"jsonnet","content":"body.foo + \"-\" + body.bar"}}]}},"created":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"version":{"number":3,"hash":"f43e93acd97eceb3","description":"The reason for the last change was...","at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"deleted":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"disabled":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"},"reason":"Disabled for recurring problems."},"statistics":{"total":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1},"levels":{"local":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1},"staging":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1},"target":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1}},"files":[{"state":"writing","openedAt":"2022-04-28T14:20:04.000Z","closingAt":"2022-04-28T14:20:04.000Z","importingAt":"2022-04-28T14:20:04.000Z","importedAt":"2022-04-28T14:20:04.000Z","retryAttempt":3,"retryReason":"network problem","retryAfter":"2022-04-28T14:20:04.000Z","statistics":{"total":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1},"levels":{"local":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1},"staging":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1},"target":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1}}}}]}}]},"required":["projectId","branchId","sourceId","type","name","description","version","created","sinks"]},"AggregationStatisticsResponseBody":{"title":"AggregationStatisticsResponseBody","type":"object","properties":{"files":{"type":"array","items":{"$ref":"#/definitions/SinkFileResponseBody"},"example":[{"state":"writing","openedAt":"2022-04-28T14:20:04.000Z","closingAt":"2022-04-28T14:20:04.000Z","importingAt":"2022-04-28T14:20:04.000Z","importedAt":"2022-04-28T14:20:04.000Z","retryAttempt":3,"retryReason":"network problem","retryAfter":"2022-04-28T14:20:04.000Z","statistics":{"total":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1},"levels":{"local":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1},"staging":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1},"target":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1}}}}]},"levels":{"$ref":"#/definitions/LevelsResponseBody"},"total":{"$ref":"#/definitions/LevelResponseBody"}},"example":{"total":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1},"levels":{"local":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1},"staging":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1},"target":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1}},"files":[{"state":"writing","openedAt":"2022-04-28T14:20:04.000Z","closingAt":"2022-04-28T14:20:04.000Z","importingAt":"2022-04-28T14:20:04.000Z","importedAt":"2022-04-28T14:20:04.000Z","retryAttempt":3,"retryReason":"network problem","retryAfter":"2022-04-28T14:20:04.000Z","statistics":{"total":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1},"levels":{"local":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1},"staging":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1},"target":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1}}}}]},"required":["total","levels","files"]},"ByResponseBody":{"title":"ByResponseBody","type":"object","properties":{"tokenDesc":{"type":"string","description":"Description of the token.","example":"john.green@company.com"},"tokenId":{"type":"string","description":"ID of the token.","example":"896455"},"type":{"type":"string","description":"Date and time of deletion.","example":"user","enum":["system","user"]},"userId":{"type":"string","description":"ID of the user.","example":"578621"},"userName":{"type":"string","description":"Name of the user.","example":"John Green"}},"description":"Information about the operation actor.","example":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"},"required":["type"]},"CreatedEntityResponseBody":{"title":"CreatedEntityResponseBody","type":"object","properties":{"at":{"type":"string","description":"Date and time of deletion.","example":"2022-04-28T14:20:04.000Z","format":"date-time"},"by":{"$ref":"#/definitions/ByResponseBody"}},"description":"Information about the entity creation.","example":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"required":["at","by"]},"DeletedEntityResponseBody":{"title":"DeletedEntityResponseBody","type":"object","properties":{"at":{"type":"string","description":"Date and time of deletion.","example":"2022-04-28T14:20:04.000Z","format":"date-time"},"by":{"$ref":"#/definitions/ByResponseBody"}},"description":"Information about the deleted entity.","example":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"required":["at","by"]},"DisabledEntityResponseBody":{"title":"DisabledEntityResponseBody","type":"object","properties":{"at":{"type":"string","description":"Date and time of disabling.","example":"2022-04-28T14:20:04.000Z","format":"date-time"},"by":{"$ref":"#/definitions/ByResponseBody"},"reason":{"type":"string","description":"Why was the entity disabled?","example":"Disabled for recurring problems."}},"description":"Information about the disabled entity.","example":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"},"reason":"Disabled for recurring problems."},"required":["at","by","reason"]},"HTTPSourceResponseBody":{"title":"HTTPSourceResponseBody","type":"object","properties":{"url":{"type":"string","description":"URL of the HTTP source. Contains secret used for authentication.","example":"https://stream-in.keboola.com/G0lpTbz0vhakDicfoDQQ3BCzGYdW3qewd1D3eUbqETygHKGb"}},"description":"HTTP source details for \"type\" = \"http\".","example":{"url":"https://stream-in.keboola.com/G0lpTbz0vhakDicfoDQQ3BCzGYdW3qewd1D3eUbqETygHKGb"},"required":["url"]},"LevelResponseBody":{"title":"LevelResponseBody","type":"object","properties":{"firstRecordAt":{"type":"string","description":"Timestamp of the first received record.","example":"2022-04-28T14:20:04.000Z","format":"date-time"},"lastRecordAt":{"type":"string","description":"Timestamp of the last received record.","example":"2022-04-28T14:20:04.000Z","format":"date-time"},"recordsCount":{"type":"integer","example":1,"format":"int64"},"uncompressedSize":{"type":"integer","description":"Uncompressed size of data in bytes.","example":1,"format":"int64"}},"example":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1},"required":["recordsCount","uncompressedSize"]},"LevelsResponseBody":{"title":"LevelsResponseBody","type":"object","properties":{"local":{"$ref":"#/definitions/LevelResponseBody"},"staging":{"$ref":"#/definitions/LevelResponseBody"},"target":{"$ref":"#/definitions/LevelResponseBody"}},"example":{"local":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1},"staging":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1},"target":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1}}},"PaginatedResponseResponseBody":{"title":"PaginatedResponseResponseBody","type":"object","properties":{"lastId":{"type":"string","description":"ID of the last record in the response.","example":"my-object-456"},"limit":{"type":"integer","description":"Current limit.","example":100,"format":"int64"},"sinceId":{"type":"string","description":"Current offset.","example":"my-object-123"},"totalCount":{"type":"integer","description":"Total count of all records.","example":1000,"format":"int64"}},"example":{"limit":100,"totalCount":1000,"sinceId":"my-object-123","lastId":"my-object-456"},"required":["sinceId","limit","lastId","totalCount"]},"SettingPatchRequestBody":{"title":"SettingPatchRequestBody","type":"object","properties":{"key":{"type":"string","description":"Key path.","example":"some.service.limit","minLength":1},"value":{"description":"A new key value. Use null to reset the value to the default value.","example":"1m20s"}},"description":"One setting key-value pair.","example":{"key":"some.service.limit","value":"1m20s"},"required":["key"]},"SettingResultResponseBody":{"title":"SettingResultResponseBody","type":"object","properties":{"defaultValue":{"description":"Default value.","example":"30s"},"description":{"type":"string","description":"Key description.","example":"Minimal interval between uploads."},"key":{"type":"string","description":"Key path.","example":"some.service.limit"},"overwritten":{"type":"boolean","description":"True, if the default value is locally overwritten.","example":true},"protected":{"type":"boolean","description":"True, if only a super admin can modify the key.","example":false},"type":{"type":"string","description":"Value type.","example":"string","enum":["string","int","float","bool","[]string","[]int","[]float"]},"validation":{"type":"string","description":"Validation rules as a string definition.","example":"minDuration=15s"},"value":{"description":"Actual value.","example":"1m20s"}},"description":"One setting key-value pair.","example":{"key":"some.service.limit","type":"string","description":"Minimal interval between uploads.","value":"1m20s","defaultValue":"30s","overwritten":true,"protected":false,"validation":"minDuration=15s"},"required":["key","type","description","value","defaultValue","overwritten","protected"]},"SinkFileResponseBody":{"title":"SinkFileResponseBody","type":"object","properties":{"closingAt":{"type":"string","example":"2022-04-28T14:20:04.000Z","format":"date-time"},"importedAt":{"type":"string","example":"2022-04-28T14:20:04.000Z","format":"date-time"},"importingAt":{"type":"string","example":"2022-04-28T14:20:04.000Z","format":"date-time"},"openedAt":{"type":"string","example":"2022-04-28T14:20:04.000Z","format":"date-time"},"retryAfter":{"type":"string","description":"Next attempt time.","example":"2022-04-28T14:20:04.000Z","format":"date-time"},"retryAttempt":{"type":"integer","description":"Number of failed attempts.","example":3,"format":"int64"},"retryReason":{"type":"string","description":"Reason of the last failed attempt.","example":"network problem"},"state":{"type":"string","example":"writing","enum":["writing","closing","importing","imported"]},"statistics":{"$ref":"#/definitions/SinkFileStatisticsResponseBody"}},"example":{"state":"writing","openedAt":"2022-04-28T14:20:04.000Z","closingAt":"2022-04-28T14:20:04.000Z","importingAt":"2022-04-28T14:20:04.000Z","importedAt":"2022-04-28T14:20:04.000Z","retryAttempt":3,"retryReason":"network problem","retryAfter":"2022-04-28T14:20:04.000Z","statistics":{"total":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1},"levels":{"local":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1},"staging":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1},"target":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1}}}},"required":["state","openedAt"]},"SinkFileStatisticsResponseBody":{"title":"SinkFileStatisticsResponseBody","type":"object","properties":{"levels":{"$ref":"#/definitions/LevelsResponseBody"},"total":{"$ref":"#/definitions/LevelResponseBody"}},"example":{"total":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1},"levels":{"local":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1},"staging":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1},"target":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1}}},"required":["total","levels"]},"SinkResponseBody":{"title":"SinkResponseBody","type":"object","properties":{"branchId":{"type":"integer","example":345,"format":"int64"},"created":{"$ref":"#/definitions/CreatedEntityResponseBody"},"deleted":{"$ref":"#/definitions/DeletedEntityResponseBody"},"description":{"type":"string","description":"Description of the source.","example":"The sink stores records to a table.","maxLength":4096},"disabled":{"$ref":"#/definitions/DisabledEntityResponseBody"},"name":{"type":"string","description":"Human readable name of the sink.","example":"Raw Data Sink","minLength":1,"maxLength":40},"projectId":{"type":"integer","example":123,"format":"int64"},"sinkId":{"type":"string","example":"github-pr-table-sink","minLength":1,"maxLength":48},"sourceId":{"type":"string","example":"github-webhook-source","minLength":1,"maxLength":48},"table":{"$ref":"#/definitions/TableSinkResponseBody"},"type":{"type":"string","example":"table","enum":["table"]},"version":{"$ref":"#/definitions/VersionResponseBody"}},"description":"A mapping from imported data to a destination table.","example":{"projectId":123,"branchId":345,"sourceId":"github-webhook-source","sinkId":"github-pr-table-sink","type":"table","name":"Raw Data Sink","description":"The sink stores records to a table.","table":{"type":"keboola","tableId":"in.c-bucket.table","mapping":{"columns":[{"type":"uuid-v7","name":"id-col","primaryKey":true},{"type":"datetime","name":"datetime-col"},{"type":"ip","name":"ip-col"},{"type":"headers","name":"headers-col"},{"type":"body","name":"body-col"},{"type":"template","name":"template-col","template":{"language":"jsonnet","content":"body.foo + \"-\" + body.bar"}}]}},"version":{"number":3,"hash":"f43e93acd97eceb3","description":"The reason for the last change was...","at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"created":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"deleted":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"disabled":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"},"reason":"Disabled for recurring problems."}},"required":["projectId","branchId","sourceId","sinkId","type","name","description","version","created"]},"SourceResponseBody":{"title":"SourceResponseBody","type":"object","properties":{"branchId":{"type":"integer","example":345,"format":"int64"},"created":{"$ref":"#/definitions/CreatedEntityResponseBody"},"deleted":{"$ref":"#/definitions/DeletedEntityResponseBody"},"description":{"type":"string","description":"Description of the source.","example":"The source receives events from Github.","maxLength":4096},"disabled":{"$ref":"#/definitions/DisabledEntityResponseBody"},"http":{"$ref":"#/definitions/HTTPSourceResponseBody"},"name":{"type":"string","description":"Human readable name of the source.","example":"Github Webhook Source","minLength":1,"maxLength":40},"projectId":{"type":"integer","example":123,"format":"int64"},"sourceId":{"type":"string","example":"github-webhook-source","minLength":1,"maxLength":48},"type":{"type":"string","example":"http","enum":["http"]},"version":{"$ref":"#/definitions/VersionResponseBody"}},"description":"Source of data for further processing, start of the stream, max 100 sources per a branch.","example":{"projectId":123,"branchId":345,"sourceId":"github-webhook-source","type":"http","name":"Github Webhook Source","description":"The source receives events from Github.","http":{"url":"https://stream-in.keboola.com/G0lpTbz0vhakDicfoDQQ3BCzGYdW3qewd1D3eUbqETygHKGb"},"created":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"version":{"number":3,"hash":"f43e93acd97eceb3","description":"The reason for the last change was...","at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"deleted":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"disabled":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"},"reason":"Disabled for recurring problems."}},"required":["projectId","branchId","sourceId","type","name","description","created","version"]},"StreamAPIVersionIndexResponseBody":{"title":"StreamAPIVersionIndexResponseBody","type":"object","properties":{"api":{"type":"string","description":"Name of the API","example":"stream"},"documentation":{"type":"string","description":"URL of the API documentation.","example":"https://stream.keboola.com/v1/documentation"}},"example":{"api":"stream","documentation":"https://stream.keboola.com/v1/documentation"},"required":["api","documentation"]},"StreamAggregateSourcesResponseBody":{"title":"StreamAggregateSourcesResponseBody","type":"object","properties":{"branchId":{"type":"integer","example":345,"format":"int64"},"page":{"$ref":"#/definitions/PaginatedResponseResponseBody"},"projectId":{"type":"integer","example":123,"format":"int64"},"sources":{"type":"array","items":{"$ref":"#/definitions/AggregationSourceResponseBody"},"example":[{"projectId":123,"branchId":345,"sourceId":"github-webhook-source","type":"http","name":"Github Webhook Source","description":"The source receives events from Github.","http":{"url":"https://stream-in.keboola.com/G0lpTbz0vhakDicfoDQQ3BCzGYdW3qewd1D3eUbqETygHKGb"},"created":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"version":{"number":3,"hash":"f43e93acd97eceb3","description":"The reason for the last change was...","at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"deleted":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"disabled":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"},"reason":"Disabled for recurring problems."},"sinks":[{"projectId":123,"branchId":345,"sourceId":"github-webhook-source","sinkId":"github-pr-table-sink","type":"table","name":"Raw Data Sink","description":"The sink stores records to a table.","table":{"type":"keboola","tableId":"in.c-bucket.table","mapping":{"columns":[{"type":"uuid-v7","name":"id-col","primaryKey":true},{"type":"datetime","name":"datetime-col"},{"type":"ip","name":"ip-col"},{"type":"headers","name":"headers-col"},{"type":"body","name":"body-col"},{"type":"template","name":"template-col","template":{"language":"jsonnet","content":"body.foo + \"-\" + body.bar"}}]}},"created":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"version":{"number":3,"hash":"f43e93acd97eceb3","description":"The reason for the last change was...","at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"deleted":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"disabled":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"},"reason":"Disabled for recurring problems."},"statistics":{"total":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1},"levels":{"local":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1},"staging":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1},"target":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1}},"files":[{"state":"writing","openedAt":"2022-04-28T14:20:04.000Z","closingAt":"2022-04-28T14:20:04.000Z","importingAt":"2022-04-28T14:20:04.000Z","importedAt":"2022-04-28T14:20:04.000Z","retryAttempt":3,"retryReason":"network problem","retryAfter":"2022-04-28T14:20:04.000Z","statistics":{"total":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1},"levels":{"local":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1},"staging":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1},"target":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1}}}}]}}]}]}},"example":{"projectId":123,"branchId":345,"page":{"limit":100,"totalCount":1000,"sinceId":"my-object-123","lastId":"my-object-456"},"sources":[{"projectId":123,"branchId":345,"sourceId":"github-webhook-source","type":"http","name":"Github Webhook Source","description":"The source receives events from Github.","http":{"url":"https://stream-in.keboola.com/G0lpTbz0vhakDicfoDQQ3BCzGYdW3qewd1D3eUbqETygHKGb"},"created":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"version":{"number":3,"hash":"f43e93acd97eceb3","description":"The reason for the last change was...","at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"deleted":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"disabled":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"},"reason":"Disabled for recurring problems."},"sinks":[{"projectId":123,"branchId":345,"sourceId":"github-webhook-source","sinkId":"github-pr-table-sink","type":"table","name":"Raw Data Sink","description":"The sink stores records to a table.","table":{"type":"keboola","tableId":"in.c-bucket.table","mapping":{"columns":[{"type":"uuid-v7","name":"id-col","primaryKey":true},{"type":"datetime","name":"datetime-col"},{"type":"ip","name":"ip-col"},{"type":"headers","name":"headers-col"},{"type":"body","name":"body-col"},{"type":"template","name":"template-col","template":{"language":"jsonnet","content":"body.foo + \"-\" + body.bar"}}]}},"created":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"version":{"number":3,"hash":"f43e93acd97eceb3","description":"The reason for the last change was...","at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"deleted":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"disabled":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"},"reason":"Disabled for recurring problems."},"statistics":{"total":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1},"levels":{"local":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1},"staging":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1},"target":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1}},"files":[{"state":"writing","openedAt":"2022-04-28T14:20:04.000Z","closingAt":"2022-04-28T14:20:04.000Z","importingAt":"2022-04-28T14:20:04.000Z","importedAt":"2022-04-28T14:20:04.000Z","retryAttempt":3,"retryReason":"network problem","retryAfter":"2022-04-28T14:20:04.000Z","statistics":{"total":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1},"levels":{"local":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1},"staging":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1},"target":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1}}}}]}}]}]},"required":["projectId","branchId","page","sources"]},"StreamCreateSinkRequestBody":{"title":"StreamCreateSinkRequestBody","type":"object","properties":{"description":{"type":"string","description":"Description of the source.","example":"The sink stores records to a table.","maxLength":4096},"name":{"type":"string","description":"Human readable name of the sink.","example":"Raw Data Sink","minLength":1,"maxLength":40},"sinkId":{"type":"string","description":"Optional ID, if not filled in, it will be generated from name. Cannot be changed later.","example":"github-pr-table-sink","minLength":1,"maxLength":48},"table":{"$ref":"#/definitions/TableSinkCreateRequestBody"},"type":{"type":"string","example":"table","enum":["table"]}},"example":{"sinkId":"github-pr-table-sink","type":"table","name":"Raw Data Sink","description":"The sink stores records to a table.","table":{"type":"keboola","tableId":"in.c-bucket.table","mapping":{"columns":[{"type":"uuid-v7","name":"id-col","primaryKey":true},{"type":"datetime","name":"datetime-col"},{"type":"ip","name":"ip-col"},{"type":"headers","name":"headers-col"},{"type":"body","name":"body-col"},{"type":"template","name":"template-col","template":{"language":"jsonnet","content":"body.foo + \"-\" + body.bar"}}]}}},"required":["type","name"]},"StreamCreateSinkResponseBody":{"title":"StreamCreateSinkResponseBody","type":"object","properties":{"createdAt":{"type":"string","description":"Date and time of the task creation.","example":"2022-04-28T14:20:04.000Z","format":"date-time"},"duration":{"type":"integer","description":"Duration of the task in milliseconds.","example":123456789,"format":"int64"},"error":{"type":"string","example":"abc123"},"finishedAt":{"type":"string","description":"Date and time of the task end.","example":"2022-04-28T14:20:04.000Z","format":"date-time"},"isFinished":{"type":"boolean","description":"Shortcut for status != \"processing\".","example":false},"outputs":{"$ref":"#/definitions/TaskOutputsResponseBody"},"result":{"type":"string","example":"abc123"},"status":{"type":"string","description":"Task status, one of: processing, success, error","example":"success","enum":["processing","success","error"]},"taskId":{"type":"string","example":"task_1234"},"type":{"type":"string","description":"Task type.","example":"abc123"},"url":{"type":"string","description":"URL of the task.","example":"abc123"}},"example":{"taskId":"task_1234","type":"abc123","url":"abc123","status":"success","isFinished":false,"createdAt":"2022-04-28T14:20:04.000Z","finishedAt":"2022-04-28T14:20:04.000Z","duration":123456789,"result":"abc123","error":"abc123","outputs":{"url":"abc123","projectId":123,"branchId":345,"sourceId":"github-webhook-source","sinkId":"github-pr-table-sink"}},"required":["taskId","type","url","status","isFinished","createdAt"]},"StreamCreateSinkStreamAPIResourceLimitReachedResponseBody":{"title":"StreamCreateSinkStreamAPIResourceLimitReachedResponseBody","type":"object","properties":{"error":{"type":"string","description":"Name of error.","example":"stream.internalError"},"message":{"type":"string","description":"Error message.","example":"Internal Error"},"statusCode":{"type":"integer","description":"HTTP status code.","example":500,"format":"int64"}},"description":"Resource limit reached.","example":{"statusCode":422,"error":"stream.api.resourceLimitReached","message":"Maximum number of sources per project is 100."},"required":["statusCode","error","message"]},"StreamCreateSinkStreamAPISinkAlreadyExistsResponseBody":{"title":"StreamCreateSinkStreamAPISinkAlreadyExistsResponseBody","type":"object","properties":{"error":{"type":"string","description":"Name of error.","example":"stream.internalError"},"message":{"type":"string","description":"Error message.","example":"Internal Error"},"statusCode":{"type":"integer","description":"HTTP status code.","example":500,"format":"int64"}},"description":"Sink already exists in the source.","example":{"statusCode":409,"error":"stream.api.sinkAlreadyExists","message":"Sink already exists in the source."},"required":["statusCode","error","message"]},"StreamCreateSinkStreamAPISourceNotFoundResponseBody":{"title":"StreamCreateSinkStreamAPISourceNotFoundResponseBody","type":"object","properties":{"error":{"type":"string","description":"Name of error.","example":"stream.internalError"},"message":{"type":"string","description":"Error message.","example":"Internal Error"},"statusCode":{"type":"integer","description":"HTTP status code.","example":500,"format":"int64"}},"description":"Source not found error.","example":{"statusCode":404,"error":"stream.api.sourceNotFound","message":"Source \"github-pull-requests\" not found."},"required":["statusCode","error","message"]},"StreamCreateSourceRequestBody":{"title":"StreamCreateSourceRequestBody","type":"object","properties":{"description":{"type":"string","description":"Description of the source.","example":"The source receives events from Github.","maxLength":4096},"name":{"type":"string","description":"Human readable name of the source.","example":"Github Webhook Source","minLength":1,"maxLength":40},"sourceId":{"type":"string","description":"Optional ID, if not filled in, it will be generated from name. Cannot be changed later.","example":"github-webhook-source","minLength":1,"maxLength":48},"type":{"type":"string","example":"http","enum":["http"]}},"example":{"sourceId":"github-webhook-source","type":"http","name":"Github Webhook Source","description":"The source receives events from Github."},"required":["type","name"]},"StreamCreateSourceResponseBody":{"title":"StreamCreateSourceResponseBody","type":"object","properties":{"createdAt":{"type":"string","description":"Date and time of the task creation.","example":"2022-04-28T14:20:04.000Z","format":"date-time"},"duration":{"type":"integer","description":"Duration of the task in milliseconds.","example":123456789,"format":"int64"},"error":{"type":"string","example":"abc123"},"finishedAt":{"type":"string","description":"Date and time of the task end.","example":"2022-04-28T14:20:04.000Z","format":"date-time"},"isFinished":{"type":"boolean","description":"Shortcut for status != \"processing\".","example":false},"outputs":{"$ref":"#/definitions/TaskOutputsResponseBody"},"result":{"type":"string","example":"abc123"},"status":{"type":"string","description":"Task status, one of: processing, success, error","example":"success","enum":["processing","success","error"]},"taskId":{"type":"string","example":"task_1234"},"type":{"type":"string","description":"Task type.","example":"abc123"},"url":{"type":"string","description":"URL of the task.","example":"abc123"}},"example":{"taskId":"task_1234","type":"abc123","url":"abc123","status":"success","isFinished":false,"createdAt":"2022-04-28T14:20:04.000Z","finishedAt":"2022-04-28T14:20:04.000Z","duration":123456789,"result":"abc123","error":"abc123","outputs":{"url":"abc123","projectId":123,"branchId":345,"sourceId":"github-webhook-source","sinkId":"github-pr-table-sink"}},"required":["taskId","type","url","status","isFinished","createdAt"]},"StreamCreateSourceStreamAPIResourceLimitReachedResponseBody":{"title":"StreamCreateSourceStreamAPIResourceLimitReachedResponseBody","type":"object","properties":{"error":{"type":"string","description":"Name of error.","example":"stream.internalError"},"message":{"type":"string","description":"Error message.","example":"Internal Error"},"statusCode":{"type":"integer","description":"HTTP status code.","example":500,"format":"int64"}},"description":"Resource limit reached.","example":{"statusCode":422,"error":"stream.api.resourceLimitReached","message":"Maximum number of sources per project is 100."},"required":["statusCode","error","message"]},"StreamCreateSourceStreamAPISourceAlreadyExistsResponseBody":{"title":"StreamCreateSourceStreamAPISourceAlreadyExistsResponseBody","type":"object","properties":{"error":{"type":"string","description":"Name of error.","example":"stream.internalError"},"message":{"type":"string","description":"Error message.","example":"Internal Error"},"statusCode":{"type":"integer","description":"HTTP status code.","example":500,"format":"int64"}},"description":"Source already exists in the branch.","example":{"statusCode":409,"error":"stream.api.sourceAlreadyExists","message":"Source already exists in the branch."},"required":["statusCode","error","message"]},"StreamDeleteSinkResponseBody":{"title":"StreamDeleteSinkResponseBody","type":"object","properties":{"createdAt":{"type":"string","description":"Date and time of the task creation.","example":"2022-04-28T14:20:04.000Z","format":"date-time"},"duration":{"type":"integer","description":"Duration of the task in milliseconds.","example":123456789,"format":"int64"},"error":{"type":"string","example":"abc123"},"finishedAt":{"type":"string","description":"Date and time of the task end.","example":"2022-04-28T14:20:04.000Z","format":"date-time"},"isFinished":{"type":"boolean","description":"Shortcut for status != \"processing\".","example":false},"outputs":{"$ref":"#/definitions/TaskOutputsResponseBody"},"result":{"type":"string","example":"abc123"},"status":{"type":"string","description":"Task status, one of: processing, success, error","example":"success","enum":["processing","success","error"]},"taskId":{"type":"string","example":"task_1234"},"type":{"type":"string","description":"Task type.","example":"abc123"},"url":{"type":"string","description":"URL of the task.","example":"abc123"}},"example":{"taskId":"task_1234","type":"abc123","url":"abc123","status":"success","isFinished":false,"createdAt":"2022-04-28T14:20:04.000Z","finishedAt":"2022-04-28T14:20:04.000Z","duration":123456789,"result":"abc123","error":"abc123","outputs":{"url":"abc123","projectId":123,"branchId":345,"sourceId":"github-webhook-source","sinkId":"github-pr-table-sink"}},"required":["taskId","type","url","status","isFinished","createdAt"]},"StreamDeleteSinkStreamAPISinkNotFoundResponseBody":{"title":"StreamDeleteSinkStreamAPISinkNotFoundResponseBody","type":"object","properties":{"error":{"type":"string","description":"Name of error.","example":"stream.internalError"},"message":{"type":"string","description":"Error message.","example":"Internal Error"},"statusCode":{"type":"integer","description":"HTTP status code.","example":500,"format":"int64"}},"description":"Sink not found error.","example":{"statusCode":404,"error":"stream.api.sinkNotFound","message":"Sink \"github-changed-files\" not found."},"required":["statusCode","error","message"]},"StreamDeleteSinkStreamAPISourceNotFoundResponseBody":{"title":"StreamDeleteSinkStreamAPISourceNotFoundResponseBody","type":"object","properties":{"error":{"type":"string","description":"Name of error.","example":"stream.internalError"},"message":{"type":"string","description":"Error message.","example":"Internal Error"},"statusCode":{"type":"integer","description":"HTTP status code.","example":500,"format":"int64"}},"description":"Source not found error.","example":{"statusCode":404,"error":"stream.api.sourceNotFound","message":"Source \"github-pull-requests\" not found."},"required":["statusCode","error","message"]},"StreamDeleteSourceResponseBody":{"title":"StreamDeleteSourceResponseBody","type":"object","properties":{"createdAt":{"type":"string","description":"Date and time of the task creation.","example":"2022-04-28T14:20:04.000Z","format":"date-time"},"duration":{"type":"integer","description":"Duration of the task in milliseconds.","example":123456789,"format":"int64"},"error":{"type":"string","example":"abc123"},"finishedAt":{"type":"string","description":"Date and time of the task end.","example":"2022-04-28T14:20:04.000Z","format":"date-time"},"isFinished":{"type":"boolean","description":"Shortcut for status != \"processing\".","example":false},"outputs":{"$ref":"#/definitions/TaskOutputsResponseBody"},"result":{"type":"string","example":"abc123"},"status":{"type":"string","description":"Task status, one of: processing, success, error","example":"success","enum":["processing","success","error"]},"taskId":{"type":"string","example":"task_1234"},"type":{"type":"string","description":"Task type.","example":"abc123"},"url":{"type":"string","description":"URL of the task.","example":"abc123"}},"example":{"taskId":"task_1234","type":"abc123","url":"abc123","status":"success","isFinished":false,"createdAt":"2022-04-28T14:20:04.000Z","finishedAt":"2022-04-28T14:20:04.000Z","duration":123456789,"result":"abc123","error":"abc123","outputs":{"url":"abc123","projectId":123,"branchId":345,"sourceId":"github-webhook-source","sinkId":"github-pr-table-sink"}},"required":["taskId","type","url","status","isFinished","createdAt"]},"StreamDeleteSourceStreamAPISourceNotFoundResponseBody":{"title":"StreamDeleteSourceStreamAPISourceNotFoundResponseBody","type":"object","properties":{"error":{"type":"string","description":"Name of error.","example":"stream.internalError"},"message":{"type":"string","description":"Error message.","example":"Internal Error"},"statusCode":{"type":"integer","description":"HTTP status code.","example":500,"format":"int64"}},"description":"Source not found error.","example":{"statusCode":404,"error":"stream.api.sourceNotFound","message":"Source \"github-pull-requests\" not found."},"required":["statusCode","error","message"]},"StreamGetSinkResponseBody":{"title":"StreamGetSinkResponseBody","type":"object","properties":{"branchId":{"type":"integer","example":345,"format":"int64"},"created":{"$ref":"#/definitions/CreatedEntityResponseBody"},"deleted":{"$ref":"#/definitions/DeletedEntityResponseBody"},"description":{"type":"string","description":"Description of the source.","example":"The sink stores records to a table.","maxLength":4096},"disabled":{"$ref":"#/definitions/DisabledEntityResponseBody"},"name":{"type":"string","description":"Human readable name of the sink.","example":"Raw Data Sink","minLength":1,"maxLength":40},"projectId":{"type":"integer","example":123,"format":"int64"},"sinkId":{"type":"string","example":"github-pr-table-sink","minLength":1,"maxLength":48},"sourceId":{"type":"string","example":"github-webhook-source","minLength":1,"maxLength":48},"table":{"$ref":"#/definitions/TableSinkResponseBody"},"type":{"type":"string","example":"table","enum":["table"]},"version":{"$ref":"#/definitions/VersionResponseBody"}},"example":{"projectId":123,"branchId":345,"sourceId":"github-webhook-source","sinkId":"github-pr-table-sink","type":"table","name":"Raw Data Sink","description":"The sink stores records to a table.","table":{"type":"keboola","tableId":"in.c-bucket.table","mapping":{"columns":[{"type":"uuid-v7","name":"id-col","primaryKey":true},{"type":"datetime","name":"datetime-col"},{"type":"ip","name":"ip-col"},{"type":"headers","name":"headers-col"},{"type":"body","name":"body-col"},{"type":"template","name":"template-col","template":{"language":"jsonnet","content":"body.foo + \"-\" + body.bar"}}]}},"version":{"number":3,"hash":"f43e93acd97eceb3","description":"The reason for the last change was...","at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"created":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"deleted":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"disabled":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"},"reason":"Disabled for recurring problems."}},"required":["projectId","branchId","sourceId","sinkId","type","name","description","version","created"]},"StreamGetSinkSettingsResponseBody":{"title":"StreamGetSinkSettingsResponseBody","type":"object","properties":{"settings":{"type":"array","items":{"$ref":"#/definitions/SettingResultResponseBody"},"example":[{"key":"some.service.limit","type":"string","description":"Minimal interval between uploads.","value":"1m20s","defaultValue":"30s","overwritten":true,"protected":false,"validation":"minDuration=15s"}]}},"example":{"settings":[{"key":"some.service.limit","type":"string","description":"Minimal interval between uploads.","value":"1m20s","defaultValue":"30s","overwritten":true,"protected":false,"validation":"minDuration=15s"}]}},"StreamGetSinkSettingsStreamAPISinkNotFoundResponseBody":{"title":"StreamGetSinkSettingsStreamAPISinkNotFoundResponseBody","type":"object","properties":{"error":{"type":"string","description":"Name of error.","example":"stream.internalError"},"message":{"type":"string","description":"Error message.","example":"Internal Error"},"statusCode":{"type":"integer","description":"HTTP status code.","example":500,"format":"int64"}},"description":"Sink not found error.","example":{"statusCode":404,"error":"stream.api.sinkNotFound","message":"Sink \"github-changed-files\" not found."},"required":["statusCode","error","message"]},"StreamGetSinkSettingsStreamAPISourceNotFoundResponseBody":{"title":"StreamGetSinkSettingsStreamAPISourceNotFoundResponseBody","type":"object","properties":{"error":{"type":"string","description":"Name of error.","example":"stream.internalError"},"message":{"type":"string","description":"Error message.","example":"Internal Error"},"statusCode":{"type":"integer","description":"HTTP status code.","example":500,"format":"int64"}},"description":"Source not found error.","example":{"statusCode":404,"error":"stream.api.sourceNotFound","message":"Source \"github-pull-requests\" not found."},"required":["statusCode","error","message"]},"StreamGetSinkStreamAPISinkNotFoundResponseBody":{"title":"StreamGetSinkStreamAPISinkNotFoundResponseBody","type":"object","properties":{"error":{"type":"string","description":"Name of error.","example":"stream.internalError"},"message":{"type":"string","description":"Error message.","example":"Internal Error"},"statusCode":{"type":"integer","description":"HTTP status code.","example":500,"format":"int64"}},"description":"Sink not found error.","example":{"statusCode":404,"error":"stream.api.sinkNotFound","message":"Sink \"github-changed-files\" not found."},"required":["statusCode","error","message"]},"StreamGetSinkStreamAPISourceNotFoundResponseBody":{"title":"StreamGetSinkStreamAPISourceNotFoundResponseBody","type":"object","properties":{"error":{"type":"string","description":"Name of error.","example":"stream.internalError"},"message":{"type":"string","description":"Error message.","example":"Internal Error"},"statusCode":{"type":"integer","description":"HTTP status code.","example":500,"format":"int64"}},"description":"Source not found error.","example":{"statusCode":404,"error":"stream.api.sourceNotFound","message":"Source \"github-pull-requests\" not found."},"required":["statusCode","error","message"]},"StreamGetSourceResponseBody":{"title":"StreamGetSourceResponseBody","type":"object","properties":{"branchId":{"type":"integer","example":345,"format":"int64"},"created":{"$ref":"#/definitions/CreatedEntityResponseBody"},"deleted":{"$ref":"#/definitions/DeletedEntityResponseBody"},"description":{"type":"string","description":"Description of the source.","example":"The source receives events from Github.","maxLength":4096},"disabled":{"$ref":"#/definitions/DisabledEntityResponseBody"},"http":{"$ref":"#/definitions/HTTPSourceResponseBody"},"name":{"type":"string","description":"Human readable name of the source.","example":"Github Webhook Source","minLength":1,"maxLength":40},"projectId":{"type":"integer","example":123,"format":"int64"},"sourceId":{"type":"string","example":"github-webhook-source","minLength":1,"maxLength":48},"type":{"type":"string","example":"http","enum":["http"]},"version":{"$ref":"#/definitions/VersionResponseBody"}},"example":{"projectId":123,"branchId":345,"sourceId":"github-webhook-source","type":"http","name":"Github Webhook Source","description":"The source receives events from Github.","http":{"url":"https://stream-in.keboola.com/G0lpTbz0vhakDicfoDQQ3BCzGYdW3qewd1D3eUbqETygHKGb"},"created":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"version":{"number":3,"hash":"f43e93acd97eceb3","description":"The reason for the last change was...","at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"deleted":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"disabled":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"},"reason":"Disabled for recurring problems."}},"required":["projectId","branchId","sourceId","type","name","description","created","version"]},"StreamGetSourceSettingsResponseBody":{"title":"StreamGetSourceSettingsResponseBody","type":"object","properties":{"settings":{"type":"array","items":{"$ref":"#/definitions/SettingResultResponseBody"},"example":[{"key":"some.service.limit","type":"string","description":"Minimal interval between uploads.","value":"1m20s","defaultValue":"30s","overwritten":true,"protected":false,"validation":"minDuration=15s"}]}},"example":{"settings":[{"key":"some.service.limit","type":"string","description":"Minimal interval between uploads.","value":"1m20s","defaultValue":"30s","overwritten":true,"protected":false,"validation":"minDuration=15s"}]}},"StreamGetSourceSettingsStreamAPISourceNotFoundResponseBody":{"title":"StreamGetSourceSettingsStreamAPISourceNotFoundResponseBody","type":"object","properties":{"error":{"type":"string","description":"Name of error.","example":"stream.internalError"},"message":{"type":"string","description":"Error message.","example":"Internal Error"},"statusCode":{"type":"integer","description":"HTTP status code.","example":500,"format":"int64"}},"description":"Source not found error.","example":{"statusCode":404,"error":"stream.api.sourceNotFound","message":"Source \"github-pull-requests\" not found."},"required":["statusCode","error","message"]},"StreamGetSourceStreamAPISourceNotFoundResponseBody":{"title":"StreamGetSourceStreamAPISourceNotFoundResponseBody","type":"object","properties":{"error":{"type":"string","description":"Name of error.","example":"stream.internalError"},"message":{"type":"string","description":"Error message.","example":"Internal Error"},"statusCode":{"type":"integer","description":"HTTP status code.","example":500,"format":"int64"}},"description":"Source not found error.","example":{"statusCode":404,"error":"stream.api.sourceNotFound","message":"Source \"github-pull-requests\" not found."},"required":["statusCode","error","message"]},"StreamGetTaskResponseBody":{"title":"StreamGetTaskResponseBody","type":"object","properties":{"createdAt":{"type":"string","description":"Date and time of the task creation.","example":"2022-04-28T14:20:04.000Z","format":"date-time"},"duration":{"type":"integer","description":"Duration of the task in milliseconds.","example":123456789,"format":"int64"},"error":{"type":"string","example":"abc123"},"finishedAt":{"type":"string","description":"Date and time of the task end.","example":"2022-04-28T14:20:04.000Z","format":"date-time"},"isFinished":{"type":"boolean","description":"Shortcut for status != \"processing\".","example":false},"outputs":{"$ref":"#/definitions/TaskOutputsResponseBody"},"result":{"type":"string","example":"abc123"},"status":{"type":"string","description":"Task status, one of: processing, success, error","example":"success","enum":["processing","success","error"]},"taskId":{"type":"string","example":"task_1234"},"type":{"type":"string","description":"Task type.","example":"abc123"},"url":{"type":"string","description":"URL of the task.","example":"abc123"}},"example":{"taskId":"task_1234","type":"abc123","url":"abc123","status":"success","isFinished":false,"createdAt":"2022-04-28T14:20:04.000Z","finishedAt":"2022-04-28T14:20:04.000Z","duration":123456789,"result":"abc123","error":"abc123","outputs":{"url":"abc123","projectId":123,"branchId":345,"sourceId":"github-webhook-source","sinkId":"github-pr-table-sink"}},"required":["taskId","type","url","status","isFinished","createdAt"]},"StreamGetTaskStreamAPITaskNotFoundResponseBody":{"title":"StreamGetTaskStreamAPITaskNotFoundResponseBody","type":"object","properties":{"error":{"type":"string","description":"Name of error.","example":"stream.internalError"},"message":{"type":"string","description":"Error message.","example":"Internal Error"},"statusCode":{"type":"integer","description":"HTTP status code.","example":500,"format":"int64"}},"description":"Task not found error.","example":{"statusCode":404,"error":"stream.api.taskNotFound","message":"Task \"001\" not found."},"required":["statusCode","error","message"]},"StreamListSinksResponseBody":{"title":"StreamListSinksResponseBody","type":"object","properties":{"branchId":{"type":"integer","example":345,"format":"int64"},"page":{"$ref":"#/definitions/PaginatedResponseResponseBody"},"projectId":{"type":"integer","example":123,"format":"int64"},"sinks":{"type":"array","items":{"$ref":"#/definitions/SinkResponseBody"},"example":[{"projectId":123,"branchId":345,"sourceId":"github-webhook-source","sinkId":"github-pr-table-sink","type":"table","name":"Raw Data Sink","description":"The sink stores records to a table.","table":{"type":"keboola","tableId":"in.c-bucket.table","mapping":{"columns":[{"type":"uuid-v7","name":"id-col","primaryKey":true},{"type":"datetime","name":"datetime-col"},{"type":"ip","name":"ip-col"},{"type":"headers","name":"headers-col"},{"type":"body","name":"body-col"},{"type":"template","name":"template-col","template":{"language":"jsonnet","content":"body.foo + \"-\" + body.bar"}}]}},"version":{"number":3,"hash":"f43e93acd97eceb3","description":"The reason for the last change was...","at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"created":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"deleted":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"disabled":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"},"reason":"Disabled for recurring problems."}}]},"sourceId":{"type":"string","example":"github-webhook-source","minLength":1,"maxLength":48}},"example":{"projectId":123,"branchId":345,"sourceId":"github-webhook-source","page":{"limit":100,"totalCount":1000,"sinceId":"my-object-123","lastId":"my-object-456"},"sinks":[{"projectId":123,"branchId":345,"sourceId":"github-webhook-source","sinkId":"github-pr-table-sink","type":"table","name":"Raw Data Sink","description":"The sink stores records to a table.","table":{"type":"keboola","tableId":"in.c-bucket.table","mapping":{"columns":[{"type":"uuid-v7","name":"id-col","primaryKey":true},{"type":"datetime","name":"datetime-col"},{"type":"ip","name":"ip-col"},{"type":"headers","name":"headers-col"},{"type":"body","name":"body-col"},{"type":"template","name":"template-col","template":{"language":"jsonnet","content":"body.foo + \"-\" + body.bar"}}]}},"version":{"number":3,"hash":"f43e93acd97eceb3","description":"The reason for the last change was...","at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"created":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"deleted":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"disabled":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"},"reason":"Disabled for recurring problems."}}]},"required":["projectId","branchId","sourceId","page","sinks"]},"StreamListSinksStreamAPISourceNotFoundResponseBody":{"title":"StreamListSinksStreamAPISourceNotFoundResponseBody","type":"object","properties":{"error":{"type":"string","description":"Name of error.","example":"stream.internalError"},"message":{"type":"string","description":"Error message.","example":"Internal Error"},"statusCode":{"type":"integer","description":"HTTP status code.","example":500,"format":"int64"}},"description":"Source not found error.","example":{"statusCode":404,"error":"stream.api.sourceNotFound","message":"Source \"github-pull-requests\" not found."},"required":["statusCode","error","message"]},"StreamListSourcesResponseBody":{"title":"StreamListSourcesResponseBody","type":"object","properties":{"branchId":{"type":"integer","example":345,"format":"int64"},"page":{"$ref":"#/definitions/PaginatedResponseResponseBody"},"projectId":{"type":"integer","example":123,"format":"int64"},"sources":{"type":"array","items":{"$ref":"#/definitions/SourceResponseBody"},"example":[{"projectId":123,"branchId":345,"sourceId":"github-webhook-source","type":"http","name":"Github Webhook Source","description":"The source receives events from Github.","http":{"url":"https://stream-in.keboola.com/G0lpTbz0vhakDicfoDQQ3BCzGYdW3qewd1D3eUbqETygHKGb"},"created":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"version":{"number":3,"hash":"f43e93acd97eceb3","description":"The reason for the last change was...","at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"deleted":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"disabled":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"},"reason":"Disabled for recurring problems."}}]}},"example":{"projectId":123,"branchId":345,"page":{"limit":100,"totalCount":1000,"sinceId":"my-object-123","lastId":"my-object-456"},"sources":[{"projectId":123,"branchId":345,"sourceId":"github-webhook-source","type":"http","name":"Github Webhook Source","description":"The source receives events from Github.","http":{"url":"https://stream-in.keboola.com/G0lpTbz0vhakDicfoDQQ3BCzGYdW3qewd1D3eUbqETygHKGb"},"created":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"version":{"number":3,"hash":"f43e93acd97eceb3","description":"The reason for the last change was...","at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"deleted":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"disabled":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"},"reason":"Disabled for recurring problems."}}]},"required":["projectId","branchId","page","sources"]},"StreamSinkStatisticsFilesResponseBody":{"title":"StreamSinkStatisticsFilesResponseBody","type":"object","properties":{"files":{"type":"array","items":{"$ref":"#/definitions/SinkFileResponseBody"},"example":[{"state":"writing","openedAt":"2022-04-28T14:20:04.000Z","closingAt":"2022-04-28T14:20:04.000Z","importingAt":"2022-04-28T14:20:04.000Z","importedAt":"2022-04-28T14:20:04.000Z","retryAttempt":3,"retryReason":"network problem","retryAfter":"2022-04-28T14:20:04.000Z","statistics":{"total":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1},"levels":{"local":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1},"staging":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1},"target":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1}}}}]}},"example":{"files":[{"state":"writing","openedAt":"2022-04-28T14:20:04.000Z","closingAt":"2022-04-28T14:20:04.000Z","importingAt":"2022-04-28T14:20:04.000Z","importedAt":"2022-04-28T14:20:04.000Z","retryAttempt":3,"retryReason":"network problem","retryAfter":"2022-04-28T14:20:04.000Z","statistics":{"total":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1},"levels":{"local":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1},"staging":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1},"target":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1}}}}]},"required":["files"]},"StreamSinkStatisticsFilesStreamAPISinkNotFoundResponseBody":{"title":"StreamSinkStatisticsFilesStreamAPISinkNotFoundResponseBody","type":"object","properties":{"error":{"type":"string","description":"Name of error.","example":"stream.internalError"},"message":{"type":"string","description":"Error message.","example":"Internal Error"},"statusCode":{"type":"integer","description":"HTTP status code.","example":500,"format":"int64"}},"description":"Sink not found error.","example":{"statusCode":404,"error":"stream.api.sinkNotFound","message":"Sink \"github-changed-files\" not found."},"required":["statusCode","error","message"]},"StreamSinkStatisticsFilesStreamAPISourceNotFoundResponseBody":{"title":"StreamSinkStatisticsFilesStreamAPISourceNotFoundResponseBody","type":"object","properties":{"error":{"type":"string","description":"Name of error.","example":"stream.internalError"},"message":{"type":"string","description":"Error message.","example":"Internal Error"},"statusCode":{"type":"integer","description":"HTTP status code.","example":500,"format":"int64"}},"description":"Source not found error.","example":{"statusCode":404,"error":"stream.api.sourceNotFound","message":"Source \"github-pull-requests\" not found."},"required":["statusCode","error","message"]},"StreamSinkStatisticsTotalResponseBody":{"title":"StreamSinkStatisticsTotalResponseBody","type":"object","properties":{"levels":{"$ref":"#/definitions/LevelsResponseBody"},"total":{"$ref":"#/definitions/LevelResponseBody"}},"example":{"total":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1},"levels":{"local":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1},"staging":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1},"target":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1}}},"required":["total","levels"]},"StreamSinkStatisticsTotalStreamAPISinkNotFoundResponseBody":{"title":"StreamSinkStatisticsTotalStreamAPISinkNotFoundResponseBody","type":"object","properties":{"error":{"type":"string","description":"Name of error.","example":"stream.internalError"},"message":{"type":"string","description":"Error message.","example":"Internal Error"},"statusCode":{"type":"integer","description":"HTTP status code.","example":500,"format":"int64"}},"description":"Sink not found error.","example":{"statusCode":404,"error":"stream.api.sinkNotFound","message":"Sink \"github-changed-files\" not found."},"required":["statusCode","error","message"]},"StreamSinkStatisticsTotalStreamAPISourceNotFoundResponseBody":{"title":"StreamSinkStatisticsTotalStreamAPISourceNotFoundResponseBody","type":"object","properties":{"error":{"type":"string","description":"Name of error.","example":"stream.internalError"},"message":{"type":"string","description":"Error message.","example":"Internal Error"},"statusCode":{"type":"integer","description":"HTTP status code.","example":500,"format":"int64"}},"description":"Source not found error.","example":{"statusCode":404,"error":"stream.api.sourceNotFound","message":"Source \"github-pull-requests\" not found."},"required":["statusCode","error","message"]},"StreamTestSourceResponseBody":{"title":"StreamTestSourceResponseBody","type":"object","properties":{"branchId":{"type":"integer","example":345,"format":"int64"},"projectId":{"type":"integer","example":123,"format":"int64"},"sourceId":{"type":"string","example":"github-webhook-source","minLength":1,"maxLength":48},"tables":{"type":"array","items":{"$ref":"#/definitions/TestResultTableResponseBody"},"description":"Table for each configured sink.","example":[{"sinkId":"github-pr-table-sink","tableId":"in.c-bucket.table","rows":[{"columns":[{"name":"id","value":"12345"}]}]}]}},"example":{"projectId":123,"branchId":345,"sourceId":"github-webhook-source","tables":[{"sinkId":"github-pr-table-sink","tableId":"in.c-bucket.table","rows":[{"columns":[{"name":"id","value":"12345"}]}]}]},"required":["projectId","branchId","sourceId","tables"]},"StreamTestSourceStreamAPISourceNotFoundResponseBody":{"title":"StreamTestSourceStreamAPISourceNotFoundResponseBody","type":"object","properties":{"error":{"type":"string","description":"Name of error.","example":"stream.internalError"},"message":{"type":"string","description":"Error message.","example":"Internal Error"},"statusCode":{"type":"integer","description":"HTTP status code.","example":500,"format":"int64"}},"description":"Source not found error.","example":{"statusCode":404,"error":"stream.api.sourceNotFound","message":"Source \"github-pull-requests\" not found."},"required":["statusCode","error","message"]},"StreamUpdateSinkRequestBody":{"title":"StreamUpdateSinkRequestBody","type":"object","properties":{"changeDescription":{"type":"string","description":"Description of the modification, description of the version.","example":"Renamed."},"description":{"type":"string","description":"Description of the source.","example":"The sink stores records to a table.","maxLength":4096},"name":{"type":"string","description":"Human readable name of the sink.","example":"Raw Data Sink","minLength":1,"maxLength":40},"table":{"$ref":"#/definitions/TableSinkUpdateRequestBody"},"type":{"type":"string","example":"table","enum":["table"]}},"example":{"changeDescription":"Renamed.","type":"table","name":"Raw Data Sink","description":"The sink stores records to a table.","table":{"type":"keboola","tableId":"in.c-bucket.table","mapping":{"columns":[{"type":"uuid-v7","name":"id-col","primaryKey":true},{"type":"datetime","name":"datetime-col"},{"type":"ip","name":"ip-col"},{"type":"headers","name":"headers-col"},{"type":"body","name":"body-col"},{"type":"template","name":"template-col","template":{"language":"jsonnet","content":"body.foo + \"-\" + body.bar"}}]}}}},"StreamUpdateSinkResponseBody":{"title":"StreamUpdateSinkResponseBody","type":"object","properties":{"createdAt":{"type":"string","description":"Date and time of the task creation.","example":"2022-04-28T14:20:04.000Z","format":"date-time"},"duration":{"type":"integer","description":"Duration of the task in milliseconds.","example":123456789,"format":"int64"},"error":{"type":"string","example":"abc123"},"finishedAt":{"type":"string","description":"Date and time of the task end.","example":"2022-04-28T14:20:04.000Z","format":"date-time"},"isFinished":{"type":"boolean","description":"Shortcut for status != \"processing\".","example":false},"outputs":{"$ref":"#/definitions/TaskOutputsResponseBody"},"result":{"type":"string","example":"abc123"},"status":{"type":"string","description":"Task status, one of: processing, success, error","example":"success","enum":["processing","success","error"]},"taskId":{"type":"string","example":"task_1234"},"type":{"type":"string","description":"Task type.","example":"abc123"},"url":{"type":"string","description":"URL of the task.","example":"abc123"}},"example":{"taskId":"task_1234","type":"abc123","url":"abc123","status":"success","isFinished":false,"createdAt":"2022-04-28T14:20:04.000Z","finishedAt":"2022-04-28T14:20:04.000Z","duration":123456789,"result":"abc123","error":"abc123","outputs":{"url":"abc123","projectId":123,"branchId":345,"sourceId":"github-webhook-source","sinkId":"github-pr-table-sink"}},"required":["taskId","type","url","status","isFinished","createdAt"]},"StreamUpdateSinkSettingsRequestBody":{"title":"StreamUpdateSinkSettingsRequestBody","type":"object","properties":{"changeDescription":{"type":"string","description":"Description of the modification, description of the version.","example":"Updated settings."},"settings":{"type":"array","items":{"$ref":"#/definitions/SettingPatchRequestBody"},"example":[{"key":"some.service.limit","value":"1m20s"}]}},"example":{"changeDescription":"Updated settings.","settings":[{"key":"some.service.limit","value":"1m20s"}]}},"StreamUpdateSinkSettingsResponseBody":{"title":"StreamUpdateSinkSettingsResponseBody","type":"object","properties":{"createdAt":{"type":"string","description":"Date and time of the task creation.","example":"2022-04-28T14:20:04.000Z","format":"date-time"},"duration":{"type":"integer","description":"Duration of the task in milliseconds.","example":123456789,"format":"int64"},"error":{"type":"string","example":"abc123"},"finishedAt":{"type":"string","description":"Date and time of the task end.","example":"2022-04-28T14:20:04.000Z","format":"date-time"},"isFinished":{"type":"boolean","description":"Shortcut for status != \"processing\".","example":false},"outputs":{"$ref":"#/definitions/TaskOutputsResponseBody"},"result":{"type":"string","example":"abc123"},"status":{"type":"string","description":"Task status, one of: processing, success, error","example":"success","enum":["processing","success","error"]},"taskId":{"type":"string","example":"task_1234"},"type":{"type":"string","description":"Task type.","example":"abc123"},"url":{"type":"string","description":"URL of the task.","example":"abc123"}},"example":{"taskId":"task_1234","type":"abc123","url":"abc123","status":"success","isFinished":false,"createdAt":"2022-04-28T14:20:04.000Z","finishedAt":"2022-04-28T14:20:04.000Z","duration":123456789,"result":"abc123","error":"abc123","outputs":{"url":"abc123","projectId":123,"branchId":345,"sourceId":"github-webhook-source","sinkId":"github-pr-table-sink"}},"required":["taskId","type","url","status","isFinished","createdAt"]},"StreamUpdateSinkSettingsStreamAPIForbiddenResponseBody":{"title":"StreamUpdateSinkSettingsStreamAPIForbiddenResponseBody","type":"object","properties":{"error":{"type":"string","description":"Name of error.","example":"stream.internalError"},"message":{"type":"string","description":"Error message.","example":"Internal Error"},"statusCode":{"type":"integer","description":"HTTP status code.","example":500,"format":"int64"}},"description":"Modification of protected settings is forbidden.","example":{"statusCode":404,"error":"stream.api.forbidden","message":"Cannot modify protected keys: \"storage.level.local.compression.gzip.blockSize\"."},"required":["statusCode","error","message"]},"StreamUpdateSinkSettingsStreamAPISinkNotFoundResponseBody":{"title":"StreamUpdateSinkSettingsStreamAPISinkNotFoundResponseBody","type":"object","properties":{"error":{"type":"string","description":"Name of error.","example":"stream.internalError"},"message":{"type":"string","description":"Error message.","example":"Internal Error"},"statusCode":{"type":"integer","description":"HTTP status code.","example":500,"format":"int64"}},"description":"Sink not found error.","example":{"statusCode":404,"error":"stream.api.sinkNotFound","message":"Sink \"github-changed-files\" not found."},"required":["statusCode","error","message"]},"StreamUpdateSinkSettingsStreamAPISourceNotFoundResponseBody":{"title":"StreamUpdateSinkSettingsStreamAPISourceNotFoundResponseBody","type":"object","properties":{"error":{"type":"string","description":"Name of error.","example":"stream.internalError"},"message":{"type":"string","description":"Error message.","example":"Internal Error"},"statusCode":{"type":"integer","description":"HTTP status code.","example":500,"format":"int64"}},"description":"Source not found error.","example":{"statusCode":404,"error":"stream.api.sourceNotFound","message":"Source \"github-pull-requests\" not found."},"required":["statusCode","error","message"]},"StreamUpdateSinkStreamAPISinkNotFoundResponseBody":{"title":"StreamUpdateSinkStreamAPISinkNotFoundResponseBody","type":"object","properties":{"error":{"type":"string","description":"Name of error.","example":"stream.internalError"},"message":{"type":"string","description":"Error message.","example":"Internal Error"},"statusCode":{"type":"integer","description":"HTTP status code.","example":500,"format":"int64"}},"description":"Sink not found error.","example":{"statusCode":404,"error":"stream.api.sinkNotFound","message":"Sink \"github-changed-files\" not found."},"required":["statusCode","error","message"]},"StreamUpdateSinkStreamAPISourceNotFoundResponseBody":{"title":"StreamUpdateSinkStreamAPISourceNotFoundResponseBody","type":"object","properties":{"error":{"type":"string","description":"Name of error.","example":"stream.internalError"},"message":{"type":"string","description":"Error message.","example":"Internal Error"},"statusCode":{"type":"integer","description":"HTTP status code.","example":500,"format":"int64"}},"description":"Source not found error.","example":{"statusCode":404,"error":"stream.api.sourceNotFound","message":"Source \"github-pull-requests\" not found."},"required":["statusCode","error","message"]},"StreamUpdateSourceRequestBody":{"title":"StreamUpdateSourceRequestBody","type":"object","properties":{"changeDescription":{"type":"string","description":"Description of the modification, description of the version.","example":"Renamed."},"description":{"type":"string","description":"Description of the source.","example":"The source receives events from Github.","maxLength":4096},"name":{"type":"string","description":"Human readable name of the source.","example":"Github Webhook Source","minLength":1,"maxLength":40},"type":{"type":"string","example":"http","enum":["http"]}},"example":{"changeDescription":"Renamed.","type":"http","name":"Github Webhook Source","description":"The source receives events from Github."}},"StreamUpdateSourceResponseBody":{"title":"StreamUpdateSourceResponseBody","type":"object","properties":{"createdAt":{"type":"string","description":"Date and time of the task creation.","example":"2022-04-28T14:20:04.000Z","format":"date-time"},"duration":{"type":"integer","description":"Duration of the task in milliseconds.","example":123456789,"format":"int64"},"error":{"type":"string","example":"abc123"},"finishedAt":{"type":"string","description":"Date and time of the task end.","example":"2022-04-28T14:20:04.000Z","format":"date-time"},"isFinished":{"type":"boolean","description":"Shortcut for status != \"processing\".","example":false},"outputs":{"$ref":"#/definitions/TaskOutputsResponseBody"},"result":{"type":"string","example":"abc123"},"status":{"type":"string","description":"Task status, one of: processing, success, error","example":"success","enum":["processing","success","error"]},"taskId":{"type":"string","example":"task_1234"},"type":{"type":"string","description":"Task type.","example":"abc123"},"url":{"type":"string","description":"URL of the task.","example":"abc123"}},"example":{"taskId":"task_1234","type":"abc123","url":"abc123","status":"success","isFinished":false,"createdAt":"2022-04-28T14:20:04.000Z","finishedAt":"2022-04-28T14:20:04.000Z","duration":123456789,"result":"abc123","error":"abc123","outputs":{"url":"abc123","projectId":123,"branchId":345,"sourceId":"github-webhook-source","sinkId":"github-pr-table-sink"}},"required":["taskId","type","url","status","isFinished","createdAt"]},"StreamUpdateSourceSettingsRequestBody":{"title":"StreamUpdateSourceSettingsRequestBody","type":"object","properties":{"changeDescription":{"type":"string","description":"Description of the modification, description of the version.","example":"Updated settings."},"settings":{"type":"array","items":{"$ref":"#/definitions/SettingPatchRequestBody"},"example":[{"key":"some.service.limit","value":"1m20s"}]}},"example":{"changeDescription":"Updated settings.","settings":[{"key":"some.service.limit","value":"1m20s"}]}},"StreamUpdateSourceSettingsResponseBody":{"title":"StreamUpdateSourceSettingsResponseBody","type":"object","properties":{"createdAt":{"type":"string","description":"Date and time of the task creation.","example":"2022-04-28T14:20:04.000Z","format":"date-time"},"duration":{"type":"integer","description":"Duration of the task in milliseconds.","example":123456789,"format":"int64"},"error":{"type":"string","example":"abc123"},"finishedAt":{"type":"string","description":"Date and time of the task end.","example":"2022-04-28T14:20:04.000Z","format":"date-time"},"isFinished":{"type":"boolean","description":"Shortcut for status != \"processing\".","example":false},"outputs":{"$ref":"#/definitions/TaskOutputsResponseBody"},"result":{"type":"string","example":"abc123"},"status":{"type":"string","description":"Task status, one of: processing, success, error","example":"success","enum":["processing","success","error"]},"taskId":{"type":"string","example":"task_1234"},"type":{"type":"string","description":"Task type.","example":"abc123"},"url":{"type":"string","description":"URL of the task.","example":"abc123"}},"example":{"taskId":"task_1234","type":"abc123","url":"abc123","status":"success","isFinished":false,"createdAt":"2022-04-28T14:20:04.000Z","finishedAt":"2022-04-28T14:20:04.000Z","duration":123456789,"result":"abc123","error":"abc123","outputs":{"url":"abc123","projectId":123,"branchId":345,"sourceId":"github-webhook-source","sinkId":"github-pr-table-sink"}},"required":["taskId","type","url","status","isFinished","createdAt"]},"StreamUpdateSourceSettingsStreamAPIForbiddenResponseBody":{"title":"StreamUpdateSourceSettingsStreamAPIForbiddenResponseBody","type":"object","properties":{"error":{"type":"string","description":"Name of error.","example":"stream.internalError"},"message":{"type":"string","description":"Error message.","example":"Internal Error"},"statusCode":{"type":"integer","description":"HTTP status code.","example":500,"format":"int64"}},"description":"Modification of protected settings is forbidden.","example":{"statusCode":404,"error":"stream.api.forbidden","message":"Cannot modify protected keys: \"storage.level.local.compression.gzip.blockSize\"."},"required":["statusCode","error","message"]},"StreamUpdateSourceSettingsStreamAPISourceNotFoundResponseBody":{"title":"StreamUpdateSourceSettingsStreamAPISourceNotFoundResponseBody","type":"object","properties":{"error":{"type":"string","description":"Name of error.","example":"stream.internalError"},"message":{"type":"string","description":"Error message.","example":"Internal Error"},"statusCode":{"type":"integer","description":"HTTP status code.","example":500,"format":"int64"}},"description":"Source not found error.","example":{"statusCode":404,"error":"stream.api.sourceNotFound","message":"Source \"github-pull-requests\" not found."},"required":["statusCode","error","message"]},"StreamUpdateSourceStreamAPISourceNotFoundResponseBody":{"title":"StreamUpdateSourceStreamAPISourceNotFoundResponseBody","type":"object","properties":{"error":{"type":"string","description":"Name of error.","example":"stream.internalError"},"message":{"type":"string","description":"Error message.","example":"Internal Error"},"statusCode":{"type":"integer","description":"HTTP status code.","example":500,"format":"int64"}},"description":"Source not found error.","example":{"statusCode":404,"error":"stream.api.sourceNotFound","message":"Source \"github-pull-requests\" not found."},"required":["statusCode","error","message"]},"TableColumnRequestBody":{"title":"TableColumnRequestBody","type":"object","properties":{"name":{"type":"string","description":"Column name.","example":"id-col"},"primaryKey":{"type":"boolean","description":"Sets this column as a part of the primary key of the destination table.","default":false,"example":false},"template":{"$ref":"#/definitions/TableColumnTemplateRequestBody"},"type":{"type":"string","description":"Column mapping type. This represents a static mapping (e.g. `body` or `headers`), or a custom mapping using a template language (`template`).","example":"body","enum":["uuid-v7","datetime","ip","body","headers","template"]}},"description":"An output mapping defined by a template.","example":{"primaryKey":false,"type":"body","name":"id-col","template":{"language":"jsonnet","content":"body.foo + \"-\" + body.bar"}},"required":["type","name"]},"TableColumnResponseBody":{"title":"TableColumnResponseBody","type":"object","properties":{"name":{"type":"string","description":"Column name.","example":"id-col"},"primaryKey":{"type":"boolean","description":"Sets this column as a part of the primary key of the destination table.","default":false,"example":false},"template":{"$ref":"#/definitions/TableColumnTemplateResponseBody"},"type":{"type":"string","description":"Column mapping type. This represents a static mapping (e.g. `body` or `headers`), or a custom mapping using a template language (`template`).","example":"body","enum":["uuid-v7","datetime","ip","body","headers","template"]}},"description":"An output mapping defined by a template.","example":{"primaryKey":false,"type":"body","name":"id-col","template":{"language":"jsonnet","content":"body.foo + \"-\" + body.bar"}},"required":["type","name"]},"TableColumnTemplateRequestBody":{"title":"TableColumnTemplateRequestBody","type":"object","properties":{"content":{"type":"string","example":"body.foo + \"-\" + body.bar","minLength":1,"maxLength":4096},"language":{"type":"string","example":"jsonnet","enum":["jsonnet"]}},"description":"Template column definition, for \"type\" = \"template\".","example":{"language":"jsonnet","content":"body.foo + \"-\" + body.bar"},"required":["language","content"]},"TableColumnTemplateResponseBody":{"title":"TableColumnTemplateResponseBody","type":"object","properties":{"content":{"type":"string","example":"body.foo + \"-\" + body.bar","minLength":1,"maxLength":4096},"language":{"type":"string","example":"jsonnet","enum":["jsonnet"]}},"description":"Template column definition, for \"type\" = \"template\".","example":{"language":"jsonnet","content":"body.foo + \"-\" + body.bar"},"required":["language","content"]},"TableMappingRequestBody":{"title":"TableMappingRequestBody","type":"object","properties":{"columns":{"type":"array","items":{"$ref":"#/definitions/TableColumnRequestBody"},"example":[{"type":"uuid-v7","name":"id-col","primaryKey":true},{"type":"datetime","name":"datetime-col"},{"type":"ip","name":"ip-col"},{"type":"headers","name":"headers-col"},{"type":"body","name":"body-col"},{"type":"template","name":"template-col","template":{"language":"jsonnet","content":"body.foo + \"-\" + body.bar"}}],"minItems":1,"maxItems":100}},"description":"Table mapping definition.","example":{"columns":[{"type":"uuid-v7","name":"id-col","primaryKey":true},{"type":"datetime","name":"datetime-col"},{"type":"ip","name":"ip-col"},{"type":"headers","name":"headers-col"},{"type":"body","name":"body-col"},{"type":"template","name":"template-col","template":{"language":"jsonnet","content":"body.foo + \"-\" + body.bar"}}]},"required":["columns"]},"TableMappingResponseBody":{"title":"TableMappingResponseBody","type":"object","properties":{"columns":{"type":"array","items":{"$ref":"#/definitions/TableColumnResponseBody"},"example":[{"type":"uuid-v7","name":"id-col","primaryKey":true},{"type":"datetime","name":"datetime-col"},{"type":"ip","name":"ip-col"},{"type":"headers","name":"headers-col"},{"type":"body","name":"body-col"},{"type":"template","name":"template-col","template":{"language":"jsonnet","content":"body.foo + \"-\" + body.bar"}}],"minItems":1,"maxItems":100}},"description":"Table mapping definition.","example":{"columns":[{"type":"uuid-v7","name":"id-col","primaryKey":true},{"type":"datetime","name":"datetime-col"},{"type":"ip","name":"ip-col"},{"type":"headers","name":"headers-col"},{"type":"body","name":"body-col"},{"type":"template","name":"template-col","template":{"language":"jsonnet","content":"body.foo + \"-\" + body.bar"}}]},"required":["columns"]},"TableSinkCreateRequestBody":{"title":"TableSinkCreateRequestBody","type":"object","properties":{"mapping":{"$ref":"#/definitions/TableMappingRequestBody"},"tableId":{"type":"string","example":"in.c-bucket.table"},"type":{"type":"string","example":"keboola","enum":["keboola"]}},"description":"Table sink configuration for \"type\" = \"table\".","example":{"type":"keboola","tableId":"in.c-bucket.table","mapping":{"columns":[{"type":"uuid-v7","name":"id-col","primaryKey":true},{"type":"datetime","name":"datetime-col"},{"type":"ip","name":"ip-col"},{"type":"headers","name":"headers-col"},{"type":"body","name":"body-col"},{"type":"template","name":"template-col","template":{"language":"jsonnet","content":"body.foo + \"-\" + body.bar"}}]}},"required":["type","tableId","mapping"]},"TableSinkResponseBody":{"title":"TableSinkResponseBody","type":"object","properties":{"mapping":{"$ref":"#/definitions/TableMappingResponseBody"},"tableId":{"type":"string","example":"in.c-bucket.table"},"type":{"type":"string","example":"keboola","enum":["keboola"]}},"description":"Table sink configuration for \"type\" = \"table\".","example":{"type":"keboola","tableId":"in.c-bucket.table","mapping":{"columns":[{"type":"uuid-v7","name":"id-col","primaryKey":true},{"type":"datetime","name":"datetime-col"},{"type":"ip","name":"ip-col"},{"type":"headers","name":"headers-col"},{"type":"body","name":"body-col"},{"type":"template","name":"template-col","template":{"language":"jsonnet","content":"body.foo + \"-\" + body.bar"}}]}},"required":["type","tableId","mapping"]},"TableSinkUpdateRequestBody":{"title":"TableSinkUpdateRequestBody","type":"object","properties":{"mapping":{"$ref":"#/definitions/TableMappingRequestBody"},"tableId":{"type":"string","example":"in.c-bucket.table"},"type":{"type":"string","example":"keboola","enum":["keboola"]}},"description":"Table sink configuration for \"type\" = \"table\".","example":{"type":"keboola","tableId":"in.c-bucket.table","mapping":{"columns":[{"type":"uuid-v7","name":"id-col","primaryKey":true},{"type":"datetime","name":"datetime-col"},{"type":"ip","name":"ip-col"},{"type":"headers","name":"headers-col"},{"type":"body","name":"body-col"},{"type":"template","name":"template-col","template":{"language":"jsonnet","content":"body.foo + \"-\" + body.bar"}}]}}},"TaskOutputsResponseBody":{"title":"TaskOutputsResponseBody","type":"object","properties":{"branchId":{"type":"integer","description":"ID of the parent branch.","example":345,"format":"int64"},"projectId":{"type":"integer","description":"ID of the parent project.","example":123,"format":"int64"},"sinkId":{"type":"string","description":"ID of the created/updated sink.","example":"github-pr-table-sink","minLength":1,"maxLength":48},"sourceId":{"type":"string","description":"ID of the created/updated source.","example":"github-webhook-source","minLength":1,"maxLength":48},"url":{"type":"string","description":"Absolute URL of the entity.","example":"abc123"}},"description":"Outputs generated by the task.","example":{"url":"abc123","projectId":123,"branchId":345,"sourceId":"github-webhook-source","sinkId":"github-pr-table-sink"}},"TestResultColumnResponseBody":{"title":"TestResultColumnResponseBody","type":"object","properties":{"name":{"type":"string","description":"Column name.","example":"id"},"value":{"type":"string","description":"Column value.","example":"12345"}},"description":"Generated table column value, part of the test result.","example":{"name":"id","value":"12345"},"required":["name","value"]},"TestResultRowResponseBody":{"title":"TestResultRowResponseBody","type":"object","properties":{"columns":{"type":"array","items":{"$ref":"#/definitions/TestResultColumnResponseBody"},"description":"Generated columns.","example":[{"name":"id","value":"12345"}]}},"description":"Generated table row, part of the test result.","example":{"columns":[{"name":"id","value":"12345"}]},"required":["columns"]},"TestResultTableResponseBody":{"title":"TestResultTableResponseBody","type":"object","properties":{"rows":{"type":"array","items":{"$ref":"#/definitions/TestResultRowResponseBody"},"description":"Generated rows.","example":[{"columns":[{"name":"id","value":"12345"}]}]},"sinkId":{"type":"string","example":"github-pr-table-sink","minLength":1,"maxLength":48},"tableId":{"type":"string","example":"in.c-bucket.table"}},"description":"Generated table rows, part of the test result.","example":{"sinkId":"github-pr-table-sink","tableId":"in.c-bucket.table","rows":[{"columns":[{"name":"id","value":"12345"}]}]},"required":["sinkId","tableId","rows"]},"VersionResponseBody":{"title":"VersionResponseBody","type":"object","properties":{"at":{"type":"string","description":"Date and time of the modification.","example":"2022-04-28T14:20:04.000Z","format":"date-time"},"by":{"$ref":"#/definitions/ByResponseBody"},"description":{"type":"string","description":"Description of the change.","example":"The reason for the last change was..."},"hash":{"type":"string","description":"Hash of the entity state.","example":"f43e93acd97eceb3"},"number":{"type":"integer","description":"Version number counted from 1.","example":3,"format":"int64","minimum":1}},"description":"Version of the entity.","example":{"number":3,"hash":"f43e93acd97eceb3","description":"The reason for the last change was...","at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"required":["number","hash","at","by","description"]}},"securityDefinitions":{"storage-api-token":{"type":"apiKey","description":"Storage Api Token Authentication.","name":"X-StorageApi-Token","in":"header"}}} \ No newline at end of file diff --git a/internal/pkg/service/stream/api/openapi/openapi.yaml b/internal/pkg/service/stream/api/openapi/openapi.yaml index 6de2b3be24..cc3ed0be80 100644 --- a/internal/pkg/service/stream/api/openapi/openapi.yaml +++ b/internal/pkg/service/stream/api/openapi/openapi.yaml @@ -38,6 +38,47 @@ paths: - documentation schemes: - https + /v1/branches/{branchId}/aggregation/sources: + get: + tags: + - internal + summary: Aggregation endpoint for sources + description: Details about sources for the UI. + operationId: AggregateSources + parameters: + - name: sinceId + in: query + description: Request records after the ID. + required: false + type: string + default: "" + - name: limit + in: query + description: Maximum number of returned records. + required: false + type: integer + default: 100 + maximum: 100 + minimum: 1 + - name: branchId + in: path + description: ID of the branch or "default". + required: true + type: string + responses: + "200": + description: OK response. + schema: + $ref: '#/definitions/StreamAggregateSourcesResponseBody' + required: + - projectId + - branchId + - page + - sources + schemes: + - https + security: + - storage-api-token: [] /v1/branches/{branchId}/sources: get: tags: @@ -920,66 +961,684 @@ paths: security: - storage-api-token: [] definitions: - ByResponseBody: - title: ByResponseBody + AggregationSinkResponseBody: + title: AggregationSinkResponseBody type: object properties: - tokenDesc: + branchId: + type: integer + example: 345 + format: int64 + created: + $ref: '#/definitions/CreatedEntityResponseBody' + deleted: + $ref: '#/definitions/DeletedEntityResponseBody' + description: type: string - description: Description of the token. - example: john.green@company.com - tokenId: + description: Description of the source. + example: The sink stores records to a table. + maxLength: 4096 + disabled: + $ref: '#/definitions/DisabledEntityResponseBody' + name: type: string - description: ID of the token. - example: "896455" - type: + description: Human readable name of the sink. + example: Raw Data Sink + minLength: 1 + maxLength: 40 + projectId: + type: integer + example: 123 + format: int64 + sinkId: type: string - description: Date and time of deletion. - example: user - enum: - - system - - user - userId: + example: github-pr-table-sink + minLength: 1 + maxLength: 48 + sourceId: type: string - description: ID of the user. - example: "578621" - userName: + example: github-webhook-source + minLength: 1 + maxLength: 48 + statistics: + $ref: '#/definitions/AggregationStatisticsResponseBody' + table: + $ref: '#/definitions/TableSinkResponseBody' + type: type: string - description: Name of the user. - example: John Green - description: Information about the operation actor. + example: table + enum: + - table + version: + $ref: '#/definitions/VersionResponseBody' + description: A mapping from imported data to a destination table. example: - type: user - tokenId: "896455" - tokenDesc: john.green@company.com - userId: "578621" - userName: John Green + projectId: 123 + branchId: 345 + sourceId: github-webhook-source + sinkId: github-pr-table-sink + type: table + name: Raw Data Sink + description: The sink stores records to a table. + table: + type: keboola + tableId: in.c-bucket.table + mapping: + columns: + - type: uuid-v7 + name: id-col + primaryKey: true + - type: datetime + name: datetime-col + - type: ip + name: ip-col + - type: headers + name: headers-col + - type: body + name: body-col + - type: template + name: template-col + template: + language: jsonnet + content: body.foo + "-" + body.bar + created: + at: "2022-04-28T14:20:04.000Z" + by: + type: user + tokenId: "896455" + tokenDesc: john.green@company.com + userId: "578621" + userName: John Green + version: + number: 3 + hash: f43e93acd97eceb3 + description: The reason for the last change was... + at: "2022-04-28T14:20:04.000Z" + by: + type: user + tokenId: "896455" + tokenDesc: john.green@company.com + userId: "578621" + userName: John Green + deleted: + at: "2022-04-28T14:20:04.000Z" + by: + type: user + tokenId: "896455" + tokenDesc: john.green@company.com + userId: "578621" + userName: John Green + disabled: + at: "2022-04-28T14:20:04.000Z" + by: + type: user + tokenId: "896455" + tokenDesc: john.green@company.com + userId: "578621" + userName: John Green + reason: Disabled for recurring problems. + statistics: + total: + firstRecordAt: "2022-04-28T14:20:04.000Z" + lastRecordAt: "2022-04-28T14:20:04.000Z" + recordsCount: 1 + uncompressedSize: 1 + levels: + local: + firstRecordAt: "2022-04-28T14:20:04.000Z" + lastRecordAt: "2022-04-28T14:20:04.000Z" + recordsCount: 1 + uncompressedSize: 1 + staging: + firstRecordAt: "2022-04-28T14:20:04.000Z" + lastRecordAt: "2022-04-28T14:20:04.000Z" + recordsCount: 1 + uncompressedSize: 1 + target: + firstRecordAt: "2022-04-28T14:20:04.000Z" + lastRecordAt: "2022-04-28T14:20:04.000Z" + recordsCount: 1 + uncompressedSize: 1 + files: + - state: writing + openedAt: "2022-04-28T14:20:04.000Z" + closingAt: "2022-04-28T14:20:04.000Z" + importingAt: "2022-04-28T14:20:04.000Z" + importedAt: "2022-04-28T14:20:04.000Z" + retryAttempt: 3 + retryReason: network problem + retryAfter: "2022-04-28T14:20:04.000Z" + statistics: + total: + firstRecordAt: "2022-04-28T14:20:04.000Z" + lastRecordAt: "2022-04-28T14:20:04.000Z" + recordsCount: 1 + uncompressedSize: 1 + levels: + local: + firstRecordAt: "2022-04-28T14:20:04.000Z" + lastRecordAt: "2022-04-28T14:20:04.000Z" + recordsCount: 1 + uncompressedSize: 1 + staging: + firstRecordAt: "2022-04-28T14:20:04.000Z" + lastRecordAt: "2022-04-28T14:20:04.000Z" + recordsCount: 1 + uncompressedSize: 1 + target: + firstRecordAt: "2022-04-28T14:20:04.000Z" + lastRecordAt: "2022-04-28T14:20:04.000Z" + recordsCount: 1 + uncompressedSize: 1 required: + - projectId + - branchId + - sourceId + - sinkId - type - CreatedEntityResponseBody: - title: CreatedEntityResponseBody + - name + - description + - version + - created + AggregationSourceResponseBody: + title: AggregationSourceResponseBody type: object properties: - at: + branchId: + type: integer + example: 345 + format: int64 + created: + $ref: '#/definitions/CreatedEntityResponseBody' + deleted: + $ref: '#/definitions/DeletedEntityResponseBody' + description: type: string - description: Date and time of deletion. - example: "2022-04-28T14:20:04.000Z" - format: date-time - by: - $ref: '#/definitions/ByResponseBody' - description: Information about the entity creation. - example: - at: "2022-04-28T14:20:04.000Z" - by: - type: user - tokenId: "896455" - tokenDesc: john.green@company.com - userId: "578621" - userName: John Green - required: - - at - - by - DeletedEntityResponseBody: + description: Description of the source. + example: The source receives events from Github. + maxLength: 4096 + disabled: + $ref: '#/definitions/DisabledEntityResponseBody' + http: + $ref: '#/definitions/HTTPSourceResponseBody' + name: + type: string + description: Human readable name of the source. + example: Github Webhook Source + minLength: 1 + maxLength: 40 + projectId: + type: integer + example: 123 + format: int64 + sinks: + type: array + items: + $ref: '#/definitions/AggregationSinkResponseBody' + example: + - projectId: 123 + branchId: 345 + sourceId: github-webhook-source + sinkId: github-pr-table-sink + type: table + name: Raw Data Sink + description: The sink stores records to a table. + table: + type: keboola + tableId: in.c-bucket.table + mapping: + columns: + - type: uuid-v7 + name: id-col + primaryKey: true + - type: datetime + name: datetime-col + - type: ip + name: ip-col + - type: headers + name: headers-col + - type: body + name: body-col + - type: template + name: template-col + template: + language: jsonnet + content: body.foo + "-" + body.bar + created: + at: "2022-04-28T14:20:04.000Z" + by: + type: user + tokenId: "896455" + tokenDesc: john.green@company.com + userId: "578621" + userName: John Green + version: + number: 3 + hash: f43e93acd97eceb3 + description: The reason for the last change was... + at: "2022-04-28T14:20:04.000Z" + by: + type: user + tokenId: "896455" + tokenDesc: john.green@company.com + userId: "578621" + userName: John Green + deleted: + at: "2022-04-28T14:20:04.000Z" + by: + type: user + tokenId: "896455" + tokenDesc: john.green@company.com + userId: "578621" + userName: John Green + disabled: + at: "2022-04-28T14:20:04.000Z" + by: + type: user + tokenId: "896455" + tokenDesc: john.green@company.com + userId: "578621" + userName: John Green + reason: Disabled for recurring problems. + statistics: + total: + firstRecordAt: "2022-04-28T14:20:04.000Z" + lastRecordAt: "2022-04-28T14:20:04.000Z" + recordsCount: 1 + uncompressedSize: 1 + levels: + local: + firstRecordAt: "2022-04-28T14:20:04.000Z" + lastRecordAt: "2022-04-28T14:20:04.000Z" + recordsCount: 1 + uncompressedSize: 1 + staging: + firstRecordAt: "2022-04-28T14:20:04.000Z" + lastRecordAt: "2022-04-28T14:20:04.000Z" + recordsCount: 1 + uncompressedSize: 1 + target: + firstRecordAt: "2022-04-28T14:20:04.000Z" + lastRecordAt: "2022-04-28T14:20:04.000Z" + recordsCount: 1 + uncompressedSize: 1 + files: + - state: writing + openedAt: "2022-04-28T14:20:04.000Z" + closingAt: "2022-04-28T14:20:04.000Z" + importingAt: "2022-04-28T14:20:04.000Z" + importedAt: "2022-04-28T14:20:04.000Z" + retryAttempt: 3 + retryReason: network problem + retryAfter: "2022-04-28T14:20:04.000Z" + statistics: + total: + firstRecordAt: "2022-04-28T14:20:04.000Z" + lastRecordAt: "2022-04-28T14:20:04.000Z" + recordsCount: 1 + uncompressedSize: 1 + levels: + local: + firstRecordAt: "2022-04-28T14:20:04.000Z" + lastRecordAt: "2022-04-28T14:20:04.000Z" + recordsCount: 1 + uncompressedSize: 1 + staging: + firstRecordAt: "2022-04-28T14:20:04.000Z" + lastRecordAt: "2022-04-28T14:20:04.000Z" + recordsCount: 1 + uncompressedSize: 1 + target: + firstRecordAt: "2022-04-28T14:20:04.000Z" + lastRecordAt: "2022-04-28T14:20:04.000Z" + recordsCount: 1 + uncompressedSize: 1 + sourceId: + type: string + example: github-webhook-source + minLength: 1 + maxLength: 48 + type: + type: string + example: http + enum: + - http + version: + $ref: '#/definitions/VersionResponseBody' + description: Source of data for further processing, start of the stream, max 100 sources per a branch. + example: + projectId: 123 + branchId: 345 + sourceId: github-webhook-source + type: http + name: Github Webhook Source + description: The source receives events from Github. + http: + url: https://stream-in.keboola.com/G0lpTbz0vhakDicfoDQQ3BCzGYdW3qewd1D3eUbqETygHKGb + created: + at: "2022-04-28T14:20:04.000Z" + by: + type: user + tokenId: "896455" + tokenDesc: john.green@company.com + userId: "578621" + userName: John Green + version: + number: 3 + hash: f43e93acd97eceb3 + description: The reason for the last change was... + at: "2022-04-28T14:20:04.000Z" + by: + type: user + tokenId: "896455" + tokenDesc: john.green@company.com + userId: "578621" + userName: John Green + deleted: + at: "2022-04-28T14:20:04.000Z" + by: + type: user + tokenId: "896455" + tokenDesc: john.green@company.com + userId: "578621" + userName: John Green + disabled: + at: "2022-04-28T14:20:04.000Z" + by: + type: user + tokenId: "896455" + tokenDesc: john.green@company.com + userId: "578621" + userName: John Green + reason: Disabled for recurring problems. + sinks: + - projectId: 123 + branchId: 345 + sourceId: github-webhook-source + sinkId: github-pr-table-sink + type: table + name: Raw Data Sink + description: The sink stores records to a table. + table: + type: keboola + tableId: in.c-bucket.table + mapping: + columns: + - type: uuid-v7 + name: id-col + primaryKey: true + - type: datetime + name: datetime-col + - type: ip + name: ip-col + - type: headers + name: headers-col + - type: body + name: body-col + - type: template + name: template-col + template: + language: jsonnet + content: body.foo + "-" + body.bar + created: + at: "2022-04-28T14:20:04.000Z" + by: + type: user + tokenId: "896455" + tokenDesc: john.green@company.com + userId: "578621" + userName: John Green + version: + number: 3 + hash: f43e93acd97eceb3 + description: The reason for the last change was... + at: "2022-04-28T14:20:04.000Z" + by: + type: user + tokenId: "896455" + tokenDesc: john.green@company.com + userId: "578621" + userName: John Green + deleted: + at: "2022-04-28T14:20:04.000Z" + by: + type: user + tokenId: "896455" + tokenDesc: john.green@company.com + userId: "578621" + userName: John Green + disabled: + at: "2022-04-28T14:20:04.000Z" + by: + type: user + tokenId: "896455" + tokenDesc: john.green@company.com + userId: "578621" + userName: John Green + reason: Disabled for recurring problems. + statistics: + total: + firstRecordAt: "2022-04-28T14:20:04.000Z" + lastRecordAt: "2022-04-28T14:20:04.000Z" + recordsCount: 1 + uncompressedSize: 1 + levels: + local: + firstRecordAt: "2022-04-28T14:20:04.000Z" + lastRecordAt: "2022-04-28T14:20:04.000Z" + recordsCount: 1 + uncompressedSize: 1 + staging: + firstRecordAt: "2022-04-28T14:20:04.000Z" + lastRecordAt: "2022-04-28T14:20:04.000Z" + recordsCount: 1 + uncompressedSize: 1 + target: + firstRecordAt: "2022-04-28T14:20:04.000Z" + lastRecordAt: "2022-04-28T14:20:04.000Z" + recordsCount: 1 + uncompressedSize: 1 + files: + - state: writing + openedAt: "2022-04-28T14:20:04.000Z" + closingAt: "2022-04-28T14:20:04.000Z" + importingAt: "2022-04-28T14:20:04.000Z" + importedAt: "2022-04-28T14:20:04.000Z" + retryAttempt: 3 + retryReason: network problem + retryAfter: "2022-04-28T14:20:04.000Z" + statistics: + total: + firstRecordAt: "2022-04-28T14:20:04.000Z" + lastRecordAt: "2022-04-28T14:20:04.000Z" + recordsCount: 1 + uncompressedSize: 1 + levels: + local: + firstRecordAt: "2022-04-28T14:20:04.000Z" + lastRecordAt: "2022-04-28T14:20:04.000Z" + recordsCount: 1 + uncompressedSize: 1 + staging: + firstRecordAt: "2022-04-28T14:20:04.000Z" + lastRecordAt: "2022-04-28T14:20:04.000Z" + recordsCount: 1 + uncompressedSize: 1 + target: + firstRecordAt: "2022-04-28T14:20:04.000Z" + lastRecordAt: "2022-04-28T14:20:04.000Z" + recordsCount: 1 + uncompressedSize: 1 + required: + - projectId + - branchId + - sourceId + - type + - name + - description + - version + - created + - sinks + AggregationStatisticsResponseBody: + title: AggregationStatisticsResponseBody + type: object + properties: + files: + type: array + items: + $ref: '#/definitions/SinkFileResponseBody' + example: + - state: writing + openedAt: "2022-04-28T14:20:04.000Z" + closingAt: "2022-04-28T14:20:04.000Z" + importingAt: "2022-04-28T14:20:04.000Z" + importedAt: "2022-04-28T14:20:04.000Z" + retryAttempt: 3 + retryReason: network problem + retryAfter: "2022-04-28T14:20:04.000Z" + statistics: + total: + firstRecordAt: "2022-04-28T14:20:04.000Z" + lastRecordAt: "2022-04-28T14:20:04.000Z" + recordsCount: 1 + uncompressedSize: 1 + levels: + local: + firstRecordAt: "2022-04-28T14:20:04.000Z" + lastRecordAt: "2022-04-28T14:20:04.000Z" + recordsCount: 1 + uncompressedSize: 1 + staging: + firstRecordAt: "2022-04-28T14:20:04.000Z" + lastRecordAt: "2022-04-28T14:20:04.000Z" + recordsCount: 1 + uncompressedSize: 1 + target: + firstRecordAt: "2022-04-28T14:20:04.000Z" + lastRecordAt: "2022-04-28T14:20:04.000Z" + recordsCount: 1 + uncompressedSize: 1 + levels: + $ref: '#/definitions/LevelsResponseBody' + total: + $ref: '#/definitions/LevelResponseBody' + example: + total: + firstRecordAt: "2022-04-28T14:20:04.000Z" + lastRecordAt: "2022-04-28T14:20:04.000Z" + recordsCount: 1 + uncompressedSize: 1 + levels: + local: + firstRecordAt: "2022-04-28T14:20:04.000Z" + lastRecordAt: "2022-04-28T14:20:04.000Z" + recordsCount: 1 + uncompressedSize: 1 + staging: + firstRecordAt: "2022-04-28T14:20:04.000Z" + lastRecordAt: "2022-04-28T14:20:04.000Z" + recordsCount: 1 + uncompressedSize: 1 + target: + firstRecordAt: "2022-04-28T14:20:04.000Z" + lastRecordAt: "2022-04-28T14:20:04.000Z" + recordsCount: 1 + uncompressedSize: 1 + files: + - state: writing + openedAt: "2022-04-28T14:20:04.000Z" + closingAt: "2022-04-28T14:20:04.000Z" + importingAt: "2022-04-28T14:20:04.000Z" + importedAt: "2022-04-28T14:20:04.000Z" + retryAttempt: 3 + retryReason: network problem + retryAfter: "2022-04-28T14:20:04.000Z" + statistics: + total: + firstRecordAt: "2022-04-28T14:20:04.000Z" + lastRecordAt: "2022-04-28T14:20:04.000Z" + recordsCount: 1 + uncompressedSize: 1 + levels: + local: + firstRecordAt: "2022-04-28T14:20:04.000Z" + lastRecordAt: "2022-04-28T14:20:04.000Z" + recordsCount: 1 + uncompressedSize: 1 + staging: + firstRecordAt: "2022-04-28T14:20:04.000Z" + lastRecordAt: "2022-04-28T14:20:04.000Z" + recordsCount: 1 + uncompressedSize: 1 + target: + firstRecordAt: "2022-04-28T14:20:04.000Z" + lastRecordAt: "2022-04-28T14:20:04.000Z" + recordsCount: 1 + uncompressedSize: 1 + required: + - total + - levels + - files + ByResponseBody: + title: ByResponseBody + type: object + properties: + tokenDesc: + type: string + description: Description of the token. + example: john.green@company.com + tokenId: + type: string + description: ID of the token. + example: "896455" + type: + type: string + description: Date and time of deletion. + example: user + enum: + - system + - user + userId: + type: string + description: ID of the user. + example: "578621" + userName: + type: string + description: Name of the user. + example: John Green + description: Information about the operation actor. + example: + type: user + tokenId: "896455" + tokenDesc: john.green@company.com + userId: "578621" + userName: John Green + required: + - type + CreatedEntityResponseBody: + title: CreatedEntityResponseBody + type: object + properties: + at: + type: string + description: Date and time of deletion. + example: "2022-04-28T14:20:04.000Z" + format: date-time + by: + $ref: '#/definitions/ByResponseBody' + description: Information about the entity creation. + example: + at: "2022-04-28T14:20:04.000Z" + by: + type: user + tokenId: "896455" + tokenDesc: john.green@company.com + userId: "578621" + userName: John Green + required: + - at + - by + DeletedEntityResponseBody: title: DeletedEntityResponseBody type: object properties: @@ -1050,10 +1709,12 @@ definitions: properties: firstRecordAt: type: string + description: Timestamp of the first received record. example: "2022-04-28T14:20:04.000Z" format: date-time lastRecordAt: type: string + description: Timestamp of the last received record. example: "2022-04-28T14:20:04.000Z" format: date-time recordsCount: @@ -1062,6 +1723,7 @@ definitions: format: int64 uncompressedSize: type: integer + description: Uncompressed size of data in bytes. example: 1 format: int64 example: @@ -1286,7 +1948,6 @@ definitions: required: - state - openedAt - - statistics SinkFileStatisticsResponseBody: title: SinkFileStatisticsResponseBody type: object @@ -1560,6 +2221,363 @@ definitions: required: - api - documentation + StreamAggregateSourcesResponseBody: + title: StreamAggregateSourcesResponseBody + type: object + properties: + branchId: + type: integer + example: 345 + format: int64 + page: + $ref: '#/definitions/PaginatedResponseResponseBody' + projectId: + type: integer + example: 123 + format: int64 + sources: + type: array + items: + $ref: '#/definitions/AggregationSourceResponseBody' + example: + - projectId: 123 + branchId: 345 + sourceId: github-webhook-source + type: http + name: Github Webhook Source + description: The source receives events from Github. + http: + url: https://stream-in.keboola.com/G0lpTbz0vhakDicfoDQQ3BCzGYdW3qewd1D3eUbqETygHKGb + created: + at: "2022-04-28T14:20:04.000Z" + by: + type: user + tokenId: "896455" + tokenDesc: john.green@company.com + userId: "578621" + userName: John Green + version: + number: 3 + hash: f43e93acd97eceb3 + description: The reason for the last change was... + at: "2022-04-28T14:20:04.000Z" + by: + type: user + tokenId: "896455" + tokenDesc: john.green@company.com + userId: "578621" + userName: John Green + deleted: + at: "2022-04-28T14:20:04.000Z" + by: + type: user + tokenId: "896455" + tokenDesc: john.green@company.com + userId: "578621" + userName: John Green + disabled: + at: "2022-04-28T14:20:04.000Z" + by: + type: user + tokenId: "896455" + tokenDesc: john.green@company.com + userId: "578621" + userName: John Green + reason: Disabled for recurring problems. + sinks: + - projectId: 123 + branchId: 345 + sourceId: github-webhook-source + sinkId: github-pr-table-sink + type: table + name: Raw Data Sink + description: The sink stores records to a table. + table: + type: keboola + tableId: in.c-bucket.table + mapping: + columns: + - type: uuid-v7 + name: id-col + primaryKey: true + - type: datetime + name: datetime-col + - type: ip + name: ip-col + - type: headers + name: headers-col + - type: body + name: body-col + - type: template + name: template-col + template: + language: jsonnet + content: body.foo + "-" + body.bar + created: + at: "2022-04-28T14:20:04.000Z" + by: + type: user + tokenId: "896455" + tokenDesc: john.green@company.com + userId: "578621" + userName: John Green + version: + number: 3 + hash: f43e93acd97eceb3 + description: The reason for the last change was... + at: "2022-04-28T14:20:04.000Z" + by: + type: user + tokenId: "896455" + tokenDesc: john.green@company.com + userId: "578621" + userName: John Green + deleted: + at: "2022-04-28T14:20:04.000Z" + by: + type: user + tokenId: "896455" + tokenDesc: john.green@company.com + userId: "578621" + userName: John Green + disabled: + at: "2022-04-28T14:20:04.000Z" + by: + type: user + tokenId: "896455" + tokenDesc: john.green@company.com + userId: "578621" + userName: John Green + reason: Disabled for recurring problems. + statistics: + total: + firstRecordAt: "2022-04-28T14:20:04.000Z" + lastRecordAt: "2022-04-28T14:20:04.000Z" + recordsCount: 1 + uncompressedSize: 1 + levels: + local: + firstRecordAt: "2022-04-28T14:20:04.000Z" + lastRecordAt: "2022-04-28T14:20:04.000Z" + recordsCount: 1 + uncompressedSize: 1 + staging: + firstRecordAt: "2022-04-28T14:20:04.000Z" + lastRecordAt: "2022-04-28T14:20:04.000Z" + recordsCount: 1 + uncompressedSize: 1 + target: + firstRecordAt: "2022-04-28T14:20:04.000Z" + lastRecordAt: "2022-04-28T14:20:04.000Z" + recordsCount: 1 + uncompressedSize: 1 + files: + - state: writing + openedAt: "2022-04-28T14:20:04.000Z" + closingAt: "2022-04-28T14:20:04.000Z" + importingAt: "2022-04-28T14:20:04.000Z" + importedAt: "2022-04-28T14:20:04.000Z" + retryAttempt: 3 + retryReason: network problem + retryAfter: "2022-04-28T14:20:04.000Z" + statistics: + total: + firstRecordAt: "2022-04-28T14:20:04.000Z" + lastRecordAt: "2022-04-28T14:20:04.000Z" + recordsCount: 1 + uncompressedSize: 1 + levels: + local: + firstRecordAt: "2022-04-28T14:20:04.000Z" + lastRecordAt: "2022-04-28T14:20:04.000Z" + recordsCount: 1 + uncompressedSize: 1 + staging: + firstRecordAt: "2022-04-28T14:20:04.000Z" + lastRecordAt: "2022-04-28T14:20:04.000Z" + recordsCount: 1 + uncompressedSize: 1 + target: + firstRecordAt: "2022-04-28T14:20:04.000Z" + lastRecordAt: "2022-04-28T14:20:04.000Z" + recordsCount: 1 + uncompressedSize: 1 + example: + projectId: 123 + branchId: 345 + page: + limit: 100 + totalCount: 1000 + sinceId: my-object-123 + lastId: my-object-456 + sources: + - projectId: 123 + branchId: 345 + sourceId: github-webhook-source + type: http + name: Github Webhook Source + description: The source receives events from Github. + http: + url: https://stream-in.keboola.com/G0lpTbz0vhakDicfoDQQ3BCzGYdW3qewd1D3eUbqETygHKGb + created: + at: "2022-04-28T14:20:04.000Z" + by: + type: user + tokenId: "896455" + tokenDesc: john.green@company.com + userId: "578621" + userName: John Green + version: + number: 3 + hash: f43e93acd97eceb3 + description: The reason for the last change was... + at: "2022-04-28T14:20:04.000Z" + by: + type: user + tokenId: "896455" + tokenDesc: john.green@company.com + userId: "578621" + userName: John Green + deleted: + at: "2022-04-28T14:20:04.000Z" + by: + type: user + tokenId: "896455" + tokenDesc: john.green@company.com + userId: "578621" + userName: John Green + disabled: + at: "2022-04-28T14:20:04.000Z" + by: + type: user + tokenId: "896455" + tokenDesc: john.green@company.com + userId: "578621" + userName: John Green + reason: Disabled for recurring problems. + sinks: + - projectId: 123 + branchId: 345 + sourceId: github-webhook-source + sinkId: github-pr-table-sink + type: table + name: Raw Data Sink + description: The sink stores records to a table. + table: + type: keboola + tableId: in.c-bucket.table + mapping: + columns: + - type: uuid-v7 + name: id-col + primaryKey: true + - type: datetime + name: datetime-col + - type: ip + name: ip-col + - type: headers + name: headers-col + - type: body + name: body-col + - type: template + name: template-col + template: + language: jsonnet + content: body.foo + "-" + body.bar + created: + at: "2022-04-28T14:20:04.000Z" + by: + type: user + tokenId: "896455" + tokenDesc: john.green@company.com + userId: "578621" + userName: John Green + version: + number: 3 + hash: f43e93acd97eceb3 + description: The reason for the last change was... + at: "2022-04-28T14:20:04.000Z" + by: + type: user + tokenId: "896455" + tokenDesc: john.green@company.com + userId: "578621" + userName: John Green + deleted: + at: "2022-04-28T14:20:04.000Z" + by: + type: user + tokenId: "896455" + tokenDesc: john.green@company.com + userId: "578621" + userName: John Green + disabled: + at: "2022-04-28T14:20:04.000Z" + by: + type: user + tokenId: "896455" + tokenDesc: john.green@company.com + userId: "578621" + userName: John Green + reason: Disabled for recurring problems. + statistics: + total: + firstRecordAt: "2022-04-28T14:20:04.000Z" + lastRecordAt: "2022-04-28T14:20:04.000Z" + recordsCount: 1 + uncompressedSize: 1 + levels: + local: + firstRecordAt: "2022-04-28T14:20:04.000Z" + lastRecordAt: "2022-04-28T14:20:04.000Z" + recordsCount: 1 + uncompressedSize: 1 + staging: + firstRecordAt: "2022-04-28T14:20:04.000Z" + lastRecordAt: "2022-04-28T14:20:04.000Z" + recordsCount: 1 + uncompressedSize: 1 + target: + firstRecordAt: "2022-04-28T14:20:04.000Z" + lastRecordAt: "2022-04-28T14:20:04.000Z" + recordsCount: 1 + uncompressedSize: 1 + files: + - state: writing + openedAt: "2022-04-28T14:20:04.000Z" + closingAt: "2022-04-28T14:20:04.000Z" + importingAt: "2022-04-28T14:20:04.000Z" + importedAt: "2022-04-28T14:20:04.000Z" + retryAttempt: 3 + retryReason: network problem + retryAfter: "2022-04-28T14:20:04.000Z" + statistics: + total: + firstRecordAt: "2022-04-28T14:20:04.000Z" + lastRecordAt: "2022-04-28T14:20:04.000Z" + recordsCount: 1 + uncompressedSize: 1 + levels: + local: + firstRecordAt: "2022-04-28T14:20:04.000Z" + lastRecordAt: "2022-04-28T14:20:04.000Z" + recordsCount: 1 + uncompressedSize: 1 + staging: + firstRecordAt: "2022-04-28T14:20:04.000Z" + lastRecordAt: "2022-04-28T14:20:04.000Z" + recordsCount: 1 + uncompressedSize: 1 + target: + firstRecordAt: "2022-04-28T14:20:04.000Z" + lastRecordAt: "2022-04-28T14:20:04.000Z" + recordsCount: 1 + uncompressedSize: 1 + required: + - projectId + - branchId + - page + - sources StreamCreateSinkRequestBody: title: StreamCreateSinkRequestBody type: object diff --git a/internal/pkg/service/stream/api/openapi/openapi3.json b/internal/pkg/service/stream/api/openapi/openapi3.json index f75c16c480..8dfd7f9d21 100644 --- a/internal/pkg/service/stream/api/openapi/openapi3.json +++ b/internal/pkg/service/stream/api/openapi/openapi3.json @@ -1 +1 @@ -{"openapi":"3.0.3","info":{"title":"Stream Service","description":"A service for continuously importing data to the Keboola platform.","version":"1.0"},"servers":[{"url":"https://stream.{stack}","variables":{"stack":{"enum":["keboola.com","eu-central-1.keboola.com","north-europe.azure.keboola.com","eu-west-1.aws.keboola.dev","east-us-2.azure.keboola-testing.com"],"default":"keboola.com"}}},{"url":"http://localhost:8001"}],"paths":{"/":{"get":{"tags":["documentation"],"summary":"Redirect to /v1","description":"Redirect to /v1.","operationId":"ApiRootIndex","responses":{"301":{"description":"Moved Permanently response."}}}},"/v1":{"get":{"tags":["documentation"],"summary":"List API name and link to documentation.","description":"List API name and link to documentation.","operationId":"ApiVersionIndex","responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceDetail"},"example":{"api":"stream","documentation":"https://stream.keboola.com/v1/documentation"}}}}}}},"/v1/branches/{branchId}/sources":{"get":{"tags":["configuration"],"summary":"List all sources","description":"List all sources in the branch.","operationId":"ListSources","parameters":[{"name":"sinceId","in":"query","description":"Request records after the ID.","allowEmptyValue":true,"schema":{"type":"string","description":"Request records after the ID.","default":"","example":"my-object-123"},"example":"my-object-123"},{"name":"limit","in":"query","description":"Maximum number of returned records.","allowEmptyValue":true,"schema":{"type":"integer","description":"Maximum number of returned records.","default":100,"example":100,"format":"int64","minimum":1,"maximum":100},"example":100},{"name":"branchId","in":"path","required":true,"schema":{"type":"string","description":"ID of the branch or \"default\".","example":"default"},"example":"default"}],"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SourcesList"},"example":{"projectId":123,"branchId":345,"page":{"limit":100,"totalCount":1000,"sinceId":"my-object-123","lastId":"my-object-456"},"sources":[{"projectId":123,"branchId":345,"sourceId":"github-webhook-source","type":"http","name":"Github Webhook Source","description":"The source receives events from Github.","http":{"url":"https://stream-in.keboola.com/G0lpTbz0vhakDicfoDQQ3BCzGYdW3qewd1D3eUbqETygHKGb"},"created":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"version":{"number":3,"hash":"f43e93acd97eceb3","description":"The reason for the last change was...","at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"deleted":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"disabled":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"},"reason":"Disabled for recurring problems."}}]}}}}},"security":[{"storage-api-token":[]}]},"post":{"tags":["configuration"],"summary":"Create source","description":"Create a new source in the branch.","operationId":"CreateSource","parameters":[{"name":"branchId","in":"path","required":true,"schema":{"type":"string","description":"ID of the branch or \"default\".","example":"default"},"example":"default"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSourceRequestBody"},"example":{"sourceId":"github-webhook-source","type":"http","name":"Github Webhook Source","description":"The source receives events from Github."}}}},"responses":{"202":{"description":"Accepted response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Task"},"example":{"taskId":"task_1234","type":"abc123","url":"abc123","status":"success","isFinished":false,"createdAt":"2022-04-28T14:20:04.000Z","finishedAt":"2022-04-28T14:20:04.000Z","duration":123456789,"result":"abc123","error":"abc123","outputs":{"url":"abc123","projectId":123,"branchId":345,"sourceId":"github-webhook-source","sinkId":"github-pr-table-sink"}}}}},"409":{"description":"stream.api.sourceAlreadyExists: Source already exists in the branch.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenericError"},"example":{"statusCode":409,"error":"stream.api.sourceAlreadyExists","message":"Source already exists in the branch."}}}},"422":{"description":"stream.api.resourceLimitReached: Resource limit reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenericError"},"example":{"statusCode":422,"error":"stream.api.resourceLimitReached","message":"Maximum number of sources per project is 100."}}}}},"security":[{"storage-api-token":[]}]}},"/v1/branches/{branchId}/sources/{sourceId}":{"delete":{"tags":["configuration"],"summary":"Delete source","description":"Delete the source.","operationId":"DeleteSource","parameters":[{"name":"branchId","in":"path","required":true,"schema":{"type":"string","description":"ID of the branch or \"default\".","example":"default"},"example":"default"},{"name":"sourceId","in":"path","required":true,"schema":{"type":"string","description":"Unique ID of the source.","example":"github-webhook-source","minLength":1,"maxLength":48},"example":"github-webhook-source"}],"responses":{"202":{"description":"Accepted response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Task"},"example":{"taskId":"task_1234","type":"abc123","url":"abc123","status":"success","isFinished":false,"createdAt":"2022-04-28T14:20:04.000Z","finishedAt":"2022-04-28T14:20:04.000Z","duration":123456789,"result":"abc123","error":"abc123","outputs":{"url":"abc123","projectId":123,"branchId":345,"sourceId":"github-webhook-source","sinkId":"github-pr-table-sink"}}}}},"404":{"description":"stream.api.sourceNotFound: Source not found error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenericError"},"example":{"statusCode":404,"error":"stream.api.sourceNotFound","message":"Source \"github-pull-requests\" not found."}}}}},"security":[{"storage-api-token":[]}]},"get":{"tags":["configuration"],"summary":"Get source","description":"Get the source definition.","operationId":"GetSource","parameters":[{"name":"branchId","in":"path","required":true,"schema":{"type":"string","description":"ID of the branch or \"default\".","example":"default"},"example":"default"},{"name":"sourceId","in":"path","required":true,"schema":{"type":"string","description":"Unique ID of the source.","example":"github-webhook-source","minLength":1,"maxLength":48},"example":"github-webhook-source"}],"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Source"},"example":{"projectId":123,"branchId":345,"sourceId":"github-webhook-source","type":"http","name":"Github Webhook Source","description":"The source receives events from Github.","http":{"url":"https://stream-in.keboola.com/G0lpTbz0vhakDicfoDQQ3BCzGYdW3qewd1D3eUbqETygHKGb"},"created":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"version":{"number":3,"hash":"f43e93acd97eceb3","description":"The reason for the last change was...","at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"deleted":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"disabled":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"},"reason":"Disabled for recurring problems."}}}}},"404":{"description":"stream.api.sourceNotFound: Source not found error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenericError"},"example":{"statusCode":404,"error":"stream.api.sourceNotFound","message":"Source \"github-pull-requests\" not found."}}}}},"security":[{"storage-api-token":[]}]},"patch":{"tags":["configuration"],"summary":"Update source","description":"Update the source.","operationId":"UpdateSource","parameters":[{"name":"branchId","in":"path","required":true,"schema":{"type":"string","description":"ID of the branch or \"default\".","example":"default"},"example":"default"},{"name":"sourceId","in":"path","required":true,"schema":{"type":"string","description":"Unique ID of the source.","example":"github-webhook-source","minLength":1,"maxLength":48},"example":"github-webhook-source"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSourceRequestBody"},"example":{"changeDescription":"Renamed.","type":"http","name":"Github Webhook Source","description":"The source receives events from Github."}}}},"responses":{"202":{"description":"Accepted response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Task"},"example":{"taskId":"task_1234","type":"abc123","url":"abc123","status":"success","isFinished":false,"createdAt":"2022-04-28T14:20:04.000Z","finishedAt":"2022-04-28T14:20:04.000Z","duration":123456789,"result":"abc123","error":"abc123","outputs":{"url":"abc123","projectId":123,"branchId":345,"sourceId":"github-webhook-source","sinkId":"github-pr-table-sink"}}}}},"404":{"description":"stream.api.sourceNotFound: Source not found error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenericError"},"example":{"statusCode":404,"error":"stream.api.sourceNotFound","message":"Source \"github-pull-requests\" not found."}}}}},"security":[{"storage-api-token":[]}]}},"/v1/branches/{branchId}/sources/{sourceId}/settings":{"get":{"tags":["configuration"],"summary":"Get source settings","description":"Get source settings.","operationId":"GetSourceSettings","parameters":[{"name":"branchId","in":"path","required":true,"schema":{"type":"string","description":"ID of the branch or \"default\".","example":"default"},"example":"default"},{"name":"sourceId","in":"path","required":true,"schema":{"type":"string","description":"Unique ID of the source.","example":"github-webhook-source","minLength":1,"maxLength":48},"example":"github-webhook-source"}],"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SettingsResult"},"example":{"settings":[{"key":"some.service.limit","type":"string","description":"Minimal interval between uploads.","value":"1m20s","defaultValue":"30s","overwritten":true,"protected":false,"validation":"minDuration=15s"}]}}}},"404":{"description":"stream.api.sourceNotFound: Source not found error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenericError"},"example":{"statusCode":404,"error":"stream.api.sourceNotFound","message":"Source \"github-pull-requests\" not found."}}}}},"security":[{"storage-api-token":[]}]},"patch":{"tags":["configuration"],"summary":"Update source settings","description":"Update source settings.","operationId":"UpdateSourceSettings","parameters":[{"name":"branchId","in":"path","required":true,"schema":{"type":"string","description":"ID of the branch or \"default\".","example":"default"},"example":"default"},{"name":"sourceId","in":"path","required":true,"schema":{"type":"string","description":"Unique ID of the source.","example":"github-webhook-source","minLength":1,"maxLength":48},"example":"github-webhook-source"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSourceSettingsRequestBody"},"example":{"changeDescription":"Updated settings.","settings":[{"key":"some.service.limit","value":"1m20s"}]}}}},"responses":{"202":{"description":"Accepted response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Task"},"example":{"taskId":"task_1234","type":"abc123","url":"abc123","status":"success","isFinished":false,"createdAt":"2022-04-28T14:20:04.000Z","finishedAt":"2022-04-28T14:20:04.000Z","duration":123456789,"result":"abc123","error":"abc123","outputs":{"url":"abc123","projectId":123,"branchId":345,"sourceId":"github-webhook-source","sinkId":"github-pr-table-sink"}}}}},"404":{"description":"stream.api.forbidden: Modification of protected settings is forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenericError"},"example":{"statusCode":404,"error":"stream.api.forbidden","message":"Cannot modify protected keys: \"storage.level.local.compression.gzip.blockSize\"."}}}}},"security":[{"storage-api-token":[]}]}},"/v1/branches/{branchId}/sources/{sourceId}/sinks":{"get":{"tags":["configuration"],"summary":"List sinks","description":"List all sinks in the source.","operationId":"ListSinks","parameters":[{"name":"sinceId","in":"query","description":"Request records after the ID.","allowEmptyValue":true,"schema":{"type":"string","description":"Request records after the ID.","default":"","example":"my-object-123"},"example":"my-object-123"},{"name":"limit","in":"query","description":"Maximum number of returned records.","allowEmptyValue":true,"schema":{"type":"integer","description":"Maximum number of returned records.","default":100,"example":100,"format":"int64","minimum":1,"maximum":100},"example":100},{"name":"branchId","in":"path","required":true,"schema":{"type":"string","description":"ID of the branch or \"default\".","example":"default"},"example":"default"},{"name":"sourceId","in":"path","required":true,"schema":{"type":"string","description":"Unique ID of the source.","example":"github-webhook-source","minLength":1,"maxLength":48},"example":"github-webhook-source"}],"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SinksList"},"example":{"projectId":123,"branchId":345,"sourceId":"github-webhook-source","page":{"limit":100,"totalCount":1000,"sinceId":"my-object-123","lastId":"my-object-456"},"sinks":[{"projectId":123,"branchId":345,"sourceId":"github-webhook-source","sinkId":"github-pr-table-sink","type":"table","name":"Raw Data Sink","description":"The sink stores records to a table.","table":{"type":"keboola","tableId":"in.c-bucket.table","mapping":{"columns":[{"type":"uuid-v7","name":"id-col","primaryKey":true},{"type":"datetime","name":"datetime-col"},{"type":"ip","name":"ip-col"},{"type":"headers","name":"headers-col"},{"type":"body","name":"body-col"},{"type":"template","name":"template-col","template":{"language":"jsonnet","content":"body.foo + \"-\" + body.bar"}}]}},"version":{"number":3,"hash":"f43e93acd97eceb3","description":"The reason for the last change was...","at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"created":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"deleted":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"disabled":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"},"reason":"Disabled for recurring problems."}}]}}}},"404":{"description":"stream.api.sourceNotFound: Source not found error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenericError"},"example":{"statusCode":404,"error":"stream.api.sourceNotFound","message":"Source \"github-pull-requests\" not found."}}}}},"security":[{"storage-api-token":[]}]},"post":{"tags":["configuration"],"summary":"Create sink","description":"Create a new sink in the source.","operationId":"CreateSink","parameters":[{"name":"branchId","in":"path","required":true,"schema":{"type":"string","description":"ID of the branch or \"default\".","example":"default"},"example":"default"},{"name":"sourceId","in":"path","required":true,"schema":{"type":"string","description":"Unique ID of the source.","example":"github-webhook-source","minLength":1,"maxLength":48},"example":"github-webhook-source"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSinkRequestBody"},"example":{"sinkId":"github-pr-table-sink","type":"table","name":"Raw Data Sink","description":"The sink stores records to a table.","table":{"type":"keboola","tableId":"in.c-bucket.table","mapping":{"columns":[{"type":"uuid-v7","name":"id-col","primaryKey":true},{"type":"datetime","name":"datetime-col"},{"type":"ip","name":"ip-col"},{"type":"headers","name":"headers-col"},{"type":"body","name":"body-col"},{"type":"template","name":"template-col","template":{"language":"jsonnet","content":"body.foo + \"-\" + body.bar"}}]}}}}}},"responses":{"202":{"description":"Accepted response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Task"},"example":{"taskId":"task_1234","type":"abc123","url":"abc123","status":"success","isFinished":false,"createdAt":"2022-04-28T14:20:04.000Z","finishedAt":"2022-04-28T14:20:04.000Z","duration":123456789,"result":"abc123","error":"abc123","outputs":{"url":"abc123","projectId":123,"branchId":345,"sourceId":"github-webhook-source","sinkId":"github-pr-table-sink"}}}}},"404":{"description":"stream.api.sourceNotFound: Source not found error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenericError"},"example":{"statusCode":404,"error":"stream.api.sourceNotFound","message":"Source \"github-pull-requests\" not found."}}}},"409":{"description":"stream.api.sinkAlreadyExists: Sink already exists in the source.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenericError"},"example":{"statusCode":409,"error":"stream.api.sinkAlreadyExists","message":"Sink already exists in the source."}}}},"422":{"description":"stream.api.resourceLimitReached: Resource limit reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenericError"},"example":{"statusCode":422,"error":"stream.api.resourceLimitReached","message":"Maximum number of sources per project is 100."}}}}},"security":[{"storage-api-token":[]}]}},"/v1/branches/{branchId}/sources/{sourceId}/sinks/{sinkId}":{"delete":{"tags":["configuration"],"summary":"Delete sink","description":"Delete the sink.","operationId":"DeleteSink","parameters":[{"name":"branchId","in":"path","required":true,"schema":{"type":"string","description":"ID of the branch or \"default\".","example":"default"},"example":"default"},{"name":"sourceId","in":"path","required":true,"schema":{"type":"string","description":"Unique ID of the source.","example":"github-webhook-source","minLength":1,"maxLength":48},"example":"github-webhook-source"},{"name":"sinkId","in":"path","required":true,"schema":{"type":"string","description":"Unique ID of the sink.","example":"github-pr-table-sink","minLength":1,"maxLength":48},"example":"github-pr-table-sink"}],"responses":{"202":{"description":"Accepted response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Task"},"example":{"taskId":"task_1234","type":"abc123","url":"abc123","status":"success","isFinished":false,"createdAt":"2022-04-28T14:20:04.000Z","finishedAt":"2022-04-28T14:20:04.000Z","duration":123456789,"result":"abc123","error":"abc123","outputs":{"url":"abc123","projectId":123,"branchId":345,"sourceId":"github-webhook-source","sinkId":"github-pr-table-sink"}}}}},"404":{"description":"stream.api.sinkNotFound: Sink not found error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenericError"},"example":{"statusCode":404,"error":"stream.api.sinkNotFound","message":"Sink \"github-changed-files\" not found."}}}}},"security":[{"storage-api-token":[]}]},"get":{"tags":["configuration"],"summary":"Get sink","description":"Get the sink definition.","operationId":"GetSink","parameters":[{"name":"branchId","in":"path","required":true,"schema":{"type":"string","description":"ID of the branch or \"default\".","example":"default"},"example":"default"},{"name":"sourceId","in":"path","required":true,"schema":{"type":"string","description":"Unique ID of the source.","example":"github-webhook-source","minLength":1,"maxLength":48},"example":"github-webhook-source"},{"name":"sinkId","in":"path","required":true,"schema":{"type":"string","description":"Unique ID of the sink.","example":"github-pr-table-sink","minLength":1,"maxLength":48},"example":"github-pr-table-sink"}],"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sink"},"example":{"projectId":123,"branchId":345,"sourceId":"github-webhook-source","sinkId":"github-pr-table-sink","type":"table","name":"Raw Data Sink","description":"The sink stores records to a table.","table":{"type":"keboola","tableId":"in.c-bucket.table","mapping":{"columns":[{"type":"uuid-v7","name":"id-col","primaryKey":true},{"type":"datetime","name":"datetime-col"},{"type":"ip","name":"ip-col"},{"type":"headers","name":"headers-col"},{"type":"body","name":"body-col"},{"type":"template","name":"template-col","template":{"language":"jsonnet","content":"body.foo + \"-\" + body.bar"}}]}},"version":{"number":3,"hash":"f43e93acd97eceb3","description":"The reason for the last change was...","at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"created":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"deleted":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"disabled":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"},"reason":"Disabled for recurring problems."}}}}},"404":{"description":"stream.api.sinkNotFound: Sink not found error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenericError"},"example":{"statusCode":404,"error":"stream.api.sinkNotFound","message":"Sink \"github-changed-files\" not found."}}}}},"security":[{"storage-api-token":[]}]},"patch":{"tags":["configuration"],"summary":"Update sink","description":"Update the sink.","operationId":"UpdateSink","parameters":[{"name":"branchId","in":"path","required":true,"schema":{"type":"string","description":"ID of the branch or \"default\".","example":"default"},"example":"default"},{"name":"sourceId","in":"path","required":true,"schema":{"type":"string","description":"Unique ID of the source.","example":"github-webhook-source","minLength":1,"maxLength":48},"example":"github-webhook-source"},{"name":"sinkId","in":"path","required":true,"schema":{"type":"string","description":"Unique ID of the sink.","example":"github-pr-table-sink","minLength":1,"maxLength":48},"example":"github-pr-table-sink"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSinkRequestBody"},"example":{"changeDescription":"Renamed.","type":"table","name":"Raw Data Sink","description":"The sink stores records to a table.","table":{"type":"keboola","tableId":"in.c-bucket.table","mapping":{"columns":[{"type":"uuid-v7","name":"id-col","primaryKey":true},{"type":"datetime","name":"datetime-col"},{"type":"ip","name":"ip-col"},{"type":"headers","name":"headers-col"},{"type":"body","name":"body-col"},{"type":"template","name":"template-col","template":{"language":"jsonnet","content":"body.foo + \"-\" + body.bar"}}]}}}}}},"responses":{"202":{"description":"Accepted response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Task"},"example":{"taskId":"task_1234","type":"abc123","url":"abc123","status":"success","isFinished":false,"createdAt":"2022-04-28T14:20:04.000Z","finishedAt":"2022-04-28T14:20:04.000Z","duration":123456789,"result":"abc123","error":"abc123","outputs":{"url":"abc123","projectId":123,"branchId":345,"sourceId":"github-webhook-source","sinkId":"github-pr-table-sink"}}}}},"404":{"description":"stream.api.sinkNotFound: Sink not found error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenericError"},"example":{"statusCode":404,"error":"stream.api.sinkNotFound","message":"Sink \"github-changed-files\" not found."}}}}},"security":[{"storage-api-token":[]}]}},"/v1/branches/{branchId}/sources/{sourceId}/sinks/{sinkId}/settings":{"get":{"tags":["configuration"],"summary":"Get sink settings","description":"Get the sink settings.","operationId":"GetSinkSettings","parameters":[{"name":"branchId","in":"path","required":true,"schema":{"type":"string","description":"ID of the branch or \"default\".","example":"default"},"example":"default"},{"name":"sourceId","in":"path","required":true,"schema":{"type":"string","description":"Unique ID of the source.","example":"github-webhook-source","minLength":1,"maxLength":48},"example":"github-webhook-source"},{"name":"sinkId","in":"path","required":true,"schema":{"type":"string","description":"Unique ID of the sink.","example":"github-pr-table-sink","minLength":1,"maxLength":48},"example":"github-pr-table-sink"}],"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SettingsResult"},"example":{"settings":[{"key":"some.service.limit","type":"string","description":"Minimal interval between uploads.","value":"1m20s","defaultValue":"30s","overwritten":true,"protected":false,"validation":"minDuration=15s"}]}}}},"404":{"description":"stream.api.sinkNotFound: Sink not found error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenericError"},"example":{"statusCode":404,"error":"stream.api.sinkNotFound","message":"Sink \"github-changed-files\" not found."}}}}},"security":[{"storage-api-token":[]}]},"patch":{"tags":["configuration"],"summary":"Update sink settings","description":"Update sink settings.","operationId":"UpdateSinkSettings","parameters":[{"name":"branchId","in":"path","required":true,"schema":{"type":"string","description":"ID of the branch or \"default\".","example":"default"},"example":"default"},{"name":"sourceId","in":"path","required":true,"schema":{"type":"string","description":"Unique ID of the source.","example":"github-webhook-source","minLength":1,"maxLength":48},"example":"github-webhook-source"},{"name":"sinkId","in":"path","required":true,"schema":{"type":"string","description":"Unique ID of the sink.","example":"github-pr-table-sink","minLength":1,"maxLength":48},"example":"github-pr-table-sink"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSourceSettingsRequestBody"},"example":{"changeDescription":"Updated settings.","settings":[{"key":"some.service.limit","value":"1m20s"}]}}}},"responses":{"202":{"description":"Accepted response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Task"},"example":{"taskId":"task_1234","type":"abc123","url":"abc123","status":"success","isFinished":false,"createdAt":"2022-04-28T14:20:04.000Z","finishedAt":"2022-04-28T14:20:04.000Z","duration":123456789,"result":"abc123","error":"abc123","outputs":{"url":"abc123","projectId":123,"branchId":345,"sourceId":"github-webhook-source","sinkId":"github-pr-table-sink"}}}}},"404":{"description":"stream.api.forbidden: Modification of protected settings is forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenericError"},"example":{"statusCode":404,"error":"stream.api.forbidden","message":"Cannot modify protected keys: \"storage.level.local.compression.gzip.blockSize\"."}}}}},"security":[{"storage-api-token":[]}]}},"/v1/branches/{branchId}/sources/{sourceId}/sinks/{sinkId}/statistics/files":{"get":{"tags":["configuration"],"summary":"Sink files statistics","description":"Get files statistics of the sink.","operationId":"SinkStatisticsFiles","parameters":[{"name":"branchId","in":"path","required":true,"schema":{"type":"string","description":"ID of the branch or \"default\".","example":"default"},"example":"default"},{"name":"sourceId","in":"path","required":true,"schema":{"type":"string","description":"Unique ID of the source.","example":"github-webhook-source","minLength":1,"maxLength":48},"example":"github-webhook-source"},{"name":"sinkId","in":"path","required":true,"schema":{"type":"string","description":"Unique ID of the sink.","example":"github-pr-table-sink","minLength":1,"maxLength":48},"example":"github-pr-table-sink"}],"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SinkStatisticsFilesResult"},"example":{"files":[{"state":"writing","openedAt":"2022-04-28T14:20:04.000Z","closingAt":"2022-04-28T14:20:04.000Z","importingAt":"2022-04-28T14:20:04.000Z","importedAt":"2022-04-28T14:20:04.000Z","retryAttempt":3,"retryReason":"network problem","retryAfter":"2022-04-28T14:20:04.000Z","statistics":{"total":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1},"levels":{"local":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1},"staging":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1},"target":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1}}}}]}}}},"404":{"description":"stream.api.sinkNotFound: Sink not found error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenericError"},"example":{"statusCode":404,"error":"stream.api.sinkNotFound","message":"Sink \"github-changed-files\" not found."}}}}},"security":[{"storage-api-token":[]}]}},"/v1/branches/{branchId}/sources/{sourceId}/sinks/{sinkId}/statistics/total":{"get":{"tags":["configuration"],"summary":"Sink statistics total","description":"Get total statistics of the sink.","operationId":"SinkStatisticsTotal","parameters":[{"name":"branchId","in":"path","required":true,"schema":{"type":"string","description":"ID of the branch or \"default\".","example":"default"},"example":"default"},{"name":"sourceId","in":"path","required":true,"schema":{"type":"string","description":"Unique ID of the source.","example":"github-webhook-source","minLength":1,"maxLength":48},"example":"github-webhook-source"},{"name":"sinkId","in":"path","required":true,"schema":{"type":"string","description":"Unique ID of the sink.","example":"github-pr-table-sink","minLength":1,"maxLength":48},"example":"github-pr-table-sink"}],"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SinkStatisticsTotalResult"},"example":{"total":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1},"levels":{"local":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1},"staging":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1},"target":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1}}}}}},"404":{"description":"stream.api.sinkNotFound: Sink not found error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenericError"},"example":{"statusCode":404,"error":"stream.api.sinkNotFound","message":"Sink \"github-changed-files\" not found."}}}}},"security":[{"storage-api-token":[]}]}},"/v1/branches/{branchId}/sources/{sourceId}/test":{"post":{"tags":["test"],"summary":"Test source payload mapping.","description":"Tests configured mapping of the source and its sinks.","operationId":"TestSource","parameters":[{"name":"branchId","in":"path","required":true,"schema":{"type":"string","description":"ID of the branch or \"default\".","example":"default"},"example":"default"},{"name":"sourceId","in":"path","required":true,"schema":{"type":"string","description":"Unique ID of the source.","example":"github-webhook-source","minLength":1,"maxLength":48},"example":"github-webhook-source"}],"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestResult"},"example":{"projectId":123,"branchId":345,"sourceId":"github-webhook-source","tables":[{"sinkId":"github-pr-table-sink","tableId":"in.c-bucket.table","rows":[{"columns":[{"name":"id","value":"12345"}]}]}]}}}},"404":{"description":"stream.api.sourceNotFound: Source not found error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenericError"},"example":{"statusCode":404,"error":"stream.api.sourceNotFound","message":"Source \"github-pull-requests\" not found."}}}}},"security":[{"storage-api-token":[]}]}},"/v1/documentation/openapi.json":{"get":{"tags":["documentation"],"summary":"Swagger 2.0 JSON Specification","operationId":"OpenapiJson","responses":{"200":{"description":"File downloaded"}}}},"/v1/documentation/openapi.yaml":{"get":{"tags":["documentation"],"summary":"Swagger 2.0 YAML Specification","operationId":"OpenapiYaml","responses":{"200":{"description":"File downloaded"}}}},"/v1/documentation/openapi3.json":{"get":{"tags":["documentation"],"summary":"OpenAPI 3.0 JSON Specification","operationId":"Openapi3Json","responses":{"200":{"description":"File downloaded"}}}},"/v1/documentation/openapi3.yaml":{"get":{"tags":["documentation"],"summary":"OpenAPI 3.0 YAML Specification","operationId":"Openapi3Yaml","responses":{"200":{"description":"File downloaded"}}}},"/v1/tasks/{taskId}":{"get":{"tags":["configuration"],"summary":"Get task","description":"Get details of a task.","operationId":"GetTask","parameters":[{"name":"taskId","in":"path","required":true,"schema":{"type":"string","description":"Unique ID of the task.","example":"task_1234"},"example":"task_1234"}],"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Task"},"example":{"taskId":"task_1234","type":"abc123","url":"abc123","status":"success","isFinished":false,"createdAt":"2022-04-28T14:20:04.000Z","finishedAt":"2022-04-28T14:20:04.000Z","duration":123456789,"result":"abc123","error":"abc123","outputs":{"url":"abc123","projectId":123,"branchId":345,"sourceId":"github-webhook-source","sinkId":"github-pr-table-sink"}}}}},"404":{"description":"stream.api.taskNotFound: Task not found error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenericError"},"example":{"statusCode":404,"error":"stream.api.taskNotFound","message":"Task \"001\" not found."}}}}},"security":[{"storage-api-token":[]}]}}},"components":{"schemas":{"By":{"type":"object","properties":{"tokenDesc":{"type":"string","description":"Description of the token.","example":"john.green@company.com"},"tokenId":{"type":"string","description":"ID of the token.","example":"896455"},"type":{"type":"string","description":"Date and time of deletion.","example":"user","enum":["system","user"]},"userId":{"type":"string","description":"ID of the user.","example":"578621"},"userName":{"type":"string","description":"Name of the user.","example":"John Green"}},"description":"Information about the operation actor.","example":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"},"required":["type"]},"CreateSinkRequestBody":{"type":"object","properties":{"description":{"type":"string","description":"Description of the source.","example":"The sink stores records to a table.","maxLength":4096},"name":{"type":"string","description":"Human readable name of the sink.","example":"Raw Data Sink","minLength":1,"maxLength":40},"sinkId":{"type":"string","description":"Optional ID, if not filled in, it will be generated from name. Cannot be changed later.","example":"github-pr-table-sink","minLength":1,"maxLength":48},"table":{"$ref":"#/components/schemas/TableSinkCreate"},"type":{"type":"string","example":"table","enum":["table"]}},"example":{"sinkId":"github-pr-table-sink","type":"table","name":"Raw Data Sink","description":"The sink stores records to a table.","table":{"type":"keboola","tableId":"in.c-bucket.table","mapping":{"columns":[{"type":"uuid-v7","name":"id-col","primaryKey":true},{"type":"datetime","name":"datetime-col"},{"type":"ip","name":"ip-col"},{"type":"headers","name":"headers-col"},{"type":"body","name":"body-col"},{"type":"template","name":"template-col","template":{"language":"jsonnet","content":"body.foo + \"-\" + body.bar"}}]}}},"required":["type","name"]},"CreateSourceRequestBody":{"type":"object","properties":{"description":{"type":"string","description":"Description of the source.","example":"The source receives events from Github.","maxLength":4096},"name":{"type":"string","description":"Human readable name of the source.","example":"Github Webhook Source","minLength":1,"maxLength":40},"sourceId":{"type":"string","description":"Optional ID, if not filled in, it will be generated from name. Cannot be changed later.","example":"github-webhook-source","minLength":1,"maxLength":48},"type":{"type":"string","example":"http","enum":["http"]}},"example":{"sourceId":"github-webhook-source","type":"http","name":"Github Webhook Source","description":"The source receives events from Github."},"required":["type","name"]},"CreatedEntity":{"type":"object","properties":{"at":{"type":"string","description":"Date and time of deletion.","example":"2022-04-28T14:20:04.000Z","format":"date-time"},"by":{"$ref":"#/components/schemas/By"}},"description":"Information about the entity creation.","example":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"required":["at","by"]},"DisabledEntity":{"type":"object","properties":{"at":{"type":"string","description":"Date and time of disabling.","example":"2022-04-28T14:20:04.000Z","format":"date-time"},"by":{"$ref":"#/components/schemas/By"},"reason":{"type":"string","description":"Why was the entity disabled?","example":"Disabled for recurring problems."}},"description":"Information about the disabled entity.","example":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"},"reason":"Disabled for recurring problems."},"required":["at","by","reason"]},"GenericError":{"type":"object","properties":{"error":{"type":"string","description":"Name of error.","example":"stream.internalError"},"message":{"type":"string","description":"Error message.","example":"Internal Error"},"statusCode":{"type":"integer","description":"HTTP status code.","example":500,"format":"int64"}},"description":"Source already exists in the branch.","example":{"statusCode":409,"error":"stream.api.sourceAlreadyExists","message":"Source already exists in the branch."},"required":["statusCode","error","message"]},"HTTPSource":{"type":"object","properties":{"url":{"type":"string","description":"URL of the HTTP source. Contains secret used for authentication.","example":"https://stream-in.keboola.com/G0lpTbz0vhakDicfoDQQ3BCzGYdW3qewd1D3eUbqETygHKGb"}},"description":"HTTP source details for \"type\" = \"http\".","example":{"url":"https://stream-in.keboola.com/G0lpTbz0vhakDicfoDQQ3BCzGYdW3qewd1D3eUbqETygHKGb"},"required":["url"]},"Level":{"type":"object","properties":{"firstRecordAt":{"type":"string","example":"2022-04-28T14:20:04.000Z","format":"date-time"},"lastRecordAt":{"type":"string","example":"2022-04-28T14:20:04.000Z","format":"date-time"},"recordsCount":{"type":"integer","example":1,"format":"int64"},"uncompressedSize":{"type":"integer","example":1,"format":"int64"}},"example":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1},"required":["recordsCount","uncompressedSize"]},"Levels":{"type":"object","properties":{"local":{"$ref":"#/components/schemas/Level"},"staging":{"$ref":"#/components/schemas/Level"},"target":{"$ref":"#/components/schemas/Level"}},"example":{"local":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1},"staging":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1},"target":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1}}},"PaginatedResponse":{"type":"object","properties":{"lastId":{"type":"string","description":"ID of the last record in the response.","example":"my-object-456"},"limit":{"type":"integer","description":"Current limit.","example":100,"format":"int64"},"sinceId":{"type":"string","description":"Current offset.","example":"my-object-123"},"totalCount":{"type":"integer","description":"Total count of all records.","example":1000,"format":"int64"}},"example":{"limit":100,"totalCount":1000,"sinceId":"my-object-123","lastId":"my-object-456"},"required":["sinceId","limit","lastId","totalCount"]},"ServiceDetail":{"type":"object","properties":{"api":{"type":"string","description":"Name of the API","example":"stream"},"documentation":{"type":"string","description":"URL of the API documentation.","example":"https://stream.keboola.com/v1/documentation"}},"example":{"api":"stream","documentation":"https://stream.keboola.com/v1/documentation"},"required":["api","documentation"]},"SettingPatch":{"type":"object","properties":{"key":{"type":"string","description":"Key path.","example":"some.service.limit","minLength":1},"value":{"description":"A new key value. Use null to reset the value to the default value.","example":"1m20s"}},"description":"One setting key-value pair.","example":{"key":"some.service.limit","value":"1m20s"},"required":["key"]},"SettingResult":{"type":"object","properties":{"defaultValue":{"description":"Default value.","example":"30s"},"description":{"type":"string","description":"Key description.","example":"Minimal interval between uploads."},"key":{"type":"string","description":"Key path.","example":"some.service.limit"},"overwritten":{"type":"boolean","description":"True, if the default value is locally overwritten.","example":true},"protected":{"type":"boolean","description":"True, if only a super admin can modify the key.","example":false},"type":{"type":"string","description":"Value type.","example":"string","enum":["string","int","float","bool","[]string","[]int","[]float"]},"validation":{"type":"string","description":"Validation rules as a string definition.","example":"minDuration=15s"},"value":{"description":"Actual value.","example":"1m20s"}},"description":"One setting key-value pair.","example":{"key":"some.service.limit","type":"string","description":"Minimal interval between uploads.","value":"1m20s","defaultValue":"30s","overwritten":true,"protected":false,"validation":"minDuration=15s"},"required":["key","type","description","value","defaultValue","overwritten","protected"]},"SettingsResult":{"type":"object","properties":{"settings":{"type":"array","items":{"$ref":"#/components/schemas/SettingResult"},"example":[{"key":"some.service.limit","type":"string","description":"Minimal interval between uploads.","value":"1m20s","defaultValue":"30s","overwritten":true,"protected":false,"validation":"minDuration=15s"}]}},"example":{"settings":[{"key":"some.service.limit","type":"string","description":"Minimal interval between uploads.","value":"1m20s","defaultValue":"30s","overwritten":true,"protected":false,"validation":"minDuration=15s"}]}},"Sink":{"type":"object","properties":{"branchId":{"type":"integer","example":345,"format":"int64"},"created":{"$ref":"#/components/schemas/CreatedEntity"},"deleted":{"$ref":"#/components/schemas/CreatedEntity"},"description":{"type":"string","description":"Description of the source.","example":"The sink stores records to a table.","maxLength":4096},"disabled":{"$ref":"#/components/schemas/DisabledEntity"},"name":{"type":"string","description":"Human readable name of the sink.","example":"Raw Data Sink","minLength":1,"maxLength":40},"projectId":{"type":"integer","example":123,"format":"int64"},"sinkId":{"type":"string","example":"github-pr-table-sink","minLength":1,"maxLength":48},"sourceId":{"type":"string","example":"github-webhook-source","minLength":1,"maxLength":48},"table":{"$ref":"#/components/schemas/TableSinkCreate"},"type":{"type":"string","example":"table","enum":["table"]},"version":{"$ref":"#/components/schemas/Version"}},"example":{"projectId":123,"branchId":345,"sourceId":"github-webhook-source","sinkId":"github-pr-table-sink","type":"table","name":"Raw Data Sink","description":"The sink stores records to a table.","table":{"type":"keboola","tableId":"in.c-bucket.table","mapping":{"columns":[{"type":"uuid-v7","name":"id-col","primaryKey":true},{"type":"datetime","name":"datetime-col"},{"type":"ip","name":"ip-col"},{"type":"headers","name":"headers-col"},{"type":"body","name":"body-col"},{"type":"template","name":"template-col","template":{"language":"jsonnet","content":"body.foo + \"-\" + body.bar"}}]}},"version":{"number":3,"hash":"f43e93acd97eceb3","description":"The reason for the last change was...","at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"created":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"deleted":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"disabled":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"},"reason":"Disabled for recurring problems."}},"required":["projectId","branchId","sourceId","sinkId","type","name","description","version","created"]},"SinkFile":{"type":"object","properties":{"closingAt":{"type":"string","example":"2022-04-28T14:20:04.000Z","format":"date-time"},"importedAt":{"type":"string","example":"2022-04-28T14:20:04.000Z","format":"date-time"},"importingAt":{"type":"string","example":"2022-04-28T14:20:04.000Z","format":"date-time"},"openedAt":{"type":"string","example":"2022-04-28T14:20:04.000Z","format":"date-time"},"retryAfter":{"type":"string","description":"Next attempt time.","example":"2022-04-28T14:20:04.000Z","format":"date-time"},"retryAttempt":{"type":"integer","description":"Number of failed attempts.","example":3,"format":"int64"},"retryReason":{"type":"string","description":"Reason of the last failed attempt.","example":"network problem"},"state":{"type":"string","example":"writing","enum":["writing","closing","importing","imported"]},"statistics":{"$ref":"#/components/schemas/SinkStatisticsTotalResult"}},"example":{"state":"writing","openedAt":"2022-04-28T14:20:04.000Z","closingAt":"2022-04-28T14:20:04.000Z","importingAt":"2022-04-28T14:20:04.000Z","importedAt":"2022-04-28T14:20:04.000Z","retryAttempt":3,"retryReason":"network problem","retryAfter":"2022-04-28T14:20:04.000Z","statistics":{"total":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1},"levels":{"local":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1},"staging":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1},"target":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1}}}},"required":["state","openedAt","statistics"]},"SinkStatisticsFilesResult":{"type":"object","properties":{"files":{"type":"array","items":{"$ref":"#/components/schemas/SinkFile"},"example":[{"state":"writing","openedAt":"2022-04-28T14:20:04.000Z","closingAt":"2022-04-28T14:20:04.000Z","importingAt":"2022-04-28T14:20:04.000Z","importedAt":"2022-04-28T14:20:04.000Z","retryAttempt":3,"retryReason":"network problem","retryAfter":"2022-04-28T14:20:04.000Z","statistics":{"total":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1},"levels":{"local":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1},"staging":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1},"target":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1}}}}]}},"example":{"files":[{"state":"writing","openedAt":"2022-04-28T14:20:04.000Z","closingAt":"2022-04-28T14:20:04.000Z","importingAt":"2022-04-28T14:20:04.000Z","importedAt":"2022-04-28T14:20:04.000Z","retryAttempt":3,"retryReason":"network problem","retryAfter":"2022-04-28T14:20:04.000Z","statistics":{"total":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1},"levels":{"local":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1},"staging":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1},"target":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1}}}}]},"required":["files"]},"SinkStatisticsTotalResult":{"type":"object","properties":{"levels":{"$ref":"#/components/schemas/Levels"},"total":{"$ref":"#/components/schemas/Level"}},"example":{"total":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1},"levels":{"local":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1},"staging":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1},"target":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1}}},"required":["total","levels"]},"SinksList":{"type":"object","properties":{"branchId":{"type":"integer","example":345,"format":"int64"},"page":{"$ref":"#/components/schemas/PaginatedResponse"},"projectId":{"type":"integer","example":123,"format":"int64"},"sinks":{"type":"array","items":{"$ref":"#/components/schemas/Sink"},"example":[{"projectId":123,"branchId":345,"sourceId":"github-webhook-source","sinkId":"github-pr-table-sink","type":"table","name":"Raw Data Sink","description":"The sink stores records to a table.","table":{"type":"keboola","tableId":"in.c-bucket.table","mapping":{"columns":[{"type":"uuid-v7","name":"id-col","primaryKey":true},{"type":"datetime","name":"datetime-col"},{"type":"ip","name":"ip-col"},{"type":"headers","name":"headers-col"},{"type":"body","name":"body-col"},{"type":"template","name":"template-col","template":{"language":"jsonnet","content":"body.foo + \"-\" + body.bar"}}]}},"version":{"number":3,"hash":"f43e93acd97eceb3","description":"The reason for the last change was...","at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"created":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"deleted":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"disabled":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"},"reason":"Disabled for recurring problems."}}]},"sourceId":{"type":"string","example":"github-webhook-source","minLength":1,"maxLength":48}},"example":{"projectId":123,"branchId":345,"sourceId":"github-webhook-source","page":{"limit":100,"totalCount":1000,"sinceId":"my-object-123","lastId":"my-object-456"},"sinks":[{"projectId":123,"branchId":345,"sourceId":"github-webhook-source","sinkId":"github-pr-table-sink","type":"table","name":"Raw Data Sink","description":"The sink stores records to a table.","table":{"type":"keboola","tableId":"in.c-bucket.table","mapping":{"columns":[{"type":"uuid-v7","name":"id-col","primaryKey":true},{"type":"datetime","name":"datetime-col"},{"type":"ip","name":"ip-col"},{"type":"headers","name":"headers-col"},{"type":"body","name":"body-col"},{"type":"template","name":"template-col","template":{"language":"jsonnet","content":"body.foo + \"-\" + body.bar"}}]}},"version":{"number":3,"hash":"f43e93acd97eceb3","description":"The reason for the last change was...","at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"created":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"deleted":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"disabled":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"},"reason":"Disabled for recurring problems."}}]},"required":["projectId","branchId","sourceId","page","sinks"]},"Source":{"type":"object","properties":{"branchId":{"type":"integer","example":345,"format":"int64"},"created":{"$ref":"#/components/schemas/CreatedEntity"},"deleted":{"$ref":"#/components/schemas/CreatedEntity"},"description":{"type":"string","description":"Description of the source.","example":"The source receives events from Github.","maxLength":4096},"disabled":{"$ref":"#/components/schemas/DisabledEntity"},"http":{"$ref":"#/components/schemas/HTTPSource"},"name":{"type":"string","description":"Human readable name of the source.","example":"Github Webhook Source","minLength":1,"maxLength":40},"projectId":{"type":"integer","example":123,"format":"int64"},"sourceId":{"type":"string","example":"github-webhook-source","minLength":1,"maxLength":48},"type":{"type":"string","example":"http","enum":["http"]},"version":{"$ref":"#/components/schemas/Version"}},"description":"Source of data for further processing, start of the stream, max 100 sources per a branch.","example":{"projectId":123,"branchId":345,"sourceId":"github-webhook-source","type":"http","name":"Github Webhook Source","description":"The source receives events from Github.","http":{"url":"https://stream-in.keboola.com/G0lpTbz0vhakDicfoDQQ3BCzGYdW3qewd1D3eUbqETygHKGb"},"created":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"version":{"number":3,"hash":"f43e93acd97eceb3","description":"The reason for the last change was...","at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"deleted":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"disabled":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"},"reason":"Disabled for recurring problems."}},"required":["projectId","branchId","sourceId","type","name","description","created","version"]},"SourcesList":{"type":"object","properties":{"branchId":{"type":"integer","example":345,"format":"int64"},"page":{"$ref":"#/components/schemas/PaginatedResponse"},"projectId":{"type":"integer","example":123,"format":"int64"},"sources":{"type":"array","items":{"$ref":"#/components/schemas/Source"},"example":[{"projectId":123,"branchId":345,"sourceId":"github-webhook-source","type":"http","name":"Github Webhook Source","description":"The source receives events from Github.","http":{"url":"https://stream-in.keboola.com/G0lpTbz0vhakDicfoDQQ3BCzGYdW3qewd1D3eUbqETygHKGb"},"created":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"version":{"number":3,"hash":"f43e93acd97eceb3","description":"The reason for the last change was...","at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"deleted":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"disabled":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"},"reason":"Disabled for recurring problems."}}]}},"example":{"projectId":123,"branchId":345,"page":{"limit":100,"totalCount":1000,"sinceId":"my-object-123","lastId":"my-object-456"},"sources":[{"projectId":123,"branchId":345,"sourceId":"github-webhook-source","type":"http","name":"Github Webhook Source","description":"The source receives events from Github.","http":{"url":"https://stream-in.keboola.com/G0lpTbz0vhakDicfoDQQ3BCzGYdW3qewd1D3eUbqETygHKGb"},"created":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"version":{"number":3,"hash":"f43e93acd97eceb3","description":"The reason for the last change was...","at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"deleted":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"disabled":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"},"reason":"Disabled for recurring problems."}}]},"required":["projectId","branchId","page","sources"]},"TableColumn":{"type":"object","properties":{"name":{"type":"string","description":"Column name.","example":"id-col"},"primaryKey":{"type":"boolean","description":"Sets this column as a part of the primary key of the destination table.","default":false,"example":false},"template":{"$ref":"#/components/schemas/TableColumnTemplate"},"type":{"type":"string","description":"Column mapping type. This represents a static mapping (e.g. `body` or `headers`), or a custom mapping using a template language (`template`).","example":"body","enum":["uuid-v7","datetime","ip","body","headers","template"]}},"description":"An output mapping defined by a template.","example":{"primaryKey":false,"type":"body","name":"id-col","template":{"language":"jsonnet","content":"body.foo + \"-\" + body.bar"}},"required":["type","name"]},"TableColumnTemplate":{"type":"object","properties":{"content":{"type":"string","example":"body.foo + \"-\" + body.bar","minLength":1,"maxLength":4096},"language":{"type":"string","example":"jsonnet","enum":["jsonnet"]}},"description":"Template column definition, for \"type\" = \"template\".","example":{"language":"jsonnet","content":"body.foo + \"-\" + body.bar"},"required":["language","content"]},"TableMapping":{"type":"object","properties":{"columns":{"type":"array","items":{"$ref":"#/components/schemas/TableColumn"},"example":[{"type":"uuid-v7","name":"id-col","primaryKey":true},{"type":"datetime","name":"datetime-col"},{"type":"ip","name":"ip-col"},{"type":"headers","name":"headers-col"},{"type":"body","name":"body-col"},{"type":"template","name":"template-col","template":{"language":"jsonnet","content":"body.foo + \"-\" + body.bar"}}],"minItems":1,"maxItems":100}},"description":"Table mapping definition.","example":{"columns":[{"type":"uuid-v7","name":"id-col","primaryKey":true},{"type":"datetime","name":"datetime-col"},{"type":"ip","name":"ip-col"},{"type":"headers","name":"headers-col"},{"type":"body","name":"body-col"},{"type":"template","name":"template-col","template":{"language":"jsonnet","content":"body.foo + \"-\" + body.bar"}}]},"required":["columns"]},"TableSinkCreate":{"type":"object","properties":{"mapping":{"$ref":"#/components/schemas/TableMapping"},"tableId":{"type":"string","example":"in.c-bucket.table"},"type":{"type":"string","example":"keboola","enum":["keboola"]}},"description":"Table sink configuration for \"type\" = \"table\".","example":{"type":"keboola","tableId":"in.c-bucket.table","mapping":{"columns":[{"type":"uuid-v7","name":"id-col","primaryKey":true},{"type":"datetime","name":"datetime-col"},{"type":"ip","name":"ip-col"},{"type":"headers","name":"headers-col"},{"type":"body","name":"body-col"},{"type":"template","name":"template-col","template":{"language":"jsonnet","content":"body.foo + \"-\" + body.bar"}}]}},"required":["type","tableId","mapping"]},"TableSinkUpdate":{"type":"object","properties":{"mapping":{"$ref":"#/components/schemas/TableMapping"},"tableId":{"type":"string","example":"in.c-bucket.table"},"type":{"type":"string","example":"keboola","enum":["keboola"]}},"description":"Table sink configuration for \"type\" = \"table\".","example":{"type":"keboola","tableId":"in.c-bucket.table","mapping":{"columns":[{"type":"uuid-v7","name":"id-col","primaryKey":true},{"type":"datetime","name":"datetime-col"},{"type":"ip","name":"ip-col"},{"type":"headers","name":"headers-col"},{"type":"body","name":"body-col"},{"type":"template","name":"template-col","template":{"language":"jsonnet","content":"body.foo + \"-\" + body.bar"}}]}}},"Task":{"type":"object","properties":{"createdAt":{"type":"string","description":"Date and time of the task creation.","example":"2022-04-28T14:20:04.000Z","format":"date-time"},"duration":{"type":"integer","description":"Duration of the task in milliseconds.","example":123456789,"format":"int64"},"error":{"type":"string","example":"abc123"},"finishedAt":{"type":"string","description":"Date and time of the task end.","example":"2022-04-28T14:20:04.000Z","format":"date-time"},"isFinished":{"type":"boolean","description":"Shortcut for status != \"processing\".","example":false},"outputs":{"$ref":"#/components/schemas/TaskOutputs"},"result":{"type":"string","example":"abc123"},"status":{"type":"string","description":"Task status, one of: processing, success, error","example":"success","enum":["processing","success","error"]},"taskId":{"type":"string","example":"task_1234"},"type":{"type":"string","description":"Task type.","example":"abc123"},"url":{"type":"string","description":"URL of the task.","example":"abc123"}},"example":{"taskId":"task_1234","type":"abc123","url":"abc123","status":"success","isFinished":false,"createdAt":"2022-04-28T14:20:04.000Z","finishedAt":"2022-04-28T14:20:04.000Z","duration":123456789,"result":"abc123","error":"abc123","outputs":{"url":"abc123","projectId":123,"branchId":345,"sourceId":"github-webhook-source","sinkId":"github-pr-table-sink"}},"required":["taskId","type","url","status","isFinished","createdAt"]},"TaskOutputs":{"type":"object","properties":{"branchId":{"type":"integer","description":"ID of the parent branch.","example":345,"format":"int64"},"projectId":{"type":"integer","description":"ID of the parent project.","example":123,"format":"int64"},"sinkId":{"type":"string","description":"ID of the created/updated sink.","example":"github-pr-table-sink","minLength":1,"maxLength":48},"sourceId":{"type":"string","description":"ID of the created/updated source.","example":"github-webhook-source","minLength":1,"maxLength":48},"url":{"type":"string","description":"Absolute URL of the entity.","example":"abc123"}},"description":"Outputs generated by the task.","example":{"url":"abc123","projectId":123,"branchId":345,"sourceId":"github-webhook-source","sinkId":"github-pr-table-sink"}},"TestResult":{"type":"object","properties":{"branchId":{"type":"integer","example":345,"format":"int64"},"projectId":{"type":"integer","example":123,"format":"int64"},"sourceId":{"type":"string","example":"github-webhook-source","minLength":1,"maxLength":48},"tables":{"type":"array","items":{"$ref":"#/components/schemas/TestResultTable"},"description":"Table for each configured sink.","example":[{"sinkId":"github-pr-table-sink","tableId":"in.c-bucket.table","rows":[{"columns":[{"name":"id","value":"12345"}]}]}]}},"example":{"projectId":123,"branchId":345,"sourceId":"github-webhook-source","tables":[{"sinkId":"github-pr-table-sink","tableId":"in.c-bucket.table","rows":[{"columns":[{"name":"id","value":"12345"}]}]}]},"required":["projectId","branchId","sourceId","tables"]},"TestResultColumn":{"type":"object","properties":{"name":{"type":"string","description":"Column name.","example":"id"},"value":{"type":"string","description":"Column value.","example":"12345"}},"description":"Generated table column value, part of the test result.","example":{"name":"id","value":"12345"},"required":["name","value"]},"TestResultRow":{"type":"object","properties":{"columns":{"type":"array","items":{"$ref":"#/components/schemas/TestResultColumn"},"description":"Generated columns.","example":[{"name":"id","value":"12345"}]}},"description":"Generated table row, part of the test result.","example":{"columns":[{"name":"id","value":"12345"}]},"required":["columns"]},"TestResultTable":{"type":"object","properties":{"rows":{"type":"array","items":{"$ref":"#/components/schemas/TestResultRow"},"description":"Generated rows.","example":[{"columns":[{"name":"id","value":"12345"}]}]},"sinkId":{"type":"string","example":"github-pr-table-sink","minLength":1,"maxLength":48},"tableId":{"type":"string","example":"in.c-bucket.table"}},"description":"Generated table rows, part of the test result.","example":{"sinkId":"github-pr-table-sink","tableId":"in.c-bucket.table","rows":[{"columns":[{"name":"id","value":"12345"}]}]},"required":["sinkId","tableId","rows"]},"UpdateSinkRequestBody":{"type":"object","properties":{"changeDescription":{"type":"string","description":"Description of the modification, description of the version.","example":"Renamed."},"description":{"type":"string","description":"Description of the source.","example":"The sink stores records to a table.","maxLength":4096},"name":{"type":"string","description":"Human readable name of the sink.","example":"Raw Data Sink","minLength":1,"maxLength":40},"table":{"$ref":"#/components/schemas/TableSinkUpdate"},"type":{"type":"string","example":"table","enum":["table"]}},"example":{"changeDescription":"Renamed.","type":"table","name":"Raw Data Sink","description":"The sink stores records to a table.","table":{"type":"keboola","tableId":"in.c-bucket.table","mapping":{"columns":[{"type":"uuid-v7","name":"id-col","primaryKey":true},{"type":"datetime","name":"datetime-col"},{"type":"ip","name":"ip-col"},{"type":"headers","name":"headers-col"},{"type":"body","name":"body-col"},{"type":"template","name":"template-col","template":{"language":"jsonnet","content":"body.foo + \"-\" + body.bar"}}]}}}},"UpdateSourceRequestBody":{"type":"object","properties":{"changeDescription":{"type":"string","description":"Description of the modification, description of the version.","example":"Renamed."},"description":{"type":"string","description":"Description of the source.","example":"The source receives events from Github.","maxLength":4096},"name":{"type":"string","description":"Human readable name of the source.","example":"Github Webhook Source","minLength":1,"maxLength":40},"type":{"type":"string","example":"http","enum":["http"]}},"example":{"changeDescription":"Renamed.","type":"http","name":"Github Webhook Source","description":"The source receives events from Github."}},"UpdateSourceSettingsRequestBody":{"type":"object","properties":{"changeDescription":{"type":"string","description":"Description of the modification, description of the version.","example":"Updated settings."},"settings":{"type":"array","items":{"$ref":"#/components/schemas/SettingPatch"},"example":[{"key":"some.service.limit","value":"1m20s"}]}},"example":{"changeDescription":"Updated settings.","settings":[{"key":"some.service.limit","value":"1m20s"}]}},"Version":{"type":"object","properties":{"at":{"type":"string","description":"Date and time of the modification.","example":"2022-04-28T14:20:04.000Z","format":"date-time"},"by":{"$ref":"#/components/schemas/By"},"description":{"type":"string","description":"Description of the change.","example":"The reason for the last change was..."},"hash":{"type":"string","description":"Hash of the entity state.","example":"f43e93acd97eceb3"},"number":{"type":"integer","description":"Version number counted from 1.","example":3,"format":"int64","minimum":1}},"description":"Version of the entity.","example":{"number":3,"hash":"f43e93acd97eceb3","description":"The reason for the last change was...","at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"required":["number","hash","at","by","description"]}},"securitySchemes":{"storage-api-token":{"type":"apiKey","description":"Storage Api Token Authentication.","name":"X-StorageApi-Token","in":"header"}}},"tags":[{"name":"stream","description":"A service for continuously importing data to the Keboola platform."}]} \ No newline at end of file +{"openapi":"3.0.3","info":{"title":"Stream Service","description":"A service for continuously importing data to the Keboola platform.","version":"1.0"},"servers":[{"url":"https://stream.{stack}","variables":{"stack":{"enum":["keboola.com","eu-central-1.keboola.com","north-europe.azure.keboola.com","eu-west-1.aws.keboola.dev","east-us-2.azure.keboola-testing.com"],"default":"keboola.com"}}},{"url":"http://localhost:8001"}],"paths":{"/":{"get":{"tags":["documentation"],"summary":"Redirect to /v1","description":"Redirect to /v1.","operationId":"ApiRootIndex","responses":{"301":{"description":"Moved Permanently response."}}}},"/v1":{"get":{"tags":["documentation"],"summary":"List API name and link to documentation.","description":"List API name and link to documentation.","operationId":"ApiVersionIndex","responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceDetail"},"example":{"api":"stream","documentation":"https://stream.keboola.com/v1/documentation"}}}}}}},"/v1/branches/{branchId}/aggregation/sources":{"get":{"tags":["internal"],"summary":"Aggregation endpoint for sources","description":"Details about sources for the UI.","operationId":"AggregateSources","parameters":[{"name":"sinceId","in":"query","description":"Request records after the ID.","allowEmptyValue":true,"schema":{"type":"string","description":"Request records after the ID.","default":"","example":"my-object-123"},"example":"my-object-123"},{"name":"limit","in":"query","description":"Maximum number of returned records.","allowEmptyValue":true,"schema":{"type":"integer","description":"Maximum number of returned records.","default":100,"example":100,"format":"int64","minimum":1,"maximum":100},"example":100},{"name":"branchId","in":"path","required":true,"schema":{"type":"string","description":"ID of the branch or \"default\".","example":"default"},"example":"default"}],"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AggregationSourcesResult"},"example":{"projectId":123,"branchId":345,"page":{"limit":100,"totalCount":1000,"sinceId":"my-object-123","lastId":"my-object-456"},"sources":[{"projectId":123,"branchId":345,"sourceId":"github-webhook-source","type":"http","name":"Github Webhook Source","description":"The source receives events from Github.","http":{"url":"https://stream-in.keboola.com/G0lpTbz0vhakDicfoDQQ3BCzGYdW3qewd1D3eUbqETygHKGb"},"created":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"version":{"number":3,"hash":"f43e93acd97eceb3","description":"The reason for the last change was...","at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"deleted":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"disabled":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"},"reason":"Disabled for recurring problems."},"sinks":[{"projectId":123,"branchId":345,"sourceId":"github-webhook-source","sinkId":"github-pr-table-sink","type":"table","name":"Raw Data Sink","description":"The sink stores records to a table.","table":{"type":"keboola","tableId":"in.c-bucket.table","mapping":{"columns":[{"type":"uuid-v7","name":"id-col","primaryKey":true},{"type":"datetime","name":"datetime-col"},{"type":"ip","name":"ip-col"},{"type":"headers","name":"headers-col"},{"type":"body","name":"body-col"},{"type":"template","name":"template-col","template":{"language":"jsonnet","content":"body.foo + \"-\" + body.bar"}}]}},"created":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"version":{"number":3,"hash":"f43e93acd97eceb3","description":"The reason for the last change was...","at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"deleted":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"disabled":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"},"reason":"Disabled for recurring problems."},"statistics":{"total":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1},"levels":{"local":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1},"staging":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1},"target":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1}},"files":[{"state":"writing","openedAt":"2022-04-28T14:20:04.000Z","closingAt":"2022-04-28T14:20:04.000Z","importingAt":"2022-04-28T14:20:04.000Z","importedAt":"2022-04-28T14:20:04.000Z","retryAttempt":3,"retryReason":"network problem","retryAfter":"2022-04-28T14:20:04.000Z","statistics":{"total":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1},"levels":{"local":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1},"staging":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1},"target":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1}}}}]}}]}]}}}}},"security":[{"storage-api-token":[]}]}},"/v1/branches/{branchId}/sources":{"get":{"tags":["configuration"],"summary":"List all sources","description":"List all sources in the branch.","operationId":"ListSources","parameters":[{"name":"sinceId","in":"query","description":"Request records after the ID.","allowEmptyValue":true,"schema":{"type":"string","description":"Request records after the ID.","default":"","example":"my-object-123"},"example":"my-object-123"},{"name":"limit","in":"query","description":"Maximum number of returned records.","allowEmptyValue":true,"schema":{"type":"integer","description":"Maximum number of returned records.","default":100,"example":100,"format":"int64","minimum":1,"maximum":100},"example":100},{"name":"branchId","in":"path","required":true,"schema":{"type":"string","description":"ID of the branch or \"default\".","example":"default"},"example":"default"}],"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SourcesList"},"example":{"projectId":123,"branchId":345,"page":{"limit":100,"totalCount":1000,"sinceId":"my-object-123","lastId":"my-object-456"},"sources":[{"projectId":123,"branchId":345,"sourceId":"github-webhook-source","type":"http","name":"Github Webhook Source","description":"The source receives events from Github.","http":{"url":"https://stream-in.keboola.com/G0lpTbz0vhakDicfoDQQ3BCzGYdW3qewd1D3eUbqETygHKGb"},"created":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"version":{"number":3,"hash":"f43e93acd97eceb3","description":"The reason for the last change was...","at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"deleted":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"disabled":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"},"reason":"Disabled for recurring problems."}}]}}}}},"security":[{"storage-api-token":[]}]},"post":{"tags":["configuration"],"summary":"Create source","description":"Create a new source in the branch.","operationId":"CreateSource","parameters":[{"name":"branchId","in":"path","required":true,"schema":{"type":"string","description":"ID of the branch or \"default\".","example":"default"},"example":"default"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSourceRequestBody"},"example":{"sourceId":"github-webhook-source","type":"http","name":"Github Webhook Source","description":"The source receives events from Github."}}}},"responses":{"202":{"description":"Accepted response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Task"},"example":{"taskId":"task_1234","type":"abc123","url":"abc123","status":"success","isFinished":false,"createdAt":"2022-04-28T14:20:04.000Z","finishedAt":"2022-04-28T14:20:04.000Z","duration":123456789,"result":"abc123","error":"abc123","outputs":{"url":"abc123","projectId":123,"branchId":345,"sourceId":"github-webhook-source","sinkId":"github-pr-table-sink"}}}}},"409":{"description":"stream.api.sourceAlreadyExists: Source already exists in the branch.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenericError"},"example":{"statusCode":409,"error":"stream.api.sourceAlreadyExists","message":"Source already exists in the branch."}}}},"422":{"description":"stream.api.resourceLimitReached: Resource limit reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenericError"},"example":{"statusCode":422,"error":"stream.api.resourceLimitReached","message":"Maximum number of sources per project is 100."}}}}},"security":[{"storage-api-token":[]}]}},"/v1/branches/{branchId}/sources/{sourceId}":{"delete":{"tags":["configuration"],"summary":"Delete source","description":"Delete the source.","operationId":"DeleteSource","parameters":[{"name":"branchId","in":"path","required":true,"schema":{"type":"string","description":"ID of the branch or \"default\".","example":"default"},"example":"default"},{"name":"sourceId","in":"path","required":true,"schema":{"type":"string","description":"Unique ID of the source.","example":"github-webhook-source","minLength":1,"maxLength":48},"example":"github-webhook-source"}],"responses":{"202":{"description":"Accepted response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Task"},"example":{"taskId":"task_1234","type":"abc123","url":"abc123","status":"success","isFinished":false,"createdAt":"2022-04-28T14:20:04.000Z","finishedAt":"2022-04-28T14:20:04.000Z","duration":123456789,"result":"abc123","error":"abc123","outputs":{"url":"abc123","projectId":123,"branchId":345,"sourceId":"github-webhook-source","sinkId":"github-pr-table-sink"}}}}},"404":{"description":"stream.api.sourceNotFound: Source not found error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenericError"},"example":{"statusCode":404,"error":"stream.api.sourceNotFound","message":"Source \"github-pull-requests\" not found."}}}}},"security":[{"storage-api-token":[]}]},"get":{"tags":["configuration"],"summary":"Get source","description":"Get the source definition.","operationId":"GetSource","parameters":[{"name":"branchId","in":"path","required":true,"schema":{"type":"string","description":"ID of the branch or \"default\".","example":"default"},"example":"default"},{"name":"sourceId","in":"path","required":true,"schema":{"type":"string","description":"Unique ID of the source.","example":"github-webhook-source","minLength":1,"maxLength":48},"example":"github-webhook-source"}],"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Source"},"example":{"projectId":123,"branchId":345,"sourceId":"github-webhook-source","type":"http","name":"Github Webhook Source","description":"The source receives events from Github.","http":{"url":"https://stream-in.keboola.com/G0lpTbz0vhakDicfoDQQ3BCzGYdW3qewd1D3eUbqETygHKGb"},"created":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"version":{"number":3,"hash":"f43e93acd97eceb3","description":"The reason for the last change was...","at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"deleted":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"disabled":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"},"reason":"Disabled for recurring problems."}}}}},"404":{"description":"stream.api.sourceNotFound: Source not found error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenericError"},"example":{"statusCode":404,"error":"stream.api.sourceNotFound","message":"Source \"github-pull-requests\" not found."}}}}},"security":[{"storage-api-token":[]}]},"patch":{"tags":["configuration"],"summary":"Update source","description":"Update the source.","operationId":"UpdateSource","parameters":[{"name":"branchId","in":"path","required":true,"schema":{"type":"string","description":"ID of the branch or \"default\".","example":"default"},"example":"default"},{"name":"sourceId","in":"path","required":true,"schema":{"type":"string","description":"Unique ID of the source.","example":"github-webhook-source","minLength":1,"maxLength":48},"example":"github-webhook-source"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSourceRequestBody"},"example":{"changeDescription":"Renamed.","type":"http","name":"Github Webhook Source","description":"The source receives events from Github."}}}},"responses":{"202":{"description":"Accepted response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Task"},"example":{"taskId":"task_1234","type":"abc123","url":"abc123","status":"success","isFinished":false,"createdAt":"2022-04-28T14:20:04.000Z","finishedAt":"2022-04-28T14:20:04.000Z","duration":123456789,"result":"abc123","error":"abc123","outputs":{"url":"abc123","projectId":123,"branchId":345,"sourceId":"github-webhook-source","sinkId":"github-pr-table-sink"}}}}},"404":{"description":"stream.api.sourceNotFound: Source not found error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenericError"},"example":{"statusCode":404,"error":"stream.api.sourceNotFound","message":"Source \"github-pull-requests\" not found."}}}}},"security":[{"storage-api-token":[]}]}},"/v1/branches/{branchId}/sources/{sourceId}/settings":{"get":{"tags":["configuration"],"summary":"Get source settings","description":"Get source settings.","operationId":"GetSourceSettings","parameters":[{"name":"branchId","in":"path","required":true,"schema":{"type":"string","description":"ID of the branch or \"default\".","example":"default"},"example":"default"},{"name":"sourceId","in":"path","required":true,"schema":{"type":"string","description":"Unique ID of the source.","example":"github-webhook-source","minLength":1,"maxLength":48},"example":"github-webhook-source"}],"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SettingsResult"},"example":{"settings":[{"key":"some.service.limit","type":"string","description":"Minimal interval between uploads.","value":"1m20s","defaultValue":"30s","overwritten":true,"protected":false,"validation":"minDuration=15s"}]}}}},"404":{"description":"stream.api.sourceNotFound: Source not found error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenericError"},"example":{"statusCode":404,"error":"stream.api.sourceNotFound","message":"Source \"github-pull-requests\" not found."}}}}},"security":[{"storage-api-token":[]}]},"patch":{"tags":["configuration"],"summary":"Update source settings","description":"Update source settings.","operationId":"UpdateSourceSettings","parameters":[{"name":"branchId","in":"path","required":true,"schema":{"type":"string","description":"ID of the branch or \"default\".","example":"default"},"example":"default"},{"name":"sourceId","in":"path","required":true,"schema":{"type":"string","description":"Unique ID of the source.","example":"github-webhook-source","minLength":1,"maxLength":48},"example":"github-webhook-source"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSourceSettingsRequestBody"},"example":{"changeDescription":"Updated settings.","settings":[{"key":"some.service.limit","value":"1m20s"}]}}}},"responses":{"202":{"description":"Accepted response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Task"},"example":{"taskId":"task_1234","type":"abc123","url":"abc123","status":"success","isFinished":false,"createdAt":"2022-04-28T14:20:04.000Z","finishedAt":"2022-04-28T14:20:04.000Z","duration":123456789,"result":"abc123","error":"abc123","outputs":{"url":"abc123","projectId":123,"branchId":345,"sourceId":"github-webhook-source","sinkId":"github-pr-table-sink"}}}}},"404":{"description":"stream.api.forbidden: Modification of protected settings is forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenericError"},"example":{"statusCode":404,"error":"stream.api.forbidden","message":"Cannot modify protected keys: \"storage.level.local.compression.gzip.blockSize\"."}}}}},"security":[{"storage-api-token":[]}]}},"/v1/branches/{branchId}/sources/{sourceId}/sinks":{"get":{"tags":["configuration"],"summary":"List sinks","description":"List all sinks in the source.","operationId":"ListSinks","parameters":[{"name":"sinceId","in":"query","description":"Request records after the ID.","allowEmptyValue":true,"schema":{"type":"string","description":"Request records after the ID.","default":"","example":"my-object-123"},"example":"my-object-123"},{"name":"limit","in":"query","description":"Maximum number of returned records.","allowEmptyValue":true,"schema":{"type":"integer","description":"Maximum number of returned records.","default":100,"example":100,"format":"int64","minimum":1,"maximum":100},"example":100},{"name":"branchId","in":"path","required":true,"schema":{"type":"string","description":"ID of the branch or \"default\".","example":"default"},"example":"default"},{"name":"sourceId","in":"path","required":true,"schema":{"type":"string","description":"Unique ID of the source.","example":"github-webhook-source","minLength":1,"maxLength":48},"example":"github-webhook-source"}],"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SinksList"},"example":{"projectId":123,"branchId":345,"sourceId":"github-webhook-source","page":{"limit":100,"totalCount":1000,"sinceId":"my-object-123","lastId":"my-object-456"},"sinks":[{"projectId":123,"branchId":345,"sourceId":"github-webhook-source","sinkId":"github-pr-table-sink","type":"table","name":"Raw Data Sink","description":"The sink stores records to a table.","table":{"type":"keboola","tableId":"in.c-bucket.table","mapping":{"columns":[{"type":"uuid-v7","name":"id-col","primaryKey":true},{"type":"datetime","name":"datetime-col"},{"type":"ip","name":"ip-col"},{"type":"headers","name":"headers-col"},{"type":"body","name":"body-col"},{"type":"template","name":"template-col","template":{"language":"jsonnet","content":"body.foo + \"-\" + body.bar"}}]}},"version":{"number":3,"hash":"f43e93acd97eceb3","description":"The reason for the last change was...","at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"created":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"deleted":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"disabled":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"},"reason":"Disabled for recurring problems."}}]}}}},"404":{"description":"stream.api.sourceNotFound: Source not found error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenericError"},"example":{"statusCode":404,"error":"stream.api.sourceNotFound","message":"Source \"github-pull-requests\" not found."}}}}},"security":[{"storage-api-token":[]}]},"post":{"tags":["configuration"],"summary":"Create sink","description":"Create a new sink in the source.","operationId":"CreateSink","parameters":[{"name":"branchId","in":"path","required":true,"schema":{"type":"string","description":"ID of the branch or \"default\".","example":"default"},"example":"default"},{"name":"sourceId","in":"path","required":true,"schema":{"type":"string","description":"Unique ID of the source.","example":"github-webhook-source","minLength":1,"maxLength":48},"example":"github-webhook-source"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSinkRequestBody"},"example":{"sinkId":"github-pr-table-sink","type":"table","name":"Raw Data Sink","description":"The sink stores records to a table.","table":{"type":"keboola","tableId":"in.c-bucket.table","mapping":{"columns":[{"type":"uuid-v7","name":"id-col","primaryKey":true},{"type":"datetime","name":"datetime-col"},{"type":"ip","name":"ip-col"},{"type":"headers","name":"headers-col"},{"type":"body","name":"body-col"},{"type":"template","name":"template-col","template":{"language":"jsonnet","content":"body.foo + \"-\" + body.bar"}}]}}}}}},"responses":{"202":{"description":"Accepted response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Task"},"example":{"taskId":"task_1234","type":"abc123","url":"abc123","status":"success","isFinished":false,"createdAt":"2022-04-28T14:20:04.000Z","finishedAt":"2022-04-28T14:20:04.000Z","duration":123456789,"result":"abc123","error":"abc123","outputs":{"url":"abc123","projectId":123,"branchId":345,"sourceId":"github-webhook-source","sinkId":"github-pr-table-sink"}}}}},"404":{"description":"stream.api.sourceNotFound: Source not found error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenericError"},"example":{"statusCode":404,"error":"stream.api.sourceNotFound","message":"Source \"github-pull-requests\" not found."}}}},"409":{"description":"stream.api.sinkAlreadyExists: Sink already exists in the source.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenericError"},"example":{"statusCode":409,"error":"stream.api.sinkAlreadyExists","message":"Sink already exists in the source."}}}},"422":{"description":"stream.api.resourceLimitReached: Resource limit reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenericError"},"example":{"statusCode":422,"error":"stream.api.resourceLimitReached","message":"Maximum number of sources per project is 100."}}}}},"security":[{"storage-api-token":[]}]}},"/v1/branches/{branchId}/sources/{sourceId}/sinks/{sinkId}":{"delete":{"tags":["configuration"],"summary":"Delete sink","description":"Delete the sink.","operationId":"DeleteSink","parameters":[{"name":"branchId","in":"path","required":true,"schema":{"type":"string","description":"ID of the branch or \"default\".","example":"default"},"example":"default"},{"name":"sourceId","in":"path","required":true,"schema":{"type":"string","description":"Unique ID of the source.","example":"github-webhook-source","minLength":1,"maxLength":48},"example":"github-webhook-source"},{"name":"sinkId","in":"path","required":true,"schema":{"type":"string","description":"Unique ID of the sink.","example":"github-pr-table-sink","minLength":1,"maxLength":48},"example":"github-pr-table-sink"}],"responses":{"202":{"description":"Accepted response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Task"},"example":{"taskId":"task_1234","type":"abc123","url":"abc123","status":"success","isFinished":false,"createdAt":"2022-04-28T14:20:04.000Z","finishedAt":"2022-04-28T14:20:04.000Z","duration":123456789,"result":"abc123","error":"abc123","outputs":{"url":"abc123","projectId":123,"branchId":345,"sourceId":"github-webhook-source","sinkId":"github-pr-table-sink"}}}}},"404":{"description":"stream.api.sinkNotFound: Sink not found error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenericError"},"example":{"statusCode":404,"error":"stream.api.sinkNotFound","message":"Sink \"github-changed-files\" not found."}}}}},"security":[{"storage-api-token":[]}]},"get":{"tags":["configuration"],"summary":"Get sink","description":"Get the sink definition.","operationId":"GetSink","parameters":[{"name":"branchId","in":"path","required":true,"schema":{"type":"string","description":"ID of the branch or \"default\".","example":"default"},"example":"default"},{"name":"sourceId","in":"path","required":true,"schema":{"type":"string","description":"Unique ID of the source.","example":"github-webhook-source","minLength":1,"maxLength":48},"example":"github-webhook-source"},{"name":"sinkId","in":"path","required":true,"schema":{"type":"string","description":"Unique ID of the sink.","example":"github-pr-table-sink","minLength":1,"maxLength":48},"example":"github-pr-table-sink"}],"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sink"},"example":{"projectId":123,"branchId":345,"sourceId":"github-webhook-source","sinkId":"github-pr-table-sink","type":"table","name":"Raw Data Sink","description":"The sink stores records to a table.","table":{"type":"keboola","tableId":"in.c-bucket.table","mapping":{"columns":[{"type":"uuid-v7","name":"id-col","primaryKey":true},{"type":"datetime","name":"datetime-col"},{"type":"ip","name":"ip-col"},{"type":"headers","name":"headers-col"},{"type":"body","name":"body-col"},{"type":"template","name":"template-col","template":{"language":"jsonnet","content":"body.foo + \"-\" + body.bar"}}]}},"version":{"number":3,"hash":"f43e93acd97eceb3","description":"The reason for the last change was...","at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"created":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"deleted":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"disabled":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"},"reason":"Disabled for recurring problems."}}}}},"404":{"description":"stream.api.sinkNotFound: Sink not found error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenericError"},"example":{"statusCode":404,"error":"stream.api.sinkNotFound","message":"Sink \"github-changed-files\" not found."}}}}},"security":[{"storage-api-token":[]}]},"patch":{"tags":["configuration"],"summary":"Update sink","description":"Update the sink.","operationId":"UpdateSink","parameters":[{"name":"branchId","in":"path","required":true,"schema":{"type":"string","description":"ID of the branch or \"default\".","example":"default"},"example":"default"},{"name":"sourceId","in":"path","required":true,"schema":{"type":"string","description":"Unique ID of the source.","example":"github-webhook-source","minLength":1,"maxLength":48},"example":"github-webhook-source"},{"name":"sinkId","in":"path","required":true,"schema":{"type":"string","description":"Unique ID of the sink.","example":"github-pr-table-sink","minLength":1,"maxLength":48},"example":"github-pr-table-sink"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSinkRequestBody"},"example":{"changeDescription":"Renamed.","type":"table","name":"Raw Data Sink","description":"The sink stores records to a table.","table":{"type":"keboola","tableId":"in.c-bucket.table","mapping":{"columns":[{"type":"uuid-v7","name":"id-col","primaryKey":true},{"type":"datetime","name":"datetime-col"},{"type":"ip","name":"ip-col"},{"type":"headers","name":"headers-col"},{"type":"body","name":"body-col"},{"type":"template","name":"template-col","template":{"language":"jsonnet","content":"body.foo + \"-\" + body.bar"}}]}}}}}},"responses":{"202":{"description":"Accepted response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Task"},"example":{"taskId":"task_1234","type":"abc123","url":"abc123","status":"success","isFinished":false,"createdAt":"2022-04-28T14:20:04.000Z","finishedAt":"2022-04-28T14:20:04.000Z","duration":123456789,"result":"abc123","error":"abc123","outputs":{"url":"abc123","projectId":123,"branchId":345,"sourceId":"github-webhook-source","sinkId":"github-pr-table-sink"}}}}},"404":{"description":"stream.api.sinkNotFound: Sink not found error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenericError"},"example":{"statusCode":404,"error":"stream.api.sinkNotFound","message":"Sink \"github-changed-files\" not found."}}}}},"security":[{"storage-api-token":[]}]}},"/v1/branches/{branchId}/sources/{sourceId}/sinks/{sinkId}/settings":{"get":{"tags":["configuration"],"summary":"Get sink settings","description":"Get the sink settings.","operationId":"GetSinkSettings","parameters":[{"name":"branchId","in":"path","required":true,"schema":{"type":"string","description":"ID of the branch or \"default\".","example":"default"},"example":"default"},{"name":"sourceId","in":"path","required":true,"schema":{"type":"string","description":"Unique ID of the source.","example":"github-webhook-source","minLength":1,"maxLength":48},"example":"github-webhook-source"},{"name":"sinkId","in":"path","required":true,"schema":{"type":"string","description":"Unique ID of the sink.","example":"github-pr-table-sink","minLength":1,"maxLength":48},"example":"github-pr-table-sink"}],"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SettingsResult"},"example":{"settings":[{"key":"some.service.limit","type":"string","description":"Minimal interval between uploads.","value":"1m20s","defaultValue":"30s","overwritten":true,"protected":false,"validation":"minDuration=15s"}]}}}},"404":{"description":"stream.api.sinkNotFound: Sink not found error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenericError"},"example":{"statusCode":404,"error":"stream.api.sinkNotFound","message":"Sink \"github-changed-files\" not found."}}}}},"security":[{"storage-api-token":[]}]},"patch":{"tags":["configuration"],"summary":"Update sink settings","description":"Update sink settings.","operationId":"UpdateSinkSettings","parameters":[{"name":"branchId","in":"path","required":true,"schema":{"type":"string","description":"ID of the branch or \"default\".","example":"default"},"example":"default"},{"name":"sourceId","in":"path","required":true,"schema":{"type":"string","description":"Unique ID of the source.","example":"github-webhook-source","minLength":1,"maxLength":48},"example":"github-webhook-source"},{"name":"sinkId","in":"path","required":true,"schema":{"type":"string","description":"Unique ID of the sink.","example":"github-pr-table-sink","minLength":1,"maxLength":48},"example":"github-pr-table-sink"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSourceSettingsRequestBody"},"example":{"changeDescription":"Updated settings.","settings":[{"key":"some.service.limit","value":"1m20s"}]}}}},"responses":{"202":{"description":"Accepted response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Task"},"example":{"taskId":"task_1234","type":"abc123","url":"abc123","status":"success","isFinished":false,"createdAt":"2022-04-28T14:20:04.000Z","finishedAt":"2022-04-28T14:20:04.000Z","duration":123456789,"result":"abc123","error":"abc123","outputs":{"url":"abc123","projectId":123,"branchId":345,"sourceId":"github-webhook-source","sinkId":"github-pr-table-sink"}}}}},"404":{"description":"stream.api.forbidden: Modification of protected settings is forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenericError"},"example":{"statusCode":404,"error":"stream.api.forbidden","message":"Cannot modify protected keys: \"storage.level.local.compression.gzip.blockSize\"."}}}}},"security":[{"storage-api-token":[]}]}},"/v1/branches/{branchId}/sources/{sourceId}/sinks/{sinkId}/statistics/files":{"get":{"tags":["configuration"],"summary":"Sink files statistics","description":"Get files statistics of the sink.","operationId":"SinkStatisticsFiles","parameters":[{"name":"branchId","in":"path","required":true,"schema":{"type":"string","description":"ID of the branch or \"default\".","example":"default"},"example":"default"},{"name":"sourceId","in":"path","required":true,"schema":{"type":"string","description":"Unique ID of the source.","example":"github-webhook-source","minLength":1,"maxLength":48},"example":"github-webhook-source"},{"name":"sinkId","in":"path","required":true,"schema":{"type":"string","description":"Unique ID of the sink.","example":"github-pr-table-sink","minLength":1,"maxLength":48},"example":"github-pr-table-sink"}],"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SinkStatisticsFilesResult"},"example":{"files":[{"state":"writing","openedAt":"2022-04-28T14:20:04.000Z","closingAt":"2022-04-28T14:20:04.000Z","importingAt":"2022-04-28T14:20:04.000Z","importedAt":"2022-04-28T14:20:04.000Z","retryAttempt":3,"retryReason":"network problem","retryAfter":"2022-04-28T14:20:04.000Z","statistics":{"total":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1},"levels":{"local":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1},"staging":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1},"target":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1}}}}]}}}},"404":{"description":"stream.api.sinkNotFound: Sink not found error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenericError"},"example":{"statusCode":404,"error":"stream.api.sinkNotFound","message":"Sink \"github-changed-files\" not found."}}}}},"security":[{"storage-api-token":[]}]}},"/v1/branches/{branchId}/sources/{sourceId}/sinks/{sinkId}/statistics/total":{"get":{"tags":["configuration"],"summary":"Sink statistics total","description":"Get total statistics of the sink.","operationId":"SinkStatisticsTotal","parameters":[{"name":"branchId","in":"path","required":true,"schema":{"type":"string","description":"ID of the branch or \"default\".","example":"default"},"example":"default"},{"name":"sourceId","in":"path","required":true,"schema":{"type":"string","description":"Unique ID of the source.","example":"github-webhook-source","minLength":1,"maxLength":48},"example":"github-webhook-source"},{"name":"sinkId","in":"path","required":true,"schema":{"type":"string","description":"Unique ID of the sink.","example":"github-pr-table-sink","minLength":1,"maxLength":48},"example":"github-pr-table-sink"}],"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SinkStatisticsTotalResult"},"example":{"total":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1},"levels":{"local":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1},"staging":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1},"target":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1}}}}}},"404":{"description":"stream.api.sinkNotFound: Sink not found error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenericError"},"example":{"statusCode":404,"error":"stream.api.sinkNotFound","message":"Sink \"github-changed-files\" not found."}}}}},"security":[{"storage-api-token":[]}]}},"/v1/branches/{branchId}/sources/{sourceId}/test":{"post":{"tags":["test"],"summary":"Test source payload mapping.","description":"Tests configured mapping of the source and its sinks.","operationId":"TestSource","parameters":[{"name":"branchId","in":"path","required":true,"schema":{"type":"string","description":"ID of the branch or \"default\".","example":"default"},"example":"default"},{"name":"sourceId","in":"path","required":true,"schema":{"type":"string","description":"Unique ID of the source.","example":"github-webhook-source","minLength":1,"maxLength":48},"example":"github-webhook-source"}],"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestResult"},"example":{"projectId":123,"branchId":345,"sourceId":"github-webhook-source","tables":[{"sinkId":"github-pr-table-sink","tableId":"in.c-bucket.table","rows":[{"columns":[{"name":"id","value":"12345"}]}]}]}}}},"404":{"description":"stream.api.sourceNotFound: Source not found error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenericError"},"example":{"statusCode":404,"error":"stream.api.sourceNotFound","message":"Source \"github-pull-requests\" not found."}}}}},"security":[{"storage-api-token":[]}]}},"/v1/documentation/openapi.json":{"get":{"tags":["documentation"],"summary":"Swagger 2.0 JSON Specification","operationId":"OpenapiJson","responses":{"200":{"description":"File downloaded"}}}},"/v1/documentation/openapi.yaml":{"get":{"tags":["documentation"],"summary":"Swagger 2.0 YAML Specification","operationId":"OpenapiYaml","responses":{"200":{"description":"File downloaded"}}}},"/v1/documentation/openapi3.json":{"get":{"tags":["documentation"],"summary":"OpenAPI 3.0 JSON Specification","operationId":"Openapi3Json","responses":{"200":{"description":"File downloaded"}}}},"/v1/documentation/openapi3.yaml":{"get":{"tags":["documentation"],"summary":"OpenAPI 3.0 YAML Specification","operationId":"Openapi3Yaml","responses":{"200":{"description":"File downloaded"}}}},"/v1/tasks/{taskId}":{"get":{"tags":["configuration"],"summary":"Get task","description":"Get details of a task.","operationId":"GetTask","parameters":[{"name":"taskId","in":"path","required":true,"schema":{"type":"string","description":"Unique ID of the task.","example":"task_1234"},"example":"task_1234"}],"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Task"},"example":{"taskId":"task_1234","type":"abc123","url":"abc123","status":"success","isFinished":false,"createdAt":"2022-04-28T14:20:04.000Z","finishedAt":"2022-04-28T14:20:04.000Z","duration":123456789,"result":"abc123","error":"abc123","outputs":{"url":"abc123","projectId":123,"branchId":345,"sourceId":"github-webhook-source","sinkId":"github-pr-table-sink"}}}}},"404":{"description":"stream.api.taskNotFound: Task not found error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenericError"},"example":{"statusCode":404,"error":"stream.api.taskNotFound","message":"Task \"001\" not found."}}}}},"security":[{"storage-api-token":[]}]}}},"components":{"schemas":{"AggregationSink":{"type":"object","properties":{"branchId":{"type":"integer","example":345,"format":"int64"},"created":{"$ref":"#/components/schemas/CreatedEntity"},"deleted":{"$ref":"#/components/schemas/CreatedEntity"},"description":{"type":"string","description":"Description of the source.","example":"The sink stores records to a table.","maxLength":4096},"disabled":{"$ref":"#/components/schemas/DisabledEntity"},"name":{"type":"string","description":"Human readable name of the sink.","example":"Raw Data Sink","minLength":1,"maxLength":40},"projectId":{"type":"integer","example":123,"format":"int64"},"sinkId":{"type":"string","example":"github-pr-table-sink","minLength":1,"maxLength":48},"sourceId":{"type":"string","example":"github-webhook-source","minLength":1,"maxLength":48},"statistics":{"$ref":"#/components/schemas/AggregationStatistics"},"table":{"$ref":"#/components/schemas/TableSinkCreate"},"type":{"type":"string","example":"table","enum":["table"]},"version":{"$ref":"#/components/schemas/Version"}},"description":"A mapping from imported data to a destination table.","example":{"projectId":123,"branchId":345,"sourceId":"github-webhook-source","sinkId":"github-pr-table-sink","type":"table","name":"Raw Data Sink","description":"The sink stores records to a table.","table":{"type":"keboola","tableId":"in.c-bucket.table","mapping":{"columns":[{"type":"uuid-v7","name":"id-col","primaryKey":true},{"type":"datetime","name":"datetime-col"},{"type":"ip","name":"ip-col"},{"type":"headers","name":"headers-col"},{"type":"body","name":"body-col"},{"type":"template","name":"template-col","template":{"language":"jsonnet","content":"body.foo + \"-\" + body.bar"}}]}},"created":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"version":{"number":3,"hash":"f43e93acd97eceb3","description":"The reason for the last change was...","at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"deleted":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"disabled":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"},"reason":"Disabled for recurring problems."},"statistics":{"total":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1},"levels":{"local":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1},"staging":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1},"target":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1}},"files":[{"state":"writing","openedAt":"2022-04-28T14:20:04.000Z","closingAt":"2022-04-28T14:20:04.000Z","importingAt":"2022-04-28T14:20:04.000Z","importedAt":"2022-04-28T14:20:04.000Z","retryAttempt":3,"retryReason":"network problem","retryAfter":"2022-04-28T14:20:04.000Z","statistics":{"total":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1},"levels":{"local":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1},"staging":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1},"target":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1}}}}]}},"required":["projectId","branchId","sourceId","sinkId","type","name","description","version","created"]},"AggregationSource":{"type":"object","properties":{"branchId":{"type":"integer","example":345,"format":"int64"},"created":{"$ref":"#/components/schemas/CreatedEntity"},"deleted":{"$ref":"#/components/schemas/CreatedEntity"},"description":{"type":"string","description":"Description of the source.","example":"The source receives events from Github.","maxLength":4096},"disabled":{"$ref":"#/components/schemas/DisabledEntity"},"http":{"$ref":"#/components/schemas/HTTPSource"},"name":{"type":"string","description":"Human readable name of the source.","example":"Github Webhook Source","minLength":1,"maxLength":40},"projectId":{"type":"integer","example":123,"format":"int64"},"sinks":{"type":"array","items":{"$ref":"#/components/schemas/AggregationSink"},"example":[{"projectId":123,"branchId":345,"sourceId":"github-webhook-source","sinkId":"github-pr-table-sink","type":"table","name":"Raw Data Sink","description":"The sink stores records to a table.","table":{"type":"keboola","tableId":"in.c-bucket.table","mapping":{"columns":[{"type":"uuid-v7","name":"id-col","primaryKey":true},{"type":"datetime","name":"datetime-col"},{"type":"ip","name":"ip-col"},{"type":"headers","name":"headers-col"},{"type":"body","name":"body-col"},{"type":"template","name":"template-col","template":{"language":"jsonnet","content":"body.foo + \"-\" + body.bar"}}]}},"created":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"version":{"number":3,"hash":"f43e93acd97eceb3","description":"The reason for the last change was...","at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"deleted":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"disabled":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"},"reason":"Disabled for recurring problems."},"statistics":{"total":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1},"levels":{"local":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1},"staging":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1},"target":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1}},"files":[{"state":"writing","openedAt":"2022-04-28T14:20:04.000Z","closingAt":"2022-04-28T14:20:04.000Z","importingAt":"2022-04-28T14:20:04.000Z","importedAt":"2022-04-28T14:20:04.000Z","retryAttempt":3,"retryReason":"network problem","retryAfter":"2022-04-28T14:20:04.000Z","statistics":{"total":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1},"levels":{"local":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1},"staging":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1},"target":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1}}}}]}}]},"sourceId":{"type":"string","example":"github-webhook-source","minLength":1,"maxLength":48},"type":{"type":"string","example":"http","enum":["http"]},"version":{"$ref":"#/components/schemas/Version"}},"description":"Source of data for further processing, start of the stream, max 100 sources per a branch.","example":{"projectId":123,"branchId":345,"sourceId":"github-webhook-source","type":"http","name":"Github Webhook Source","description":"The source receives events from Github.","http":{"url":"https://stream-in.keboola.com/G0lpTbz0vhakDicfoDQQ3BCzGYdW3qewd1D3eUbqETygHKGb"},"created":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"version":{"number":3,"hash":"f43e93acd97eceb3","description":"The reason for the last change was...","at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"deleted":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"disabled":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"},"reason":"Disabled for recurring problems."},"sinks":[{"projectId":123,"branchId":345,"sourceId":"github-webhook-source","sinkId":"github-pr-table-sink","type":"table","name":"Raw Data Sink","description":"The sink stores records to a table.","table":{"type":"keboola","tableId":"in.c-bucket.table","mapping":{"columns":[{"type":"uuid-v7","name":"id-col","primaryKey":true},{"type":"datetime","name":"datetime-col"},{"type":"ip","name":"ip-col"},{"type":"headers","name":"headers-col"},{"type":"body","name":"body-col"},{"type":"template","name":"template-col","template":{"language":"jsonnet","content":"body.foo + \"-\" + body.bar"}}]}},"created":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"version":{"number":3,"hash":"f43e93acd97eceb3","description":"The reason for the last change was...","at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"deleted":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"disabled":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"},"reason":"Disabled for recurring problems."},"statistics":{"total":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1},"levels":{"local":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1},"staging":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1},"target":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1}},"files":[{"state":"writing","openedAt":"2022-04-28T14:20:04.000Z","closingAt":"2022-04-28T14:20:04.000Z","importingAt":"2022-04-28T14:20:04.000Z","importedAt":"2022-04-28T14:20:04.000Z","retryAttempt":3,"retryReason":"network problem","retryAfter":"2022-04-28T14:20:04.000Z","statistics":{"total":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1},"levels":{"local":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1},"staging":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1},"target":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1}}}}]}}]},"required":["projectId","branchId","sourceId","type","name","description","version","created","sinks"]},"AggregationSourcesResult":{"type":"object","properties":{"branchId":{"type":"integer","example":345,"format":"int64"},"page":{"$ref":"#/components/schemas/PaginatedResponse"},"projectId":{"type":"integer","example":123,"format":"int64"},"sources":{"type":"array","items":{"$ref":"#/components/schemas/AggregationSource"},"example":[{"projectId":123,"branchId":345,"sourceId":"github-webhook-source","type":"http","name":"Github Webhook Source","description":"The source receives events from Github.","http":{"url":"https://stream-in.keboola.com/G0lpTbz0vhakDicfoDQQ3BCzGYdW3qewd1D3eUbqETygHKGb"},"created":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"version":{"number":3,"hash":"f43e93acd97eceb3","description":"The reason for the last change was...","at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"deleted":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"disabled":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"},"reason":"Disabled for recurring problems."},"sinks":[{"projectId":123,"branchId":345,"sourceId":"github-webhook-source","sinkId":"github-pr-table-sink","type":"table","name":"Raw Data Sink","description":"The sink stores records to a table.","table":{"type":"keboola","tableId":"in.c-bucket.table","mapping":{"columns":[{"type":"uuid-v7","name":"id-col","primaryKey":true},{"type":"datetime","name":"datetime-col"},{"type":"ip","name":"ip-col"},{"type":"headers","name":"headers-col"},{"type":"body","name":"body-col"},{"type":"template","name":"template-col","template":{"language":"jsonnet","content":"body.foo + \"-\" + body.bar"}}]}},"created":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"version":{"number":3,"hash":"f43e93acd97eceb3","description":"The reason for the last change was...","at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"deleted":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"disabled":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"},"reason":"Disabled for recurring problems."},"statistics":{"total":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1},"levels":{"local":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1},"staging":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1},"target":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1}},"files":[{"state":"writing","openedAt":"2022-04-28T14:20:04.000Z","closingAt":"2022-04-28T14:20:04.000Z","importingAt":"2022-04-28T14:20:04.000Z","importedAt":"2022-04-28T14:20:04.000Z","retryAttempt":3,"retryReason":"network problem","retryAfter":"2022-04-28T14:20:04.000Z","statistics":{"total":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1},"levels":{"local":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1},"staging":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1},"target":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1}}}}]}}]}]}},"example":{"projectId":123,"branchId":345,"page":{"limit":100,"totalCount":1000,"sinceId":"my-object-123","lastId":"my-object-456"},"sources":[{"projectId":123,"branchId":345,"sourceId":"github-webhook-source","type":"http","name":"Github Webhook Source","description":"The source receives events from Github.","http":{"url":"https://stream-in.keboola.com/G0lpTbz0vhakDicfoDQQ3BCzGYdW3qewd1D3eUbqETygHKGb"},"created":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"version":{"number":3,"hash":"f43e93acd97eceb3","description":"The reason for the last change was...","at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"deleted":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"disabled":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"},"reason":"Disabled for recurring problems."},"sinks":[{"projectId":123,"branchId":345,"sourceId":"github-webhook-source","sinkId":"github-pr-table-sink","type":"table","name":"Raw Data Sink","description":"The sink stores records to a table.","table":{"type":"keboola","tableId":"in.c-bucket.table","mapping":{"columns":[{"type":"uuid-v7","name":"id-col","primaryKey":true},{"type":"datetime","name":"datetime-col"},{"type":"ip","name":"ip-col"},{"type":"headers","name":"headers-col"},{"type":"body","name":"body-col"},{"type":"template","name":"template-col","template":{"language":"jsonnet","content":"body.foo + \"-\" + body.bar"}}]}},"created":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"version":{"number":3,"hash":"f43e93acd97eceb3","description":"The reason for the last change was...","at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"deleted":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"disabled":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"},"reason":"Disabled for recurring problems."},"statistics":{"total":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1},"levels":{"local":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1},"staging":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1},"target":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1}},"files":[{"state":"writing","openedAt":"2022-04-28T14:20:04.000Z","closingAt":"2022-04-28T14:20:04.000Z","importingAt":"2022-04-28T14:20:04.000Z","importedAt":"2022-04-28T14:20:04.000Z","retryAttempt":3,"retryReason":"network problem","retryAfter":"2022-04-28T14:20:04.000Z","statistics":{"total":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1},"levels":{"local":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1},"staging":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1},"target":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1}}}}]}}]}]},"required":["projectId","branchId","page","sources"]},"AggregationStatistics":{"type":"object","properties":{"files":{"type":"array","items":{"$ref":"#/components/schemas/SinkFile"},"example":[{"state":"writing","openedAt":"2022-04-28T14:20:04.000Z","closingAt":"2022-04-28T14:20:04.000Z","importingAt":"2022-04-28T14:20:04.000Z","importedAt":"2022-04-28T14:20:04.000Z","retryAttempt":3,"retryReason":"network problem","retryAfter":"2022-04-28T14:20:04.000Z","statistics":{"total":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1},"levels":{"local":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1},"staging":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1},"target":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1}}}}]},"levels":{"$ref":"#/components/schemas/Levels"},"total":{"$ref":"#/components/schemas/Level"}},"example":{"total":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1},"levels":{"local":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1},"staging":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1},"target":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1}},"files":[{"state":"writing","openedAt":"2022-04-28T14:20:04.000Z","closingAt":"2022-04-28T14:20:04.000Z","importingAt":"2022-04-28T14:20:04.000Z","importedAt":"2022-04-28T14:20:04.000Z","retryAttempt":3,"retryReason":"network problem","retryAfter":"2022-04-28T14:20:04.000Z","statistics":{"total":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1},"levels":{"local":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1},"staging":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1},"target":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1}}}}]},"required":["total","levels","files"]},"By":{"type":"object","properties":{"tokenDesc":{"type":"string","description":"Description of the token.","example":"john.green@company.com"},"tokenId":{"type":"string","description":"ID of the token.","example":"896455"},"type":{"type":"string","description":"Date and time of deletion.","example":"user","enum":["system","user"]},"userId":{"type":"string","description":"ID of the user.","example":"578621"},"userName":{"type":"string","description":"Name of the user.","example":"John Green"}},"description":"Information about the operation actor.","example":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"},"required":["type"]},"CreateSinkRequestBody":{"type":"object","properties":{"description":{"type":"string","description":"Description of the source.","example":"The sink stores records to a table.","maxLength":4096},"name":{"type":"string","description":"Human readable name of the sink.","example":"Raw Data Sink","minLength":1,"maxLength":40},"sinkId":{"type":"string","description":"Optional ID, if not filled in, it will be generated from name. Cannot be changed later.","example":"github-pr-table-sink","minLength":1,"maxLength":48},"table":{"$ref":"#/components/schemas/TableSinkCreate"},"type":{"type":"string","example":"table","enum":["table"]}},"example":{"sinkId":"github-pr-table-sink","type":"table","name":"Raw Data Sink","description":"The sink stores records to a table.","table":{"type":"keboola","tableId":"in.c-bucket.table","mapping":{"columns":[{"type":"uuid-v7","name":"id-col","primaryKey":true},{"type":"datetime","name":"datetime-col"},{"type":"ip","name":"ip-col"},{"type":"headers","name":"headers-col"},{"type":"body","name":"body-col"},{"type":"template","name":"template-col","template":{"language":"jsonnet","content":"body.foo + \"-\" + body.bar"}}]}}},"required":["type","name"]},"CreateSourceRequestBody":{"type":"object","properties":{"description":{"type":"string","description":"Description of the source.","example":"The source receives events from Github.","maxLength":4096},"name":{"type":"string","description":"Human readable name of the source.","example":"Github Webhook Source","minLength":1,"maxLength":40},"sourceId":{"type":"string","description":"Optional ID, if not filled in, it will be generated from name. Cannot be changed later.","example":"github-webhook-source","minLength":1,"maxLength":48},"type":{"type":"string","example":"http","enum":["http"]}},"example":{"sourceId":"github-webhook-source","type":"http","name":"Github Webhook Source","description":"The source receives events from Github."},"required":["type","name"]},"CreatedEntity":{"type":"object","properties":{"at":{"type":"string","description":"Date and time of deletion.","example":"2022-04-28T14:20:04.000Z","format":"date-time"},"by":{"$ref":"#/components/schemas/By"}},"description":"Information about the entity creation.","example":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"required":["at","by"]},"DisabledEntity":{"type":"object","properties":{"at":{"type":"string","description":"Date and time of disabling.","example":"2022-04-28T14:20:04.000Z","format":"date-time"},"by":{"$ref":"#/components/schemas/By"},"reason":{"type":"string","description":"Why was the entity disabled?","example":"Disabled for recurring problems."}},"description":"Information about the disabled entity.","example":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"},"reason":"Disabled for recurring problems."},"required":["at","by","reason"]},"GenericError":{"type":"object","properties":{"error":{"type":"string","description":"Name of error.","example":"stream.internalError"},"message":{"type":"string","description":"Error message.","example":"Internal Error"},"statusCode":{"type":"integer","description":"HTTP status code.","example":500,"format":"int64"}},"description":"Source already exists in the branch.","example":{"statusCode":409,"error":"stream.api.sourceAlreadyExists","message":"Source already exists in the branch."},"required":["statusCode","error","message"]},"HTTPSource":{"type":"object","properties":{"url":{"type":"string","description":"URL of the HTTP source. Contains secret used for authentication.","example":"https://stream-in.keboola.com/G0lpTbz0vhakDicfoDQQ3BCzGYdW3qewd1D3eUbqETygHKGb"}},"description":"HTTP source details for \"type\" = \"http\".","example":{"url":"https://stream-in.keboola.com/G0lpTbz0vhakDicfoDQQ3BCzGYdW3qewd1D3eUbqETygHKGb"},"required":["url"]},"Level":{"type":"object","properties":{"firstRecordAt":{"type":"string","description":"Timestamp of the first received record.","example":"2022-04-28T14:20:04.000Z","format":"date-time"},"lastRecordAt":{"type":"string","description":"Timestamp of the last received record.","example":"2022-04-28T14:20:04.000Z","format":"date-time"},"recordsCount":{"type":"integer","example":1,"format":"int64"},"uncompressedSize":{"type":"integer","description":"Uncompressed size of data in bytes.","example":1,"format":"int64"}},"example":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1},"required":["recordsCount","uncompressedSize"]},"Levels":{"type":"object","properties":{"local":{"$ref":"#/components/schemas/Level"},"staging":{"$ref":"#/components/schemas/Level"},"target":{"$ref":"#/components/schemas/Level"}},"example":{"local":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1},"staging":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1},"target":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1}}},"PaginatedResponse":{"type":"object","properties":{"lastId":{"type":"string","description":"ID of the last record in the response.","example":"my-object-456"},"limit":{"type":"integer","description":"Current limit.","example":100,"format":"int64"},"sinceId":{"type":"string","description":"Current offset.","example":"my-object-123"},"totalCount":{"type":"integer","description":"Total count of all records.","example":1000,"format":"int64"}},"example":{"limit":100,"totalCount":1000,"sinceId":"my-object-123","lastId":"my-object-456"},"required":["sinceId","limit","lastId","totalCount"]},"ServiceDetail":{"type":"object","properties":{"api":{"type":"string","description":"Name of the API","example":"stream"},"documentation":{"type":"string","description":"URL of the API documentation.","example":"https://stream.keboola.com/v1/documentation"}},"example":{"api":"stream","documentation":"https://stream.keboola.com/v1/documentation"},"required":["api","documentation"]},"SettingPatch":{"type":"object","properties":{"key":{"type":"string","description":"Key path.","example":"some.service.limit","minLength":1},"value":{"description":"A new key value. Use null to reset the value to the default value.","example":"1m20s"}},"description":"One setting key-value pair.","example":{"key":"some.service.limit","value":"1m20s"},"required":["key"]},"SettingResult":{"type":"object","properties":{"defaultValue":{"description":"Default value.","example":"30s"},"description":{"type":"string","description":"Key description.","example":"Minimal interval between uploads."},"key":{"type":"string","description":"Key path.","example":"some.service.limit"},"overwritten":{"type":"boolean","description":"True, if the default value is locally overwritten.","example":true},"protected":{"type":"boolean","description":"True, if only a super admin can modify the key.","example":false},"type":{"type":"string","description":"Value type.","example":"string","enum":["string","int","float","bool","[]string","[]int","[]float"]},"validation":{"type":"string","description":"Validation rules as a string definition.","example":"minDuration=15s"},"value":{"description":"Actual value.","example":"1m20s"}},"description":"One setting key-value pair.","example":{"key":"some.service.limit","type":"string","description":"Minimal interval between uploads.","value":"1m20s","defaultValue":"30s","overwritten":true,"protected":false,"validation":"minDuration=15s"},"required":["key","type","description","value","defaultValue","overwritten","protected"]},"SettingsResult":{"type":"object","properties":{"settings":{"type":"array","items":{"$ref":"#/components/schemas/SettingResult"},"example":[{"key":"some.service.limit","type":"string","description":"Minimal interval between uploads.","value":"1m20s","defaultValue":"30s","overwritten":true,"protected":false,"validation":"minDuration=15s"}]}},"example":{"settings":[{"key":"some.service.limit","type":"string","description":"Minimal interval between uploads.","value":"1m20s","defaultValue":"30s","overwritten":true,"protected":false,"validation":"minDuration=15s"}]}},"Sink":{"type":"object","properties":{"branchId":{"type":"integer","example":345,"format":"int64"},"created":{"$ref":"#/components/schemas/CreatedEntity"},"deleted":{"$ref":"#/components/schemas/CreatedEntity"},"description":{"type":"string","description":"Description of the source.","example":"The sink stores records to a table.","maxLength":4096},"disabled":{"$ref":"#/components/schemas/DisabledEntity"},"name":{"type":"string","description":"Human readable name of the sink.","example":"Raw Data Sink","minLength":1,"maxLength":40},"projectId":{"type":"integer","example":123,"format":"int64"},"sinkId":{"type":"string","example":"github-pr-table-sink","minLength":1,"maxLength":48},"sourceId":{"type":"string","example":"github-webhook-source","minLength":1,"maxLength":48},"table":{"$ref":"#/components/schemas/TableSinkCreate"},"type":{"type":"string","example":"table","enum":["table"]},"version":{"$ref":"#/components/schemas/Version"}},"example":{"projectId":123,"branchId":345,"sourceId":"github-webhook-source","sinkId":"github-pr-table-sink","type":"table","name":"Raw Data Sink","description":"The sink stores records to a table.","table":{"type":"keboola","tableId":"in.c-bucket.table","mapping":{"columns":[{"type":"uuid-v7","name":"id-col","primaryKey":true},{"type":"datetime","name":"datetime-col"},{"type":"ip","name":"ip-col"},{"type":"headers","name":"headers-col"},{"type":"body","name":"body-col"},{"type":"template","name":"template-col","template":{"language":"jsonnet","content":"body.foo + \"-\" + body.bar"}}]}},"version":{"number":3,"hash":"f43e93acd97eceb3","description":"The reason for the last change was...","at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"created":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"deleted":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"disabled":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"},"reason":"Disabled for recurring problems."}},"required":["projectId","branchId","sourceId","sinkId","type","name","description","version","created"]},"SinkFile":{"type":"object","properties":{"closingAt":{"type":"string","example":"2022-04-28T14:20:04.000Z","format":"date-time"},"importedAt":{"type":"string","example":"2022-04-28T14:20:04.000Z","format":"date-time"},"importingAt":{"type":"string","example":"2022-04-28T14:20:04.000Z","format":"date-time"},"openedAt":{"type":"string","example":"2022-04-28T14:20:04.000Z","format":"date-time"},"retryAfter":{"type":"string","description":"Next attempt time.","example":"2022-04-28T14:20:04.000Z","format":"date-time"},"retryAttempt":{"type":"integer","description":"Number of failed attempts.","example":3,"format":"int64"},"retryReason":{"type":"string","description":"Reason of the last failed attempt.","example":"network problem"},"state":{"type":"string","example":"writing","enum":["writing","closing","importing","imported"]},"statistics":{"$ref":"#/components/schemas/SinkStatisticsTotalResult"}},"example":{"state":"writing","openedAt":"2022-04-28T14:20:04.000Z","closingAt":"2022-04-28T14:20:04.000Z","importingAt":"2022-04-28T14:20:04.000Z","importedAt":"2022-04-28T14:20:04.000Z","retryAttempt":3,"retryReason":"network problem","retryAfter":"2022-04-28T14:20:04.000Z","statistics":{"total":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1},"levels":{"local":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1},"staging":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1},"target":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1}}}},"required":["state","openedAt"]},"SinkStatisticsFilesResult":{"type":"object","properties":{"files":{"type":"array","items":{"$ref":"#/components/schemas/SinkFile"},"example":[{"state":"writing","openedAt":"2022-04-28T14:20:04.000Z","closingAt":"2022-04-28T14:20:04.000Z","importingAt":"2022-04-28T14:20:04.000Z","importedAt":"2022-04-28T14:20:04.000Z","retryAttempt":3,"retryReason":"network problem","retryAfter":"2022-04-28T14:20:04.000Z","statistics":{"total":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1},"levels":{"local":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1},"staging":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1},"target":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1}}}}]}},"example":{"files":[{"state":"writing","openedAt":"2022-04-28T14:20:04.000Z","closingAt":"2022-04-28T14:20:04.000Z","importingAt":"2022-04-28T14:20:04.000Z","importedAt":"2022-04-28T14:20:04.000Z","retryAttempt":3,"retryReason":"network problem","retryAfter":"2022-04-28T14:20:04.000Z","statistics":{"total":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1},"levels":{"local":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1},"staging":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1},"target":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1}}}}]},"required":["files"]},"SinkStatisticsTotalResult":{"type":"object","properties":{"levels":{"$ref":"#/components/schemas/Levels"},"total":{"$ref":"#/components/schemas/Level"}},"example":{"total":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1},"levels":{"local":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1},"staging":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1},"target":{"firstRecordAt":"2022-04-28T14:20:04.000Z","lastRecordAt":"2022-04-28T14:20:04.000Z","recordsCount":1,"uncompressedSize":1}}},"required":["total","levels"]},"SinksList":{"type":"object","properties":{"branchId":{"type":"integer","example":345,"format":"int64"},"page":{"$ref":"#/components/schemas/PaginatedResponse"},"projectId":{"type":"integer","example":123,"format":"int64"},"sinks":{"type":"array","items":{"$ref":"#/components/schemas/Sink"},"example":[{"projectId":123,"branchId":345,"sourceId":"github-webhook-source","sinkId":"github-pr-table-sink","type":"table","name":"Raw Data Sink","description":"The sink stores records to a table.","table":{"type":"keboola","tableId":"in.c-bucket.table","mapping":{"columns":[{"type":"uuid-v7","name":"id-col","primaryKey":true},{"type":"datetime","name":"datetime-col"},{"type":"ip","name":"ip-col"},{"type":"headers","name":"headers-col"},{"type":"body","name":"body-col"},{"type":"template","name":"template-col","template":{"language":"jsonnet","content":"body.foo + \"-\" + body.bar"}}]}},"version":{"number":3,"hash":"f43e93acd97eceb3","description":"The reason for the last change was...","at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"created":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"deleted":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"disabled":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"},"reason":"Disabled for recurring problems."}}]},"sourceId":{"type":"string","example":"github-webhook-source","minLength":1,"maxLength":48}},"example":{"projectId":123,"branchId":345,"sourceId":"github-webhook-source","page":{"limit":100,"totalCount":1000,"sinceId":"my-object-123","lastId":"my-object-456"},"sinks":[{"projectId":123,"branchId":345,"sourceId":"github-webhook-source","sinkId":"github-pr-table-sink","type":"table","name":"Raw Data Sink","description":"The sink stores records to a table.","table":{"type":"keboola","tableId":"in.c-bucket.table","mapping":{"columns":[{"type":"uuid-v7","name":"id-col","primaryKey":true},{"type":"datetime","name":"datetime-col"},{"type":"ip","name":"ip-col"},{"type":"headers","name":"headers-col"},{"type":"body","name":"body-col"},{"type":"template","name":"template-col","template":{"language":"jsonnet","content":"body.foo + \"-\" + body.bar"}}]}},"version":{"number":3,"hash":"f43e93acd97eceb3","description":"The reason for the last change was...","at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"created":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"deleted":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"disabled":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"},"reason":"Disabled for recurring problems."}}]},"required":["projectId","branchId","sourceId","page","sinks"]},"Source":{"type":"object","properties":{"branchId":{"type":"integer","example":345,"format":"int64"},"created":{"$ref":"#/components/schemas/CreatedEntity"},"deleted":{"$ref":"#/components/schemas/CreatedEntity"},"description":{"type":"string","description":"Description of the source.","example":"The source receives events from Github.","maxLength":4096},"disabled":{"$ref":"#/components/schemas/DisabledEntity"},"http":{"$ref":"#/components/schemas/HTTPSource"},"name":{"type":"string","description":"Human readable name of the source.","example":"Github Webhook Source","minLength":1,"maxLength":40},"projectId":{"type":"integer","example":123,"format":"int64"},"sourceId":{"type":"string","example":"github-webhook-source","minLength":1,"maxLength":48},"type":{"type":"string","example":"http","enum":["http"]},"version":{"$ref":"#/components/schemas/Version"}},"description":"Source of data for further processing, start of the stream, max 100 sources per a branch.","example":{"projectId":123,"branchId":345,"sourceId":"github-webhook-source","type":"http","name":"Github Webhook Source","description":"The source receives events from Github.","http":{"url":"https://stream-in.keboola.com/G0lpTbz0vhakDicfoDQQ3BCzGYdW3qewd1D3eUbqETygHKGb"},"created":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"version":{"number":3,"hash":"f43e93acd97eceb3","description":"The reason for the last change was...","at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"deleted":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"disabled":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"},"reason":"Disabled for recurring problems."}},"required":["projectId","branchId","sourceId","type","name","description","created","version"]},"SourcesList":{"type":"object","properties":{"branchId":{"type":"integer","example":345,"format":"int64"},"page":{"$ref":"#/components/schemas/PaginatedResponse"},"projectId":{"type":"integer","example":123,"format":"int64"},"sources":{"type":"array","items":{"$ref":"#/components/schemas/Source"},"example":[{"projectId":123,"branchId":345,"sourceId":"github-webhook-source","type":"http","name":"Github Webhook Source","description":"The source receives events from Github.","http":{"url":"https://stream-in.keboola.com/G0lpTbz0vhakDicfoDQQ3BCzGYdW3qewd1D3eUbqETygHKGb"},"created":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"version":{"number":3,"hash":"f43e93acd97eceb3","description":"The reason for the last change was...","at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"deleted":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"disabled":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"},"reason":"Disabled for recurring problems."}}]}},"example":{"projectId":123,"branchId":345,"page":{"limit":100,"totalCount":1000,"sinceId":"my-object-123","lastId":"my-object-456"},"sources":[{"projectId":123,"branchId":345,"sourceId":"github-webhook-source","type":"http","name":"Github Webhook Source","description":"The source receives events from Github.","http":{"url":"https://stream-in.keboola.com/G0lpTbz0vhakDicfoDQQ3BCzGYdW3qewd1D3eUbqETygHKGb"},"created":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"version":{"number":3,"hash":"f43e93acd97eceb3","description":"The reason for the last change was...","at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"deleted":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"disabled":{"at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"},"reason":"Disabled for recurring problems."}}]},"required":["projectId","branchId","page","sources"]},"TableColumn":{"type":"object","properties":{"name":{"type":"string","description":"Column name.","example":"id-col"},"primaryKey":{"type":"boolean","description":"Sets this column as a part of the primary key of the destination table.","default":false,"example":false},"template":{"$ref":"#/components/schemas/TableColumnTemplate"},"type":{"type":"string","description":"Column mapping type. This represents a static mapping (e.g. `body` or `headers`), or a custom mapping using a template language (`template`).","example":"body","enum":["uuid-v7","datetime","ip","body","headers","template"]}},"description":"An output mapping defined by a template.","example":{"primaryKey":false,"type":"body","name":"id-col","template":{"language":"jsonnet","content":"body.foo + \"-\" + body.bar"}},"required":["type","name"]},"TableColumnTemplate":{"type":"object","properties":{"content":{"type":"string","example":"body.foo + \"-\" + body.bar","minLength":1,"maxLength":4096},"language":{"type":"string","example":"jsonnet","enum":["jsonnet"]}},"description":"Template column definition, for \"type\" = \"template\".","example":{"language":"jsonnet","content":"body.foo + \"-\" + body.bar"},"required":["language","content"]},"TableMapping":{"type":"object","properties":{"columns":{"type":"array","items":{"$ref":"#/components/schemas/TableColumn"},"example":[{"type":"uuid-v7","name":"id-col","primaryKey":true},{"type":"datetime","name":"datetime-col"},{"type":"ip","name":"ip-col"},{"type":"headers","name":"headers-col"},{"type":"body","name":"body-col"},{"type":"template","name":"template-col","template":{"language":"jsonnet","content":"body.foo + \"-\" + body.bar"}}],"minItems":1,"maxItems":100}},"description":"Table mapping definition.","example":{"columns":[{"type":"uuid-v7","name":"id-col","primaryKey":true},{"type":"datetime","name":"datetime-col"},{"type":"ip","name":"ip-col"},{"type":"headers","name":"headers-col"},{"type":"body","name":"body-col"},{"type":"template","name":"template-col","template":{"language":"jsonnet","content":"body.foo + \"-\" + body.bar"}}]},"required":["columns"]},"TableSinkCreate":{"type":"object","properties":{"mapping":{"$ref":"#/components/schemas/TableMapping"},"tableId":{"type":"string","example":"in.c-bucket.table"},"type":{"type":"string","example":"keboola","enum":["keboola"]}},"description":"Table sink configuration for \"type\" = \"table\".","example":{"type":"keboola","tableId":"in.c-bucket.table","mapping":{"columns":[{"type":"uuid-v7","name":"id-col","primaryKey":true},{"type":"datetime","name":"datetime-col"},{"type":"ip","name":"ip-col"},{"type":"headers","name":"headers-col"},{"type":"body","name":"body-col"},{"type":"template","name":"template-col","template":{"language":"jsonnet","content":"body.foo + \"-\" + body.bar"}}]}},"required":["type","tableId","mapping"]},"TableSinkUpdate":{"type":"object","properties":{"mapping":{"$ref":"#/components/schemas/TableMapping"},"tableId":{"type":"string","example":"in.c-bucket.table"},"type":{"type":"string","example":"keboola","enum":["keboola"]}},"description":"Table sink configuration for \"type\" = \"table\".","example":{"type":"keboola","tableId":"in.c-bucket.table","mapping":{"columns":[{"type":"uuid-v7","name":"id-col","primaryKey":true},{"type":"datetime","name":"datetime-col"},{"type":"ip","name":"ip-col"},{"type":"headers","name":"headers-col"},{"type":"body","name":"body-col"},{"type":"template","name":"template-col","template":{"language":"jsonnet","content":"body.foo + \"-\" + body.bar"}}]}}},"Task":{"type":"object","properties":{"createdAt":{"type":"string","description":"Date and time of the task creation.","example":"2022-04-28T14:20:04.000Z","format":"date-time"},"duration":{"type":"integer","description":"Duration of the task in milliseconds.","example":123456789,"format":"int64"},"error":{"type":"string","example":"abc123"},"finishedAt":{"type":"string","description":"Date and time of the task end.","example":"2022-04-28T14:20:04.000Z","format":"date-time"},"isFinished":{"type":"boolean","description":"Shortcut for status != \"processing\".","example":false},"outputs":{"$ref":"#/components/schemas/TaskOutputs"},"result":{"type":"string","example":"abc123"},"status":{"type":"string","description":"Task status, one of: processing, success, error","example":"success","enum":["processing","success","error"]},"taskId":{"type":"string","example":"task_1234"},"type":{"type":"string","description":"Task type.","example":"abc123"},"url":{"type":"string","description":"URL of the task.","example":"abc123"}},"example":{"taskId":"task_1234","type":"abc123","url":"abc123","status":"success","isFinished":false,"createdAt":"2022-04-28T14:20:04.000Z","finishedAt":"2022-04-28T14:20:04.000Z","duration":123456789,"result":"abc123","error":"abc123","outputs":{"url":"abc123","projectId":123,"branchId":345,"sourceId":"github-webhook-source","sinkId":"github-pr-table-sink"}},"required":["taskId","type","url","status","isFinished","createdAt"]},"TaskOutputs":{"type":"object","properties":{"branchId":{"type":"integer","description":"ID of the parent branch.","example":345,"format":"int64"},"projectId":{"type":"integer","description":"ID of the parent project.","example":123,"format":"int64"},"sinkId":{"type":"string","description":"ID of the created/updated sink.","example":"github-pr-table-sink","minLength":1,"maxLength":48},"sourceId":{"type":"string","description":"ID of the created/updated source.","example":"github-webhook-source","minLength":1,"maxLength":48},"url":{"type":"string","description":"Absolute URL of the entity.","example":"abc123"}},"description":"Outputs generated by the task.","example":{"url":"abc123","projectId":123,"branchId":345,"sourceId":"github-webhook-source","sinkId":"github-pr-table-sink"}},"TestResult":{"type":"object","properties":{"branchId":{"type":"integer","example":345,"format":"int64"},"projectId":{"type":"integer","example":123,"format":"int64"},"sourceId":{"type":"string","example":"github-webhook-source","minLength":1,"maxLength":48},"tables":{"type":"array","items":{"$ref":"#/components/schemas/TestResultTable"},"description":"Table for each configured sink.","example":[{"sinkId":"github-pr-table-sink","tableId":"in.c-bucket.table","rows":[{"columns":[{"name":"id","value":"12345"}]}]}]}},"example":{"projectId":123,"branchId":345,"sourceId":"github-webhook-source","tables":[{"sinkId":"github-pr-table-sink","tableId":"in.c-bucket.table","rows":[{"columns":[{"name":"id","value":"12345"}]}]}]},"required":["projectId","branchId","sourceId","tables"]},"TestResultColumn":{"type":"object","properties":{"name":{"type":"string","description":"Column name.","example":"id"},"value":{"type":"string","description":"Column value.","example":"12345"}},"description":"Generated table column value, part of the test result.","example":{"name":"id","value":"12345"},"required":["name","value"]},"TestResultRow":{"type":"object","properties":{"columns":{"type":"array","items":{"$ref":"#/components/schemas/TestResultColumn"},"description":"Generated columns.","example":[{"name":"id","value":"12345"}]}},"description":"Generated table row, part of the test result.","example":{"columns":[{"name":"id","value":"12345"}]},"required":["columns"]},"TestResultTable":{"type":"object","properties":{"rows":{"type":"array","items":{"$ref":"#/components/schemas/TestResultRow"},"description":"Generated rows.","example":[{"columns":[{"name":"id","value":"12345"}]}]},"sinkId":{"type":"string","example":"github-pr-table-sink","minLength":1,"maxLength":48},"tableId":{"type":"string","example":"in.c-bucket.table"}},"description":"Generated table rows, part of the test result.","example":{"sinkId":"github-pr-table-sink","tableId":"in.c-bucket.table","rows":[{"columns":[{"name":"id","value":"12345"}]}]},"required":["sinkId","tableId","rows"]},"UpdateSinkRequestBody":{"type":"object","properties":{"changeDescription":{"type":"string","description":"Description of the modification, description of the version.","example":"Renamed."},"description":{"type":"string","description":"Description of the source.","example":"The sink stores records to a table.","maxLength":4096},"name":{"type":"string","description":"Human readable name of the sink.","example":"Raw Data Sink","minLength":1,"maxLength":40},"table":{"$ref":"#/components/schemas/TableSinkUpdate"},"type":{"type":"string","example":"table","enum":["table"]}},"example":{"changeDescription":"Renamed.","type":"table","name":"Raw Data Sink","description":"The sink stores records to a table.","table":{"type":"keboola","tableId":"in.c-bucket.table","mapping":{"columns":[{"type":"uuid-v7","name":"id-col","primaryKey":true},{"type":"datetime","name":"datetime-col"},{"type":"ip","name":"ip-col"},{"type":"headers","name":"headers-col"},{"type":"body","name":"body-col"},{"type":"template","name":"template-col","template":{"language":"jsonnet","content":"body.foo + \"-\" + body.bar"}}]}}}},"UpdateSourceRequestBody":{"type":"object","properties":{"changeDescription":{"type":"string","description":"Description of the modification, description of the version.","example":"Renamed."},"description":{"type":"string","description":"Description of the source.","example":"The source receives events from Github.","maxLength":4096},"name":{"type":"string","description":"Human readable name of the source.","example":"Github Webhook Source","minLength":1,"maxLength":40},"type":{"type":"string","example":"http","enum":["http"]}},"example":{"changeDescription":"Renamed.","type":"http","name":"Github Webhook Source","description":"The source receives events from Github."}},"UpdateSourceSettingsRequestBody":{"type":"object","properties":{"changeDescription":{"type":"string","description":"Description of the modification, description of the version.","example":"Updated settings."},"settings":{"type":"array","items":{"$ref":"#/components/schemas/SettingPatch"},"example":[{"key":"some.service.limit","value":"1m20s"}]}},"example":{"changeDescription":"Updated settings.","settings":[{"key":"some.service.limit","value":"1m20s"}]}},"Version":{"type":"object","properties":{"at":{"type":"string","description":"Date and time of the modification.","example":"2022-04-28T14:20:04.000Z","format":"date-time"},"by":{"$ref":"#/components/schemas/By"},"description":{"type":"string","description":"Description of the change.","example":"The reason for the last change was..."},"hash":{"type":"string","description":"Hash of the entity state.","example":"f43e93acd97eceb3"},"number":{"type":"integer","description":"Version number counted from 1.","example":3,"format":"int64","minimum":1}},"description":"Version of the entity.","example":{"number":3,"hash":"f43e93acd97eceb3","description":"The reason for the last change was...","at":"2022-04-28T14:20:04.000Z","by":{"type":"user","tokenId":"896455","tokenDesc":"john.green@company.com","userId":"578621","userName":"John Green"}},"required":["number","hash","at","by","description"]}},"securitySchemes":{"storage-api-token":{"type":"apiKey","description":"Storage Api Token Authentication.","name":"X-StorageApi-Token","in":"header"}}},"tags":[{"name":"stream","description":"A service for continuously importing data to the Keboola platform."}]} \ No newline at end of file diff --git a/internal/pkg/service/stream/api/openapi/openapi3.yaml b/internal/pkg/service/stream/api/openapi/openapi3.yaml index 0716ab90c9..732e236202 100644 --- a/internal/pkg/service/stream/api/openapi/openapi3.yaml +++ b/internal/pkg/service/stream/api/openapi/openapi3.yaml @@ -43,6 +43,225 @@ paths: example: api: stream documentation: https://stream.keboola.com/v1/documentation + /v1/branches/{branchId}/aggregation/sources: + get: + tags: + - internal + summary: Aggregation endpoint for sources + description: Details about sources for the UI. + operationId: AggregateSources + parameters: + - name: sinceId + in: query + description: Request records after the ID. + allowEmptyValue: true + schema: + type: string + description: Request records after the ID. + default: "" + example: my-object-123 + example: my-object-123 + - name: limit + in: query + description: Maximum number of returned records. + allowEmptyValue: true + schema: + type: integer + description: Maximum number of returned records. + default: 100 + example: 100 + format: int64 + minimum: 1 + maximum: 100 + example: 100 + - name: branchId + in: path + required: true + schema: + type: string + description: ID of the branch or "default". + example: default + example: default + responses: + "200": + description: OK response. + content: + application/json: + schema: + $ref: '#/components/schemas/AggregationSourcesResult' + example: + projectId: 123 + branchId: 345 + page: + limit: 100 + totalCount: 1000 + sinceId: my-object-123 + lastId: my-object-456 + sources: + - projectId: 123 + branchId: 345 + sourceId: github-webhook-source + type: http + name: Github Webhook Source + description: The source receives events from Github. + http: + url: https://stream-in.keboola.com/G0lpTbz0vhakDicfoDQQ3BCzGYdW3qewd1D3eUbqETygHKGb + created: + at: "2022-04-28T14:20:04.000Z" + by: + type: user + tokenId: "896455" + tokenDesc: john.green@company.com + userId: "578621" + userName: John Green + version: + number: 3 + hash: f43e93acd97eceb3 + description: The reason for the last change was... + at: "2022-04-28T14:20:04.000Z" + by: + type: user + tokenId: "896455" + tokenDesc: john.green@company.com + userId: "578621" + userName: John Green + deleted: + at: "2022-04-28T14:20:04.000Z" + by: + type: user + tokenId: "896455" + tokenDesc: john.green@company.com + userId: "578621" + userName: John Green + disabled: + at: "2022-04-28T14:20:04.000Z" + by: + type: user + tokenId: "896455" + tokenDesc: john.green@company.com + userId: "578621" + userName: John Green + reason: Disabled for recurring problems. + sinks: + - projectId: 123 + branchId: 345 + sourceId: github-webhook-source + sinkId: github-pr-table-sink + type: table + name: Raw Data Sink + description: The sink stores records to a table. + table: + type: keboola + tableId: in.c-bucket.table + mapping: + columns: + - type: uuid-v7 + name: id-col + primaryKey: true + - type: datetime + name: datetime-col + - type: ip + name: ip-col + - type: headers + name: headers-col + - type: body + name: body-col + - type: template + name: template-col + template: + language: jsonnet + content: body.foo + "-" + body.bar + created: + at: "2022-04-28T14:20:04.000Z" + by: + type: user + tokenId: "896455" + tokenDesc: john.green@company.com + userId: "578621" + userName: John Green + version: + number: 3 + hash: f43e93acd97eceb3 + description: The reason for the last change was... + at: "2022-04-28T14:20:04.000Z" + by: + type: user + tokenId: "896455" + tokenDesc: john.green@company.com + userId: "578621" + userName: John Green + deleted: + at: "2022-04-28T14:20:04.000Z" + by: + type: user + tokenId: "896455" + tokenDesc: john.green@company.com + userId: "578621" + userName: John Green + disabled: + at: "2022-04-28T14:20:04.000Z" + by: + type: user + tokenId: "896455" + tokenDesc: john.green@company.com + userId: "578621" + userName: John Green + reason: Disabled for recurring problems. + statistics: + total: + firstRecordAt: "2022-04-28T14:20:04.000Z" + lastRecordAt: "2022-04-28T14:20:04.000Z" + recordsCount: 1 + uncompressedSize: 1 + levels: + local: + firstRecordAt: "2022-04-28T14:20:04.000Z" + lastRecordAt: "2022-04-28T14:20:04.000Z" + recordsCount: 1 + uncompressedSize: 1 + staging: + firstRecordAt: "2022-04-28T14:20:04.000Z" + lastRecordAt: "2022-04-28T14:20:04.000Z" + recordsCount: 1 + uncompressedSize: 1 + target: + firstRecordAt: "2022-04-28T14:20:04.000Z" + lastRecordAt: "2022-04-28T14:20:04.000Z" + recordsCount: 1 + uncompressedSize: 1 + files: + - state: writing + openedAt: "2022-04-28T14:20:04.000Z" + closingAt: "2022-04-28T14:20:04.000Z" + importingAt: "2022-04-28T14:20:04.000Z" + importedAt: "2022-04-28T14:20:04.000Z" + retryAttempt: 3 + retryReason: network problem + retryAfter: "2022-04-28T14:20:04.000Z" + statistics: + total: + firstRecordAt: "2022-04-28T14:20:04.000Z" + lastRecordAt: "2022-04-28T14:20:04.000Z" + recordsCount: 1 + uncompressedSize: 1 + levels: + local: + firstRecordAt: "2022-04-28T14:20:04.000Z" + lastRecordAt: "2022-04-28T14:20:04.000Z" + recordsCount: 1 + uncompressedSize: 1 + staging: + firstRecordAt: "2022-04-28T14:20:04.000Z" + lastRecordAt: "2022-04-28T14:20:04.000Z" + recordsCount: 1 + uncompressedSize: 1 + target: + firstRecordAt: "2022-04-28T14:20:04.000Z" + lastRecordAt: "2022-04-28T14:20:04.000Z" + recordsCount: 1 + uncompressedSize: 1 + security: + - storage-api-token: [] /v1/branches/{branchId}/sources: get: tags: @@ -1572,6 +1791,977 @@ paths: - storage-api-token: [] components: schemas: + AggregationSink: + type: object + properties: + branchId: + type: integer + example: 345 + format: int64 + created: + $ref: '#/components/schemas/CreatedEntity' + deleted: + $ref: '#/components/schemas/CreatedEntity' + description: + type: string + description: Description of the source. + example: The sink stores records to a table. + maxLength: 4096 + disabled: + $ref: '#/components/schemas/DisabledEntity' + name: + type: string + description: Human readable name of the sink. + example: Raw Data Sink + minLength: 1 + maxLength: 40 + projectId: + type: integer + example: 123 + format: int64 + sinkId: + type: string + example: github-pr-table-sink + minLength: 1 + maxLength: 48 + sourceId: + type: string + example: github-webhook-source + minLength: 1 + maxLength: 48 + statistics: + $ref: '#/components/schemas/AggregationStatistics' + table: + $ref: '#/components/schemas/TableSinkCreate' + type: + type: string + example: table + enum: + - table + version: + $ref: '#/components/schemas/Version' + description: A mapping from imported data to a destination table. + example: + projectId: 123 + branchId: 345 + sourceId: github-webhook-source + sinkId: github-pr-table-sink + type: table + name: Raw Data Sink + description: The sink stores records to a table. + table: + type: keboola + tableId: in.c-bucket.table + mapping: + columns: + - type: uuid-v7 + name: id-col + primaryKey: true + - type: datetime + name: datetime-col + - type: ip + name: ip-col + - type: headers + name: headers-col + - type: body + name: body-col + - type: template + name: template-col + template: + language: jsonnet + content: body.foo + "-" + body.bar + created: + at: "2022-04-28T14:20:04.000Z" + by: + type: user + tokenId: "896455" + tokenDesc: john.green@company.com + userId: "578621" + userName: John Green + version: + number: 3 + hash: f43e93acd97eceb3 + description: The reason for the last change was... + at: "2022-04-28T14:20:04.000Z" + by: + type: user + tokenId: "896455" + tokenDesc: john.green@company.com + userId: "578621" + userName: John Green + deleted: + at: "2022-04-28T14:20:04.000Z" + by: + type: user + tokenId: "896455" + tokenDesc: john.green@company.com + userId: "578621" + userName: John Green + disabled: + at: "2022-04-28T14:20:04.000Z" + by: + type: user + tokenId: "896455" + tokenDesc: john.green@company.com + userId: "578621" + userName: John Green + reason: Disabled for recurring problems. + statistics: + total: + firstRecordAt: "2022-04-28T14:20:04.000Z" + lastRecordAt: "2022-04-28T14:20:04.000Z" + recordsCount: 1 + uncompressedSize: 1 + levels: + local: + firstRecordAt: "2022-04-28T14:20:04.000Z" + lastRecordAt: "2022-04-28T14:20:04.000Z" + recordsCount: 1 + uncompressedSize: 1 + staging: + firstRecordAt: "2022-04-28T14:20:04.000Z" + lastRecordAt: "2022-04-28T14:20:04.000Z" + recordsCount: 1 + uncompressedSize: 1 + target: + firstRecordAt: "2022-04-28T14:20:04.000Z" + lastRecordAt: "2022-04-28T14:20:04.000Z" + recordsCount: 1 + uncompressedSize: 1 + files: + - state: writing + openedAt: "2022-04-28T14:20:04.000Z" + closingAt: "2022-04-28T14:20:04.000Z" + importingAt: "2022-04-28T14:20:04.000Z" + importedAt: "2022-04-28T14:20:04.000Z" + retryAttempt: 3 + retryReason: network problem + retryAfter: "2022-04-28T14:20:04.000Z" + statistics: + total: + firstRecordAt: "2022-04-28T14:20:04.000Z" + lastRecordAt: "2022-04-28T14:20:04.000Z" + recordsCount: 1 + uncompressedSize: 1 + levels: + local: + firstRecordAt: "2022-04-28T14:20:04.000Z" + lastRecordAt: "2022-04-28T14:20:04.000Z" + recordsCount: 1 + uncompressedSize: 1 + staging: + firstRecordAt: "2022-04-28T14:20:04.000Z" + lastRecordAt: "2022-04-28T14:20:04.000Z" + recordsCount: 1 + uncompressedSize: 1 + target: + firstRecordAt: "2022-04-28T14:20:04.000Z" + lastRecordAt: "2022-04-28T14:20:04.000Z" + recordsCount: 1 + uncompressedSize: 1 + required: + - projectId + - branchId + - sourceId + - sinkId + - type + - name + - description + - version + - created + AggregationSource: + type: object + properties: + branchId: + type: integer + example: 345 + format: int64 + created: + $ref: '#/components/schemas/CreatedEntity' + deleted: + $ref: '#/components/schemas/CreatedEntity' + description: + type: string + description: Description of the source. + example: The source receives events from Github. + maxLength: 4096 + disabled: + $ref: '#/components/schemas/DisabledEntity' + http: + $ref: '#/components/schemas/HTTPSource' + name: + type: string + description: Human readable name of the source. + example: Github Webhook Source + minLength: 1 + maxLength: 40 + projectId: + type: integer + example: 123 + format: int64 + sinks: + type: array + items: + $ref: '#/components/schemas/AggregationSink' + example: + - projectId: 123 + branchId: 345 + sourceId: github-webhook-source + sinkId: github-pr-table-sink + type: table + name: Raw Data Sink + description: The sink stores records to a table. + table: + type: keboola + tableId: in.c-bucket.table + mapping: + columns: + - type: uuid-v7 + name: id-col + primaryKey: true + - type: datetime + name: datetime-col + - type: ip + name: ip-col + - type: headers + name: headers-col + - type: body + name: body-col + - type: template + name: template-col + template: + language: jsonnet + content: body.foo + "-" + body.bar + created: + at: "2022-04-28T14:20:04.000Z" + by: + type: user + tokenId: "896455" + tokenDesc: john.green@company.com + userId: "578621" + userName: John Green + version: + number: 3 + hash: f43e93acd97eceb3 + description: The reason for the last change was... + at: "2022-04-28T14:20:04.000Z" + by: + type: user + tokenId: "896455" + tokenDesc: john.green@company.com + userId: "578621" + userName: John Green + deleted: + at: "2022-04-28T14:20:04.000Z" + by: + type: user + tokenId: "896455" + tokenDesc: john.green@company.com + userId: "578621" + userName: John Green + disabled: + at: "2022-04-28T14:20:04.000Z" + by: + type: user + tokenId: "896455" + tokenDesc: john.green@company.com + userId: "578621" + userName: John Green + reason: Disabled for recurring problems. + statistics: + total: + firstRecordAt: "2022-04-28T14:20:04.000Z" + lastRecordAt: "2022-04-28T14:20:04.000Z" + recordsCount: 1 + uncompressedSize: 1 + levels: + local: + firstRecordAt: "2022-04-28T14:20:04.000Z" + lastRecordAt: "2022-04-28T14:20:04.000Z" + recordsCount: 1 + uncompressedSize: 1 + staging: + firstRecordAt: "2022-04-28T14:20:04.000Z" + lastRecordAt: "2022-04-28T14:20:04.000Z" + recordsCount: 1 + uncompressedSize: 1 + target: + firstRecordAt: "2022-04-28T14:20:04.000Z" + lastRecordAt: "2022-04-28T14:20:04.000Z" + recordsCount: 1 + uncompressedSize: 1 + files: + - state: writing + openedAt: "2022-04-28T14:20:04.000Z" + closingAt: "2022-04-28T14:20:04.000Z" + importingAt: "2022-04-28T14:20:04.000Z" + importedAt: "2022-04-28T14:20:04.000Z" + retryAttempt: 3 + retryReason: network problem + retryAfter: "2022-04-28T14:20:04.000Z" + statistics: + total: + firstRecordAt: "2022-04-28T14:20:04.000Z" + lastRecordAt: "2022-04-28T14:20:04.000Z" + recordsCount: 1 + uncompressedSize: 1 + levels: + local: + firstRecordAt: "2022-04-28T14:20:04.000Z" + lastRecordAt: "2022-04-28T14:20:04.000Z" + recordsCount: 1 + uncompressedSize: 1 + staging: + firstRecordAt: "2022-04-28T14:20:04.000Z" + lastRecordAt: "2022-04-28T14:20:04.000Z" + recordsCount: 1 + uncompressedSize: 1 + target: + firstRecordAt: "2022-04-28T14:20:04.000Z" + lastRecordAt: "2022-04-28T14:20:04.000Z" + recordsCount: 1 + uncompressedSize: 1 + sourceId: + type: string + example: github-webhook-source + minLength: 1 + maxLength: 48 + type: + type: string + example: http + enum: + - http + version: + $ref: '#/components/schemas/Version' + description: Source of data for further processing, start of the stream, max 100 sources per a branch. + example: + projectId: 123 + branchId: 345 + sourceId: github-webhook-source + type: http + name: Github Webhook Source + description: The source receives events from Github. + http: + url: https://stream-in.keboola.com/G0lpTbz0vhakDicfoDQQ3BCzGYdW3qewd1D3eUbqETygHKGb + created: + at: "2022-04-28T14:20:04.000Z" + by: + type: user + tokenId: "896455" + tokenDesc: john.green@company.com + userId: "578621" + userName: John Green + version: + number: 3 + hash: f43e93acd97eceb3 + description: The reason for the last change was... + at: "2022-04-28T14:20:04.000Z" + by: + type: user + tokenId: "896455" + tokenDesc: john.green@company.com + userId: "578621" + userName: John Green + deleted: + at: "2022-04-28T14:20:04.000Z" + by: + type: user + tokenId: "896455" + tokenDesc: john.green@company.com + userId: "578621" + userName: John Green + disabled: + at: "2022-04-28T14:20:04.000Z" + by: + type: user + tokenId: "896455" + tokenDesc: john.green@company.com + userId: "578621" + userName: John Green + reason: Disabled for recurring problems. + sinks: + - projectId: 123 + branchId: 345 + sourceId: github-webhook-source + sinkId: github-pr-table-sink + type: table + name: Raw Data Sink + description: The sink stores records to a table. + table: + type: keboola + tableId: in.c-bucket.table + mapping: + columns: + - type: uuid-v7 + name: id-col + primaryKey: true + - type: datetime + name: datetime-col + - type: ip + name: ip-col + - type: headers + name: headers-col + - type: body + name: body-col + - type: template + name: template-col + template: + language: jsonnet + content: body.foo + "-" + body.bar + created: + at: "2022-04-28T14:20:04.000Z" + by: + type: user + tokenId: "896455" + tokenDesc: john.green@company.com + userId: "578621" + userName: John Green + version: + number: 3 + hash: f43e93acd97eceb3 + description: The reason for the last change was... + at: "2022-04-28T14:20:04.000Z" + by: + type: user + tokenId: "896455" + tokenDesc: john.green@company.com + userId: "578621" + userName: John Green + deleted: + at: "2022-04-28T14:20:04.000Z" + by: + type: user + tokenId: "896455" + tokenDesc: john.green@company.com + userId: "578621" + userName: John Green + disabled: + at: "2022-04-28T14:20:04.000Z" + by: + type: user + tokenId: "896455" + tokenDesc: john.green@company.com + userId: "578621" + userName: John Green + reason: Disabled for recurring problems. + statistics: + total: + firstRecordAt: "2022-04-28T14:20:04.000Z" + lastRecordAt: "2022-04-28T14:20:04.000Z" + recordsCount: 1 + uncompressedSize: 1 + levels: + local: + firstRecordAt: "2022-04-28T14:20:04.000Z" + lastRecordAt: "2022-04-28T14:20:04.000Z" + recordsCount: 1 + uncompressedSize: 1 + staging: + firstRecordAt: "2022-04-28T14:20:04.000Z" + lastRecordAt: "2022-04-28T14:20:04.000Z" + recordsCount: 1 + uncompressedSize: 1 + target: + firstRecordAt: "2022-04-28T14:20:04.000Z" + lastRecordAt: "2022-04-28T14:20:04.000Z" + recordsCount: 1 + uncompressedSize: 1 + files: + - state: writing + openedAt: "2022-04-28T14:20:04.000Z" + closingAt: "2022-04-28T14:20:04.000Z" + importingAt: "2022-04-28T14:20:04.000Z" + importedAt: "2022-04-28T14:20:04.000Z" + retryAttempt: 3 + retryReason: network problem + retryAfter: "2022-04-28T14:20:04.000Z" + statistics: + total: + firstRecordAt: "2022-04-28T14:20:04.000Z" + lastRecordAt: "2022-04-28T14:20:04.000Z" + recordsCount: 1 + uncompressedSize: 1 + levels: + local: + firstRecordAt: "2022-04-28T14:20:04.000Z" + lastRecordAt: "2022-04-28T14:20:04.000Z" + recordsCount: 1 + uncompressedSize: 1 + staging: + firstRecordAt: "2022-04-28T14:20:04.000Z" + lastRecordAt: "2022-04-28T14:20:04.000Z" + recordsCount: 1 + uncompressedSize: 1 + target: + firstRecordAt: "2022-04-28T14:20:04.000Z" + lastRecordAt: "2022-04-28T14:20:04.000Z" + recordsCount: 1 + uncompressedSize: 1 + required: + - projectId + - branchId + - sourceId + - type + - name + - description + - version + - created + - sinks + AggregationSourcesResult: + type: object + properties: + branchId: + type: integer + example: 345 + format: int64 + page: + $ref: '#/components/schemas/PaginatedResponse' + projectId: + type: integer + example: 123 + format: int64 + sources: + type: array + items: + $ref: '#/components/schemas/AggregationSource' + example: + - projectId: 123 + branchId: 345 + sourceId: github-webhook-source + type: http + name: Github Webhook Source + description: The source receives events from Github. + http: + url: https://stream-in.keboola.com/G0lpTbz0vhakDicfoDQQ3BCzGYdW3qewd1D3eUbqETygHKGb + created: + at: "2022-04-28T14:20:04.000Z" + by: + type: user + tokenId: "896455" + tokenDesc: john.green@company.com + userId: "578621" + userName: John Green + version: + number: 3 + hash: f43e93acd97eceb3 + description: The reason for the last change was... + at: "2022-04-28T14:20:04.000Z" + by: + type: user + tokenId: "896455" + tokenDesc: john.green@company.com + userId: "578621" + userName: John Green + deleted: + at: "2022-04-28T14:20:04.000Z" + by: + type: user + tokenId: "896455" + tokenDesc: john.green@company.com + userId: "578621" + userName: John Green + disabled: + at: "2022-04-28T14:20:04.000Z" + by: + type: user + tokenId: "896455" + tokenDesc: john.green@company.com + userId: "578621" + userName: John Green + reason: Disabled for recurring problems. + sinks: + - projectId: 123 + branchId: 345 + sourceId: github-webhook-source + sinkId: github-pr-table-sink + type: table + name: Raw Data Sink + description: The sink stores records to a table. + table: + type: keboola + tableId: in.c-bucket.table + mapping: + columns: + - type: uuid-v7 + name: id-col + primaryKey: true + - type: datetime + name: datetime-col + - type: ip + name: ip-col + - type: headers + name: headers-col + - type: body + name: body-col + - type: template + name: template-col + template: + language: jsonnet + content: body.foo + "-" + body.bar + created: + at: "2022-04-28T14:20:04.000Z" + by: + type: user + tokenId: "896455" + tokenDesc: john.green@company.com + userId: "578621" + userName: John Green + version: + number: 3 + hash: f43e93acd97eceb3 + description: The reason for the last change was... + at: "2022-04-28T14:20:04.000Z" + by: + type: user + tokenId: "896455" + tokenDesc: john.green@company.com + userId: "578621" + userName: John Green + deleted: + at: "2022-04-28T14:20:04.000Z" + by: + type: user + tokenId: "896455" + tokenDesc: john.green@company.com + userId: "578621" + userName: John Green + disabled: + at: "2022-04-28T14:20:04.000Z" + by: + type: user + tokenId: "896455" + tokenDesc: john.green@company.com + userId: "578621" + userName: John Green + reason: Disabled for recurring problems. + statistics: + total: + firstRecordAt: "2022-04-28T14:20:04.000Z" + lastRecordAt: "2022-04-28T14:20:04.000Z" + recordsCount: 1 + uncompressedSize: 1 + levels: + local: + firstRecordAt: "2022-04-28T14:20:04.000Z" + lastRecordAt: "2022-04-28T14:20:04.000Z" + recordsCount: 1 + uncompressedSize: 1 + staging: + firstRecordAt: "2022-04-28T14:20:04.000Z" + lastRecordAt: "2022-04-28T14:20:04.000Z" + recordsCount: 1 + uncompressedSize: 1 + target: + firstRecordAt: "2022-04-28T14:20:04.000Z" + lastRecordAt: "2022-04-28T14:20:04.000Z" + recordsCount: 1 + uncompressedSize: 1 + files: + - state: writing + openedAt: "2022-04-28T14:20:04.000Z" + closingAt: "2022-04-28T14:20:04.000Z" + importingAt: "2022-04-28T14:20:04.000Z" + importedAt: "2022-04-28T14:20:04.000Z" + retryAttempt: 3 + retryReason: network problem + retryAfter: "2022-04-28T14:20:04.000Z" + statistics: + total: + firstRecordAt: "2022-04-28T14:20:04.000Z" + lastRecordAt: "2022-04-28T14:20:04.000Z" + recordsCount: 1 + uncompressedSize: 1 + levels: + local: + firstRecordAt: "2022-04-28T14:20:04.000Z" + lastRecordAt: "2022-04-28T14:20:04.000Z" + recordsCount: 1 + uncompressedSize: 1 + staging: + firstRecordAt: "2022-04-28T14:20:04.000Z" + lastRecordAt: "2022-04-28T14:20:04.000Z" + recordsCount: 1 + uncompressedSize: 1 + target: + firstRecordAt: "2022-04-28T14:20:04.000Z" + lastRecordAt: "2022-04-28T14:20:04.000Z" + recordsCount: 1 + uncompressedSize: 1 + example: + projectId: 123 + branchId: 345 + page: + limit: 100 + totalCount: 1000 + sinceId: my-object-123 + lastId: my-object-456 + sources: + - projectId: 123 + branchId: 345 + sourceId: github-webhook-source + type: http + name: Github Webhook Source + description: The source receives events from Github. + http: + url: https://stream-in.keboola.com/G0lpTbz0vhakDicfoDQQ3BCzGYdW3qewd1D3eUbqETygHKGb + created: + at: "2022-04-28T14:20:04.000Z" + by: + type: user + tokenId: "896455" + tokenDesc: john.green@company.com + userId: "578621" + userName: John Green + version: + number: 3 + hash: f43e93acd97eceb3 + description: The reason for the last change was... + at: "2022-04-28T14:20:04.000Z" + by: + type: user + tokenId: "896455" + tokenDesc: john.green@company.com + userId: "578621" + userName: John Green + deleted: + at: "2022-04-28T14:20:04.000Z" + by: + type: user + tokenId: "896455" + tokenDesc: john.green@company.com + userId: "578621" + userName: John Green + disabled: + at: "2022-04-28T14:20:04.000Z" + by: + type: user + tokenId: "896455" + tokenDesc: john.green@company.com + userId: "578621" + userName: John Green + reason: Disabled for recurring problems. + sinks: + - projectId: 123 + branchId: 345 + sourceId: github-webhook-source + sinkId: github-pr-table-sink + type: table + name: Raw Data Sink + description: The sink stores records to a table. + table: + type: keboola + tableId: in.c-bucket.table + mapping: + columns: + - type: uuid-v7 + name: id-col + primaryKey: true + - type: datetime + name: datetime-col + - type: ip + name: ip-col + - type: headers + name: headers-col + - type: body + name: body-col + - type: template + name: template-col + template: + language: jsonnet + content: body.foo + "-" + body.bar + created: + at: "2022-04-28T14:20:04.000Z" + by: + type: user + tokenId: "896455" + tokenDesc: john.green@company.com + userId: "578621" + userName: John Green + version: + number: 3 + hash: f43e93acd97eceb3 + description: The reason for the last change was... + at: "2022-04-28T14:20:04.000Z" + by: + type: user + tokenId: "896455" + tokenDesc: john.green@company.com + userId: "578621" + userName: John Green + deleted: + at: "2022-04-28T14:20:04.000Z" + by: + type: user + tokenId: "896455" + tokenDesc: john.green@company.com + userId: "578621" + userName: John Green + disabled: + at: "2022-04-28T14:20:04.000Z" + by: + type: user + tokenId: "896455" + tokenDesc: john.green@company.com + userId: "578621" + userName: John Green + reason: Disabled for recurring problems. + statistics: + total: + firstRecordAt: "2022-04-28T14:20:04.000Z" + lastRecordAt: "2022-04-28T14:20:04.000Z" + recordsCount: 1 + uncompressedSize: 1 + levels: + local: + firstRecordAt: "2022-04-28T14:20:04.000Z" + lastRecordAt: "2022-04-28T14:20:04.000Z" + recordsCount: 1 + uncompressedSize: 1 + staging: + firstRecordAt: "2022-04-28T14:20:04.000Z" + lastRecordAt: "2022-04-28T14:20:04.000Z" + recordsCount: 1 + uncompressedSize: 1 + target: + firstRecordAt: "2022-04-28T14:20:04.000Z" + lastRecordAt: "2022-04-28T14:20:04.000Z" + recordsCount: 1 + uncompressedSize: 1 + files: + - state: writing + openedAt: "2022-04-28T14:20:04.000Z" + closingAt: "2022-04-28T14:20:04.000Z" + importingAt: "2022-04-28T14:20:04.000Z" + importedAt: "2022-04-28T14:20:04.000Z" + retryAttempt: 3 + retryReason: network problem + retryAfter: "2022-04-28T14:20:04.000Z" + statistics: + total: + firstRecordAt: "2022-04-28T14:20:04.000Z" + lastRecordAt: "2022-04-28T14:20:04.000Z" + recordsCount: 1 + uncompressedSize: 1 + levels: + local: + firstRecordAt: "2022-04-28T14:20:04.000Z" + lastRecordAt: "2022-04-28T14:20:04.000Z" + recordsCount: 1 + uncompressedSize: 1 + staging: + firstRecordAt: "2022-04-28T14:20:04.000Z" + lastRecordAt: "2022-04-28T14:20:04.000Z" + recordsCount: 1 + uncompressedSize: 1 + target: + firstRecordAt: "2022-04-28T14:20:04.000Z" + lastRecordAt: "2022-04-28T14:20:04.000Z" + recordsCount: 1 + uncompressedSize: 1 + required: + - projectId + - branchId + - page + - sources + AggregationStatistics: + type: object + properties: + files: + type: array + items: + $ref: '#/components/schemas/SinkFile' + example: + - state: writing + openedAt: "2022-04-28T14:20:04.000Z" + closingAt: "2022-04-28T14:20:04.000Z" + importingAt: "2022-04-28T14:20:04.000Z" + importedAt: "2022-04-28T14:20:04.000Z" + retryAttempt: 3 + retryReason: network problem + retryAfter: "2022-04-28T14:20:04.000Z" + statistics: + total: + firstRecordAt: "2022-04-28T14:20:04.000Z" + lastRecordAt: "2022-04-28T14:20:04.000Z" + recordsCount: 1 + uncompressedSize: 1 + levels: + local: + firstRecordAt: "2022-04-28T14:20:04.000Z" + lastRecordAt: "2022-04-28T14:20:04.000Z" + recordsCount: 1 + uncompressedSize: 1 + staging: + firstRecordAt: "2022-04-28T14:20:04.000Z" + lastRecordAt: "2022-04-28T14:20:04.000Z" + recordsCount: 1 + uncompressedSize: 1 + target: + firstRecordAt: "2022-04-28T14:20:04.000Z" + lastRecordAt: "2022-04-28T14:20:04.000Z" + recordsCount: 1 + uncompressedSize: 1 + levels: + $ref: '#/components/schemas/Levels' + total: + $ref: '#/components/schemas/Level' + example: + total: + firstRecordAt: "2022-04-28T14:20:04.000Z" + lastRecordAt: "2022-04-28T14:20:04.000Z" + recordsCount: 1 + uncompressedSize: 1 + levels: + local: + firstRecordAt: "2022-04-28T14:20:04.000Z" + lastRecordAt: "2022-04-28T14:20:04.000Z" + recordsCount: 1 + uncompressedSize: 1 + staging: + firstRecordAt: "2022-04-28T14:20:04.000Z" + lastRecordAt: "2022-04-28T14:20:04.000Z" + recordsCount: 1 + uncompressedSize: 1 + target: + firstRecordAt: "2022-04-28T14:20:04.000Z" + lastRecordAt: "2022-04-28T14:20:04.000Z" + recordsCount: 1 + uncompressedSize: 1 + files: + - state: writing + openedAt: "2022-04-28T14:20:04.000Z" + closingAt: "2022-04-28T14:20:04.000Z" + importingAt: "2022-04-28T14:20:04.000Z" + importedAt: "2022-04-28T14:20:04.000Z" + retryAttempt: 3 + retryReason: network problem + retryAfter: "2022-04-28T14:20:04.000Z" + statistics: + total: + firstRecordAt: "2022-04-28T14:20:04.000Z" + lastRecordAt: "2022-04-28T14:20:04.000Z" + recordsCount: 1 + uncompressedSize: 1 + levels: + local: + firstRecordAt: "2022-04-28T14:20:04.000Z" + lastRecordAt: "2022-04-28T14:20:04.000Z" + recordsCount: 1 + uncompressedSize: 1 + staging: + firstRecordAt: "2022-04-28T14:20:04.000Z" + lastRecordAt: "2022-04-28T14:20:04.000Z" + recordsCount: 1 + uncompressedSize: 1 + target: + firstRecordAt: "2022-04-28T14:20:04.000Z" + lastRecordAt: "2022-04-28T14:20:04.000Z" + recordsCount: 1 + uncompressedSize: 1 + required: + - total + - levels + - files By: type: object properties: @@ -1788,10 +2978,12 @@ components: properties: firstRecordAt: type: string + description: Timestamp of the first received record. example: "2022-04-28T14:20:04.000Z" format: date-time lastRecordAt: type: string + description: Timestamp of the last received record. example: "2022-04-28T14:20:04.000Z" format: date-time recordsCount: @@ -1800,6 +2992,7 @@ components: format: int64 uncompressedSize: type: integer + description: Uncompressed size of data in bytes. example: 1 format: int64 example: @@ -2184,7 +3377,6 @@ components: required: - state - openedAt - - statistics SinkStatisticsFilesResult: type: object properties: