diff --git a/api/templates/design.go b/api/templates/design.go index b0950d3d6e..0f8bebb46c 100644 --- a/api/templates/design.go +++ b/api/templates/design.go @@ -181,10 +181,11 @@ var _ = Service("templates", func() { Meta("openapi:summary", "List templates in the repository") Description("List all templates defined in the repository.") Result(Templates) - Payload(RepositoryRequest) + Payload(TemplatesRequest) HTTP(func() { GET("/repositories/{repository}/templates") Meta("openapi:tag:template") + Param("filter") Response(StatusOK) RepositoryNotFoundError() }) @@ -567,6 +568,13 @@ var TemplateRequest = Type("TemplateRequest", func() { Required("template") }) +var TemplatesRequest = Type("TemplatesRequest", func() { + Extend(RepositoryRequest) + Attribute("filter", String, "The 'filter' attribute specifies the category of templates to retrieve from the repository.", func() { + Enum("keboola.components", "keboola.data-apps") + }) +}) + var TemplateVersionRequest = Type("TemplateVersionRequest", func() { Extend(TemplateRequest) templateVersionAttr() diff --git a/internal/pkg/service/templates/api/gen/http/templates/server/encode_decode.go b/internal/pkg/service/templates/api/gen/http/templates/server/encode_decode.go index 60da80d214..e49d99ca8e 100644 --- a/internal/pkg/service/templates/api/gen/http/templates/server/encode_decode.go +++ b/internal/pkg/service/templates/api/gen/http/templates/server/encode_decode.go @@ -174,12 +174,22 @@ func DecodeTemplatesIndexRequest(mux goahttp.Muxer, decoder func(*http.Request) return func(r *http.Request) (any, error) { var ( repository string + filter *string storageAPIToken string err error params = mux.Vars(r) ) repository = params["repository"] + filterRaw := r.URL.Query().Get("filter") + if filterRaw != "" { + filter = &filterRaw + } + if filter != nil { + if !(*filter == "keboola.components" || *filter == "keboola.data-apps") { + err = goa.MergeErrors(err, goa.InvalidEnumValueError("filter", *filter, []any{"keboola.components", "keboola.data-apps"})) + } + } storageAPIToken = r.Header.Get("X-StorageApi-Token") if storageAPIToken == "" { err = goa.MergeErrors(err, goa.MissingFieldError("X-StorageApi-Token", "header")) @@ -187,7 +197,7 @@ func DecodeTemplatesIndexRequest(mux goahttp.Muxer, decoder func(*http.Request) if err != nil { return nil, err } - payload := NewTemplatesIndexPayload(repository, storageAPIToken) + payload := NewTemplatesIndexPayload(repository, filter, storageAPIToken) if strings.Contains(payload.StorageAPIToken, " ") { // Remove authorization scheme prefix (e.g. "Bearer") cred := strings.SplitN(payload.StorageAPIToken, " ", 2)[1] diff --git a/internal/pkg/service/templates/api/gen/http/templates/server/types.go b/internal/pkg/service/templates/api/gen/http/templates/server/types.go index 1584744ee3..039cefec53 100644 --- a/internal/pkg/service/templates/api/gen/http/templates/server/types.go +++ b/internal/pkg/service/templates/api/gen/http/templates/server/types.go @@ -2006,9 +2006,10 @@ func NewRepositoryIndexPayload(repository string, storageAPIToken string) *templ // NewTemplatesIndexPayload builds a templates service TemplatesIndex endpoint // payload. -func NewTemplatesIndexPayload(repository string, storageAPIToken string) *templates.TemplatesIndexPayload { +func NewTemplatesIndexPayload(repository string, filter *string, storageAPIToken string) *templates.TemplatesIndexPayload { v := &templates.TemplatesIndexPayload{} v.Repository = repository + v.Filter = filter v.StorageAPIToken = storageAPIToken return v diff --git a/internal/pkg/service/templates/api/gen/templates/service.go b/internal/pkg/service/templates/api/gen/templates/service.go index 55698a9798..4a99fce8f4 100644 --- a/internal/pkg/service/templates/api/gen/templates/service.go +++ b/internal/pkg/service/templates/api/gen/templates/service.go @@ -517,6 +517,9 @@ type Templates struct { // TemplatesIndex method. type TemplatesIndexPayload struct { StorageAPIToken string + // The 'filter' attribute specifies the category of templates to retrieve from + // the repository. + Filter *string // Name of the template repository. Use "keboola" for default Keboola // repository. Repository string diff --git a/internal/pkg/service/templates/api/openapi/openapi.json b/internal/pkg/service/templates/api/openapi/openapi.json index 2aaf401dbb..5c36ed7852 100644 --- a/internal/pkg/service/templates/api/openapi/openapi.json +++ b/internal/pkg/service/templates/api/openapi/openapi.json @@ -1 +1 @@ -{"swagger":"2.0","info":{"title":"Templates Service","description":"A service for applying templates to Keboola projects.","version":"1.0"},"host":"templates.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/ServiceDetail","required":["api","documentation"]}}},"schemes":["https"]}},"/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/project/{branch}/instances":{"get":{"tags":["instance"],"summary":"List instances","operationId":"InstancesIndex","parameters":[{"name":"branch","in":"path","description":"ID of the branch. Use \"default\" for default branch.","required":true,"type":"string"}],"responses":{"200":{"description":"OK response.","schema":{"$ref":"#/definitions/Instances","required":["instances"]}},"404":{"description":"Not Found response.","schema":{"$ref":"#/definitions/GenericError","required":["statusCode","error","message"]}}},"schemes":["https"],"security":[{"storage-api-token":[]}]}},"/v1/project/{branch}/instances/{instanceId}":{"get":{"tags":["instance"],"summary":"Get instance detail","operationId":"InstanceIndex","parameters":[{"name":"branch","in":"path","description":"ID of the branch. Use \"default\" for default branch.","required":true,"type":"string"},{"name":"instanceId","in":"path","description":"ID of the template instance.","required":true,"type":"string"}],"responses":{"200":{"description":"OK response.","schema":{"$ref":"#/definitions/InstanceDetail","required":["instanceId","templateId","version","repositoryName","branch","name","created","updated","templateDetail","versionDetail","configurations"]}},"404":{"description":"Not Found response.","schema":{"$ref":"#/definitions/GenericError","required":["statusCode","error","message"]}}},"schemes":["https"],"security":[{"storage-api-token":[]}]},"put":{"tags":["instance"],"summary":"Update instance name","operationId":"UpdateInstance","parameters":[{"name":"branch","in":"path","description":"ID of the branch. Use \"default\" for default branch.","required":true,"type":"string"},{"name":"instanceId","in":"path","description":"ID of the template instance.","required":true,"type":"string"},{"name":"UpdateInstanceRequestBody","in":"body","required":true,"schema":{"$ref":"#/definitions/TemplatesUpdateInstanceRequestBody","required":["name"]}}],"responses":{"200":{"description":"OK response.","schema":{"$ref":"#/definitions/InstanceDetail","required":["instanceId","templateId","version","repositoryName","branch","name","created","updated","templateDetail","versionDetail","configurations"]}},"404":{"description":"Not Found response.","schema":{"$ref":"#/definitions/GenericError","required":["statusCode","error","message"]}},"503":{"description":"Service Unavailable response.","schema":{"$ref":"#/definitions/ProjectLockedError","required":["statusCode","error","message"]},"headers":{"Retry-After":{"description":"Indicates how long the user agent should wait before making a follow-up request.","type":"string"}}}},"schemes":["https"],"security":[{"storage-api-token":[]}]},"delete":{"tags":["instance"],"summary":"Delete instance","operationId":"DeleteInstance","parameters":[{"name":"branch","in":"path","description":"ID of the branch. Use \"default\" for default branch.","required":true,"type":"string"},{"name":"instanceId","in":"path","description":"ID of the template instance.","required":true,"type":"string"}],"responses":{"202":{"description":"Accepted response.","schema":{"$ref":"#/definitions/Task","required":["id","type","url","status","isFinished","createdAt"]}},"404":{"description":"Not Found response.","schema":{"$ref":"#/definitions/GenericError","required":["statusCode","error","message"]}},"503":{"description":"Service Unavailable response.","schema":{"$ref":"#/definitions/ProjectLockedError","required":["statusCode","error","message"]},"headers":{"Retry-After":{"description":"Indicates how long the user agent should wait before making a follow-up request.","type":"string"}}}},"schemes":["https"],"security":[{"storage-api-token":[]}]}},"/v1/project/{branch}/instances/{instanceId}/upgrade/{version}":{"post":{"tags":["instance"],"summary":"Re-generate the instance in the same or different version","operationId":"UpgradeInstance","parameters":[{"name":"branch","in":"path","description":"ID of the branch. Use \"default\" for default branch.","required":true,"type":"string"},{"name":"instanceId","in":"path","description":"ID of the template instance.","required":true,"type":"string"},{"name":"version","in":"path","description":"Semantic version of the template. Use \"default\" for default version.","required":true,"type":"string"},{"name":"UpgradeInstanceRequestBody","in":"body","required":true,"schema":{"$ref":"#/definitions/TemplatesUpgradeInstanceRequestBody","required":["steps"]}}],"responses":{"202":{"description":"Accepted response.","schema":{"$ref":"#/definitions/Task","required":["id","type","url","status","isFinished","createdAt"]}},"400":{"description":"Bad Request response.","schema":{"$ref":"#/definitions/ValidationError","required":["error","message","ValidationResult"]}},"404":{"description":"Not Found response.","schema":{"$ref":"#/definitions/GenericError","required":["statusCode","error","message"]}},"503":{"description":"Service Unavailable response.","schema":{"$ref":"#/definitions/ProjectLockedError","required":["statusCode","error","message"]},"headers":{"Retry-After":{"description":"Indicates how long the user agent should wait before making a follow-up request.","type":"string"}}}},"schemes":["https"],"security":[{"storage-api-token":[]}]}},"/v1/project/{branch}/instances/{instanceId}/upgrade/{version}/inputs":{"get":{"tags":["instance"],"summary":"Get inputs for upgrade operation","operationId":"UpgradeInstanceInputsIndex","parameters":[{"name":"branch","in":"path","description":"ID of the branch. Use \"default\" for default branch.","required":true,"type":"string"},{"name":"instanceId","in":"path","description":"ID of the template instance.","required":true,"type":"string"},{"name":"version","in":"path","description":"Semantic version of the template. Use \"default\" for default version.","required":true,"type":"string"}],"responses":{"200":{"description":"OK response.","schema":{"$ref":"#/definitions/Inputs","required":["stepGroups","initialState"]}},"404":{"description":"Not Found response.","schema":{"$ref":"#/definitions/GenericError","required":["statusCode","error","message"]}}},"schemes":["https"],"security":[{"storage-api-token":[]}]},"post":{"tags":["instance"],"summary":"Validate inputs for upgrade operation","operationId":"UpgradeInstanceValidateInputs","parameters":[{"name":"branch","in":"path","description":"ID of the branch. Use \"default\" for default branch.","required":true,"type":"string"},{"name":"instanceId","in":"path","description":"ID of the template instance.","required":true,"type":"string"},{"name":"version","in":"path","description":"Semantic version of the template. Use \"default\" for default version.","required":true,"type":"string"},{"name":"UpgradeInstanceValidateInputsRequestBody","in":"body","required":true,"schema":{"$ref":"#/definitions/TemplatesUpgradeInstanceValidateInputsRequestBody","required":["steps"]}}],"responses":{"200":{"description":"OK response.","schema":{"$ref":"#/definitions/ValidationResult","required":["valid","stepGroups"]}},"404":{"description":"Not Found response.","schema":{"$ref":"#/definitions/GenericError","required":["statusCode","error","message"]}}},"schemes":["https"],"security":[{"storage-api-token":[]}]}},"/v1/repositories":{"get":{"tags":["template"],"summary":"List template repositories","description":"List all template repositories defined in the project.","operationId":"RepositoriesIndex","responses":{"200":{"description":"OK response.","schema":{"$ref":"#/definitions/Repositories","required":["repositories"]}}},"schemes":["https"],"security":[{"storage-api-token":[]}]}},"/v1/repositories/{repository}":{"get":{"tags":["template"],"summary":"Get template repository detail","description":"Get details of specified repository. Use \"keboola\" for default Keboola repository.","operationId":"RepositoryIndex","parameters":[{"name":"repository","in":"path","description":"Name of the template repository. Use \"keboola\" for default Keboola repository.","required":true,"type":"string"}],"responses":{"200":{"description":"OK response.","schema":{"$ref":"#/definitions/Repository","required":["name","url","ref","author"]}},"404":{"description":"Not Found response.","schema":{"$ref":"#/definitions/GenericError","required":["statusCode","error","message"]}}},"schemes":["https"],"security":[{"storage-api-token":[]}]}},"/v1/repositories/{repository}/templates":{"get":{"tags":["template"],"summary":"List templates in the repository","description":"List all templates defined in the repository.","operationId":"TemplatesIndex","parameters":[{"name":"repository","in":"path","description":"Name of the template repository. Use \"keboola\" for default Keboola repository.","required":true,"type":"string"}],"responses":{"200":{"description":"OK response.","schema":{"$ref":"#/definitions/Templates","required":["repository","templates"]}},"404":{"description":"Not Found response.","schema":{"$ref":"#/definitions/GenericError","required":["statusCode","error","message"]}}},"schemes":["https"],"security":[{"storage-api-token":[]}]}},"/v1/repositories/{repository}/templates/{template}":{"get":{"tags":["template"],"summary":"Get template detail and versions","description":"Get detail and versions of specified template.","operationId":"TemplateIndex","parameters":[{"name":"repository","in":"path","description":"Name of the template repository. Use \"keboola\" for default Keboola repository.","required":true,"type":"string"},{"name":"template","in":"path","description":"ID of the template.","required":true,"type":"string"}],"responses":{"200":{"description":"OK response.","schema":{"$ref":"#/definitions/TemplateDetail","required":["id","name","deprecated","author","description","defaultVersion","repository","categories","components","versions"]}},"404":{"description":"Not Found response.","schema":{"$ref":"#/definitions/GenericError","required":["statusCode","error","message"]}}},"schemes":["https"],"security":[{"storage-api-token":[]}]}},"/v1/repositories/{repository}/templates/{template}/{version}":{"get":{"tags":["template"],"summary":"Get version detail","description":"Get details of specified template version.","operationId":"VersionIndex","parameters":[{"name":"repository","in":"path","description":"Name of the template repository. Use \"keboola\" for default Keboola repository.","required":true,"type":"string"},{"name":"template","in":"path","description":"ID of the template.","required":true,"type":"string"},{"name":"version","in":"path","description":"Semantic version of the template. Use \"default\" for default version.","required":true,"type":"string"}],"responses":{"200":{"description":"OK response.","schema":{"$ref":"#/definitions/VersionDetailExtended","required":["version","stable","description","components","longDescription","readme","repository","template"]}},"404":{"description":"Not Found response.","schema":{"$ref":"#/definitions/GenericError","required":["statusCode","error","message"]}}},"schemes":["https"],"security":[{"storage-api-token":[]}]}},"/v1/repositories/{repository}/templates/{template}/{version}/inputs":{"get":{"tags":["template"],"summary":"Get inputs","description":"Get inputs for the \"use\" API call.","operationId":"InputsIndex","parameters":[{"name":"repository","in":"path","description":"Name of the template repository. Use \"keboola\" for default Keboola repository.","required":true,"type":"string"},{"name":"template","in":"path","description":"ID of the template.","required":true,"type":"string"},{"name":"version","in":"path","description":"Semantic version of the template. Use \"default\" for default version.","required":true,"type":"string"}],"responses":{"200":{"description":"OK response.","schema":{"$ref":"#/definitions/Inputs","required":["stepGroups","initialState"]}},"404":{"description":"Not Found response.","schema":{"$ref":"#/definitions/GenericError","required":["statusCode","error","message"]}}},"schemes":["https"],"security":[{"storage-api-token":[]}]}},"/v1/repositories/{repository}/templates/{template}/{version}/use":{"post":{"tags":["template"],"summary":"Use template","description":"Validate inputs and use template in the branch.\nOnly configured steps should be send.","operationId":"UseTemplateVersion","parameters":[{"name":"repository","in":"path","description":"Name of the template repository. Use \"keboola\" for default Keboola repository.","required":true,"type":"string"},{"name":"template","in":"path","description":"ID of the template.","required":true,"type":"string"},{"name":"version","in":"path","description":"Semantic version of the template. Use \"default\" for default version.","required":true,"type":"string"},{"name":"UseTemplateVersionRequestBody","in":"body","required":true,"schema":{"$ref":"#/definitions/TemplatesUseTemplateVersionRequestBody","required":["name","branch","steps"]}}],"responses":{"202":{"description":"Accepted response.","schema":{"$ref":"#/definitions/Task","required":["id","type","url","status","isFinished","createdAt"]}},"400":{"description":"Bad Request response.","schema":{"$ref":"#/definitions/ValidationError","required":["error","message","ValidationResult"]}},"404":{"description":"Not Found response.","schema":{"$ref":"#/definitions/GenericError","required":["statusCode","error","message"]}},"503":{"description":"Service Unavailable response.","schema":{"$ref":"#/definitions/ProjectLockedError","required":["statusCode","error","message"]},"headers":{"Retry-After":{"description":"Indicates how long the user agent should wait before making a follow-up request.","type":"string"}}}},"schemes":["https"],"security":[{"storage-api-token":[]}]}},"/v1/repositories/{repository}/templates/{template}/{version}/validate":{"post":{"tags":["template"],"summary":"Validate inputs","description":"Validate inputs for the \"use\" API call.\nOnly configured steps should be send.","operationId":"ValidateInputs","parameters":[{"name":"repository","in":"path","description":"Name of the template repository. Use \"keboola\" for default Keboola repository.","required":true,"type":"string"},{"name":"template","in":"path","description":"ID of the template.","required":true,"type":"string"},{"name":"version","in":"path","description":"Semantic version of the template. Use \"default\" for default version.","required":true,"type":"string"},{"name":"ValidateInputsRequestBody","in":"body","required":true,"schema":{"$ref":"#/definitions/TemplatesValidateInputsRequestBody","required":["steps"]}}],"responses":{"200":{"description":"OK response.","schema":{"$ref":"#/definitions/ValidationResult","required":["valid","stepGroups"]}},"404":{"description":"Not Found response.","schema":{"$ref":"#/definitions/GenericError","required":["statusCode","error","message"]}}},"schemes":["https"],"security":[{"storage-api-token":[]}]}},"/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/Task","required":["id","type","url","status","isFinished","createdAt"]}},"404":{"description":"Not Found response.","schema":{"$ref":"#/definitions/GenericError","required":["statusCode","error","message"]}}},"schemes":["https"],"security":[{"storage-api-token":[]}]}}},"definitions":{"Author":{"title":"Author","type":"object","properties":{"name":{"type":"string","description":"Name of the author.","example":"Keboola","minLength":1},"url":{"type":"string","description":"Link to the author website.","example":"https://www.keboola.com","minLength":1}},"description":"Author of template or repository.","example":{"name":"Keboola","url":"https://www.keboola.com"},"required":["name","url"]},"ChangeInfo":{"title":"ChangeInfo","type":"object","properties":{"date":{"type":"string","description":"Date and time of the change.","example":"2022-04-28T14:20:04+00:00","format":"date-time"},"tokenId":{"type":"string","description":"The token by which the change was made.","example":"245941"}},"description":"Date of change and who made it.","example":{"date":"2022-04-28T14:20:04+00:00","tokenId":"245941"},"required":["date","tokenId"]},"Config":{"title":"Config","type":"object","properties":{"componentId":{"type":"string","description":"Component ID.","example":"keboola.ex-db-mysql"},"configId":{"type":"string","description":"Configuration ID.","example":"7954825835"},"name":{"type":"string","description":"Name of the configuration.","example":"My Extractor"}},"description":"The configuration that is part of the template instance.","example":{"componentId":"keboola.ex-db-mysql","configId":"7954825835","name":"My Extractor"},"required":["componentId","configId","name"]},"GenericError":{"title":"GenericError","type":"object","properties":{"error":{"type":"string","description":"Name of error.","example":"templates.internalError"},"message":{"type":"string","description":"Error message.","example":"Internal Error"},"statusCode":{"type":"integer","description":"HTTP status code.","example":500,"format":"int64"}},"description":"Repository not found error.","example":{"statusCode":404,"error":"templates.repositoryNotFound","message":"Repository \"name\" not found."},"required":["statusCode","error","message"]},"Input":{"title":"Input","type":"object","properties":{"componentId":{"type":"string","description":"Component id for \"oauth\" kind inputs.","example":"keboola.ex-component"},"default":{"description":"Default value, match defined type.","example":"foo bar","oneOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"items":{"type":"string"},"type":"array"},{"type":"object"}]},"description":{"type":"string","description":"Description of the input.","example":"Insert Service API Token.","minLength":1,"maxLength":60},"id":{"type":"string","description":"Unique ID of the input.","example":"api-token","minLength":1},"kind":{"type":"string","description":"Kind of the input.","example":"input","enum":["input","hidden","textarea","confirm","select","multiselect","oauth","oauthAccounts"]},"name":{"type":"string","description":"Name of the input.","example":"API Token","minLength":1,"maxLength":25},"oauthInputId":{"type":"string","description":"OAuth input id for \"oauthAccounts\" kind inputs.","example":"oauthInput"},"options":{"type":"array","items":{"$ref":"#/definitions/InputOption"},"description":"Input options for type = select OR multiselect.","example":[{"label":"Country 1","value":"value1"},{"label":"Country 2","value":"value2"},{"label":"Country 3","value":"value3"}]},"type":{"type":"string","description":"Type of the input.","example":"string","enum":["string","int","double","bool","string[]","object"]}},"description":"User input.","example":{"id":"api-token","name":"API Token","description":"Insert Service API Token.","type":"string","kind":"hidden","default":"","options":null},"required":["id","name","description","type","kind","default"]},"InputOption":{"title":"InputOption","type":"object","properties":{"label":{"type":"string","description":"Visible label of the option.","example":"Label","minLength":1,"maxLength":25},"value":{"type":"string","description":"Value of the option.","example":"value","minLength":0,"maxLength":100}},"description":"Input option for type = select OR multiselect.","example":{"label":"Label","value":"value"},"required":["label","value"]},"InputValidationResult":{"title":"InputValidationResult","type":"object","properties":{"error":{"type":"string","description":"Error message.","example":"API token cannot be empty."},"id":{"type":"string","description":"Input ID.","example":"api-token"},"visible":{"type":"boolean","description":"If false, the input should be hidden to user.","example":true}},"description":"Validation Detail of the input.","example":{"error":"API token cannot be empty.","id":"api-token","visible":true},"required":["id","visible"]},"InputValue":{"title":"InputValue","type":"object","properties":{"id":{"type":"string","description":"Unique ID of the input.","example":"g01-s01","minLength":1},"value":{"description":"Input value filled in by user in the required type.","example":"foo bar"}},"description":"Input value filled in by user.","example":{"id":"user","value":"user@example.com"},"required":["id","value"]},"Inputs":{"title":"Inputs","type":"object","properties":{"initialState":{"$ref":"#/definitions/ValidationResult"},"stepGroups":{"type":"array","items":{"$ref":"#/definitions/StepGroup"},"description":"List of the step groups.","example":[{"id":"g01","description":"Choose one of the eshop platforms.","required":"atLeastOne","step":[{"id":"g01-s01","icon":"common:download","name":"Super Ecommerce","description":"Sell online with the Super E-commerce website.","dialogName":"Super Ecommerce","dialogDescription":"Please configure credentials to your Super Ecommerce account.","inputs":[{"id":"user","name":"User Name","description":"","type":"string","kind":"input","default":"john","options":null},{"id":"api-token","name":"API Token","description":"Insert Service API Token.","type":"string","kind":"hidden","default":"","options":null},{"id":"export-description","name":"Description","description":"Please enter a short description of what this export is for.","type":"string","kind":"textarea","default":"This export exports data to ...","options":null},{"id":"country","name":"Country","description":"Please select one country.","type":"string","kind":"select","default":"value1","options":[{"label":"Country 1","value":"value1"},{"label":"Country 2","value":"value2"},{"label":"Country 3","value":"value3"}]},{"id":"limit","name":"Limit","description":"Enter the maximum number of records.","type":"int","kind":"input","default":1000,"options":null},{"id":"person-height","name":"Person Height","description":"","type":"double","kind":"input","default":178.5,"options":null},{"id":"dummy-data","name":"Generate dummy data","description":"Do you want to generate dummy data?","type":"bool","kind":"confirm","default":true,"options":null},{"id":"countries","name":"Countries","description":"Please select at least one country.","type":"string[]","kind":"multiselect","default":["value1","value3"],"options":[{"label":"Country 1","value":"value1"},{"label":"Country 2","value":"value2"},{"label":"Country 3","value":"value3"}]}]},{"id":"g01-s02","icon":"common:download","name":"Other Ecommerce","description":"Alternative ecommerce solution.","dialogName":"Other Ecommerce","dialogDescription":"Alternative ecommerce solution.","inputs":[{"id":"host","name":"Service Host","description":"Base path of the Service API.","type":"string","kind":"input","default":"example.com","options":null},{"id":"token","name":"Service Token","description":"Service API token.","type":"string","kind":"hidden","default":"","options":null}]}]},{"id":"g02","description":"","required":"all","step":[{"id":"g02-s01","icon":"common:download","name":"Snowflake","description":"Transformation.","dialogName":"Snowflake","dialogDescription":"Step without inputs, locked, for illustration only.","inputs":[]}]},{"id":"g03","description":"Select some destinations if you want.","required":"optional","step":[{"id":"g03-s01","icon":"common:upload","name":"Service 1","description":"Some external service.","dialogName":"Snowflake","dialogDescription":"Some external service.","inputs":[{"id":"host","name":"Service Host","description":"Base path of the Service API.","type":"string","kind":"input","default":"example.com","options":null}]},{"id":"g03-s02","icon":"common:upload","name":"Maximum length step name","description":"Maximum length desc lorem ipsum dolor sit amet consectetur.","dialogName":"Maximum dialog step name","dialogDescription":"Maximum dialog description lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nas.","inputs":[{"id":"host","name":"Input With Max Length Xy","description":"Far far away, behind the word mountains, far from the countr","type":"string","kind":"input","default":"A wonderful serenity has taken possession of my entire soul, like these sweet mornings of spring white...","options":null}]},{"id":"g03-s03","icon":"common:upload","name":"Service 3","description":"Some external service.","dialogName":"Service 3","dialogDescription":"Some external service.","inputs":[]},{"id":"g03-s04","icon":"common:upload","name":"Service 4","description":"Some external service.","dialogName":"Service 4","dialogDescription":"Some external service.","inputs":[{"id":"host","name":"Service Host","description":"Base path of the Service API.","type":"string","kind":"input","default":"example.com","options":null}]},{"id":"g03-s05","icon":"common:upload","name":"Service 5","description":"Some external service.","dialogName":"Service 5 Dialog Name","dialogDescription":"Some external service.","inputs":[{"id":"host","name":"Service Host","description":"Base path of the Service API.","type":"string","kind":"input","default":"example.com","options":null}]}]}],"minItems":1}},"example":{"initialState":{"valid":false,"stepGroups":[{"id":"g01","valid":false,"error":"All steps must be configured.","steps":[{"id":"g01-s01","configured":true,"valid":false,"inputs":[{"id":"api-token","visible":true,"error":"Value cannot be empty."},{"id":"password","visible":false,"error":null}]}]},{"id":"g02","valid":true,"error":null,"steps":[{"id":"g02-s01","configured":false,"valid":true,"inputs":[]},{"id":"g02-s02","configured":true,"valid":true,"inputs":[{"id":"username","visible":true,"error":null}]}]}]},"stepGroups":[{"id":"g01","description":"Choose one of the eshop platforms.","required":"atLeastOne","step":[{"id":"g01-s01","icon":"common:download","name":"Super Ecommerce","description":"Sell online with the Super E-commerce website.","dialogName":"Super Ecommerce","dialogDescription":"Please configure credentials to your Super Ecommerce account.","inputs":[{"id":"user","name":"User Name","description":"","type":"string","kind":"input","default":"john","options":null},{"id":"api-token","name":"API Token","description":"Insert Service API Token.","type":"string","kind":"hidden","default":"","options":null},{"id":"export-description","name":"Description","description":"Please enter a short description of what this export is for.","type":"string","kind":"textarea","default":"This export exports data to ...","options":null},{"id":"country","name":"Country","description":"Please select one country.","type":"string","kind":"select","default":"value1","options":[{"label":"Country 1","value":"value1"},{"label":"Country 2","value":"value2"},{"label":"Country 3","value":"value3"}]},{"id":"limit","name":"Limit","description":"Enter the maximum number of records.","type":"int","kind":"input","default":1000,"options":null},{"id":"person-height","name":"Person Height","description":"","type":"double","kind":"input","default":178.5,"options":null},{"id":"dummy-data","name":"Generate dummy data","description":"Do you want to generate dummy data?","type":"bool","kind":"confirm","default":true,"options":null},{"id":"countries","name":"Countries","description":"Please select at least one country.","type":"string[]","kind":"multiselect","default":["value1","value3"],"options":[{"label":"Country 1","value":"value1"},{"label":"Country 2","value":"value2"},{"label":"Country 3","value":"value3"}]}]},{"id":"g01-s02","icon":"common:download","name":"Other Ecommerce","description":"Alternative ecommerce solution.","dialogName":"Other Ecommerce","dialogDescription":"Alternative ecommerce solution.","inputs":[{"id":"host","name":"Service Host","description":"Base path of the Service API.","type":"string","kind":"input","default":"example.com","options":null},{"id":"token","name":"Service Token","description":"Service API token.","type":"string","kind":"hidden","default":"","options":null}]}]},{"id":"g02","description":"","required":"all","step":[{"id":"g02-s01","icon":"common:download","name":"Snowflake","description":"Transformation.","dialogName":"Snowflake","dialogDescription":"Step without inputs, locked, for illustration only.","inputs":[]}]},{"id":"g03","description":"Select some destinations if you want.","required":"optional","step":[{"id":"g03-s01","icon":"common:upload","name":"Service 1","description":"Some external service.","dialogName":"Snowflake","dialogDescription":"Some external service.","inputs":[{"id":"host","name":"Service Host","description":"Base path of the Service API.","type":"string","kind":"input","default":"example.com","options":null}]},{"id":"g03-s02","icon":"common:upload","name":"Maximum length step name","description":"Maximum length desc lorem ipsum dolor sit amet consectetur.","dialogName":"Maximum dialog step name","dialogDescription":"Maximum dialog description lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nas.","inputs":[{"id":"host","name":"Input With Max Length Xy","description":"Far far away, behind the word mountains, far from the countr","type":"string","kind":"input","default":"A wonderful serenity has taken possession of my entire soul, like these sweet mornings of spring white...","options":null}]},{"id":"g03-s03","icon":"common:upload","name":"Service 3","description":"Some external service.","dialogName":"Service 3","dialogDescription":"Some external service.","inputs":[]},{"id":"g03-s04","icon":"common:upload","name":"Service 4","description":"Some external service.","dialogName":"Service 4","dialogDescription":"Some external service.","inputs":[{"id":"host","name":"Service Host","description":"Base path of the Service API.","type":"string","kind":"input","default":"example.com","options":null}]},{"id":"g03-s05","icon":"common:upload","name":"Service 5","description":"Some external service.","dialogName":"Service 5 Dialog Name","dialogDescription":"Some external service.","inputs":[{"id":"host","name":"Service Host","description":"Base path of the Service API.","type":"string","kind":"input","default":"example.com","options":null}]}]}]},"required":["stepGroups","initialState"]},"Instance":{"title":"Instance","type":"object","properties":{"branch":{"type":"string","description":"ID of the branch.","example":"5876"},"configurations":{"type":"array","items":{"$ref":"#/definitions/Config"},"description":"All configurations from the instance.","example":[{"componentId":"keboola.ex-db-mysql","configId":"7954825835","name":"My Extractor"}]},"created":{"$ref":"#/definitions/ChangeInfo"},"instanceId":{"type":"string","example":"abc123"},"mainConfig":{"$ref":"#/definitions/MainConfig"},"name":{"type":"string","description":"Name of the instance.","example":"My Instance"},"repositoryName":{"type":"string","description":"Name of the template repository.","example":"keboola"},"templateId":{"type":"string","example":"aa","minLength":1,"maxLength":40},"updated":{"$ref":"#/definitions/ChangeInfo"},"version":{"type":"string","description":"Semantic version of the template.","example":"v1.1.0"}},"description":"Template instance.","example":{"branch":"5876","configurations":[{"componentId":"keboola.ex-db-mysql","configId":"7954825835","name":"My Extractor"}],"created":{"date":"2022-04-28T14:20:04+00:00","tokenId":"245941"},"instanceId":"abc123","mainConfig":{"componentId":"keboola.orchestrator","configId":"7954825835"},"name":"My Instance","repositoryName":"keboola","templateId":"aa","updated":{"date":"2022-04-28T14:20:04+00:00","tokenId":"245941"},"version":"v1.1.0"},"required":["instanceId","templateId","version","repositoryName","branch","name","created","updated","configurations"]},"InstanceDetail":{"title":"InstanceDetail","type":"object","properties":{"branch":{"type":"string","description":"ID of the branch.","example":"5876"},"configurations":{"type":"array","items":{"$ref":"#/definitions/Config"},"description":"All configurations from the instance.","example":[{"componentId":"keboola.ex-db-mysql","configId":"7954825835","name":"My Extractor"}]},"created":{"$ref":"#/definitions/ChangeInfo"},"instanceId":{"type":"string","example":"abc123"},"mainConfig":{"$ref":"#/definitions/MainConfig"},"name":{"type":"string","description":"Name of the instance.","example":"My Instance"},"repositoryName":{"type":"string","example":"abc123"},"templateDetail":{"$ref":"#/definitions/TemplateBase"},"templateId":{"type":"string","example":"abc123"},"updated":{"$ref":"#/definitions/ChangeInfo"},"version":{"type":"string","example":"abc123"},"versionDetail":{"$ref":"#/definitions/VersionDetail"}},"example":{"branch":"5876","configurations":[{"componentId":"keboola.ex-db-mysql","configId":"7954825835","name":"My Extractor"}],"created":{"date":"2022-04-28T14:20:04+00:00","tokenId":"245941"},"instanceId":"abc123","mainConfig":{"componentId":"keboola.orchestrator","configId":"7954825835"},"name":"My Instance","repositoryName":"abc123","templateDetail":{"author":{"name":"Keboola","url":"https://www.keboola.com"},"defaultVersion":"v1.2.3","deprecated":false,"description":"Full workflow to load all user accounts from the Service.","id":"aa","name":"My Template"},"templateId":"abc123","updated":{"date":"2022-04-28T14:20:04+00:00","tokenId":"245941"},"version":"abc123","versionDetail":{"version":"v1.2.3","stable":true,"description":"Stable version.","components":["ex-generic-v2","keboola.snowflake-transformation"],"longDescription":"Maximum length template **description** dolor sit amet, consectetuer adipiscing elit","readme":"Lorem markdownum quod discenda [aegide lapidem](http://www.nequeuntoffensa.io/)"}},"required":["instanceId","templateId","version","repositoryName","branch","name","created","updated","templateDetail","versionDetail","configurations"]},"Instances":{"title":"Instances","type":"object","properties":{"instances":{"type":"array","items":{"$ref":"#/definitions/Instance"},"description":"All instances found in branch.","example":[{"branch":"5876","configurations":[{"componentId":"keboola.ex-db-mysql","configId":"7954825835","name":"My Extractor"}],"created":{"date":"2022-04-28T14:20:04+00:00","tokenId":"245941"},"instanceId":"abc123","mainConfig":{"componentId":"keboola.orchestrator","configId":"7954825835"},"name":"My Instance","repositoryName":"keboola","templateId":"aa","updated":{"date":"2022-04-28T14:20:04+00:00","tokenId":"245941"},"version":"v1.1.0"}]}},"example":{"instances":[{"branch":"5876","configurations":[{"componentId":"keboola.ex-db-mysql","configId":"7954825835","name":"My Extractor"}],"created":{"date":"2022-04-28T14:20:04+00:00","tokenId":"245941"},"instanceId":"abc123","mainConfig":{"componentId":"keboola.orchestrator","configId":"7954825835"},"name":"My Instance","repositoryName":"keboola","templateId":"aa","updated":{"date":"2022-04-28T14:20:04+00:00","tokenId":"245941"},"version":"v1.1.0"}]},"required":["instances"]},"MainConfig":{"title":"MainConfig","type":"object","properties":{"componentId":{"type":"string","description":"Component ID.","example":"keboola.orchestrator"},"configId":{"type":"string","description":"Configuration ID.","example":"7954825835"}},"description":"Main config of the instance, usually an orchestration. Optional.","example":{"componentId":"keboola.orchestrator","configId":"7954825835"},"required":["componentId","configId"]},"ProjectLockedError":{"title":"ProjectLockedError","type":"object","properties":{"error":{"type":"string","description":"Name of error.","example":"templates.internalError"},"message":{"type":"string","description":"Error message.","example":"The project is locked, another operation is in progress, please try again later."},"statusCode":{"type":"integer","description":"HTTP status code.","example":503,"format":"int64"}},"description":"Access to branch metadata must be atomic, so only one write operation can run at a time. If this error occurs, the client should make retries, see Retry-After header.","example":{"statusCode":503,"error":"templates.projectLocked","message":"The project is locked, another operation is in progress, please try again later."},"required":["statusCode","error","message"]},"Repositories":{"title":"Repositories","type":"object","properties":{"repositories":{"type":"array","items":{"$ref":"#/definitions/Repository"},"description":"All template repositories defined in the project.","example":[{"name":"keboola","url":"https://github.com/keboola/keboola-as-code-templates","ref":"main","author":{"name":"Keboola","url":"https://www.keboola.com"}}]}},"example":{"repositories":[{"name":"keboola","url":"https://github.com/keboola/keboola-as-code-templates","ref":"main","author":{"name":"Keboola","url":"https://www.keboola.com"}}]},"required":["repositories"]},"Repository":{"title":"Repository","type":"object","properties":{"author":{"$ref":"#/definitions/Author"},"name":{"type":"string","description":"Template repository name. Use \"keboola\" for default Keboola repository.","example":"keboola","minLength":1,"maxLength":40},"ref":{"type":"string","description":"Git branch or tag.","example":"main","minLength":1},"url":{"type":"string","description":"Git URL to the repository.","example":"https://github.com/keboola/keboola-as-code-templates","minLength":1}},"description":"Template repository.","example":{"name":"keboola","url":"https://github.com/keboola/keboola-as-code-templates","ref":"main","author":{"name":"Keboola","url":"https://www.keboola.com"}},"required":["name","url","ref","author"]},"ServiceDetail":{"title":"ServiceDetail","type":"object","properties":{"api":{"type":"string","description":"Name of the API","example":"templates"},"documentation":{"type":"string","description":"URL of the API documentation.","example":"https://templates.keboola.com/v1/documentation"}},"example":{"api":"templates","documentation":"https://templates.keboola.com/v1/documentation"},"required":["api","documentation"]},"Step":{"title":"Step","type":"object","properties":{"description":{"type":"string","description":"Description of the step.","example":"Sell online with the Super E-commerce website.","minLength":1,"maxLength":60},"dialogDescription":{"type":"string","description":"Description of the dialog with inputs.","example":"Please configure the connection to your Super Ecommerce account.","minLength":1,"maxLength":200},"dialogName":{"type":"string","description":"Name of the dialog with inputs.","example":"Super Ecommerce","minLength":1,"maxLength":25},"icon":{"type":"string","description":"Icon for UI. Component icon if it starts with \"component:...\", or a common icon if it starts with \"common:...\".","example":"common:download","minLength":1,"maxLength":40},"id":{"type":"string","description":"Unique ID of the step.","example":"g01-s01","minLength":1},"inputs":{"type":"array","items":{"$ref":"#/definitions/Input"},"description":"Inputs in the step.","example":[{"id":"user","name":"User Name","description":"","type":"string","kind":"input","default":"john","options":null},{"id":"api-token","name":"API Token","description":"Insert Service API Token.","type":"string","kind":"hidden","default":"","options":null},{"id":"export-description","name":"Description","description":"Please enter a short description of what this export is for.","type":"string","kind":"textarea","default":"This export exports data to ...","options":null},{"id":"country","name":"Country","description":"Please select one country.","type":"string","kind":"select","default":"value1","options":[{"label":"Country 1","value":"value1"},{"label":"Country 2","value":"value2"},{"label":"Country 3","value":"value3"}]},{"id":"limit","name":"Limit","description":"Enter the maximum number of records.","type":"int","kind":"input","default":1000,"options":null},{"id":"person-height","name":"Person Height","description":"","type":"double","kind":"input","default":178.5,"options":null},{"id":"dummy-data","name":"Generate dummy data","description":"Do you want to generate dummy data?","type":"bool","kind":"confirm","default":true,"options":null},{"id":"countries","name":"Countries","description":"Please select at least one country.","type":"string[]","kind":"multiselect","default":["value1","value3"],"options":[{"label":"Country 1","value":"value1"},{"label":"Country 2","value":"value2"},{"label":"Country 3","value":"value3"}]}],"minItems":0},"name":{"type":"string","description":"Name of the step.","example":"Super Ecommerce","minLength":1,"maxLength":25}},"description":"Step is a container for inputs.","example":{"description":"Sell online with the Super E-commerce website.","dialogDescription":"Please configure the connection to your Super Ecommerce account.","dialogName":"Super Ecommerce","icon":"common:download","id":"g01-s01","inputs":[{"id":"user","name":"User Name","description":"","type":"string","kind":"input","default":"john","options":null},{"id":"api-token","name":"API Token","description":"Insert Service API Token.","type":"string","kind":"hidden","default":"","options":null},{"id":"export-description","name":"Description","description":"Please enter a short description of what this export is for.","type":"string","kind":"textarea","default":"This export exports data to ...","options":null},{"id":"country","name":"Country","description":"Please select one country.","type":"string","kind":"select","default":"value1","options":[{"label":"Country 1","value":"value1"},{"label":"Country 2","value":"value2"},{"label":"Country 3","value":"value3"}]},{"id":"limit","name":"Limit","description":"Enter the maximum number of records.","type":"int","kind":"input","default":1000,"options":null},{"id":"person-height","name":"Person Height","description":"","type":"double","kind":"input","default":178.5,"options":null},{"id":"dummy-data","name":"Generate dummy data","description":"Do you want to generate dummy data?","type":"bool","kind":"confirm","default":true,"options":null},{"id":"countries","name":"Countries","description":"Please select at least one country.","type":"string[]","kind":"multiselect","default":["value1","value3"],"options":[{"label":"Country 1","value":"value1"},{"label":"Country 2","value":"value2"},{"label":"Country 3","value":"value3"}]}],"name":"Super Ecommerce"},"required":["id","icon","name","description","dialogName","dialogDescription","inputs"]},"StepGroup":{"title":"StepGroup","type":"object","properties":{"description":{"type":"string","description":"Description of the step group, a tooltip explaining what needs to be configured.","example":"Choose one of the eshop platforms.","minLength":1,"maxLength":80},"id":{"type":"string","description":"Unique ID of the step group.","example":"g01"},"required":{"type":"string","description":"The number of steps that must be configured.","example":"atLeastOne","enum":["all","atLeastOne","exactlyOne","zeroOrOne","optional"]},"steps":{"type":"array","items":{"$ref":"#/definitions/Step"},"description":"Steps in the group.","example":[{"id":"g01-s01","icon":"common:download","name":"Super Ecommerce","description":"Sell online with the Super E-commerce website.","dialogName":"Super Ecommerce","dialogDescription":"Please configure credentials to your Super Ecommerce account.","inputs":[{"id":"user","name":"User Name","description":"","type":"string","kind":"input","default":"john","options":null},{"id":"api-token","name":"API Token","description":"Insert Service API Token.","type":"string","kind":"hidden","default":"","options":null},{"id":"export-description","name":"Description","description":"Please enter a short description of what this export is for.","type":"string","kind":"textarea","default":"This export exports data to ...","options":null},{"id":"country","name":"Country","description":"Please select one country.","type":"string","kind":"select","default":"value1","options":[{"label":"Country 1","value":"value1"},{"label":"Country 2","value":"value2"},{"label":"Country 3","value":"value3"}]},{"id":"limit","name":"Limit","description":"Enter the maximum number of records.","type":"int","kind":"input","default":1000,"options":null},{"id":"person-height","name":"Person Height","description":"","type":"double","kind":"input","default":178.5,"options":null},{"id":"dummy-data","name":"Generate dummy data","description":"Do you want to generate dummy data?","type":"bool","kind":"confirm","default":true,"options":null},{"id":"countries","name":"Countries","description":"Please select at least one country.","type":"string[]","kind":"multiselect","default":["value1","value3"],"options":[{"label":"Country 1","value":"value1"},{"label":"Country 2","value":"value2"},{"label":"Country 3","value":"value3"}]}]}],"minItems":1}},"description":"Step group is a container for steps.","example":{"description":"Choose one of the eshop platforms.","id":"g01","required":"atLeastOne","steps":[{"id":"g01-s01","icon":"common:download","name":"Super Ecommerce","description":"Sell online with the Super E-commerce website.","dialogName":"Super Ecommerce","dialogDescription":"Please configure credentials to your Super Ecommerce account.","inputs":[{"id":"user","name":"User Name","description":"","type":"string","kind":"input","default":"john","options":null},{"id":"api-token","name":"API Token","description":"Insert Service API Token.","type":"string","kind":"hidden","default":"","options":null},{"id":"export-description","name":"Description","description":"Please enter a short description of what this export is for.","type":"string","kind":"textarea","default":"This export exports data to ...","options":null},{"id":"country","name":"Country","description":"Please select one country.","type":"string","kind":"select","default":"value1","options":[{"label":"Country 1","value":"value1"},{"label":"Country 2","value":"value2"},{"label":"Country 3","value":"value3"}]},{"id":"limit","name":"Limit","description":"Enter the maximum number of records.","type":"int","kind":"input","default":1000,"options":null},{"id":"person-height","name":"Person Height","description":"","type":"double","kind":"input","default":178.5,"options":null},{"id":"dummy-data","name":"Generate dummy data","description":"Do you want to generate dummy data?","type":"bool","kind":"confirm","default":true,"options":null},{"id":"countries","name":"Countries","description":"Please select at least one country.","type":"string[]","kind":"multiselect","default":["value1","value3"],"options":[{"label":"Country 1","value":"value1"},{"label":"Country 2","value":"value2"},{"label":"Country 3","value":"value3"}]}]}]},"required":["id","description","required","steps"]},"StepGroupValidationResult":{"title":"StepGroupValidationResult","type":"object","properties":{"error":{"type":"string","description":"Are all inputs valid?","example":"All steps must be configured."},"id":{"type":"string","description":"Step group ID.","example":"g01"},"steps":{"type":"array","items":{"$ref":"#/definitions/StepValidationResult"},"description":"List of Details for the steps.","example":[{"configured":false,"id":"g01-s01","inputs":[{"error":"API token cannot be empty.","id":"api-token","visible":true}],"valid":false}]},"valid":{"type":"boolean","description":"True if the required number of steps is configured and all inputs are valid.","example":false}},"description":"Validation Detail of the step group.","example":{"error":"All steps must be configured.","id":"g01","steps":[{"configured":false,"id":"g01-s01","inputs":[{"error":"API token cannot be empty.","id":"api-token","visible":true}],"valid":false}],"valid":false},"required":["id","valid","steps"]},"StepPayload":{"title":"StepPayload","type":"object","properties":{"id":{"type":"string","description":"Unique ID of the step.","example":"g01-s01","minLength":1},"inputs":{"type":"array","items":{"$ref":"#/definitions/InputValue"},"description":"Input values.","example":[{"id":"user","value":"user@example.com"},{"id":"api-token","value":"123456"}]}},"description":"Step with input values filled in by user.","example":{"id":"g01-s01","inputs":[{"id":"user","value":"user@example.com"},{"id":"api-token","value":"123456"}]},"required":["id","inputs"]},"StepValidationResult":{"title":"StepValidationResult","type":"object","properties":{"configured":{"type":"boolean","description":"True if the step was part of the sent payload.","example":false},"id":{"type":"string","description":"Step ID.","example":"g01-s01"},"inputs":{"type":"array","items":{"$ref":"#/definitions/InputValidationResult"},"description":"List of Details for the inputs.","example":[{"error":"API token cannot be empty.","id":"api-token","visible":true}]},"valid":{"type":"boolean","description":"True if all inputs in the step are valid.","example":false}},"description":"Validation Detail of the step.","example":{"configured":false,"id":"g01-s01","inputs":[{"error":"API token cannot be empty.","id":"api-token","visible":true}],"valid":false},"required":["id","configured","valid","inputs"]},"Task":{"title":"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"},"id":{"type":"string","example":"abc123"},"isFinished":{"type":"boolean","description":"Shortcut for status != \"processing\".","example":false},"outputs":{"$ref":"#/definitions/TaskOutputs"},"result":{"type":"string","example":"abc123"},"status":{"type":"string","description":"Task status, one of: processing, success, error","example":"success","enum":["processing","success","error"]},"type":{"type":"string","description":"Task type.","example":"abc123"},"url":{"type":"string","description":"URL of the task.","example":"abc123"}},"example":{"id":"task-1","url":"https://templates.keboola.com/v1/tasks/template.use/2018-01-01T00:00:00.000Z_dIklP","type":"template.use","createdAt":"2018-01-01T00:00:00.000Z","finishedAt":"2018-01-01T00:00:00.000Z","isFinished":true,"duration":123,"result":"task succeeded","outputs":{"instanceId":"V1StGXR8IZ5jdHi6BAmyT"}},"required":["id","type","url","status","isFinished","createdAt"]},"TaskOutputs":{"title":"TaskOutputs","type":"object","properties":{"instanceId":{"type":"string","description":"ID of the created/updated template instance.","example":"abc123"}},"description":"Outputs generated by the task.","example":{"instanceId":"abc123"}},"Template":{"title":"Template","type":"object","properties":{"author":{"$ref":"#/definitions/Author"},"categories":{"type":"array","items":{"type":"string","example":"abc123"},"description":"List of categories the template belongs to.","example":["E-commerce","Other","Social Media"]},"components":{"type":"array","items":{"type":"string","example":"abc123"},"description":"List of components used in the template.","example":["ex-generic-v2","keboola.snowflake-transformation"]},"defaultVersion":{"type":"string","description":"Recommended version of the template.","example":"v1.2.3","minLength":1,"maxLength":20},"deprecated":{"type":"boolean","description":"Deprecated template cannot be used.","example":false},"description":{"type":"string","description":"Short description of the template.","example":"Full workflow to load all user accounts from the Service.","minLength":1,"maxLength":200},"id":{"type":"string","example":"aa","minLength":1,"maxLength":40},"name":{"type":"string","description":"Template name.","example":"My Template","minLength":1,"maxLength":40},"versions":{"type":"array","items":{"$ref":"#/definitions/Version"},"description":"All available versions of the template.","example":[{"version":"v0.1.1","stable":false,"description":"Initial version."},{"version":"v1.1.1","stable":true,"description":""},{"version":"v1.2.3","stable":true,"description":""},{"version":"v2.0.0","stable":false,"description":"Experimental support for new API."}]}},"description":"Template.","example":{"author":{"name":"Keboola","url":"https://www.keboola.com"},"categories":["E-commerce","Other","Social Media"],"components":["ex-generic-v2","keboola.snowflake-transformation"],"defaultVersion":"v1.2.3","deprecated":false,"description":"Full workflow to load all user accounts from the Service.","id":"aa","name":"My Template","versions":[{"version":"v0.1.1","stable":false,"description":"Initial version."},{"version":"v1.1.1","stable":true,"description":""},{"version":"v1.2.3","stable":true,"description":""},{"version":"v2.0.0","stable":false,"description":"Experimental support for new API."}]},"required":["id","name","deprecated","author","description","defaultVersion","categories","components","versions"]},"TemplateBase":{"title":"TemplateBase","type":"object","properties":{"author":{"$ref":"#/definitions/Author"},"defaultVersion":{"type":"string","description":"Recommended version of the template.","example":"v1.2.3","minLength":1,"maxLength":20},"deprecated":{"type":"boolean","description":"Deprecated template cannot be used.","example":false},"description":{"type":"string","description":"Short description of the template.","example":"Full workflow to load all user accounts from the Service.","minLength":1,"maxLength":200},"id":{"type":"string","example":"aa","minLength":1,"maxLength":40},"name":{"type":"string","description":"Template name.","example":"My Template","minLength":1,"maxLength":40}},"description":"Template base information.","example":{"author":{"name":"Keboola","url":"https://www.keboola.com"},"defaultVersion":"v1.2.3","deprecated":false,"description":"Full workflow to load all user accounts from the Service.","id":"aa","name":"My Template"},"required":["id","name","deprecated","author","description","defaultVersion"]},"TemplateDetail":{"title":"TemplateDetail","type":"object","properties":{"author":{"$ref":"#/definitions/Author"},"categories":{"type":"array","items":{"type":"string","example":"abc123"},"description":"List of categories the template belongs to.","example":["E-commerce","Other","Social Media"]},"components":{"type":"array","items":{"type":"string","example":"abc123"},"description":"List of components used in the template.","example":["ex-generic-v2","keboola.snowflake-transformation"]},"defaultVersion":{"type":"string","description":"Recommended version of the template.","example":"v1.2.3","minLength":1,"maxLength":20},"deprecated":{"type":"boolean","description":"Deprecated template cannot be used.","example":false},"description":{"type":"string","description":"Short description of the template.","example":"Full workflow to load all user accounts from the Service.","minLength":1,"maxLength":200},"id":{"type":"string","example":"aa","minLength":1,"maxLength":40},"name":{"type":"string","description":"Template name.","example":"My Template","minLength":1,"maxLength":40},"repository":{"$ref":"#/definitions/Repository"},"versions":{"type":"array","items":{"$ref":"#/definitions/Version"},"description":"All available versions of the template.","example":[{"version":"v0.1.1","stable":false,"description":"Initial version."},{"version":"v1.1.1","stable":true,"description":""},{"version":"v1.2.3","stable":true,"description":""},{"version":"v2.0.0","stable":false,"description":"Experimental support for new API."}]}},"example":{"id":"my-template","name":"My Template","deprecated":false,"categories":["E-commerce","Other","Social Media"],"components":["ex-generic-v2","keboola.snowflake-transformation"],"author":{"name":"Keboola","url":"https://www.keboola.com"},"description":"Full workflow to load all user accounts from the Service.","defaultVersion":"v1.2.3","versions":[{"version":"v0.1.1","stable":false,"description":"Initial version."},{"version":"v1.1.1","stable":true,"description":""},{"version":"v1.2.3","stable":true,"description":""},{"version":"v2.0.0","stable":false,"description":"Experimental support for new API."}],"repository":{"name":"keboola","url":"https://github.com/keboola/keboola-as-code-templates","ref":"main","author":{"name":"Keboola","url":"https://www.keboola.com"}}},"required":["id","name","deprecated","author","description","defaultVersion","repository","categories","components","versions"]},"Templates":{"title":"Templates","type":"object","properties":{"repository":{"$ref":"#/definitions/Repository"},"templates":{"type":"array","items":{"$ref":"#/definitions/Template"},"description":"All template defined in the repository.","example":[{"author":{"name":"Keboola","url":"https://www.keboola.com"},"categories":["E-commerce","Other","Social Media"],"components":["ex-generic-v2","keboola.snowflake-transformation"],"defaultVersion":"v1.2.3","deprecated":false,"description":"Full workflow to load all user accounts from the Service.","id":"aa","name":"My Template","versions":[{"version":"v0.1.1","stable":false,"description":"Initial version."},{"version":"v1.1.1","stable":true,"description":""},{"version":"v1.2.3","stable":true,"description":""},{"version":"v2.0.0","stable":false,"description":"Experimental support for new API."}]}]}},"example":{"repository":{"name":"keboola","url":"https://github.com/keboola/keboola-as-code-templates","ref":"main","author":{"name":"Keboola","url":"https://www.keboola.com"}},"templates":[{"id":"my-template","name":"My Template","deprecated":false,"categories":["E-commerce","Other","Social Media"],"components":["ex-generic-v2","keboola.snowflake-transformation"],"author":{"name":"Keboola","url":"https://www.keboola.com"},"description":"Full workflow to load all user accounts from the Service.","defaultVersion":"v1.2.3","versions":[{"version":"v0.1.1","stable":false,"description":"Initial version."},{"version":"v1.1.1","stable":true,"description":""},{"version":"v1.2.3","stable":true,"description":""},{"version":"v2.0.0","stable":false,"description":"Experimental support for new API."}]},{"id":"maximum-length-template-id-dolor-sit-an","name":"Maximum length template name ipsum dolo","deprecated":false,"categories":["E-commerce","Other","Social Media"],"components":["ex-generic-v2","keboola.snowflake-transformation"],"author":{"name":"Keboola","url":"https://www.keboola.com"},"description":"Maximum length template description dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascet.","defaultVersion":"v4.5.6","versions":[{"version":"v4.5.6","stable":true,"description":"Maximum length version description abc."}]}]},"required":["repository","templates"]},"TemplatesUpdateInstanceRequestBody":{"title":"TemplatesUpdateInstanceRequestBody","type":"object","properties":{"name":{"type":"string","description":"New name of the instance.","example":"My Great Instance"}},"example":{"name":"My Great Instance"},"required":["name"]},"TemplatesUpgradeInstanceRequestBody":{"title":"TemplatesUpgradeInstanceRequestBody","type":"object","properties":{"steps":{"type":"array","items":{"$ref":"#/definitions/StepPayload"},"description":"Steps with input values filled in by user.","example":[{"id":"g01-s01","inputs":[{"id":"user","value":"user@example.com"},{"id":"api-token","value":"123456"}]}]}},"example":{"steps":[{"id":"g01-s01","inputs":[{"id":"user","value":"user@example.com"},{"id":"api-token","value":"123456"}]}]},"required":["steps"]},"TemplatesUpgradeInstanceValidateInputsRequestBody":{"title":"TemplatesUpgradeInstanceValidateInputsRequestBody","type":"object","properties":{"steps":{"type":"array","items":{"$ref":"#/definitions/StepPayload"},"description":"Steps with input values filled in by user.","example":[{"id":"g01-s01","inputs":[{"id":"user","value":"user@example.com"},{"id":"api-token","value":"123456"}]}]}},"example":{"steps":[{"id":"g01-s01","inputs":[{"id":"user","value":"user@example.com"},{"id":"api-token","value":"123456"}]}]},"required":["steps"]},"TemplatesUseTemplateVersionRequestBody":{"title":"TemplatesUseTemplateVersionRequestBody","type":"object","properties":{"branch":{"type":"string","description":"ID of the branch. Use \"default\" for default branch.","example":"default"},"name":{"type":"string","description":"Name of the new template instance.","example":"My Instance"},"steps":{"type":"array","items":{"$ref":"#/definitions/StepPayload"},"description":"Steps with input values filled in by user.","example":[{"id":"g01-s01","inputs":[{"id":"user","value":"user@example.com"},{"id":"api-token","value":"123456"}]}]}},"example":{"branch":"default","name":"My Instance","steps":[{"id":"g01-s01","inputs":[{"id":"user","value":"user@example.com"},{"id":"api-token","value":"123456"}]}]},"required":["name","branch","steps"]},"TemplatesValidateInputsRequestBody":{"title":"TemplatesValidateInputsRequestBody","type":"object","properties":{"steps":{"type":"array","items":{"$ref":"#/definitions/StepPayload"},"description":"Steps with input values filled in by user.","example":[{"id":"g01-s01","inputs":[{"id":"user","value":"user@example.com"},{"id":"api-token","value":"123456"}]}]}},"example":{"steps":[{"id":"g01-s01","inputs":[{"id":"user","value":"user@example.com"},{"id":"api-token","value":"123456"}]}]},"required":["steps"]},"ValidationError":{"title":"ValidationError","type":"object","properties":{"ValidationResult":{"$ref":"#/definitions/ValidationResult"},"error":{"type":"string","description":"Name of error.","example":"InvalidPayload"},"message":{"type":"string","description":"Error message.","example":"Inputs are not valid."}},"description":"Inputs are not valid.","example":{"ValidationResult":{"valid":false,"stepGroups":[{"id":"g01","valid":false,"error":"All steps must be configured.","steps":[{"id":"g01-s01","configured":true,"valid":false,"inputs":[{"id":"api-token","visible":true,"error":"Value cannot be empty."},{"id":"password","visible":false,"error":null}]}]},{"id":"g02","valid":true,"error":null,"steps":[{"id":"g02-s01","configured":false,"valid":true,"inputs":[]},{"id":"g02-s02","configured":true,"valid":true,"inputs":[{"id":"username","visible":true,"error":null}]}]}]},"error":"InvalidPayload","message":"Inputs are not valid."},"required":["error","message","ValidationResult"]},"ValidationResult":{"title":"ValidationResult","type":"object","properties":{"stepGroups":{"type":"array","items":{"$ref":"#/definitions/StepGroupValidationResult"},"description":"List of Details for the step groups.","example":[{"error":"All steps must be configured.","id":"g01","steps":[{"configured":false,"id":"g01-s01","inputs":[{"error":"API token cannot be empty.","id":"api-token","visible":true}],"valid":false}],"valid":false}]},"valid":{"type":"boolean","description":"True if all groups and inputs are valid.","example":false}},"description":"Detail of the inputs validation.","example":{"valid":false,"stepGroups":[{"id":"g01","valid":false,"error":"All steps must be configured.","steps":[{"id":"g01-s01","configured":true,"valid":false,"inputs":[{"id":"api-token","visible":true,"error":"Value cannot be empty."},{"id":"password","visible":false,"error":null}]}]},{"id":"g02","valid":true,"error":null,"steps":[{"id":"g02-s01","configured":false,"valid":true,"inputs":[]},{"id":"g02-s02","configured":true,"valid":true,"inputs":[{"id":"username","visible":true,"error":null}]}]}]},"required":["valid","stepGroups"]},"Version":{"title":"Version","type":"object","properties":{"description":{"type":"string","description":"Optional short description of the version. Can be empty.","example":"Experimental support for new API.","minLength":0,"maxLength":40},"stable":{"type":"boolean","description":"If true, then the version is ready for production use.","example":true},"version":{"type":"string","description":"Semantic version.","example":"v1.2.3","minLength":1,"maxLength":20}},"description":"Template version.","example":{"version":"v1.2.3","stable":true,"description":"Stable version."},"required":["version","stable","description"]},"VersionDetail":{"title":"VersionDetail","type":"object","properties":{"components":{"type":"array","items":{"type":"string","example":"abc123"},"description":"List of components used in the template version.","example":["ex-generic-v2","keboola.snowflake-transformation"]},"description":{"type":"string","description":"Optional short description of the version. Can be empty.","example":"Experimental support for new API.","minLength":0,"maxLength":40},"longDescription":{"type":"string","description":"Extended description of the template in Markdown format.","example":"**Full workflow** to load all user accounts from [the Service](https://service.com). With *extended* explanation ...","minLength":1},"readme":{"type":"string","description":"Readme of the template version in Markdown format.","example":"Lorem markdownum quod discenda [aegide lapidem](http://www.nequeuntoffensa.io/)","minLength":1},"stable":{"type":"boolean","description":"If true, then the version is ready for production use.","example":true},"version":{"type":"string","description":"Semantic version.","example":"v1.2.3","minLength":1,"maxLength":20}},"example":{"version":"v1.2.3","stable":true,"description":"Stable version.","components":["ex-generic-v2","keboola.snowflake-transformation"],"longDescription":"Maximum length template **description** dolor sit amet, consectetuer adipiscing elit","readme":"Lorem markdownum quod discenda [aegide lapidem](http://www.nequeuntoffensa.io/)"},"required":["version","stable","description","components","longDescription","readme"]},"VersionDetailExtended":{"title":"VersionDetailExtended","type":"object","properties":{"components":{"type":"array","items":{"type":"string","example":"abc123"},"description":"List of components used in the template version.","example":["ex-generic-v2","keboola.snowflake-transformation"]},"description":{"type":"string","description":"Optional short description of the version. Can be empty.","example":"Experimental support for new API.","minLength":0,"maxLength":40},"longDescription":{"type":"string","description":"Extended description of the template in Markdown format.","example":"**Full workflow** to load all user accounts from [the Service](https://service.com). With *extended* explanation ...","minLength":1},"readme":{"type":"string","description":"Readme of the template version in Markdown format.","example":"Lorem markdownum quod discenda [aegide lapidem](http://www.nequeuntoffensa.io/)","minLength":1},"repository":{"$ref":"#/definitions/Repository"},"stable":{"type":"boolean","description":"If true, then the version is ready for production use.","example":true},"template":{"$ref":"#/definitions/Template"},"version":{"type":"string","description":"Semantic version.","example":"v1.2.3","minLength":1,"maxLength":20}},"example":{"version":"v1.2.3","stable":true,"description":"Stable version.","components":["ex-generic-v2","keboola.snowflake-transformation"],"longDescription":"Maximum length template **description** dolor sit amet, consectetuer adipiscing elit","readme":"Lorem markdownum quod discenda [aegide lapidem](http://www.nequeuntoffensa.io/)","repository":{"name":"keboola","url":"https://github.com/keboola/keboola-as-code-templates","ref":"main","author":{"name":"Keboola","url":"https://www.keboola.com"}},"template":{"id":"my-template","name":"My Template","deprecated":false,"author":{"name":"Keboola","url":"https://www.keboola.com"},"description":"Full workflow to load all user accounts from the Service.","defaultVersion":"v1.2.3"}},"required":["version","stable","description","components","longDescription","readme","repository","template"]}},"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":"Templates Service","description":"A service for applying templates to Keboola projects.","version":"1.0"},"host":"templates.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/ServiceDetail","required":["api","documentation"]}}},"schemes":["https"]}},"/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/project/{branch}/instances":{"get":{"tags":["instance"],"summary":"List instances","operationId":"InstancesIndex","parameters":[{"name":"branch","in":"path","description":"ID of the branch. Use \"default\" for default branch.","required":true,"type":"string"}],"responses":{"200":{"description":"OK response.","schema":{"$ref":"#/definitions/Instances","required":["instances"]}},"404":{"description":"Not Found response.","schema":{"$ref":"#/definitions/GenericError","required":["statusCode","error","message"]}}},"schemes":["https"],"security":[{"storage-api-token":[]}]}},"/v1/project/{branch}/instances/{instanceId}":{"get":{"tags":["instance"],"summary":"Get instance detail","operationId":"InstanceIndex","parameters":[{"name":"branch","in":"path","description":"ID of the branch. Use \"default\" for default branch.","required":true,"type":"string"},{"name":"instanceId","in":"path","description":"ID of the template instance.","required":true,"type":"string"}],"responses":{"200":{"description":"OK response.","schema":{"$ref":"#/definitions/InstanceDetail","required":["instanceId","templateId","version","repositoryName","branch","name","created","updated","templateDetail","versionDetail","configurations"]}},"404":{"description":"Not Found response.","schema":{"$ref":"#/definitions/GenericError","required":["statusCode","error","message"]}}},"schemes":["https"],"security":[{"storage-api-token":[]}]},"put":{"tags":["instance"],"summary":"Update instance name","operationId":"UpdateInstance","parameters":[{"name":"branch","in":"path","description":"ID of the branch. Use \"default\" for default branch.","required":true,"type":"string"},{"name":"instanceId","in":"path","description":"ID of the template instance.","required":true,"type":"string"},{"name":"UpdateInstanceRequestBody","in":"body","required":true,"schema":{"$ref":"#/definitions/TemplatesUpdateInstanceRequestBody","required":["name"]}}],"responses":{"200":{"description":"OK response.","schema":{"$ref":"#/definitions/InstanceDetail","required":["instanceId","templateId","version","repositoryName","branch","name","created","updated","templateDetail","versionDetail","configurations"]}},"404":{"description":"Not Found response.","schema":{"$ref":"#/definitions/GenericError","required":["statusCode","error","message"]}},"503":{"description":"Service Unavailable response.","schema":{"$ref":"#/definitions/ProjectLockedError","required":["statusCode","error","message"]},"headers":{"Retry-After":{"description":"Indicates how long the user agent should wait before making a follow-up request.","type":"string"}}}},"schemes":["https"],"security":[{"storage-api-token":[]}]},"delete":{"tags":["instance"],"summary":"Delete instance","operationId":"DeleteInstance","parameters":[{"name":"branch","in":"path","description":"ID of the branch. Use \"default\" for default branch.","required":true,"type":"string"},{"name":"instanceId","in":"path","description":"ID of the template instance.","required":true,"type":"string"}],"responses":{"202":{"description":"Accepted response.","schema":{"$ref":"#/definitions/Task","required":["id","type","url","status","isFinished","createdAt"]}},"404":{"description":"Not Found response.","schema":{"$ref":"#/definitions/GenericError","required":["statusCode","error","message"]}},"503":{"description":"Service Unavailable response.","schema":{"$ref":"#/definitions/ProjectLockedError","required":["statusCode","error","message"]},"headers":{"Retry-After":{"description":"Indicates how long the user agent should wait before making a follow-up request.","type":"string"}}}},"schemes":["https"],"security":[{"storage-api-token":[]}]}},"/v1/project/{branch}/instances/{instanceId}/upgrade/{version}":{"post":{"tags":["instance"],"summary":"Re-generate the instance in the same or different version","operationId":"UpgradeInstance","parameters":[{"name":"branch","in":"path","description":"ID of the branch. Use \"default\" for default branch.","required":true,"type":"string"},{"name":"instanceId","in":"path","description":"ID of the template instance.","required":true,"type":"string"},{"name":"version","in":"path","description":"Semantic version of the template. Use \"default\" for default version.","required":true,"type":"string"},{"name":"UpgradeInstanceRequestBody","in":"body","required":true,"schema":{"$ref":"#/definitions/TemplatesUpgradeInstanceRequestBody","required":["steps"]}}],"responses":{"202":{"description":"Accepted response.","schema":{"$ref":"#/definitions/Task","required":["id","type","url","status","isFinished","createdAt"]}},"400":{"description":"Bad Request response.","schema":{"$ref":"#/definitions/ValidationError","required":["error","message","ValidationResult"]}},"404":{"description":"Not Found response.","schema":{"$ref":"#/definitions/GenericError","required":["statusCode","error","message"]}},"503":{"description":"Service Unavailable response.","schema":{"$ref":"#/definitions/ProjectLockedError","required":["statusCode","error","message"]},"headers":{"Retry-After":{"description":"Indicates how long the user agent should wait before making a follow-up request.","type":"string"}}}},"schemes":["https"],"security":[{"storage-api-token":[]}]}},"/v1/project/{branch}/instances/{instanceId}/upgrade/{version}/inputs":{"get":{"tags":["instance"],"summary":"Get inputs for upgrade operation","operationId":"UpgradeInstanceInputsIndex","parameters":[{"name":"branch","in":"path","description":"ID of the branch. Use \"default\" for default branch.","required":true,"type":"string"},{"name":"instanceId","in":"path","description":"ID of the template instance.","required":true,"type":"string"},{"name":"version","in":"path","description":"Semantic version of the template. Use \"default\" for default version.","required":true,"type":"string"}],"responses":{"200":{"description":"OK response.","schema":{"$ref":"#/definitions/Inputs","required":["stepGroups","initialState"]}},"404":{"description":"Not Found response.","schema":{"$ref":"#/definitions/GenericError","required":["statusCode","error","message"]}}},"schemes":["https"],"security":[{"storage-api-token":[]}]},"post":{"tags":["instance"],"summary":"Validate inputs for upgrade operation","operationId":"UpgradeInstanceValidateInputs","parameters":[{"name":"branch","in":"path","description":"ID of the branch. Use \"default\" for default branch.","required":true,"type":"string"},{"name":"instanceId","in":"path","description":"ID of the template instance.","required":true,"type":"string"},{"name":"version","in":"path","description":"Semantic version of the template. Use \"default\" for default version.","required":true,"type":"string"},{"name":"UpgradeInstanceValidateInputsRequestBody","in":"body","required":true,"schema":{"$ref":"#/definitions/TemplatesUpgradeInstanceValidateInputsRequestBody","required":["steps"]}}],"responses":{"200":{"description":"OK response.","schema":{"$ref":"#/definitions/ValidationResult","required":["valid","stepGroups"]}},"404":{"description":"Not Found response.","schema":{"$ref":"#/definitions/GenericError","required":["statusCode","error","message"]}}},"schemes":["https"],"security":[{"storage-api-token":[]}]}},"/v1/repositories":{"get":{"tags":["template"],"summary":"List template repositories","description":"List all template repositories defined in the project.","operationId":"RepositoriesIndex","responses":{"200":{"description":"OK response.","schema":{"$ref":"#/definitions/Repositories","required":["repositories"]}}},"schemes":["https"],"security":[{"storage-api-token":[]}]}},"/v1/repositories/{repository}":{"get":{"tags":["template"],"summary":"Get template repository detail","description":"Get details of specified repository. Use \"keboola\" for default Keboola repository.","operationId":"RepositoryIndex","parameters":[{"name":"repository","in":"path","description":"Name of the template repository. Use \"keboola\" for default Keboola repository.","required":true,"type":"string"}],"responses":{"200":{"description":"OK response.","schema":{"$ref":"#/definitions/Repository","required":["name","url","ref","author"]}},"404":{"description":"Not Found response.","schema":{"$ref":"#/definitions/GenericError","required":["statusCode","error","message"]}}},"schemes":["https"],"security":[{"storage-api-token":[]}]}},"/v1/repositories/{repository}/templates":{"get":{"tags":["template"],"summary":"List templates in the repository","description":"List all templates defined in the repository.","operationId":"TemplatesIndex","parameters":[{"name":"filter","in":"query","description":"The 'filter' attribute specifies the category of templates to retrieve from the repository.","required":false,"type":"string","enum":["keboola.components","keboola.data-apps"]},{"name":"repository","in":"path","description":"Name of the template repository. Use \"keboola\" for default Keboola repository.","required":true,"type":"string"}],"responses":{"200":{"description":"OK response.","schema":{"$ref":"#/definitions/Templates","required":["repository","templates"]}},"404":{"description":"Not Found response.","schema":{"$ref":"#/definitions/GenericError","required":["statusCode","error","message"]}}},"schemes":["https"],"security":[{"storage-api-token":[]}]}},"/v1/repositories/{repository}/templates/{template}":{"get":{"tags":["template"],"summary":"Get template detail and versions","description":"Get detail and versions of specified template.","operationId":"TemplateIndex","parameters":[{"name":"repository","in":"path","description":"Name of the template repository. Use \"keboola\" for default Keboola repository.","required":true,"type":"string"},{"name":"template","in":"path","description":"ID of the template.","required":true,"type":"string"}],"responses":{"200":{"description":"OK response.","schema":{"$ref":"#/definitions/TemplateDetail","required":["id","name","deprecated","author","description","defaultVersion","repository","categories","components","versions"]}},"404":{"description":"Not Found response.","schema":{"$ref":"#/definitions/GenericError","required":["statusCode","error","message"]}}},"schemes":["https"],"security":[{"storage-api-token":[]}]}},"/v1/repositories/{repository}/templates/{template}/{version}":{"get":{"tags":["template"],"summary":"Get version detail","description":"Get details of specified template version.","operationId":"VersionIndex","parameters":[{"name":"repository","in":"path","description":"Name of the template repository. Use \"keboola\" for default Keboola repository.","required":true,"type":"string"},{"name":"template","in":"path","description":"ID of the template.","required":true,"type":"string"},{"name":"version","in":"path","description":"Semantic version of the template. Use \"default\" for default version.","required":true,"type":"string"}],"responses":{"200":{"description":"OK response.","schema":{"$ref":"#/definitions/VersionDetailExtended","required":["version","stable","description","components","longDescription","readme","repository","template"]}},"404":{"description":"Not Found response.","schema":{"$ref":"#/definitions/GenericError","required":["statusCode","error","message"]}}},"schemes":["https"],"security":[{"storage-api-token":[]}]}},"/v1/repositories/{repository}/templates/{template}/{version}/inputs":{"get":{"tags":["template"],"summary":"Get inputs","description":"Get inputs for the \"use\" API call.","operationId":"InputsIndex","parameters":[{"name":"repository","in":"path","description":"Name of the template repository. Use \"keboola\" for default Keboola repository.","required":true,"type":"string"},{"name":"template","in":"path","description":"ID of the template.","required":true,"type":"string"},{"name":"version","in":"path","description":"Semantic version of the template. Use \"default\" for default version.","required":true,"type":"string"}],"responses":{"200":{"description":"OK response.","schema":{"$ref":"#/definitions/Inputs","required":["stepGroups","initialState"]}},"404":{"description":"Not Found response.","schema":{"$ref":"#/definitions/GenericError","required":["statusCode","error","message"]}}},"schemes":["https"],"security":[{"storage-api-token":[]}]}},"/v1/repositories/{repository}/templates/{template}/{version}/use":{"post":{"tags":["template"],"summary":"Use template","description":"Validate inputs and use template in the branch.\nOnly configured steps should be send.","operationId":"UseTemplateVersion","parameters":[{"name":"repository","in":"path","description":"Name of the template repository. Use \"keboola\" for default Keboola repository.","required":true,"type":"string"},{"name":"template","in":"path","description":"ID of the template.","required":true,"type":"string"},{"name":"version","in":"path","description":"Semantic version of the template. Use \"default\" for default version.","required":true,"type":"string"},{"name":"UseTemplateVersionRequestBody","in":"body","required":true,"schema":{"$ref":"#/definitions/TemplatesUseTemplateVersionRequestBody","required":["name","branch","steps"]}}],"responses":{"202":{"description":"Accepted response.","schema":{"$ref":"#/definitions/Task","required":["id","type","url","status","isFinished","createdAt"]}},"400":{"description":"Bad Request response.","schema":{"$ref":"#/definitions/ValidationError","required":["error","message","ValidationResult"]}},"404":{"description":"Not Found response.","schema":{"$ref":"#/definitions/GenericError","required":["statusCode","error","message"]}},"503":{"description":"Service Unavailable response.","schema":{"$ref":"#/definitions/ProjectLockedError","required":["statusCode","error","message"]},"headers":{"Retry-After":{"description":"Indicates how long the user agent should wait before making a follow-up request.","type":"string"}}}},"schemes":["https"],"security":[{"storage-api-token":[]}]}},"/v1/repositories/{repository}/templates/{template}/{version}/validate":{"post":{"tags":["template"],"summary":"Validate inputs","description":"Validate inputs for the \"use\" API call.\nOnly configured steps should be send.","operationId":"ValidateInputs","parameters":[{"name":"repository","in":"path","description":"Name of the template repository. Use \"keboola\" for default Keboola repository.","required":true,"type":"string"},{"name":"template","in":"path","description":"ID of the template.","required":true,"type":"string"},{"name":"version","in":"path","description":"Semantic version of the template. Use \"default\" for default version.","required":true,"type":"string"},{"name":"ValidateInputsRequestBody","in":"body","required":true,"schema":{"$ref":"#/definitions/TemplatesValidateInputsRequestBody","required":["steps"]}}],"responses":{"200":{"description":"OK response.","schema":{"$ref":"#/definitions/ValidationResult","required":["valid","stepGroups"]}},"404":{"description":"Not Found response.","schema":{"$ref":"#/definitions/GenericError","required":["statusCode","error","message"]}}},"schemes":["https"],"security":[{"storage-api-token":[]}]}},"/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/Task","required":["id","type","url","status","isFinished","createdAt"]}},"404":{"description":"Not Found response.","schema":{"$ref":"#/definitions/GenericError","required":["statusCode","error","message"]}}},"schemes":["https"],"security":[{"storage-api-token":[]}]}}},"definitions":{"Author":{"title":"Author","type":"object","properties":{"name":{"type":"string","description":"Name of the author.","example":"Keboola","minLength":1},"url":{"type":"string","description":"Link to the author website.","example":"https://www.keboola.com","minLength":1}},"description":"Author of template or repository.","example":{"name":"Keboola","url":"https://www.keboola.com"},"required":["name","url"]},"ChangeInfo":{"title":"ChangeInfo","type":"object","properties":{"date":{"type":"string","description":"Date and time of the change.","example":"2022-04-28T14:20:04+00:00","format":"date-time"},"tokenId":{"type":"string","description":"The token by which the change was made.","example":"245941"}},"description":"Date of change and who made it.","example":{"date":"2022-04-28T14:20:04+00:00","tokenId":"245941"},"required":["date","tokenId"]},"Config":{"title":"Config","type":"object","properties":{"componentId":{"type":"string","description":"Component ID.","example":"keboola.ex-db-mysql"},"configId":{"type":"string","description":"Configuration ID.","example":"7954825835"},"name":{"type":"string","description":"Name of the configuration.","example":"My Extractor"}},"description":"The configuration that is part of the template instance.","example":{"componentId":"keboola.ex-db-mysql","configId":"7954825835","name":"My Extractor"},"required":["componentId","configId","name"]},"GenericError":{"title":"GenericError","type":"object","properties":{"error":{"type":"string","description":"Name of error.","example":"templates.internalError"},"message":{"type":"string","description":"Error message.","example":"Internal Error"},"statusCode":{"type":"integer","description":"HTTP status code.","example":500,"format":"int64"}},"description":"Repository not found error.","example":{"statusCode":404,"error":"templates.repositoryNotFound","message":"Repository \"name\" not found."},"required":["statusCode","error","message"]},"Input":{"title":"Input","type":"object","properties":{"componentId":{"type":"string","description":"Component id for \"oauth\" kind inputs.","example":"keboola.ex-component"},"default":{"description":"Default value, match defined type.","example":"foo bar","oneOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"items":{"type":"string"},"type":"array"},{"type":"object"}]},"description":{"type":"string","description":"Description of the input.","example":"Insert Service API Token.","minLength":1,"maxLength":60},"id":{"type":"string","description":"Unique ID of the input.","example":"api-token","minLength":1},"kind":{"type":"string","description":"Kind of the input.","example":"input","enum":["input","hidden","textarea","confirm","select","multiselect","oauth","oauthAccounts"]},"name":{"type":"string","description":"Name of the input.","example":"API Token","minLength":1,"maxLength":25},"oauthInputId":{"type":"string","description":"OAuth input id for \"oauthAccounts\" kind inputs.","example":"oauthInput"},"options":{"type":"array","items":{"$ref":"#/definitions/InputOption"},"description":"Input options for type = select OR multiselect.","example":[{"label":"Country 1","value":"value1"},{"label":"Country 2","value":"value2"},{"label":"Country 3","value":"value3"}]},"type":{"type":"string","description":"Type of the input.","example":"string","enum":["string","int","double","bool","string[]","object"]}},"description":"User input.","example":{"id":"api-token","name":"API Token","description":"Insert Service API Token.","type":"string","kind":"hidden","default":"","options":null},"required":["id","name","description","type","kind","default"]},"InputOption":{"title":"InputOption","type":"object","properties":{"label":{"type":"string","description":"Visible label of the option.","example":"Label","minLength":1,"maxLength":25},"value":{"type":"string","description":"Value of the option.","example":"value","minLength":0,"maxLength":100}},"description":"Input option for type = select OR multiselect.","example":{"label":"Label","value":"value"},"required":["label","value"]},"InputValidationResult":{"title":"InputValidationResult","type":"object","properties":{"error":{"type":"string","description":"Error message.","example":"API token cannot be empty."},"id":{"type":"string","description":"Input ID.","example":"api-token"},"visible":{"type":"boolean","description":"If false, the input should be hidden to user.","example":true}},"description":"Validation Detail of the input.","example":{"error":"API token cannot be empty.","id":"api-token","visible":true},"required":["id","visible"]},"InputValue":{"title":"InputValue","type":"object","properties":{"id":{"type":"string","description":"Unique ID of the input.","example":"g01-s01","minLength":1},"value":{"description":"Input value filled in by user in the required type.","example":"foo bar"}},"description":"Input value filled in by user.","example":{"id":"user","value":"user@example.com"},"required":["id","value"]},"Inputs":{"title":"Inputs","type":"object","properties":{"initialState":{"$ref":"#/definitions/ValidationResult"},"stepGroups":{"type":"array","items":{"$ref":"#/definitions/StepGroup"},"description":"List of the step groups.","example":[{"id":"g01","description":"Choose one of the eshop platforms.","required":"atLeastOne","step":[{"id":"g01-s01","icon":"common:download","name":"Super Ecommerce","description":"Sell online with the Super E-commerce website.","dialogName":"Super Ecommerce","dialogDescription":"Please configure credentials to your Super Ecommerce account.","inputs":[{"id":"user","name":"User Name","description":"","type":"string","kind":"input","default":"john","options":null},{"id":"api-token","name":"API Token","description":"Insert Service API Token.","type":"string","kind":"hidden","default":"","options":null},{"id":"export-description","name":"Description","description":"Please enter a short description of what this export is for.","type":"string","kind":"textarea","default":"This export exports data to ...","options":null},{"id":"country","name":"Country","description":"Please select one country.","type":"string","kind":"select","default":"value1","options":[{"label":"Country 1","value":"value1"},{"label":"Country 2","value":"value2"},{"label":"Country 3","value":"value3"}]},{"id":"limit","name":"Limit","description":"Enter the maximum number of records.","type":"int","kind":"input","default":1000,"options":null},{"id":"person-height","name":"Person Height","description":"","type":"double","kind":"input","default":178.5,"options":null},{"id":"dummy-data","name":"Generate dummy data","description":"Do you want to generate dummy data?","type":"bool","kind":"confirm","default":true,"options":null},{"id":"countries","name":"Countries","description":"Please select at least one country.","type":"string[]","kind":"multiselect","default":["value1","value3"],"options":[{"label":"Country 1","value":"value1"},{"label":"Country 2","value":"value2"},{"label":"Country 3","value":"value3"}]}]},{"id":"g01-s02","icon":"common:download","name":"Other Ecommerce","description":"Alternative ecommerce solution.","dialogName":"Other Ecommerce","dialogDescription":"Alternative ecommerce solution.","inputs":[{"id":"host","name":"Service Host","description":"Base path of the Service API.","type":"string","kind":"input","default":"example.com","options":null},{"id":"token","name":"Service Token","description":"Service API token.","type":"string","kind":"hidden","default":"","options":null}]}]},{"id":"g02","description":"","required":"all","step":[{"id":"g02-s01","icon":"common:download","name":"Snowflake","description":"Transformation.","dialogName":"Snowflake","dialogDescription":"Step without inputs, locked, for illustration only.","inputs":[]}]},{"id":"g03","description":"Select some destinations if you want.","required":"optional","step":[{"id":"g03-s01","icon":"common:upload","name":"Service 1","description":"Some external service.","dialogName":"Snowflake","dialogDescription":"Some external service.","inputs":[{"id":"host","name":"Service Host","description":"Base path of the Service API.","type":"string","kind":"input","default":"example.com","options":null}]},{"id":"g03-s02","icon":"common:upload","name":"Maximum length step name","description":"Maximum length desc lorem ipsum dolor sit amet consectetur.","dialogName":"Maximum dialog step name","dialogDescription":"Maximum dialog description lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nas.","inputs":[{"id":"host","name":"Input With Max Length Xy","description":"Far far away, behind the word mountains, far from the countr","type":"string","kind":"input","default":"A wonderful serenity has taken possession of my entire soul, like these sweet mornings of spring white...","options":null}]},{"id":"g03-s03","icon":"common:upload","name":"Service 3","description":"Some external service.","dialogName":"Service 3","dialogDescription":"Some external service.","inputs":[]},{"id":"g03-s04","icon":"common:upload","name":"Service 4","description":"Some external service.","dialogName":"Service 4","dialogDescription":"Some external service.","inputs":[{"id":"host","name":"Service Host","description":"Base path of the Service API.","type":"string","kind":"input","default":"example.com","options":null}]},{"id":"g03-s05","icon":"common:upload","name":"Service 5","description":"Some external service.","dialogName":"Service 5 Dialog Name","dialogDescription":"Some external service.","inputs":[{"id":"host","name":"Service Host","description":"Base path of the Service API.","type":"string","kind":"input","default":"example.com","options":null}]}]}],"minItems":1}},"example":{"initialState":{"valid":false,"stepGroups":[{"id":"g01","valid":false,"error":"All steps must be configured.","steps":[{"id":"g01-s01","configured":true,"valid":false,"inputs":[{"id":"api-token","visible":true,"error":"Value cannot be empty."},{"id":"password","visible":false,"error":null}]}]},{"id":"g02","valid":true,"error":null,"steps":[{"id":"g02-s01","configured":false,"valid":true,"inputs":[]},{"id":"g02-s02","configured":true,"valid":true,"inputs":[{"id":"username","visible":true,"error":null}]}]}]},"stepGroups":[{"id":"g01","description":"Choose one of the eshop platforms.","required":"atLeastOne","step":[{"id":"g01-s01","icon":"common:download","name":"Super Ecommerce","description":"Sell online with the Super E-commerce website.","dialogName":"Super Ecommerce","dialogDescription":"Please configure credentials to your Super Ecommerce account.","inputs":[{"id":"user","name":"User Name","description":"","type":"string","kind":"input","default":"john","options":null},{"id":"api-token","name":"API Token","description":"Insert Service API Token.","type":"string","kind":"hidden","default":"","options":null},{"id":"export-description","name":"Description","description":"Please enter a short description of what this export is for.","type":"string","kind":"textarea","default":"This export exports data to ...","options":null},{"id":"country","name":"Country","description":"Please select one country.","type":"string","kind":"select","default":"value1","options":[{"label":"Country 1","value":"value1"},{"label":"Country 2","value":"value2"},{"label":"Country 3","value":"value3"}]},{"id":"limit","name":"Limit","description":"Enter the maximum number of records.","type":"int","kind":"input","default":1000,"options":null},{"id":"person-height","name":"Person Height","description":"","type":"double","kind":"input","default":178.5,"options":null},{"id":"dummy-data","name":"Generate dummy data","description":"Do you want to generate dummy data?","type":"bool","kind":"confirm","default":true,"options":null},{"id":"countries","name":"Countries","description":"Please select at least one country.","type":"string[]","kind":"multiselect","default":["value1","value3"],"options":[{"label":"Country 1","value":"value1"},{"label":"Country 2","value":"value2"},{"label":"Country 3","value":"value3"}]}]},{"id":"g01-s02","icon":"common:download","name":"Other Ecommerce","description":"Alternative ecommerce solution.","dialogName":"Other Ecommerce","dialogDescription":"Alternative ecommerce solution.","inputs":[{"id":"host","name":"Service Host","description":"Base path of the Service API.","type":"string","kind":"input","default":"example.com","options":null},{"id":"token","name":"Service Token","description":"Service API token.","type":"string","kind":"hidden","default":"","options":null}]}]},{"id":"g02","description":"","required":"all","step":[{"id":"g02-s01","icon":"common:download","name":"Snowflake","description":"Transformation.","dialogName":"Snowflake","dialogDescription":"Step without inputs, locked, for illustration only.","inputs":[]}]},{"id":"g03","description":"Select some destinations if you want.","required":"optional","step":[{"id":"g03-s01","icon":"common:upload","name":"Service 1","description":"Some external service.","dialogName":"Snowflake","dialogDescription":"Some external service.","inputs":[{"id":"host","name":"Service Host","description":"Base path of the Service API.","type":"string","kind":"input","default":"example.com","options":null}]},{"id":"g03-s02","icon":"common:upload","name":"Maximum length step name","description":"Maximum length desc lorem ipsum dolor sit amet consectetur.","dialogName":"Maximum dialog step name","dialogDescription":"Maximum dialog description lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nas.","inputs":[{"id":"host","name":"Input With Max Length Xy","description":"Far far away, behind the word mountains, far from the countr","type":"string","kind":"input","default":"A wonderful serenity has taken possession of my entire soul, like these sweet mornings of spring white...","options":null}]},{"id":"g03-s03","icon":"common:upload","name":"Service 3","description":"Some external service.","dialogName":"Service 3","dialogDescription":"Some external service.","inputs":[]},{"id":"g03-s04","icon":"common:upload","name":"Service 4","description":"Some external service.","dialogName":"Service 4","dialogDescription":"Some external service.","inputs":[{"id":"host","name":"Service Host","description":"Base path of the Service API.","type":"string","kind":"input","default":"example.com","options":null}]},{"id":"g03-s05","icon":"common:upload","name":"Service 5","description":"Some external service.","dialogName":"Service 5 Dialog Name","dialogDescription":"Some external service.","inputs":[{"id":"host","name":"Service Host","description":"Base path of the Service API.","type":"string","kind":"input","default":"example.com","options":null}]}]}]},"required":["stepGroups","initialState"]},"Instance":{"title":"Instance","type":"object","properties":{"branch":{"type":"string","description":"ID of the branch.","example":"5876"},"configurations":{"type":"array","items":{"$ref":"#/definitions/Config"},"description":"All configurations from the instance.","example":[{"componentId":"keboola.ex-db-mysql","configId":"7954825835","name":"My Extractor"}]},"created":{"$ref":"#/definitions/ChangeInfo"},"instanceId":{"type":"string","example":"abc123"},"mainConfig":{"$ref":"#/definitions/MainConfig"},"name":{"type":"string","description":"Name of the instance.","example":"My Instance"},"repositoryName":{"type":"string","description":"Name of the template repository.","example":"keboola"},"templateId":{"type":"string","example":"aa","minLength":1,"maxLength":40},"updated":{"$ref":"#/definitions/ChangeInfo"},"version":{"type":"string","description":"Semantic version of the template.","example":"v1.1.0"}},"description":"Template instance.","example":{"branch":"5876","configurations":[{"componentId":"keboola.ex-db-mysql","configId":"7954825835","name":"My Extractor"}],"created":{"date":"2022-04-28T14:20:04+00:00","tokenId":"245941"},"instanceId":"abc123","mainConfig":{"componentId":"keboola.orchestrator","configId":"7954825835"},"name":"My Instance","repositoryName":"keboola","templateId":"aa","updated":{"date":"2022-04-28T14:20:04+00:00","tokenId":"245941"},"version":"v1.1.0"},"required":["instanceId","templateId","version","repositoryName","branch","name","created","updated","configurations"]},"InstanceDetail":{"title":"InstanceDetail","type":"object","properties":{"branch":{"type":"string","description":"ID of the branch.","example":"5876"},"configurations":{"type":"array","items":{"$ref":"#/definitions/Config"},"description":"All configurations from the instance.","example":[{"componentId":"keboola.ex-db-mysql","configId":"7954825835","name":"My Extractor"}]},"created":{"$ref":"#/definitions/ChangeInfo"},"instanceId":{"type":"string","example":"abc123"},"mainConfig":{"$ref":"#/definitions/MainConfig"},"name":{"type":"string","description":"Name of the instance.","example":"My Instance"},"repositoryName":{"type":"string","example":"abc123"},"templateDetail":{"$ref":"#/definitions/TemplateBase"},"templateId":{"type":"string","example":"abc123"},"updated":{"$ref":"#/definitions/ChangeInfo"},"version":{"type":"string","example":"abc123"},"versionDetail":{"$ref":"#/definitions/VersionDetail"}},"example":{"branch":"5876","configurations":[{"componentId":"keboola.ex-db-mysql","configId":"7954825835","name":"My Extractor"}],"created":{"date":"2022-04-28T14:20:04+00:00","tokenId":"245941"},"instanceId":"abc123","mainConfig":{"componentId":"keboola.orchestrator","configId":"7954825835"},"name":"My Instance","repositoryName":"abc123","templateDetail":{"author":{"name":"Keboola","url":"https://www.keboola.com"},"defaultVersion":"v1.2.3","deprecated":false,"description":"Full workflow to load all user accounts from the Service.","id":"aa","name":"My Template"},"templateId":"abc123","updated":{"date":"2022-04-28T14:20:04+00:00","tokenId":"245941"},"version":"abc123","versionDetail":{"version":"v1.2.3","stable":true,"description":"Stable version.","components":["ex-generic-v2","keboola.snowflake-transformation"],"longDescription":"Maximum length template **description** dolor sit amet, consectetuer adipiscing elit","readme":"Lorem markdownum quod discenda [aegide lapidem](http://www.nequeuntoffensa.io/)"}},"required":["instanceId","templateId","version","repositoryName","branch","name","created","updated","templateDetail","versionDetail","configurations"]},"Instances":{"title":"Instances","type":"object","properties":{"instances":{"type":"array","items":{"$ref":"#/definitions/Instance"},"description":"All instances found in branch.","example":[{"branch":"5876","configurations":[{"componentId":"keboola.ex-db-mysql","configId":"7954825835","name":"My Extractor"}],"created":{"date":"2022-04-28T14:20:04+00:00","tokenId":"245941"},"instanceId":"abc123","mainConfig":{"componentId":"keboola.orchestrator","configId":"7954825835"},"name":"My Instance","repositoryName":"keboola","templateId":"aa","updated":{"date":"2022-04-28T14:20:04+00:00","tokenId":"245941"},"version":"v1.1.0"}]}},"example":{"instances":[{"branch":"5876","configurations":[{"componentId":"keboola.ex-db-mysql","configId":"7954825835","name":"My Extractor"}],"created":{"date":"2022-04-28T14:20:04+00:00","tokenId":"245941"},"instanceId":"abc123","mainConfig":{"componentId":"keboola.orchestrator","configId":"7954825835"},"name":"My Instance","repositoryName":"keboola","templateId":"aa","updated":{"date":"2022-04-28T14:20:04+00:00","tokenId":"245941"},"version":"v1.1.0"}]},"required":["instances"]},"MainConfig":{"title":"MainConfig","type":"object","properties":{"componentId":{"type":"string","description":"Component ID.","example":"keboola.orchestrator"},"configId":{"type":"string","description":"Configuration ID.","example":"7954825835"}},"description":"Main config of the instance, usually an orchestration. Optional.","example":{"componentId":"keboola.orchestrator","configId":"7954825835"},"required":["componentId","configId"]},"ProjectLockedError":{"title":"ProjectLockedError","type":"object","properties":{"error":{"type":"string","description":"Name of error.","example":"templates.internalError"},"message":{"type":"string","description":"Error message.","example":"The project is locked, another operation is in progress, please try again later."},"statusCode":{"type":"integer","description":"HTTP status code.","example":503,"format":"int64"}},"description":"Access to branch metadata must be atomic, so only one write operation can run at a time. If this error occurs, the client should make retries, see Retry-After header.","example":{"statusCode":503,"error":"templates.projectLocked","message":"The project is locked, another operation is in progress, please try again later."},"required":["statusCode","error","message"]},"Repositories":{"title":"Repositories","type":"object","properties":{"repositories":{"type":"array","items":{"$ref":"#/definitions/Repository"},"description":"All template repositories defined in the project.","example":[{"name":"keboola","url":"https://github.com/keboola/keboola-as-code-templates","ref":"main","author":{"name":"Keboola","url":"https://www.keboola.com"}}]}},"example":{"repositories":[{"name":"keboola","url":"https://github.com/keboola/keboola-as-code-templates","ref":"main","author":{"name":"Keboola","url":"https://www.keboola.com"}}]},"required":["repositories"]},"Repository":{"title":"Repository","type":"object","properties":{"author":{"$ref":"#/definitions/Author"},"name":{"type":"string","description":"Template repository name. Use \"keboola\" for default Keboola repository.","example":"keboola","minLength":1,"maxLength":40},"ref":{"type":"string","description":"Git branch or tag.","example":"main","minLength":1},"url":{"type":"string","description":"Git URL to the repository.","example":"https://github.com/keboola/keboola-as-code-templates","minLength":1}},"description":"Template repository.","example":{"name":"keboola","url":"https://github.com/keboola/keboola-as-code-templates","ref":"main","author":{"name":"Keboola","url":"https://www.keboola.com"}},"required":["name","url","ref","author"]},"ServiceDetail":{"title":"ServiceDetail","type":"object","properties":{"api":{"type":"string","description":"Name of the API","example":"templates"},"documentation":{"type":"string","description":"URL of the API documentation.","example":"https://templates.keboola.com/v1/documentation"}},"example":{"api":"templates","documentation":"https://templates.keboola.com/v1/documentation"},"required":["api","documentation"]},"Step":{"title":"Step","type":"object","properties":{"description":{"type":"string","description":"Description of the step.","example":"Sell online with the Super E-commerce website.","minLength":1,"maxLength":60},"dialogDescription":{"type":"string","description":"Description of the dialog with inputs.","example":"Please configure the connection to your Super Ecommerce account.","minLength":1,"maxLength":200},"dialogName":{"type":"string","description":"Name of the dialog with inputs.","example":"Super Ecommerce","minLength":1,"maxLength":25},"icon":{"type":"string","description":"Icon for UI. Component icon if it starts with \"component:...\", or a common icon if it starts with \"common:...\".","example":"common:download","minLength":1,"maxLength":40},"id":{"type":"string","description":"Unique ID of the step.","example":"g01-s01","minLength":1},"inputs":{"type":"array","items":{"$ref":"#/definitions/Input"},"description":"Inputs in the step.","example":[{"id":"user","name":"User Name","description":"","type":"string","kind":"input","default":"john","options":null},{"id":"api-token","name":"API Token","description":"Insert Service API Token.","type":"string","kind":"hidden","default":"","options":null},{"id":"export-description","name":"Description","description":"Please enter a short description of what this export is for.","type":"string","kind":"textarea","default":"This export exports data to ...","options":null},{"id":"country","name":"Country","description":"Please select one country.","type":"string","kind":"select","default":"value1","options":[{"label":"Country 1","value":"value1"},{"label":"Country 2","value":"value2"},{"label":"Country 3","value":"value3"}]},{"id":"limit","name":"Limit","description":"Enter the maximum number of records.","type":"int","kind":"input","default":1000,"options":null},{"id":"person-height","name":"Person Height","description":"","type":"double","kind":"input","default":178.5,"options":null},{"id":"dummy-data","name":"Generate dummy data","description":"Do you want to generate dummy data?","type":"bool","kind":"confirm","default":true,"options":null},{"id":"countries","name":"Countries","description":"Please select at least one country.","type":"string[]","kind":"multiselect","default":["value1","value3"],"options":[{"label":"Country 1","value":"value1"},{"label":"Country 2","value":"value2"},{"label":"Country 3","value":"value3"}]}],"minItems":0},"name":{"type":"string","description":"Name of the step.","example":"Super Ecommerce","minLength":1,"maxLength":25}},"description":"Step is a container for inputs.","example":{"description":"Sell online with the Super E-commerce website.","dialogDescription":"Please configure the connection to your Super Ecommerce account.","dialogName":"Super Ecommerce","icon":"common:download","id":"g01-s01","inputs":[{"id":"user","name":"User Name","description":"","type":"string","kind":"input","default":"john","options":null},{"id":"api-token","name":"API Token","description":"Insert Service API Token.","type":"string","kind":"hidden","default":"","options":null},{"id":"export-description","name":"Description","description":"Please enter a short description of what this export is for.","type":"string","kind":"textarea","default":"This export exports data to ...","options":null},{"id":"country","name":"Country","description":"Please select one country.","type":"string","kind":"select","default":"value1","options":[{"label":"Country 1","value":"value1"},{"label":"Country 2","value":"value2"},{"label":"Country 3","value":"value3"}]},{"id":"limit","name":"Limit","description":"Enter the maximum number of records.","type":"int","kind":"input","default":1000,"options":null},{"id":"person-height","name":"Person Height","description":"","type":"double","kind":"input","default":178.5,"options":null},{"id":"dummy-data","name":"Generate dummy data","description":"Do you want to generate dummy data?","type":"bool","kind":"confirm","default":true,"options":null},{"id":"countries","name":"Countries","description":"Please select at least one country.","type":"string[]","kind":"multiselect","default":["value1","value3"],"options":[{"label":"Country 1","value":"value1"},{"label":"Country 2","value":"value2"},{"label":"Country 3","value":"value3"}]}],"name":"Super Ecommerce"},"required":["id","icon","name","description","dialogName","dialogDescription","inputs"]},"StepGroup":{"title":"StepGroup","type":"object","properties":{"description":{"type":"string","description":"Description of the step group, a tooltip explaining what needs to be configured.","example":"Choose one of the eshop platforms.","minLength":1,"maxLength":80},"id":{"type":"string","description":"Unique ID of the step group.","example":"g01"},"required":{"type":"string","description":"The number of steps that must be configured.","example":"atLeastOne","enum":["all","atLeastOne","exactlyOne","zeroOrOne","optional"]},"steps":{"type":"array","items":{"$ref":"#/definitions/Step"},"description":"Steps in the group.","example":[{"id":"g01-s01","icon":"common:download","name":"Super Ecommerce","description":"Sell online with the Super E-commerce website.","dialogName":"Super Ecommerce","dialogDescription":"Please configure credentials to your Super Ecommerce account.","inputs":[{"id":"user","name":"User Name","description":"","type":"string","kind":"input","default":"john","options":null},{"id":"api-token","name":"API Token","description":"Insert Service API Token.","type":"string","kind":"hidden","default":"","options":null},{"id":"export-description","name":"Description","description":"Please enter a short description of what this export is for.","type":"string","kind":"textarea","default":"This export exports data to ...","options":null},{"id":"country","name":"Country","description":"Please select one country.","type":"string","kind":"select","default":"value1","options":[{"label":"Country 1","value":"value1"},{"label":"Country 2","value":"value2"},{"label":"Country 3","value":"value3"}]},{"id":"limit","name":"Limit","description":"Enter the maximum number of records.","type":"int","kind":"input","default":1000,"options":null},{"id":"person-height","name":"Person Height","description":"","type":"double","kind":"input","default":178.5,"options":null},{"id":"dummy-data","name":"Generate dummy data","description":"Do you want to generate dummy data?","type":"bool","kind":"confirm","default":true,"options":null},{"id":"countries","name":"Countries","description":"Please select at least one country.","type":"string[]","kind":"multiselect","default":["value1","value3"],"options":[{"label":"Country 1","value":"value1"},{"label":"Country 2","value":"value2"},{"label":"Country 3","value":"value3"}]}]}],"minItems":1}},"description":"Step group is a container for steps.","example":{"description":"Choose one of the eshop platforms.","id":"g01","required":"atLeastOne","steps":[{"id":"g01-s01","icon":"common:download","name":"Super Ecommerce","description":"Sell online with the Super E-commerce website.","dialogName":"Super Ecommerce","dialogDescription":"Please configure credentials to your Super Ecommerce account.","inputs":[{"id":"user","name":"User Name","description":"","type":"string","kind":"input","default":"john","options":null},{"id":"api-token","name":"API Token","description":"Insert Service API Token.","type":"string","kind":"hidden","default":"","options":null},{"id":"export-description","name":"Description","description":"Please enter a short description of what this export is for.","type":"string","kind":"textarea","default":"This export exports data to ...","options":null},{"id":"country","name":"Country","description":"Please select one country.","type":"string","kind":"select","default":"value1","options":[{"label":"Country 1","value":"value1"},{"label":"Country 2","value":"value2"},{"label":"Country 3","value":"value3"}]},{"id":"limit","name":"Limit","description":"Enter the maximum number of records.","type":"int","kind":"input","default":1000,"options":null},{"id":"person-height","name":"Person Height","description":"","type":"double","kind":"input","default":178.5,"options":null},{"id":"dummy-data","name":"Generate dummy data","description":"Do you want to generate dummy data?","type":"bool","kind":"confirm","default":true,"options":null},{"id":"countries","name":"Countries","description":"Please select at least one country.","type":"string[]","kind":"multiselect","default":["value1","value3"],"options":[{"label":"Country 1","value":"value1"},{"label":"Country 2","value":"value2"},{"label":"Country 3","value":"value3"}]}]}]},"required":["id","description","required","steps"]},"StepGroupValidationResult":{"title":"StepGroupValidationResult","type":"object","properties":{"error":{"type":"string","description":"Are all inputs valid?","example":"All steps must be configured."},"id":{"type":"string","description":"Step group ID.","example":"g01"},"steps":{"type":"array","items":{"$ref":"#/definitions/StepValidationResult"},"description":"List of Details for the steps.","example":[{"configured":false,"id":"g01-s01","inputs":[{"error":"API token cannot be empty.","id":"api-token","visible":true}],"valid":false}]},"valid":{"type":"boolean","description":"True if the required number of steps is configured and all inputs are valid.","example":false}},"description":"Validation Detail of the step group.","example":{"error":"All steps must be configured.","id":"g01","steps":[{"configured":false,"id":"g01-s01","inputs":[{"error":"API token cannot be empty.","id":"api-token","visible":true}],"valid":false}],"valid":false},"required":["id","valid","steps"]},"StepPayload":{"title":"StepPayload","type":"object","properties":{"id":{"type":"string","description":"Unique ID of the step.","example":"g01-s01","minLength":1},"inputs":{"type":"array","items":{"$ref":"#/definitions/InputValue"},"description":"Input values.","example":[{"id":"user","value":"user@example.com"},{"id":"api-token","value":"123456"}]}},"description":"Step with input values filled in by user.","example":{"id":"g01-s01","inputs":[{"id":"user","value":"user@example.com"},{"id":"api-token","value":"123456"}]},"required":["id","inputs"]},"StepValidationResult":{"title":"StepValidationResult","type":"object","properties":{"configured":{"type":"boolean","description":"True if the step was part of the sent payload.","example":false},"id":{"type":"string","description":"Step ID.","example":"g01-s01"},"inputs":{"type":"array","items":{"$ref":"#/definitions/InputValidationResult"},"description":"List of Details for the inputs.","example":[{"error":"API token cannot be empty.","id":"api-token","visible":true}]},"valid":{"type":"boolean","description":"True if all inputs in the step are valid.","example":false}},"description":"Validation Detail of the step.","example":{"configured":false,"id":"g01-s01","inputs":[{"error":"API token cannot be empty.","id":"api-token","visible":true}],"valid":false},"required":["id","configured","valid","inputs"]},"Task":{"title":"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"},"id":{"type":"string","example":"abc123"},"isFinished":{"type":"boolean","description":"Shortcut for status != \"processing\".","example":false},"outputs":{"$ref":"#/definitions/TaskOutputs"},"result":{"type":"string","example":"abc123"},"status":{"type":"string","description":"Task status, one of: processing, success, error","example":"success","enum":["processing","success","error"]},"type":{"type":"string","description":"Task type.","example":"abc123"},"url":{"type":"string","description":"URL of the task.","example":"abc123"}},"example":{"id":"task-1","url":"https://templates.keboola.com/v1/tasks/template.use/2018-01-01T00:00:00.000Z_dIklP","type":"template.use","createdAt":"2018-01-01T00:00:00.000Z","finishedAt":"2018-01-01T00:00:00.000Z","isFinished":true,"duration":123,"result":"task succeeded","outputs":{"instanceId":"V1StGXR8IZ5jdHi6BAmyT"}},"required":["id","type","url","status","isFinished","createdAt"]},"TaskOutputs":{"title":"TaskOutputs","type":"object","properties":{"instanceId":{"type":"string","description":"ID of the created/updated template instance.","example":"abc123"}},"description":"Outputs generated by the task.","example":{"instanceId":"abc123"}},"Template":{"title":"Template","type":"object","properties":{"author":{"$ref":"#/definitions/Author"},"categories":{"type":"array","items":{"type":"string","example":"abc123"},"description":"List of categories the template belongs to.","example":["E-commerce","Other","Social Media"]},"components":{"type":"array","items":{"type":"string","example":"abc123"},"description":"List of components used in the template.","example":["ex-generic-v2","keboola.snowflake-transformation"]},"defaultVersion":{"type":"string","description":"Recommended version of the template.","example":"v1.2.3","minLength":1,"maxLength":20},"deprecated":{"type":"boolean","description":"Deprecated template cannot be used.","example":false},"description":{"type":"string","description":"Short description of the template.","example":"Full workflow to load all user accounts from the Service.","minLength":1,"maxLength":200},"id":{"type":"string","example":"aa","minLength":1,"maxLength":40},"name":{"type":"string","description":"Template name.","example":"My Template","minLength":1,"maxLength":40},"versions":{"type":"array","items":{"$ref":"#/definitions/Version"},"description":"All available versions of the template.","example":[{"version":"v0.1.1","stable":false,"description":"Initial version."},{"version":"v1.1.1","stable":true,"description":""},{"version":"v1.2.3","stable":true,"description":""},{"version":"v2.0.0","stable":false,"description":"Experimental support for new API."}]}},"description":"Template.","example":{"author":{"name":"Keboola","url":"https://www.keboola.com"},"categories":["E-commerce","Other","Social Media"],"components":["ex-generic-v2","keboola.snowflake-transformation"],"defaultVersion":"v1.2.3","deprecated":false,"description":"Full workflow to load all user accounts from the Service.","id":"aa","name":"My Template","versions":[{"version":"v0.1.1","stable":false,"description":"Initial version."},{"version":"v1.1.1","stable":true,"description":""},{"version":"v1.2.3","stable":true,"description":""},{"version":"v2.0.0","stable":false,"description":"Experimental support for new API."}]},"required":["id","name","deprecated","author","description","defaultVersion","categories","components","versions"]},"TemplateBase":{"title":"TemplateBase","type":"object","properties":{"author":{"$ref":"#/definitions/Author"},"defaultVersion":{"type":"string","description":"Recommended version of the template.","example":"v1.2.3","minLength":1,"maxLength":20},"deprecated":{"type":"boolean","description":"Deprecated template cannot be used.","example":false},"description":{"type":"string","description":"Short description of the template.","example":"Full workflow to load all user accounts from the Service.","minLength":1,"maxLength":200},"id":{"type":"string","example":"aa","minLength":1,"maxLength":40},"name":{"type":"string","description":"Template name.","example":"My Template","minLength":1,"maxLength":40}},"description":"Template base information.","example":{"author":{"name":"Keboola","url":"https://www.keboola.com"},"defaultVersion":"v1.2.3","deprecated":false,"description":"Full workflow to load all user accounts from the Service.","id":"aa","name":"My Template"},"required":["id","name","deprecated","author","description","defaultVersion"]},"TemplateDetail":{"title":"TemplateDetail","type":"object","properties":{"author":{"$ref":"#/definitions/Author"},"categories":{"type":"array","items":{"type":"string","example":"abc123"},"description":"List of categories the template belongs to.","example":["E-commerce","Other","Social Media"]},"components":{"type":"array","items":{"type":"string","example":"abc123"},"description":"List of components used in the template.","example":["ex-generic-v2","keboola.snowflake-transformation"]},"defaultVersion":{"type":"string","description":"Recommended version of the template.","example":"v1.2.3","minLength":1,"maxLength":20},"deprecated":{"type":"boolean","description":"Deprecated template cannot be used.","example":false},"description":{"type":"string","description":"Short description of the template.","example":"Full workflow to load all user accounts from the Service.","minLength":1,"maxLength":200},"id":{"type":"string","example":"aa","minLength":1,"maxLength":40},"name":{"type":"string","description":"Template name.","example":"My Template","minLength":1,"maxLength":40},"repository":{"$ref":"#/definitions/Repository"},"versions":{"type":"array","items":{"$ref":"#/definitions/Version"},"description":"All available versions of the template.","example":[{"version":"v0.1.1","stable":false,"description":"Initial version."},{"version":"v1.1.1","stable":true,"description":""},{"version":"v1.2.3","stable":true,"description":""},{"version":"v2.0.0","stable":false,"description":"Experimental support for new API."}]}},"example":{"id":"my-template","name":"My Template","deprecated":false,"categories":["E-commerce","Other","Social Media"],"components":["ex-generic-v2","keboola.snowflake-transformation"],"author":{"name":"Keboola","url":"https://www.keboola.com"},"description":"Full workflow to load all user accounts from the Service.","defaultVersion":"v1.2.3","versions":[{"version":"v0.1.1","stable":false,"description":"Initial version."},{"version":"v1.1.1","stable":true,"description":""},{"version":"v1.2.3","stable":true,"description":""},{"version":"v2.0.0","stable":false,"description":"Experimental support for new API."}],"repository":{"name":"keboola","url":"https://github.com/keboola/keboola-as-code-templates","ref":"main","author":{"name":"Keboola","url":"https://www.keboola.com"}}},"required":["id","name","deprecated","author","description","defaultVersion","repository","categories","components","versions"]},"Templates":{"title":"Templates","type":"object","properties":{"repository":{"$ref":"#/definitions/Repository"},"templates":{"type":"array","items":{"$ref":"#/definitions/Template"},"description":"All template defined in the repository.","example":[{"author":{"name":"Keboola","url":"https://www.keboola.com"},"categories":["E-commerce","Other","Social Media"],"components":["ex-generic-v2","keboola.snowflake-transformation"],"defaultVersion":"v1.2.3","deprecated":false,"description":"Full workflow to load all user accounts from the Service.","id":"aa","name":"My Template","versions":[{"version":"v0.1.1","stable":false,"description":"Initial version."},{"version":"v1.1.1","stable":true,"description":""},{"version":"v1.2.3","stable":true,"description":""},{"version":"v2.0.0","stable":false,"description":"Experimental support for new API."}]}]}},"example":{"repository":{"name":"keboola","url":"https://github.com/keboola/keboola-as-code-templates","ref":"main","author":{"name":"Keboola","url":"https://www.keboola.com"}},"templates":[{"id":"my-template","name":"My Template","deprecated":false,"categories":["E-commerce","Other","Social Media"],"components":["ex-generic-v2","keboola.snowflake-transformation"],"author":{"name":"Keboola","url":"https://www.keboola.com"},"description":"Full workflow to load all user accounts from the Service.","defaultVersion":"v1.2.3","versions":[{"version":"v0.1.1","stable":false,"description":"Initial version."},{"version":"v1.1.1","stable":true,"description":""},{"version":"v1.2.3","stable":true,"description":""},{"version":"v2.0.0","stable":false,"description":"Experimental support for new API."}]},{"id":"maximum-length-template-id-dolor-sit-an","name":"Maximum length template name ipsum dolo","deprecated":false,"categories":["E-commerce","Other","Social Media"],"components":["ex-generic-v2","keboola.snowflake-transformation"],"author":{"name":"Keboola","url":"https://www.keboola.com"},"description":"Maximum length template description dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascet.","defaultVersion":"v4.5.6","versions":[{"version":"v4.5.6","stable":true,"description":"Maximum length version description abc."}]}]},"required":["repository","templates"]},"TemplatesUpdateInstanceRequestBody":{"title":"TemplatesUpdateInstanceRequestBody","type":"object","properties":{"name":{"type":"string","description":"New name of the instance.","example":"My Great Instance"}},"example":{"name":"My Great Instance"},"required":["name"]},"TemplatesUpgradeInstanceRequestBody":{"title":"TemplatesUpgradeInstanceRequestBody","type":"object","properties":{"steps":{"type":"array","items":{"$ref":"#/definitions/StepPayload"},"description":"Steps with input values filled in by user.","example":[{"id":"g01-s01","inputs":[{"id":"user","value":"user@example.com"},{"id":"api-token","value":"123456"}]}]}},"example":{"steps":[{"id":"g01-s01","inputs":[{"id":"user","value":"user@example.com"},{"id":"api-token","value":"123456"}]}]},"required":["steps"]},"TemplatesUpgradeInstanceValidateInputsRequestBody":{"title":"TemplatesUpgradeInstanceValidateInputsRequestBody","type":"object","properties":{"steps":{"type":"array","items":{"$ref":"#/definitions/StepPayload"},"description":"Steps with input values filled in by user.","example":[{"id":"g01-s01","inputs":[{"id":"user","value":"user@example.com"},{"id":"api-token","value":"123456"}]}]}},"example":{"steps":[{"id":"g01-s01","inputs":[{"id":"user","value":"user@example.com"},{"id":"api-token","value":"123456"}]}]},"required":["steps"]},"TemplatesUseTemplateVersionRequestBody":{"title":"TemplatesUseTemplateVersionRequestBody","type":"object","properties":{"branch":{"type":"string","description":"ID of the branch. Use \"default\" for default branch.","example":"default"},"name":{"type":"string","description":"Name of the new template instance.","example":"My Instance"},"steps":{"type":"array","items":{"$ref":"#/definitions/StepPayload"},"description":"Steps with input values filled in by user.","example":[{"id":"g01-s01","inputs":[{"id":"user","value":"user@example.com"},{"id":"api-token","value":"123456"}]}]}},"example":{"branch":"default","name":"My Instance","steps":[{"id":"g01-s01","inputs":[{"id":"user","value":"user@example.com"},{"id":"api-token","value":"123456"}]}]},"required":["name","branch","steps"]},"TemplatesValidateInputsRequestBody":{"title":"TemplatesValidateInputsRequestBody","type":"object","properties":{"steps":{"type":"array","items":{"$ref":"#/definitions/StepPayload"},"description":"Steps with input values filled in by user.","example":[{"id":"g01-s01","inputs":[{"id":"user","value":"user@example.com"},{"id":"api-token","value":"123456"}]}]}},"example":{"steps":[{"id":"g01-s01","inputs":[{"id":"user","value":"user@example.com"},{"id":"api-token","value":"123456"}]}]},"required":["steps"]},"ValidationError":{"title":"ValidationError","type":"object","properties":{"ValidationResult":{"$ref":"#/definitions/ValidationResult"},"error":{"type":"string","description":"Name of error.","example":"InvalidPayload"},"message":{"type":"string","description":"Error message.","example":"Inputs are not valid."}},"description":"Inputs are not valid.","example":{"ValidationResult":{"valid":false,"stepGroups":[{"id":"g01","valid":false,"error":"All steps must be configured.","steps":[{"id":"g01-s01","configured":true,"valid":false,"inputs":[{"id":"api-token","visible":true,"error":"Value cannot be empty."},{"id":"password","visible":false,"error":null}]}]},{"id":"g02","valid":true,"error":null,"steps":[{"id":"g02-s01","configured":false,"valid":true,"inputs":[]},{"id":"g02-s02","configured":true,"valid":true,"inputs":[{"id":"username","visible":true,"error":null}]}]}]},"error":"InvalidPayload","message":"Inputs are not valid."},"required":["error","message","ValidationResult"]},"ValidationResult":{"title":"ValidationResult","type":"object","properties":{"stepGroups":{"type":"array","items":{"$ref":"#/definitions/StepGroupValidationResult"},"description":"List of Details for the step groups.","example":[{"error":"All steps must be configured.","id":"g01","steps":[{"configured":false,"id":"g01-s01","inputs":[{"error":"API token cannot be empty.","id":"api-token","visible":true}],"valid":false}],"valid":false}]},"valid":{"type":"boolean","description":"True if all groups and inputs are valid.","example":false}},"description":"Detail of the inputs validation.","example":{"valid":false,"stepGroups":[{"id":"g01","valid":false,"error":"All steps must be configured.","steps":[{"id":"g01-s01","configured":true,"valid":false,"inputs":[{"id":"api-token","visible":true,"error":"Value cannot be empty."},{"id":"password","visible":false,"error":null}]}]},{"id":"g02","valid":true,"error":null,"steps":[{"id":"g02-s01","configured":false,"valid":true,"inputs":[]},{"id":"g02-s02","configured":true,"valid":true,"inputs":[{"id":"username","visible":true,"error":null}]}]}]},"required":["valid","stepGroups"]},"Version":{"title":"Version","type":"object","properties":{"description":{"type":"string","description":"Optional short description of the version. Can be empty.","example":"Experimental support for new API.","minLength":0,"maxLength":40},"stable":{"type":"boolean","description":"If true, then the version is ready for production use.","example":true},"version":{"type":"string","description":"Semantic version.","example":"v1.2.3","minLength":1,"maxLength":20}},"description":"Template version.","example":{"version":"v1.2.3","stable":true,"description":"Stable version."},"required":["version","stable","description"]},"VersionDetail":{"title":"VersionDetail","type":"object","properties":{"components":{"type":"array","items":{"type":"string","example":"abc123"},"description":"List of components used in the template version.","example":["ex-generic-v2","keboola.snowflake-transformation"]},"description":{"type":"string","description":"Optional short description of the version. Can be empty.","example":"Experimental support for new API.","minLength":0,"maxLength":40},"longDescription":{"type":"string","description":"Extended description of the template in Markdown format.","example":"**Full workflow** to load all user accounts from [the Service](https://service.com). With *extended* explanation ...","minLength":1},"readme":{"type":"string","description":"Readme of the template version in Markdown format.","example":"Lorem markdownum quod discenda [aegide lapidem](http://www.nequeuntoffensa.io/)","minLength":1},"stable":{"type":"boolean","description":"If true, then the version is ready for production use.","example":true},"version":{"type":"string","description":"Semantic version.","example":"v1.2.3","minLength":1,"maxLength":20}},"example":{"version":"v1.2.3","stable":true,"description":"Stable version.","components":["ex-generic-v2","keboola.snowflake-transformation"],"longDescription":"Maximum length template **description** dolor sit amet, consectetuer adipiscing elit","readme":"Lorem markdownum quod discenda [aegide lapidem](http://www.nequeuntoffensa.io/)"},"required":["version","stable","description","components","longDescription","readme"]},"VersionDetailExtended":{"title":"VersionDetailExtended","type":"object","properties":{"components":{"type":"array","items":{"type":"string","example":"abc123"},"description":"List of components used in the template version.","example":["ex-generic-v2","keboola.snowflake-transformation"]},"description":{"type":"string","description":"Optional short description of the version. Can be empty.","example":"Experimental support for new API.","minLength":0,"maxLength":40},"longDescription":{"type":"string","description":"Extended description of the template in Markdown format.","example":"**Full workflow** to load all user accounts from [the Service](https://service.com). With *extended* explanation ...","minLength":1},"readme":{"type":"string","description":"Readme of the template version in Markdown format.","example":"Lorem markdownum quod discenda [aegide lapidem](http://www.nequeuntoffensa.io/)","minLength":1},"repository":{"$ref":"#/definitions/Repository"},"stable":{"type":"boolean","description":"If true, then the version is ready for production use.","example":true},"template":{"$ref":"#/definitions/Template"},"version":{"type":"string","description":"Semantic version.","example":"v1.2.3","minLength":1,"maxLength":20}},"example":{"version":"v1.2.3","stable":true,"description":"Stable version.","components":["ex-generic-v2","keboola.snowflake-transformation"],"longDescription":"Maximum length template **description** dolor sit amet, consectetuer adipiscing elit","readme":"Lorem markdownum quod discenda [aegide lapidem](http://www.nequeuntoffensa.io/)","repository":{"name":"keboola","url":"https://github.com/keboola/keboola-as-code-templates","ref":"main","author":{"name":"Keboola","url":"https://www.keboola.com"}},"template":{"id":"my-template","name":"My Template","deprecated":false,"author":{"name":"Keboola","url":"https://www.keboola.com"},"description":"Full workflow to load all user accounts from the Service.","defaultVersion":"v1.2.3"}},"required":["version","stable","description","components","longDescription","readme","repository","template"]}},"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/templates/api/openapi/openapi.yaml b/internal/pkg/service/templates/api/openapi/openapi.yaml index 70009ec889..70671d330f 100644 --- a/internal/pkg/service/templates/api/openapi/openapi.yaml +++ b/internal/pkg/service/templates/api/openapi/openapi.yaml @@ -511,6 +511,14 @@ paths: description: List all templates defined in the repository. operationId: TemplatesIndex parameters: + - name: filter + in: query + description: The 'filter' attribute specifies the category of templates to retrieve from the repository. + required: false + type: string + enum: + - keboola.components + - keboola.data-apps - name: repository in: path description: Name of the template repository. Use "keboola" for default Keboola repository. diff --git a/internal/pkg/service/templates/api/openapi/openapi3.json b/internal/pkg/service/templates/api/openapi/openapi3.json index c14239c9be..d2ffd15b7c 100644 --- a/internal/pkg/service/templates/api/openapi/openapi3.json +++ b/internal/pkg/service/templates/api/openapi/openapi3.json @@ -1 +1 @@ -{"openapi":"3.0.3","info":{"title":"Templates Service","description":"A service for applying templates to Keboola projects.","version":"1.0"},"servers":[{"url":"https://templates.{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:8000"}],"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":"templates","documentation":"https://templates.keboola.com/v1/documentation"}}}}}}},"/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/project/{branch}/instances":{"get":{"tags":["instance"],"summary":"List instances","operationId":"InstancesIndex","parameters":[{"name":"branch","in":"path","description":"ID of the branch. Use \"default\" for default branch.","required":true,"schema":{"type":"string","description":"ID of the branch. Use \"default\" for default branch.","example":"default"},"example":"default"}],"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Instances"},"example":{"instances":[{"branch":"5876","configurations":[{"componentId":"keboola.ex-db-mysql","configId":"7954825835","name":"My Extractor"}],"created":{"date":"2022-04-28T14:20:04+00:00","tokenId":"245941"},"instanceId":"abc123","mainConfig":{"componentId":"keboola.orchestrator","configId":"7954825835"},"name":"My Instance","repositoryName":"keboola","templateId":"aa","updated":{"date":"2022-04-28T14:20:04+00:00","tokenId":"245941"},"version":"v1.1.0"}]}}}},"404":{"description":"templates.branchNotFound: Branch not found error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenericError"},"example":{"statusCode":404,"error":"templates.branchNotFound","message":"Branch \"123\" not found."}}}}},"security":[{"storage-api-token":[]}]}},"/v1/project/{branch}/instances/{instanceId}":{"delete":{"tags":["instance"],"summary":"Delete instance","operationId":"DeleteInstance","parameters":[{"name":"branch","in":"path","description":"ID of the branch. Use \"default\" for default branch.","required":true,"schema":{"type":"string","description":"ID of the branch. Use \"default\" for default branch.","example":"default"},"example":"default"},{"name":"instanceId","in":"path","required":true,"schema":{"type":"string","description":"ID of the template instance.","example":"V1StGXR8IZ5jdHi6BAmyT"},"example":"V1StGXR8IZ5jdHi6BAmyT"}],"responses":{"202":{"description":"Accepted response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Task"},"example":{"id":"task-1","url":"https://templates.keboola.com/v1/tasks/template.use/2018-01-01T00:00:00.000Z_dIklP","type":"template.use","createdAt":"2018-01-01T00:00:00.000Z","finishedAt":"2018-01-01T00:00:00.000Z","isFinished":true,"duration":123,"result":"task succeeded","outputs":{"instanceId":"V1StGXR8IZ5jdHi6BAmyT"}}}}},"404":{"description":"templates.instanceNotFound: Instance not found error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenericError"},"example":{"statusCode":404,"error":"templates.instanceNotFound","message":"Instance \"V1StGXR8IZ5jdHi6BAmyT\" not found."}}}},"503":{"description":"templates.projectLocked: Access to branch metadata must be atomic, so only one write operation can run at a time. If this error occurs, the client should make retries, see Retry-After header.","headers":{"Retry-After":{"description":"Indicates how long the user agent should wait before making a follow-up request.","schema":{"type":"string","description":"Indicates how long the user agent should wait before making a follow-up request.","example":"\u003chttp-date\u003e/\u003cdelay-seconds\u003e"},"example":"\u003chttp-date\u003e/\u003cdelay-seconds\u003e"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectLockedError4"},"example":{"statusCode":503,"error":"templates.projectLocked","message":"The project is locked, another operation is in progress, please try again later."}}}}},"security":[{"storage-api-token":[]}]},"get":{"tags":["instance"],"summary":"Get instance detail","operationId":"InstanceIndex","parameters":[{"name":"branch","in":"path","description":"ID of the branch. Use \"default\" for default branch.","required":true,"schema":{"type":"string","description":"ID of the branch. Use \"default\" for default branch.","example":"default"},"example":"default"},{"name":"instanceId","in":"path","required":true,"schema":{"type":"string","description":"ID of the template instance.","example":"V1StGXR8IZ5jdHi6BAmyT"},"example":"V1StGXR8IZ5jdHi6BAmyT"}],"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InstanceDetail"},"example":{"branch":"5876","configurations":[{"componentId":"keboola.ex-db-mysql","configId":"7954825835","name":"My Extractor"}],"created":{"date":"2022-04-28T14:20:04+00:00","tokenId":"245941"},"instanceId":"abc123","mainConfig":{"componentId":"keboola.orchestrator","configId":"7954825835"},"name":"My Instance","repositoryName":"abc123","templateDetail":{"author":{"name":"Keboola","url":"https://www.keboola.com"},"defaultVersion":"v1.2.3","deprecated":false,"description":"Full workflow to load all user accounts from the Service.","id":"aa","name":"My Template"},"templateId":"abc123","updated":{"date":"2022-04-28T14:20:04+00:00","tokenId":"245941"},"version":"abc123","versionDetail":{"version":"v1.2.3","stable":true,"description":"Stable version.","components":["ex-generic-v2","keboola.snowflake-transformation"],"longDescription":"Maximum length template **description** dolor sit amet, consectetuer adipiscing elit","readme":"Lorem markdownum quod discenda [aegide lapidem](http://www.nequeuntoffensa.io/)"}}}}},"404":{"description":"templates.instanceNotFound: Instance not found error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenericError"},"example":{"statusCode":404,"error":"templates.instanceNotFound","message":"Instance \"V1StGXR8IZ5jdHi6BAmyT\" not found."}}}}},"security":[{"storage-api-token":[]}]},"put":{"tags":["instance"],"summary":"Update instance name","operationId":"UpdateInstance","parameters":[{"name":"branch","in":"path","description":"ID of the branch. Use \"default\" for default branch.","required":true,"schema":{"type":"string","description":"ID of the branch. Use \"default\" for default branch.","example":"default"},"example":"default"},{"name":"instanceId","in":"path","required":true,"schema":{"type":"string","description":"ID of the template instance.","example":"V1StGXR8IZ5jdHi6BAmyT"},"example":"V1StGXR8IZ5jdHi6BAmyT"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateInstanceRequestBody"},"example":{"name":"My Great Instance"}}}},"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InstanceDetail"},"example":{"branch":"5876","configurations":[{"componentId":"keboola.ex-db-mysql","configId":"7954825835","name":"My Extractor"}],"created":{"date":"2022-04-28T14:20:04+00:00","tokenId":"245941"},"instanceId":"abc123","mainConfig":{"componentId":"keboola.orchestrator","configId":"7954825835"},"name":"My Instance","repositoryName":"abc123","templateDetail":{"author":{"name":"Keboola","url":"https://www.keboola.com"},"defaultVersion":"v1.2.3","deprecated":false,"description":"Full workflow to load all user accounts from the Service.","id":"aa","name":"My Template"},"templateId":"abc123","updated":{"date":"2022-04-28T14:20:04+00:00","tokenId":"245941"},"version":"abc123","versionDetail":{"version":"v1.2.3","stable":true,"description":"Stable version.","components":["ex-generic-v2","keboola.snowflake-transformation"],"longDescription":"Maximum length template **description** dolor sit amet, consectetuer adipiscing elit","readme":"Lorem markdownum quod discenda [aegide lapidem](http://www.nequeuntoffensa.io/)"}}}}},"404":{"description":"templates.instanceNotFound: Instance not found error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenericError"},"example":{"statusCode":404,"error":"templates.instanceNotFound","message":"Instance \"V1StGXR8IZ5jdHi6BAmyT\" not found."}}}},"503":{"description":"templates.projectLocked: Access to branch metadata must be atomic, so only one write operation can run at a time. If this error occurs, the client should make retries, see Retry-After header.","headers":{"Retry-After":{"description":"Indicates how long the user agent should wait before making a follow-up request.","schema":{"type":"string","description":"Indicates how long the user agent should wait before making a follow-up request.","example":"\u003chttp-date\u003e/\u003cdelay-seconds\u003e"},"example":"\u003chttp-date\u003e/\u003cdelay-seconds\u003e"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectLockedError3"},"example":{"statusCode":503,"error":"templates.projectLocked","message":"The project is locked, another operation is in progress, please try again later."}}}}},"security":[{"storage-api-token":[]}]}},"/v1/project/{branch}/instances/{instanceId}/upgrade/{version}":{"post":{"tags":["instance"],"summary":"Re-generate the instance in the same or different version","operationId":"UpgradeInstance","parameters":[{"name":"branch","in":"path","description":"ID of the branch. Use \"default\" for default branch.","required":true,"schema":{"type":"string","description":"ID of the branch. Use \"default\" for default branch.","example":"default"},"example":"default"},{"name":"instanceId","in":"path","required":true,"schema":{"type":"string","description":"ID of the template instance.","example":"V1StGXR8IZ5jdHi6BAmyT"},"example":"V1StGXR8IZ5jdHi6BAmyT"},{"name":"version","in":"path","description":"Semantic version of the template. Use \"default\" for default version.","required":true,"schema":{"type":"string","description":"Semantic version of the template. Use \"default\" for default version.","example":"v1.2.3"},"example":"v1.2.3"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InputsPayload"},"example":{"steps":[{"id":"g01-s01","inputs":[{"id":"user","value":"user@example.com"},{"id":"api-token","value":"123456"}]}]}}}},"responses":{"202":{"description":"Accepted response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Task"},"example":{"id":"task-1","url":"https://templates.keboola.com/v1/tasks/template.use/2018-01-01T00:00:00.000Z_dIklP","type":"template.use","createdAt":"2018-01-01T00:00:00.000Z","finishedAt":"2018-01-01T00:00:00.000Z","isFinished":true,"duration":123,"result":"task succeeded","outputs":{"instanceId":"V1StGXR8IZ5jdHi6BAmyT"}}}}},"400":{"description":"InvalidInputs: Inputs are not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationError"},"example":{"ValidationResult":{"valid":false,"stepGroups":[{"id":"g01","valid":false,"error":"All steps must be configured.","steps":[{"id":"g01-s01","configured":true,"valid":false,"inputs":[{"id":"api-token","visible":true,"error":"Value cannot be empty."},{"id":"password","visible":false,"error":null}]}]},{"id":"g02","valid":true,"error":null,"steps":[{"id":"g02-s01","configured":false,"valid":true,"inputs":[]},{"id":"g02-s02","configured":true,"valid":true,"inputs":[{"id":"username","visible":true,"error":null}]}]}]},"error":"InvalidPayload","message":"Inputs are not valid."}}}},"404":{"description":"templates.versionNotFound: Version not found error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenericError"},"example":{"statusCode":404,"error":"templates.versionNotFound","message":"Version \"v1.2.3\" not found."}}}},"503":{"description":"templates.projectLocked: Access to branch metadata must be atomic, so only one write operation can run at a time. If this error occurs, the client should make retries, see Retry-After header.","headers":{"Retry-After":{"description":"Indicates how long the user agent should wait before making a follow-up request.","schema":{"type":"string","description":"Indicates how long the user agent should wait before making a follow-up request.","example":"\u003chttp-date\u003e/\u003cdelay-seconds\u003e"},"example":"\u003chttp-date\u003e/\u003cdelay-seconds\u003e"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectLockedError5"},"example":{"statusCode":503,"error":"templates.projectLocked","message":"The project is locked, another operation is in progress, please try again later."}}}}},"security":[{"storage-api-token":[]}]}},"/v1/project/{branch}/instances/{instanceId}/upgrade/{version}/inputs":{"get":{"tags":["instance"],"summary":"Get inputs for upgrade operation","operationId":"UpgradeInstanceInputsIndex","parameters":[{"name":"branch","in":"path","description":"ID of the branch. Use \"default\" for default branch.","required":true,"schema":{"type":"string","description":"ID of the branch. Use \"default\" for default branch.","example":"default"},"example":"default"},{"name":"instanceId","in":"path","required":true,"schema":{"type":"string","description":"ID of the template instance.","example":"V1StGXR8IZ5jdHi6BAmyT"},"example":"V1StGXR8IZ5jdHi6BAmyT"},{"name":"version","in":"path","description":"Semantic version of the template. Use \"default\" for default version.","required":true,"schema":{"type":"string","description":"Semantic version of the template. Use \"default\" for default version.","example":"v1.2.3"},"example":"v1.2.3"}],"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Inputs"},"example":{"initialState":{"valid":false,"stepGroups":[{"id":"g01","valid":false,"error":"All steps must be configured.","steps":[{"id":"g01-s01","configured":true,"valid":false,"inputs":[{"id":"api-token","visible":true,"error":"Value cannot be empty."},{"id":"password","visible":false,"error":null}]}]},{"id":"g02","valid":true,"error":null,"steps":[{"id":"g02-s01","configured":false,"valid":true,"inputs":[]},{"id":"g02-s02","configured":true,"valid":true,"inputs":[{"id":"username","visible":true,"error":null}]}]}]},"stepGroups":[{"id":"g01","description":"Choose one of the eshop platforms.","required":"atLeastOne","step":[{"id":"g01-s01","icon":"common:download","name":"Super Ecommerce","description":"Sell online with the Super E-commerce website.","dialogName":"Super Ecommerce","dialogDescription":"Please configure credentials to your Super Ecommerce account.","inputs":[{"id":"user","name":"User Name","description":"","type":"string","kind":"input","default":"john","options":null},{"id":"api-token","name":"API Token","description":"Insert Service API Token.","type":"string","kind":"hidden","default":"","options":null},{"id":"export-description","name":"Description","description":"Please enter a short description of what this export is for.","type":"string","kind":"textarea","default":"This export exports data to ...","options":null},{"id":"country","name":"Country","description":"Please select one country.","type":"string","kind":"select","default":"value1","options":[{"label":"Country 1","value":"value1"},{"label":"Country 2","value":"value2"},{"label":"Country 3","value":"value3"}]},{"id":"limit","name":"Limit","description":"Enter the maximum number of records.","type":"int","kind":"input","default":1000,"options":null},{"id":"person-height","name":"Person Height","description":"","type":"double","kind":"input","default":178.5,"options":null},{"id":"dummy-data","name":"Generate dummy data","description":"Do you want to generate dummy data?","type":"bool","kind":"confirm","default":true,"options":null},{"id":"countries","name":"Countries","description":"Please select at least one country.","type":"string[]","kind":"multiselect","default":["value1","value3"],"options":[{"label":"Country 1","value":"value1"},{"label":"Country 2","value":"value2"},{"label":"Country 3","value":"value3"}]}]},{"id":"g01-s02","icon":"common:download","name":"Other Ecommerce","description":"Alternative ecommerce solution.","dialogName":"Other Ecommerce","dialogDescription":"Alternative ecommerce solution.","inputs":[{"id":"host","name":"Service Host","description":"Base path of the Service API.","type":"string","kind":"input","default":"example.com","options":null},{"id":"token","name":"Service Token","description":"Service API token.","type":"string","kind":"hidden","default":"","options":null}]}]},{"id":"g02","description":"","required":"all","step":[{"id":"g02-s01","icon":"common:download","name":"Snowflake","description":"Transformation.","dialogName":"Snowflake","dialogDescription":"Step without inputs, locked, for illustration only.","inputs":[]}]},{"id":"g03","description":"Select some destinations if you want.","required":"optional","step":[{"id":"g03-s01","icon":"common:upload","name":"Service 1","description":"Some external service.","dialogName":"Snowflake","dialogDescription":"Some external service.","inputs":[{"id":"host","name":"Service Host","description":"Base path of the Service API.","type":"string","kind":"input","default":"example.com","options":null}]},{"id":"g03-s02","icon":"common:upload","name":"Maximum length step name","description":"Maximum length desc lorem ipsum dolor sit amet consectetur.","dialogName":"Maximum dialog step name","dialogDescription":"Maximum dialog description lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nas.","inputs":[{"id":"host","name":"Input With Max Length Xy","description":"Far far away, behind the word mountains, far from the countr","type":"string","kind":"input","default":"A wonderful serenity has taken possession of my entire soul, like these sweet mornings of spring white...","options":null}]},{"id":"g03-s03","icon":"common:upload","name":"Service 3","description":"Some external service.","dialogName":"Service 3","dialogDescription":"Some external service.","inputs":[]},{"id":"g03-s04","icon":"common:upload","name":"Service 4","description":"Some external service.","dialogName":"Service 4","dialogDescription":"Some external service.","inputs":[{"id":"host","name":"Service Host","description":"Base path of the Service API.","type":"string","kind":"input","default":"example.com","options":null}]},{"id":"g03-s05","icon":"common:upload","name":"Service 5","description":"Some external service.","dialogName":"Service 5 Dialog Name","dialogDescription":"Some external service.","inputs":[{"id":"host","name":"Service Host","description":"Base path of the Service API.","type":"string","kind":"input","default":"example.com","options":null}]}]}]}}}},"404":{"description":"templates.versionNotFound: Version not found error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenericError"},"example":{"statusCode":404,"error":"templates.versionNotFound","message":"Version \"v1.2.3\" not found."}}}}},"security":[{"storage-api-token":[]}]},"post":{"tags":["instance"],"summary":"Validate inputs for upgrade operation","operationId":"UpgradeInstanceValidateInputs","parameters":[{"name":"branch","in":"path","description":"ID of the branch. Use \"default\" for default branch.","required":true,"schema":{"type":"string","description":"ID of the branch. Use \"default\" for default branch.","example":"default"},"example":"default"},{"name":"instanceId","in":"path","required":true,"schema":{"type":"string","description":"ID of the template instance.","example":"V1StGXR8IZ5jdHi6BAmyT"},"example":"V1StGXR8IZ5jdHi6BAmyT"},{"name":"version","in":"path","description":"Semantic version of the template. Use \"default\" for default version.","required":true,"schema":{"type":"string","description":"Semantic version of the template. Use \"default\" for default version.","example":"v1.2.3"},"example":"v1.2.3"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InputsPayload"},"example":{"steps":[{"id":"g01-s01","inputs":[{"id":"user","value":"user@example.com"},{"id":"api-token","value":"123456"}]}]}}}},"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationResult"},"example":{"valid":false,"stepGroups":[{"id":"g01","valid":false,"error":"All steps must be configured.","steps":[{"id":"g01-s01","configured":true,"valid":false,"inputs":[{"id":"api-token","visible":true,"error":"Value cannot be empty."},{"id":"password","visible":false,"error":null}]}]},{"id":"g02","valid":true,"error":null,"steps":[{"id":"g02-s01","configured":false,"valid":true,"inputs":[]},{"id":"g02-s02","configured":true,"valid":true,"inputs":[{"id":"username","visible":true,"error":null}]}]}]}}}},"404":{"description":"templates.versionNotFound: Version not found error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenericError"},"example":{"statusCode":404,"error":"templates.versionNotFound","message":"Version \"v1.2.3\" not found."}}}}},"security":[{"storage-api-token":[]}]}},"/v1/repositories":{"get":{"tags":["template"],"summary":"List template repositories","description":"List all template repositories defined in the project.","operationId":"RepositoriesIndex","responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Repositories"},"example":{"repositories":[{"name":"keboola","url":"https://github.com/keboola/keboola-as-code-templates","ref":"main","author":{"name":"Keboola","url":"https://www.keboola.com"}}]}}}}},"security":[{"storage-api-token":[]}]}},"/v1/repositories/{repository}":{"get":{"tags":["template"],"summary":"Get template repository detail","description":"Get details of specified repository. Use \"keboola\" for default Keboola repository.","operationId":"RepositoryIndex","parameters":[{"name":"repository","in":"path","description":"Name of the template repository. Use \"keboola\" for default Keboola repository.","required":true,"schema":{"type":"string","description":"Name of the template repository. Use \"keboola\" for default Keboola repository.","example":"keboola"},"example":"keboola"}],"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Repository"},"example":{"name":"keboola","url":"https://github.com/keboola/keboola-as-code-templates","ref":"main","author":{"name":"Keboola","url":"https://www.keboola.com"}}}}},"404":{"description":"templates.repositoryNotFound: Repository not found error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenericError"},"example":{"statusCode":404,"error":"templates.repositoryNotFound","message":"Repository \"name\" not found."}}}}},"security":[{"storage-api-token":[]}]}},"/v1/repositories/{repository}/templates":{"get":{"tags":["template"],"summary":"List templates in the repository","description":"List all templates defined in the repository.","operationId":"TemplatesIndex","parameters":[{"name":"repository","in":"path","description":"Name of the template repository. Use \"keboola\" for default Keboola repository.","required":true,"schema":{"type":"string","description":"Name of the template repository. Use \"keboola\" for default Keboola repository.","example":"keboola"},"example":"keboola"}],"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Templates"},"example":{"repository":{"name":"keboola","url":"https://github.com/keboola/keboola-as-code-templates","ref":"main","author":{"name":"Keboola","url":"https://www.keboola.com"}},"templates":[{"id":"my-template","name":"My Template","deprecated":false,"categories":["E-commerce","Other","Social Media"],"components":["ex-generic-v2","keboola.snowflake-transformation"],"author":{"name":"Keboola","url":"https://www.keboola.com"},"description":"Full workflow to load all user accounts from the Service.","defaultVersion":"v1.2.3","versions":[{"version":"v0.1.1","stable":false,"description":"Initial version."},{"version":"v1.1.1","stable":true,"description":""},{"version":"v1.2.3","stable":true,"description":""},{"version":"v2.0.0","stable":false,"description":"Experimental support for new API."}]},{"id":"maximum-length-template-id-dolor-sit-an","name":"Maximum length template name ipsum dolo","deprecated":false,"categories":["E-commerce","Other","Social Media"],"components":["ex-generic-v2","keboola.snowflake-transformation"],"author":{"name":"Keboola","url":"https://www.keboola.com"},"description":"Maximum length template description dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascet.","defaultVersion":"v4.5.6","versions":[{"version":"v4.5.6","stable":true,"description":"Maximum length version description abc."}]}]}}}},"404":{"description":"templates.repositoryNotFound: Repository not found error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenericError"},"example":{"statusCode":404,"error":"templates.repositoryNotFound","message":"Repository \"name\" not found."}}}}},"security":[{"storage-api-token":[]}]}},"/v1/repositories/{repository}/templates/{template}":{"get":{"tags":["template"],"summary":"Get template detail and versions","description":"Get detail and versions of specified template.","operationId":"TemplateIndex","parameters":[{"name":"repository","in":"path","description":"Name of the template repository. Use \"keboola\" for default Keboola repository.","required":true,"schema":{"type":"string","description":"Name of the template repository. Use \"keboola\" for default Keboola repository.","example":"keboola"},"example":"keboola"},{"name":"template","in":"path","required":true,"schema":{"type":"string","description":"ID of the template.","example":"my-template","minLength":1,"maxLength":40},"example":"my-template"}],"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TemplateDetail"},"example":{"id":"my-template","name":"My Template","deprecated":false,"categories":["E-commerce","Other","Social Media"],"components":["ex-generic-v2","keboola.snowflake-transformation"],"author":{"name":"Keboola","url":"https://www.keboola.com"},"description":"Full workflow to load all user accounts from the Service.","defaultVersion":"v1.2.3","versions":[{"version":"v0.1.1","stable":false,"description":"Initial version."},{"version":"v1.1.1","stable":true,"description":""},{"version":"v1.2.3","stable":true,"description":""},{"version":"v2.0.0","stable":false,"description":"Experimental support for new API."}],"repository":{"name":"keboola","url":"https://github.com/keboola/keboola-as-code-templates","ref":"main","author":{"name":"Keboola","url":"https://www.keboola.com"}}}}}},"404":{"description":"templates.templateNotFound: Template not found error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenericError"},"example":{"statusCode":404,"error":"templates.templateNotFound","message":"Template \"id\" not found."}}}}},"security":[{"storage-api-token":[]}]}},"/v1/repositories/{repository}/templates/{template}/{version}":{"get":{"tags":["template"],"summary":"Get version detail","description":"Get details of specified template version.","operationId":"VersionIndex","parameters":[{"name":"repository","in":"path","description":"Name of the template repository. Use \"keboola\" for default Keboola repository.","required":true,"schema":{"type":"string","description":"Name of the template repository. Use \"keboola\" for default Keboola repository.","example":"keboola"},"example":"keboola"},{"name":"template","in":"path","required":true,"schema":{"type":"string","description":"ID of the template.","example":"my-template","minLength":1,"maxLength":40},"example":"my-template"},{"name":"version","in":"path","description":"Semantic version of the template. Use \"default\" for default version.","required":true,"schema":{"type":"string","description":"Semantic version of the template. Use \"default\" for default version.","example":"v1.2.3"},"example":"v1.2.3"}],"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VersionDetailExtended"},"example":{"version":"v1.2.3","stable":true,"description":"Stable version.","components":["ex-generic-v2","keboola.snowflake-transformation"],"longDescription":"Maximum length template **description** dolor sit amet, consectetuer adipiscing elit","readme":"Lorem markdownum quod discenda [aegide lapidem](http://www.nequeuntoffensa.io/)","repository":{"name":"keboola","url":"https://github.com/keboola/keboola-as-code-templates","ref":"main","author":{"name":"Keboola","url":"https://www.keboola.com"}},"template":{"id":"my-template","name":"My Template","deprecated":false,"author":{"name":"Keboola","url":"https://www.keboola.com"},"description":"Full workflow to load all user accounts from the Service.","defaultVersion":"v1.2.3"}}}}},"404":{"description":"templates.versionNotFound: Version not found error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenericError"},"example":{"statusCode":404,"error":"templates.versionNotFound","message":"Version \"v1.2.3\" not found."}}}}},"security":[{"storage-api-token":[]}]}},"/v1/repositories/{repository}/templates/{template}/{version}/inputs":{"get":{"tags":["template"],"summary":"Get inputs","description":"Get inputs for the \"use\" API call.","operationId":"InputsIndex","parameters":[{"name":"repository","in":"path","description":"Name of the template repository. Use \"keboola\" for default Keboola repository.","required":true,"schema":{"type":"string","description":"Name of the template repository. Use \"keboola\" for default Keboola repository.","example":"keboola"},"example":"keboola"},{"name":"template","in":"path","required":true,"schema":{"type":"string","description":"ID of the template.","example":"my-template","minLength":1,"maxLength":40},"example":"my-template"},{"name":"version","in":"path","description":"Semantic version of the template. Use \"default\" for default version.","required":true,"schema":{"type":"string","description":"Semantic version of the template. Use \"default\" for default version.","example":"v1.2.3"},"example":"v1.2.3"}],"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Inputs"},"example":{"initialState":{"valid":false,"stepGroups":[{"id":"g01","valid":false,"error":"All steps must be configured.","steps":[{"id":"g01-s01","configured":true,"valid":false,"inputs":[{"id":"api-token","visible":true,"error":"Value cannot be empty."},{"id":"password","visible":false,"error":null}]}]},{"id":"g02","valid":true,"error":null,"steps":[{"id":"g02-s01","configured":false,"valid":true,"inputs":[]},{"id":"g02-s02","configured":true,"valid":true,"inputs":[{"id":"username","visible":true,"error":null}]}]}]},"stepGroups":[{"id":"g01","description":"Choose one of the eshop platforms.","required":"atLeastOne","step":[{"id":"g01-s01","icon":"common:download","name":"Super Ecommerce","description":"Sell online with the Super E-commerce website.","dialogName":"Super Ecommerce","dialogDescription":"Please configure credentials to your Super Ecommerce account.","inputs":[{"id":"user","name":"User Name","description":"","type":"string","kind":"input","default":"john","options":null},{"id":"api-token","name":"API Token","description":"Insert Service API Token.","type":"string","kind":"hidden","default":"","options":null},{"id":"export-description","name":"Description","description":"Please enter a short description of what this export is for.","type":"string","kind":"textarea","default":"This export exports data to ...","options":null},{"id":"country","name":"Country","description":"Please select one country.","type":"string","kind":"select","default":"value1","options":[{"label":"Country 1","value":"value1"},{"label":"Country 2","value":"value2"},{"label":"Country 3","value":"value3"}]},{"id":"limit","name":"Limit","description":"Enter the maximum number of records.","type":"int","kind":"input","default":1000,"options":null},{"id":"person-height","name":"Person Height","description":"","type":"double","kind":"input","default":178.5,"options":null},{"id":"dummy-data","name":"Generate dummy data","description":"Do you want to generate dummy data?","type":"bool","kind":"confirm","default":true,"options":null},{"id":"countries","name":"Countries","description":"Please select at least one country.","type":"string[]","kind":"multiselect","default":["value1","value3"],"options":[{"label":"Country 1","value":"value1"},{"label":"Country 2","value":"value2"},{"label":"Country 3","value":"value3"}]}]},{"id":"g01-s02","icon":"common:download","name":"Other Ecommerce","description":"Alternative ecommerce solution.","dialogName":"Other Ecommerce","dialogDescription":"Alternative ecommerce solution.","inputs":[{"id":"host","name":"Service Host","description":"Base path of the Service API.","type":"string","kind":"input","default":"example.com","options":null},{"id":"token","name":"Service Token","description":"Service API token.","type":"string","kind":"hidden","default":"","options":null}]}]},{"id":"g02","description":"","required":"all","step":[{"id":"g02-s01","icon":"common:download","name":"Snowflake","description":"Transformation.","dialogName":"Snowflake","dialogDescription":"Step without inputs, locked, for illustration only.","inputs":[]}]},{"id":"g03","description":"Select some destinations if you want.","required":"optional","step":[{"id":"g03-s01","icon":"common:upload","name":"Service 1","description":"Some external service.","dialogName":"Snowflake","dialogDescription":"Some external service.","inputs":[{"id":"host","name":"Service Host","description":"Base path of the Service API.","type":"string","kind":"input","default":"example.com","options":null}]},{"id":"g03-s02","icon":"common:upload","name":"Maximum length step name","description":"Maximum length desc lorem ipsum dolor sit amet consectetur.","dialogName":"Maximum dialog step name","dialogDescription":"Maximum dialog description lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nas.","inputs":[{"id":"host","name":"Input With Max Length Xy","description":"Far far away, behind the word mountains, far from the countr","type":"string","kind":"input","default":"A wonderful serenity has taken possession of my entire soul, like these sweet mornings of spring white...","options":null}]},{"id":"g03-s03","icon":"common:upload","name":"Service 3","description":"Some external service.","dialogName":"Service 3","dialogDescription":"Some external service.","inputs":[]},{"id":"g03-s04","icon":"common:upload","name":"Service 4","description":"Some external service.","dialogName":"Service 4","dialogDescription":"Some external service.","inputs":[{"id":"host","name":"Service Host","description":"Base path of the Service API.","type":"string","kind":"input","default":"example.com","options":null}]},{"id":"g03-s05","icon":"common:upload","name":"Service 5","description":"Some external service.","dialogName":"Service 5 Dialog Name","dialogDescription":"Some external service.","inputs":[{"id":"host","name":"Service Host","description":"Base path of the Service API.","type":"string","kind":"input","default":"example.com","options":null}]}]}]}}}},"404":{"description":"templates.versionNotFound: Version not found error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenericError"},"example":{"statusCode":404,"error":"templates.versionNotFound","message":"Version \"v1.2.3\" not found."}}}}},"security":[{"storage-api-token":[]}]}},"/v1/repositories/{repository}/templates/{template}/{version}/use":{"post":{"tags":["template"],"summary":"Use template","description":"Validate inputs and use template in the branch.\nOnly configured steps should be send.","operationId":"UseTemplateVersion","parameters":[{"name":"repository","in":"path","description":"Name of the template repository. Use \"keboola\" for default Keboola repository.","required":true,"schema":{"type":"string","description":"Name of the template repository. Use \"keboola\" for default Keboola repository.","example":"keboola"},"example":"keboola"},{"name":"template","in":"path","required":true,"schema":{"type":"string","description":"ID of the template.","example":"my-template","minLength":1,"maxLength":40},"example":"my-template"},{"name":"version","in":"path","description":"Semantic version of the template. Use \"default\" for default version.","required":true,"schema":{"type":"string","description":"Semantic version of the template. Use \"default\" for default version.","example":"v1.2.3"},"example":"v1.2.3"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UseTemplateVersionRequestBody"},"example":{"branch":"default","name":"My Instance","steps":[{"id":"g01-s01","inputs":[{"id":"user","value":"user@example.com"},{"id":"api-token","value":"123456"}]}]}}}},"responses":{"202":{"description":"Accepted response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Task"},"example":{"id":"task-1","url":"https://templates.keboola.com/v1/tasks/template.use/2018-01-01T00:00:00.000Z_dIklP","type":"template.use","createdAt":"2018-01-01T00:00:00.000Z","finishedAt":"2018-01-01T00:00:00.000Z","isFinished":true,"duration":123,"result":"task succeeded","outputs":{"instanceId":"V1StGXR8IZ5jdHi6BAmyT"}}}}},"400":{"description":"InvalidInputs: Inputs are not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationError"},"example":{"ValidationResult":{"valid":false,"stepGroups":[{"id":"g01","valid":false,"error":"All steps must be configured.","steps":[{"id":"g01-s01","configured":true,"valid":false,"inputs":[{"id":"api-token","visible":true,"error":"Value cannot be empty."},{"id":"password","visible":false,"error":null}]}]},{"id":"g02","valid":true,"error":null,"steps":[{"id":"g02-s01","configured":false,"valid":true,"inputs":[]},{"id":"g02-s02","configured":true,"valid":true,"inputs":[{"id":"username","visible":true,"error":null}]}]}]},"error":"InvalidPayload","message":"Inputs are not valid."}}}},"404":{"description":"templates.versionNotFound: Version not found error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenericError"},"example":{"statusCode":404,"error":"templates.versionNotFound","message":"Version \"v1.2.3\" not found."}}}},"503":{"description":"templates.projectLocked: Access to branch metadata must be atomic, so only one write operation can run at a time. If this error occurs, the client should make retries, see Retry-After header.","headers":{"Retry-After":{"description":"Indicates how long the user agent should wait before making a follow-up request.","schema":{"type":"string","description":"Indicates how long the user agent should wait before making a follow-up request.","example":"\u003chttp-date\u003e/\u003cdelay-seconds\u003e"},"example":"\u003chttp-date\u003e/\u003cdelay-seconds\u003e"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectLockedError2"},"example":{"statusCode":503,"error":"templates.projectLocked","message":"The project is locked, another operation is in progress, please try again later."}}}}},"security":[{"storage-api-token":[]}]}},"/v1/repositories/{repository}/templates/{template}/{version}/validate":{"post":{"tags":["template"],"summary":"Validate inputs","description":"Validate inputs for the \"use\" API call.\nOnly configured steps should be send.","operationId":"ValidateInputs","parameters":[{"name":"repository","in":"path","description":"Name of the template repository. Use \"keboola\" for default Keboola repository.","required":true,"schema":{"type":"string","description":"Name of the template repository. Use \"keboola\" for default Keboola repository.","example":"keboola"},"example":"keboola"},{"name":"template","in":"path","required":true,"schema":{"type":"string","description":"ID of the template.","example":"my-template","minLength":1,"maxLength":40},"example":"my-template"},{"name":"version","in":"path","description":"Semantic version of the template. Use \"default\" for default version.","required":true,"schema":{"type":"string","description":"Semantic version of the template. Use \"default\" for default version.","example":"v1.2.3"},"example":"v1.2.3"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InputsPayload"},"example":{"steps":[{"id":"g01-s01","inputs":[{"id":"user","value":"user@example.com"},{"id":"api-token","value":"123456"}]}]}}}},"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationResult"},"example":{"valid":false,"stepGroups":[{"id":"g01","valid":false,"error":"All steps must be configured.","steps":[{"id":"g01-s01","configured":true,"valid":false,"inputs":[{"id":"api-token","visible":true,"error":"Value cannot be empty."},{"id":"password","visible":false,"error":null}]}]},{"id":"g02","valid":true,"error":null,"steps":[{"id":"g02-s01","configured":false,"valid":true,"inputs":[]},{"id":"g02-s02","configured":true,"valid":true,"inputs":[{"id":"username","visible":true,"error":null}]}]}]}}}},"404":{"description":"templates.versionNotFound: Version not found error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenericError"},"example":{"statusCode":404,"error":"templates.versionNotFound","message":"Version \"v1.2.3\" not found."}}}}},"security":[{"storage-api-token":[]}]}},"/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":{"id":"task-1","url":"https://templates.keboola.com/v1/tasks/template.use/2018-01-01T00:00:00.000Z_dIklP","type":"template.use","createdAt":"2018-01-01T00:00:00.000Z","finishedAt":"2018-01-01T00:00:00.000Z","isFinished":true,"duration":123,"result":"task succeeded","outputs":{"instanceId":"V1StGXR8IZ5jdHi6BAmyT"}}}}},"404":{"description":"templates.taskNotFound: Task not found error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenericError"},"example":{"statusCode":404,"error":"templates.taskNotFound","message":"Task \"001\" not found."}}}}},"security":[{"storage-api-token":[]}]}}},"components":{"schemas":{"Author":{"type":"object","properties":{"name":{"type":"string","description":"Name of the author.","example":"Keboola","minLength":1},"url":{"type":"string","description":"Link to the author website.","example":"https://www.keboola.com","minLength":1}},"description":"Author of template or repository.","example":{"name":"Keboola","url":"https://www.keboola.com"},"required":["name","url"]},"BranchRequest":{"type":"object","properties":{"branch":{"type":"string","description":"ID of the branch. Use \"default\" for default branch.","example":"default"}},"example":{"branch":"default"},"required":["branch"]},"ChangeInfo":{"type":"object","properties":{"date":{"type":"string","description":"Date and time of the change.","example":"2022-04-28T14:20:04+00:00","format":"date-time"},"tokenId":{"type":"string","description":"The token by which the change was made.","example":"245941"}},"description":"Date of change and who made it.","example":{"date":"2022-04-28T14:20:04+00:00","tokenId":"245941"},"required":["date","tokenId"]},"Config":{"type":"object","properties":{"componentId":{"type":"string","description":"Component ID.","example":"keboola.ex-db-mysql"},"configId":{"type":"string","description":"Configuration ID.","example":"7954825835"},"name":{"type":"string","description":"Name of the configuration.","example":"My Extractor"}},"description":"The configuration that is part of the template instance.","example":{"componentId":"keboola.ex-db-mysql","configId":"7954825835","name":"My Extractor"},"required":["componentId","configId","name"]},"GenericError":{"type":"object","properties":{"error":{"type":"string","description":"Name of error.","example":"templates.internalError"},"message":{"type":"string","description":"Error message.","example":"Internal Error"},"statusCode":{"type":"integer","description":"HTTP status code.","example":500,"format":"int64"}},"description":"Generic error","example":{"error":"templates.internalError","message":"Internal Error","statusCode":500},"required":["statusCode","error","message"]},"GetTaskRequest":{"type":"object","properties":{"taskId":{"type":"string","description":"Unique ID of the task.","example":"task_1234"}},"example":{"taskId":"task_1234"},"required":["taskId"]},"Input":{"type":"object","properties":{"componentId":{"type":"string","description":"Component id for \"oauth\" kind inputs.","example":"keboola.ex-component"},"default":{"description":"Default value, match defined type.","example":"foo bar","oneOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"items":{"type":"string"},"type":"array"},{"type":"object"}]},"description":{"type":"string","description":"Description of the input.","example":"Insert Service API Token.","minLength":1,"maxLength":60},"id":{"type":"string","description":"Unique ID of the input.","example":"api-token","minLength":1},"kind":{"type":"string","description":"Kind of the input.","example":"input","enum":["input","hidden","textarea","confirm","select","multiselect","oauth","oauthAccounts"]},"name":{"type":"string","description":"Name of the input.","example":"API Token","minLength":1,"maxLength":25},"oauthInputId":{"type":"string","description":"OAuth input id for \"oauthAccounts\" kind inputs.","example":"oauthInput"},"options":{"type":"array","items":{"$ref":"#/components/schemas/InputOption"},"description":"Input options for type = select OR multiselect.","example":[{"label":"Country 1","value":"value1"},{"label":"Country 2","value":"value2"},{"label":"Country 3","value":"value3"}]},"type":{"type":"string","description":"Type of the input.","example":"string","enum":["string","int","double","bool","string[]","object"]}},"description":"User input.","example":{"id":"api-token","name":"API Token","description":"Insert Service API Token.","type":"string","kind":"hidden","default":"","options":null},"required":["id","name","description","type","kind","default"]},"InputOption":{"type":"object","properties":{"label":{"type":"string","description":"Visible label of the option.","example":"Label","minLength":1,"maxLength":25},"value":{"type":"string","description":"Value of the option.","example":"value","minLength":0,"maxLength":100}},"description":"Input option for type = select OR multiselect.","example":{"label":"Label","value":"value"},"required":["label","value"]},"InputValidationResult":{"type":"object","properties":{"error":{"type":"string","description":"Error message.","example":"API token cannot be empty."},"id":{"type":"string","description":"Input ID.","example":"api-token"},"visible":{"type":"boolean","description":"If false, the input should be hidden to user.","example":true}},"description":"Validation Detail of the input.","example":{"error":"API token cannot be empty.","id":"api-token","visible":true},"required":["id","visible"]},"InputValue":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of the input.","example":"g01-s01","minLength":1},"value":{"description":"Input value filled in by user in the required type.","example":"foo bar"}},"description":"Input value filled in by user.","example":{"id":"user","value":"user@example.com"},"required":["id","value"]},"Inputs":{"type":"object","properties":{"initialState":{"$ref":"#/components/schemas/ValidationResult"},"stepGroups":{"type":"array","items":{"$ref":"#/components/schemas/StepGroup"},"description":"List of the step groups.","example":[{"id":"g01","description":"Choose one of the eshop platforms.","required":"atLeastOne","step":[{"id":"g01-s01","icon":"common:download","name":"Super Ecommerce","description":"Sell online with the Super E-commerce website.","dialogName":"Super Ecommerce","dialogDescription":"Please configure credentials to your Super Ecommerce account.","inputs":[{"id":"user","name":"User Name","description":"","type":"string","kind":"input","default":"john","options":null},{"id":"api-token","name":"API Token","description":"Insert Service API Token.","type":"string","kind":"hidden","default":"","options":null},{"id":"export-description","name":"Description","description":"Please enter a short description of what this export is for.","type":"string","kind":"textarea","default":"This export exports data to ...","options":null},{"id":"country","name":"Country","description":"Please select one country.","type":"string","kind":"select","default":"value1","options":[{"label":"Country 1","value":"value1"},{"label":"Country 2","value":"value2"},{"label":"Country 3","value":"value3"}]},{"id":"limit","name":"Limit","description":"Enter the maximum number of records.","type":"int","kind":"input","default":1000,"options":null},{"id":"person-height","name":"Person Height","description":"","type":"double","kind":"input","default":178.5,"options":null},{"id":"dummy-data","name":"Generate dummy data","description":"Do you want to generate dummy data?","type":"bool","kind":"confirm","default":true,"options":null},{"id":"countries","name":"Countries","description":"Please select at least one country.","type":"string[]","kind":"multiselect","default":["value1","value3"],"options":[{"label":"Country 1","value":"value1"},{"label":"Country 2","value":"value2"},{"label":"Country 3","value":"value3"}]}]},{"id":"g01-s02","icon":"common:download","name":"Other Ecommerce","description":"Alternative ecommerce solution.","dialogName":"Other Ecommerce","dialogDescription":"Alternative ecommerce solution.","inputs":[{"id":"host","name":"Service Host","description":"Base path of the Service API.","type":"string","kind":"input","default":"example.com","options":null},{"id":"token","name":"Service Token","description":"Service API token.","type":"string","kind":"hidden","default":"","options":null}]}]},{"id":"g02","description":"","required":"all","step":[{"id":"g02-s01","icon":"common:download","name":"Snowflake","description":"Transformation.","dialogName":"Snowflake","dialogDescription":"Step without inputs, locked, for illustration only.","inputs":[]}]},{"id":"g03","description":"Select some destinations if you want.","required":"optional","step":[{"id":"g03-s01","icon":"common:upload","name":"Service 1","description":"Some external service.","dialogName":"Snowflake","dialogDescription":"Some external service.","inputs":[{"id":"host","name":"Service Host","description":"Base path of the Service API.","type":"string","kind":"input","default":"example.com","options":null}]},{"id":"g03-s02","icon":"common:upload","name":"Maximum length step name","description":"Maximum length desc lorem ipsum dolor sit amet consectetur.","dialogName":"Maximum dialog step name","dialogDescription":"Maximum dialog description lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nas.","inputs":[{"id":"host","name":"Input With Max Length Xy","description":"Far far away, behind the word mountains, far from the countr","type":"string","kind":"input","default":"A wonderful serenity has taken possession of my entire soul, like these sweet mornings of spring white...","options":null}]},{"id":"g03-s03","icon":"common:upload","name":"Service 3","description":"Some external service.","dialogName":"Service 3","dialogDescription":"Some external service.","inputs":[]},{"id":"g03-s04","icon":"common:upload","name":"Service 4","description":"Some external service.","dialogName":"Service 4","dialogDescription":"Some external service.","inputs":[{"id":"host","name":"Service Host","description":"Base path of the Service API.","type":"string","kind":"input","default":"example.com","options":null}]},{"id":"g03-s05","icon":"common:upload","name":"Service 5","description":"Some external service.","dialogName":"Service 5 Dialog Name","dialogDescription":"Some external service.","inputs":[{"id":"host","name":"Service Host","description":"Base path of the Service API.","type":"string","kind":"input","default":"example.com","options":null}]}]}],"minItems":1}},"description":"List of the inputs divided to step groups and steps.","example":{"initialState":{"valid":false,"stepGroups":[{"id":"g01","valid":false,"error":"All steps must be configured.","steps":[{"id":"g01-s01","configured":true,"valid":false,"inputs":[{"id":"api-token","visible":true,"error":"Value cannot be empty."},{"id":"password","visible":false,"error":null}]}]},{"id":"g02","valid":true,"error":null,"steps":[{"id":"g02-s01","configured":false,"valid":true,"inputs":[]},{"id":"g02-s02","configured":true,"valid":true,"inputs":[{"id":"username","visible":true,"error":null}]}]}]},"stepGroups":[{"id":"g01","description":"Choose one of the eshop platforms.","required":"atLeastOne","step":[{"id":"g01-s01","icon":"common:download","name":"Super Ecommerce","description":"Sell online with the Super E-commerce website.","dialogName":"Super Ecommerce","dialogDescription":"Please configure credentials to your Super Ecommerce account.","inputs":[{"id":"user","name":"User Name","description":"","type":"string","kind":"input","default":"john","options":null},{"id":"api-token","name":"API Token","description":"Insert Service API Token.","type":"string","kind":"hidden","default":"","options":null},{"id":"export-description","name":"Description","description":"Please enter a short description of what this export is for.","type":"string","kind":"textarea","default":"This export exports data to ...","options":null},{"id":"country","name":"Country","description":"Please select one country.","type":"string","kind":"select","default":"value1","options":[{"label":"Country 1","value":"value1"},{"label":"Country 2","value":"value2"},{"label":"Country 3","value":"value3"}]},{"id":"limit","name":"Limit","description":"Enter the maximum number of records.","type":"int","kind":"input","default":1000,"options":null},{"id":"person-height","name":"Person Height","description":"","type":"double","kind":"input","default":178.5,"options":null},{"id":"dummy-data","name":"Generate dummy data","description":"Do you want to generate dummy data?","type":"bool","kind":"confirm","default":true,"options":null},{"id":"countries","name":"Countries","description":"Please select at least one country.","type":"string[]","kind":"multiselect","default":["value1","value3"],"options":[{"label":"Country 1","value":"value1"},{"label":"Country 2","value":"value2"},{"label":"Country 3","value":"value3"}]}]},{"id":"g01-s02","icon":"common:download","name":"Other Ecommerce","description":"Alternative ecommerce solution.","dialogName":"Other Ecommerce","dialogDescription":"Alternative ecommerce solution.","inputs":[{"id":"host","name":"Service Host","description":"Base path of the Service API.","type":"string","kind":"input","default":"example.com","options":null},{"id":"token","name":"Service Token","description":"Service API token.","type":"string","kind":"hidden","default":"","options":null}]}]},{"id":"g02","description":"","required":"all","step":[{"id":"g02-s01","icon":"common:download","name":"Snowflake","description":"Transformation.","dialogName":"Snowflake","dialogDescription":"Step without inputs, locked, for illustration only.","inputs":[]}]},{"id":"g03","description":"Select some destinations if you want.","required":"optional","step":[{"id":"g03-s01","icon":"common:upload","name":"Service 1","description":"Some external service.","dialogName":"Snowflake","dialogDescription":"Some external service.","inputs":[{"id":"host","name":"Service Host","description":"Base path of the Service API.","type":"string","kind":"input","default":"example.com","options":null}]},{"id":"g03-s02","icon":"common:upload","name":"Maximum length step name","description":"Maximum length desc lorem ipsum dolor sit amet consectetur.","dialogName":"Maximum dialog step name","dialogDescription":"Maximum dialog description lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nas.","inputs":[{"id":"host","name":"Input With Max Length Xy","description":"Far far away, behind the word mountains, far from the countr","type":"string","kind":"input","default":"A wonderful serenity has taken possession of my entire soul, like these sweet mornings of spring white...","options":null}]},{"id":"g03-s03","icon":"common:upload","name":"Service 3","description":"Some external service.","dialogName":"Service 3","dialogDescription":"Some external service.","inputs":[]},{"id":"g03-s04","icon":"common:upload","name":"Service 4","description":"Some external service.","dialogName":"Service 4","dialogDescription":"Some external service.","inputs":[{"id":"host","name":"Service Host","description":"Base path of the Service API.","type":"string","kind":"input","default":"example.com","options":null}]},{"id":"g03-s05","icon":"common:upload","name":"Service 5","description":"Some external service.","dialogName":"Service 5 Dialog Name","dialogDescription":"Some external service.","inputs":[{"id":"host","name":"Service Host","description":"Base path of the Service API.","type":"string","kind":"input","default":"example.com","options":null}]}]}]},"required":["stepGroups","initialState"]},"InputsPayload":{"type":"object","properties":{"steps":{"type":"array","items":{"$ref":"#/components/schemas/StepPayload"},"description":"Steps with input values filled in by user.","example":[{"id":"g01-s01","inputs":[{"id":"user","value":"user@example.com"},{"id":"api-token","value":"123456"}]}]}},"example":{"steps":[{"id":"g01-s01","inputs":[{"id":"user","value":"user@example.com"},{"id":"api-token","value":"123456"}]}]},"required":["steps"]},"Instance":{"type":"object","properties":{"branch":{"type":"string","description":"ID of the branch.","example":"5876"},"configurations":{"type":"array","items":{"$ref":"#/components/schemas/Config"},"description":"All configurations from the instance.","example":[{"componentId":"keboola.ex-db-mysql","configId":"7954825835","name":"My Extractor"}]},"created":{"$ref":"#/components/schemas/ChangeInfo"},"instanceId":{"type":"string","description":"ID of the template instance.","example":"V1StGXR8IZ5jdHi6BAmyT"},"mainConfig":{"$ref":"#/components/schemas/MainConfig"},"name":{"type":"string","description":"Name of the instance.","example":"My Instance"},"repositoryName":{"type":"string","description":"Name of the template repository.","example":"keboola"},"templateId":{"type":"string","description":"ID of the template.","example":"my-template","minLength":1,"maxLength":40},"updated":{"$ref":"#/components/schemas/ChangeInfo"},"version":{"type":"string","description":"Semantic version of the template.","example":"v1.1.0"}},"description":"Template instance.","example":{"branch":"5876","configurations":[{"componentId":"keboola.ex-db-mysql","configId":"7954825835","name":"My Extractor"}],"created":{"date":"2022-04-28T14:20:04+00:00","tokenId":"245941"},"instanceId":"V1StGXR8IZ5jdHi6BAmyT","mainConfig":{"componentId":"keboola.orchestrator","configId":"7954825835"},"name":"My Instance","repositoryName":"keboola","templateId":"my-template","updated":{"date":"2022-04-28T14:20:04+00:00","tokenId":"245941"},"version":"v1.1.0"},"required":["instanceId","templateId","version","repositoryName","branch","name","created","updated","configurations"]},"InstanceBase":{"type":"object","properties":{"branch":{"type":"string","description":"ID of the branch.","example":"5876"},"created":{"$ref":"#/components/schemas/ChangeInfo"},"instanceId":{"type":"string","description":"ID of the template instance.","example":"V1StGXR8IZ5jdHi6BAmyT"},"mainConfig":{"$ref":"#/components/schemas/MainConfig"},"name":{"type":"string","description":"Name of the instance.","example":"My Instance"},"updated":{"$ref":"#/components/schemas/ChangeInfo"}},"description":"Instance base information.","example":{"branch":"5876","created":{"date":"2022-04-28T14:20:04+00:00","tokenId":"245941"},"instanceId":"V1StGXR8IZ5jdHi6BAmyT","mainConfig":{"componentId":"keboola.orchestrator","configId":"7954825835"},"name":"My Instance","updated":{"date":"2022-04-28T14:20:04+00:00","tokenId":"245941"}},"required":["instanceId","branch","name","created","updated"]},"InstanceDetail":{"type":"object","properties":{"branch":{"type":"string","description":"ID of the branch.","example":"5876"},"configurations":{"type":"array","items":{"$ref":"#/components/schemas/Config"},"description":"All configurations from the instance.","example":[{"componentId":"keboola.ex-db-mysql","configId":"7954825835","name":"My Extractor"}]},"created":{"$ref":"#/components/schemas/ChangeInfo"},"instanceId":{"type":"string","description":"ID of the template instance.","example":"V1StGXR8IZ5jdHi6BAmyT"},"mainConfig":{"$ref":"#/components/schemas/MainConfig"},"name":{"type":"string","description":"Name of the instance.","example":"My Instance"},"repositoryName":{"type":"string","example":"abc123"},"templateDetail":{"$ref":"#/components/schemas/TemplateBase"},"templateId":{"type":"string","example":"abc123"},"updated":{"$ref":"#/components/schemas/ChangeInfo"},"version":{"type":"string","example":"abc123"},"versionDetail":{"$ref":"#/components/schemas/VersionDetail"}},"example":{"branch":"5876","configurations":[{"componentId":"keboola.ex-db-mysql","configId":"7954825835","name":"My Extractor"}],"created":{"date":"2022-04-28T14:20:04+00:00","tokenId":"245941"},"instanceId":"V1StGXR8IZ5jdHi6BAmyT","mainConfig":{"componentId":"keboola.orchestrator","configId":"7954825835"},"name":"My Instance","repositoryName":"abc123","templateDetail":{"author":{"name":"Keboola","url":"https://www.keboola.com"},"defaultVersion":"v1.2.3","deprecated":false,"description":"Full workflow to load all user accounts from the Service.","id":"my-template","name":"My Template"},"templateId":"abc123","updated":{"date":"2022-04-28T14:20:04+00:00","tokenId":"245941"},"version":"abc123","versionDetail":{"version":"v1.2.3","stable":true,"description":"Stable version.","components":["ex-generic-v2","keboola.snowflake-transformation"],"longDescription":"Maximum length template **description** dolor sit amet, consectetuer adipiscing elit","readme":"Lorem markdownum quod discenda [aegide lapidem](http://www.nequeuntoffensa.io/)"}},"required":["instanceId","templateId","version","repositoryName","branch","name","created","updated","templateDetail","versionDetail","configurations"]},"InstanceInputsRequest":{"type":"object","properties":{"branch":{"type":"string","description":"ID of the branch. Use \"default\" for default branch.","example":"default"},"instanceId":{"type":"string","description":"ID of the template instance.","example":"V1StGXR8IZ5jdHi6BAmyT"},"version":{"type":"string","description":"Semantic version of the template. Use \"default\" for default version.","example":"v1.2.3"}},"example":{"branch":"default","instanceId":"V1StGXR8IZ5jdHi6BAmyT","version":"v1.2.3"},"required":["version","instanceId","branch"]},"InstanceRequest":{"type":"object","properties":{"branch":{"type":"string","description":"ID of the branch. Use \"default\" for default branch.","example":"default"},"instanceId":{"type":"string","description":"ID of the template instance.","example":"V1StGXR8IZ5jdHi6BAmyT"}},"example":{"branch":"default","instanceId":"V1StGXR8IZ5jdHi6BAmyT"},"required":["instanceId","branch"]},"Instances":{"type":"object","properties":{"instances":{"type":"array","items":{"$ref":"#/components/schemas/Instance"},"description":"All instances found in branch.","example":[{"branch":"5876","configurations":[{"componentId":"keboola.ex-db-mysql","configId":"7954825835","name":"My Extractor"}],"created":{"date":"2022-04-28T14:20:04+00:00","tokenId":"245941"},"instanceId":"V1StGXR8IZ5jdHi6BAmyT","mainConfig":{"componentId":"keboola.orchestrator","configId":"7954825835"},"name":"My Instance","repositoryName":"keboola","templateId":"my-template","updated":{"date":"2022-04-28T14:20:04+00:00","tokenId":"245941"},"version":"v1.1.0"}]}},"description":"List of the instances.","example":{"instances":[{"branch":"5876","configurations":[{"componentId":"keboola.ex-db-mysql","configId":"7954825835","name":"My Extractor"}],"created":{"date":"2022-04-28T14:20:04+00:00","tokenId":"245941"},"instanceId":"V1StGXR8IZ5jdHi6BAmyT","mainConfig":{"componentId":"keboola.orchestrator","configId":"7954825835"},"name":"My Instance","repositoryName":"keboola","templateId":"my-template","updated":{"date":"2022-04-28T14:20:04+00:00","tokenId":"245941"},"version":"v1.1.0"}]},"required":["instances"]},"MainConfig":{"type":"object","properties":{"componentId":{"type":"string","description":"Component ID.","example":"keboola.orchestrator"},"configId":{"type":"string","description":"Configuration ID.","example":"7954825835"}},"description":"Main config of the instance, usually an orchestration. Optional.","example":{"componentId":"keboola.orchestrator","configId":"7954825835"},"required":["componentId","configId"]},"ProjectLockedError":{"type":"object","properties":{"error":{"type":"string","description":"Name of error.","example":"templates.internalError"},"message":{"type":"string","description":"Error message.","example":"The project is locked, another operation is in progress, please try again later."},"retryAfter":{"type":"string","description":"Indicates how long the user agent should wait before making a follow-up request.","example":"\u003chttp-date\u003e/\u003cdelay-seconds\u003e"},"statusCode":{"type":"integer","description":"HTTP status code.","example":503,"format":"int64"}},"description":"Project locked error","example":{"error":"templates.internalError","message":"The project is locked, another operation is in progress, please try again later.","retryAfter":"\u003chttp-date\u003e/\u003cdelay-seconds\u003e","statusCode":503},"required":["statusCode","error","message","retryAfter"]},"ProjectLockedError2":{"type":"object","properties":{"error":{"type":"string","description":"Name of error.","example":"templates.internalError"},"message":{"type":"string","description":"Error message.","example":"The project is locked, another operation is in progress, please try again later."},"statusCode":{"type":"integer","description":"HTTP status code.","example":503,"format":"int64"}},"description":"Access to branch metadata must be atomic, so only one write operation can run at a time. If this error occurs, the client should make retries, see Retry-After header.","example":{"statusCode":503,"error":"templates.projectLocked","message":"The project is locked, another operation is in progress, please try again later."},"required":["statusCode","error","message"]},"ProjectLockedError3":{"type":"object","properties":{"error":{"type":"string","description":"Name of error.","example":"templates.internalError"},"message":{"type":"string","description":"Error message.","example":"The project is locked, another operation is in progress, please try again later."},"statusCode":{"type":"integer","description":"HTTP status code.","example":503,"format":"int64"}},"description":"Access to branch metadata must be atomic, so only one write operation can run at a time. If this error occurs, the client should make retries, see Retry-After header.","example":{"statusCode":503,"error":"templates.projectLocked","message":"The project is locked, another operation is in progress, please try again later."},"required":["statusCode","error","message"]},"ProjectLockedError4":{"type":"object","properties":{"error":{"type":"string","description":"Name of error.","example":"templates.internalError"},"message":{"type":"string","description":"Error message.","example":"The project is locked, another operation is in progress, please try again later."},"statusCode":{"type":"integer","description":"HTTP status code.","example":503,"format":"int64"}},"description":"Access to branch metadata must be atomic, so only one write operation can run at a time. If this error occurs, the client should make retries, see Retry-After header.","example":{"statusCode":503,"error":"templates.projectLocked","message":"The project is locked, another operation is in progress, please try again later."},"required":["statusCode","error","message"]},"ProjectLockedError5":{"type":"object","properties":{"error":{"type":"string","description":"Name of error.","example":"templates.internalError"},"message":{"type":"string","description":"Error message.","example":"The project is locked, another operation is in progress, please try again later."},"statusCode":{"type":"integer","description":"HTTP status code.","example":503,"format":"int64"}},"description":"Access to branch metadata must be atomic, so only one write operation can run at a time. If this error occurs, the client should make retries, see Retry-After header.","example":{"statusCode":503,"error":"templates.projectLocked","message":"The project is locked, another operation is in progress, please try again later."},"required":["statusCode","error","message"]},"Repositories":{"type":"object","properties":{"repositories":{"type":"array","items":{"$ref":"#/components/schemas/Repository"},"description":"All template repositories defined in the project.","example":[{"name":"keboola","url":"https://github.com/keboola/keboola-as-code-templates","ref":"main","author":{"name":"Keboola","url":"https://www.keboola.com"}}]}},"description":"List of the repositories.","example":{"repositories":[{"name":"keboola","url":"https://github.com/keboola/keboola-as-code-templates","ref":"main","author":{"name":"Keboola","url":"https://www.keboola.com"}}]},"required":["repositories"]},"Repository":{"type":"object","properties":{"author":{"$ref":"#/components/schemas/Author"},"name":{"type":"string","description":"Template repository name. Use \"keboola\" for default Keboola repository.","example":"keboola","minLength":1,"maxLength":40},"ref":{"type":"string","description":"Git branch or tag.","example":"main","minLength":1},"url":{"type":"string","description":"Git URL to the repository.","example":"https://github.com/keboola/keboola-as-code-templates","minLength":1}},"description":"Template repository.","example":{"name":"keboola","url":"https://github.com/keboola/keboola-as-code-templates","ref":"main","author":{"name":"Keboola","url":"https://www.keboola.com"}},"required":["name","url","ref","author"]},"RepositoryRequest":{"type":"object","properties":{"repository":{"type":"string","description":"Name of the template repository. Use \"keboola\" for default Keboola repository.","example":"keboola"}},"example":{"repository":"keboola"},"required":["repository"]},"ServiceDetail":{"type":"object","properties":{"api":{"type":"string","description":"Name of the API","example":"templates"},"documentation":{"type":"string","description":"URL of the API documentation.","example":"https://templates.keboola.com/v1/documentation"}},"description":"Information about the service","example":{"api":"templates","documentation":"https://templates.keboola.com/v1/documentation"},"required":["api","documentation"]},"Step":{"type":"object","properties":{"description":{"type":"string","description":"Description of the step.","example":"Sell online with the Super E-commerce website.","minLength":1,"maxLength":60},"dialogDescription":{"type":"string","description":"Description of the dialog with inputs.","example":"Please configure the connection to your Super Ecommerce account.","minLength":1,"maxLength":200},"dialogName":{"type":"string","description":"Name of the dialog with inputs.","example":"Super Ecommerce","minLength":1,"maxLength":25},"icon":{"type":"string","description":"Icon for UI. Component icon if it starts with \"component:...\", or a common icon if it starts with \"common:...\".","example":"common:download","minLength":1,"maxLength":40},"id":{"type":"string","description":"Unique ID of the step.","example":"g01-s01","minLength":1},"inputs":{"type":"array","items":{"$ref":"#/components/schemas/Input"},"description":"Inputs in the step.","example":[{"id":"user","name":"User Name","description":"","type":"string","kind":"input","default":"john","options":null},{"id":"api-token","name":"API Token","description":"Insert Service API Token.","type":"string","kind":"hidden","default":"","options":null},{"id":"export-description","name":"Description","description":"Please enter a short description of what this export is for.","type":"string","kind":"textarea","default":"This export exports data to ...","options":null},{"id":"country","name":"Country","description":"Please select one country.","type":"string","kind":"select","default":"value1","options":[{"label":"Country 1","value":"value1"},{"label":"Country 2","value":"value2"},{"label":"Country 3","value":"value3"}]},{"id":"limit","name":"Limit","description":"Enter the maximum number of records.","type":"int","kind":"input","default":1000,"options":null},{"id":"person-height","name":"Person Height","description":"","type":"double","kind":"input","default":178.5,"options":null},{"id":"dummy-data","name":"Generate dummy data","description":"Do you want to generate dummy data?","type":"bool","kind":"confirm","default":true,"options":null},{"id":"countries","name":"Countries","description":"Please select at least one country.","type":"string[]","kind":"multiselect","default":["value1","value3"],"options":[{"label":"Country 1","value":"value1"},{"label":"Country 2","value":"value2"},{"label":"Country 3","value":"value3"}]}],"minItems":0},"name":{"type":"string","description":"Name of the step.","example":"Super Ecommerce","minLength":1,"maxLength":25}},"description":"Step is a container for inputs.","example":{"description":"Sell online with the Super E-commerce website.","dialogDescription":"Please configure the connection to your Super Ecommerce account.","dialogName":"Super Ecommerce","icon":"common:download","id":"g01-s01","inputs":[{"id":"user","name":"User Name","description":"","type":"string","kind":"input","default":"john","options":null},{"id":"api-token","name":"API Token","description":"Insert Service API Token.","type":"string","kind":"hidden","default":"","options":null},{"id":"export-description","name":"Description","description":"Please enter a short description of what this export is for.","type":"string","kind":"textarea","default":"This export exports data to ...","options":null},{"id":"country","name":"Country","description":"Please select one country.","type":"string","kind":"select","default":"value1","options":[{"label":"Country 1","value":"value1"},{"label":"Country 2","value":"value2"},{"label":"Country 3","value":"value3"}]},{"id":"limit","name":"Limit","description":"Enter the maximum number of records.","type":"int","kind":"input","default":1000,"options":null},{"id":"person-height","name":"Person Height","description":"","type":"double","kind":"input","default":178.5,"options":null},{"id":"dummy-data","name":"Generate dummy data","description":"Do you want to generate dummy data?","type":"bool","kind":"confirm","default":true,"options":null},{"id":"countries","name":"Countries","description":"Please select at least one country.","type":"string[]","kind":"multiselect","default":["value1","value3"],"options":[{"label":"Country 1","value":"value1"},{"label":"Country 2","value":"value2"},{"label":"Country 3","value":"value3"}]}],"name":"Super Ecommerce"},"required":["id","icon","name","description","dialogName","dialogDescription","inputs"]},"StepGroup":{"type":"object","properties":{"description":{"type":"string","description":"Description of the step group, a tooltip explaining what needs to be configured.","example":"Choose one of the eshop platforms.","minLength":1,"maxLength":80},"id":{"type":"string","description":"Unique ID of the step group.","example":"g01"},"required":{"type":"string","description":"The number of steps that must be configured.","example":"atLeastOne","enum":["all","atLeastOne","exactlyOne","zeroOrOne","optional"]},"steps":{"type":"array","items":{"$ref":"#/components/schemas/Step"},"description":"Steps in the group.","example":[{"id":"g01-s01","icon":"common:download","name":"Super Ecommerce","description":"Sell online with the Super E-commerce website.","dialogName":"Super Ecommerce","dialogDescription":"Please configure credentials to your Super Ecommerce account.","inputs":[{"id":"user","name":"User Name","description":"","type":"string","kind":"input","default":"john","options":null},{"id":"api-token","name":"API Token","description":"Insert Service API Token.","type":"string","kind":"hidden","default":"","options":null},{"id":"export-description","name":"Description","description":"Please enter a short description of what this export is for.","type":"string","kind":"textarea","default":"This export exports data to ...","options":null},{"id":"country","name":"Country","description":"Please select one country.","type":"string","kind":"select","default":"value1","options":[{"label":"Country 1","value":"value1"},{"label":"Country 2","value":"value2"},{"label":"Country 3","value":"value3"}]},{"id":"limit","name":"Limit","description":"Enter the maximum number of records.","type":"int","kind":"input","default":1000,"options":null},{"id":"person-height","name":"Person Height","description":"","type":"double","kind":"input","default":178.5,"options":null},{"id":"dummy-data","name":"Generate dummy data","description":"Do you want to generate dummy data?","type":"bool","kind":"confirm","default":true,"options":null},{"id":"countries","name":"Countries","description":"Please select at least one country.","type":"string[]","kind":"multiselect","default":["value1","value3"],"options":[{"label":"Country 1","value":"value1"},{"label":"Country 2","value":"value2"},{"label":"Country 3","value":"value3"}]}]}],"minItems":1}},"description":"Step group is a container for steps.","example":{"description":"Choose one of the eshop platforms.","id":"g01","required":"atLeastOne","steps":[{"id":"g01-s01","icon":"common:download","name":"Super Ecommerce","description":"Sell online with the Super E-commerce website.","dialogName":"Super Ecommerce","dialogDescription":"Please configure credentials to your Super Ecommerce account.","inputs":[{"id":"user","name":"User Name","description":"","type":"string","kind":"input","default":"john","options":null},{"id":"api-token","name":"API Token","description":"Insert Service API Token.","type":"string","kind":"hidden","default":"","options":null},{"id":"export-description","name":"Description","description":"Please enter a short description of what this export is for.","type":"string","kind":"textarea","default":"This export exports data to ...","options":null},{"id":"country","name":"Country","description":"Please select one country.","type":"string","kind":"select","default":"value1","options":[{"label":"Country 1","value":"value1"},{"label":"Country 2","value":"value2"},{"label":"Country 3","value":"value3"}]},{"id":"limit","name":"Limit","description":"Enter the maximum number of records.","type":"int","kind":"input","default":1000,"options":null},{"id":"person-height","name":"Person Height","description":"","type":"double","kind":"input","default":178.5,"options":null},{"id":"dummy-data","name":"Generate dummy data","description":"Do you want to generate dummy data?","type":"bool","kind":"confirm","default":true,"options":null},{"id":"countries","name":"Countries","description":"Please select at least one country.","type":"string[]","kind":"multiselect","default":["value1","value3"],"options":[{"label":"Country 1","value":"value1"},{"label":"Country 2","value":"value2"},{"label":"Country 3","value":"value3"}]}]}]},"required":["id","description","required","steps"]},"StepGroupValidationResult":{"type":"object","properties":{"error":{"type":"string","description":"Are all inputs valid?","example":"All steps must be configured."},"id":{"type":"string","description":"Step group ID.","example":"g01"},"steps":{"type":"array","items":{"$ref":"#/components/schemas/StepValidationResult"},"description":"List of Details for the steps.","example":[{"configured":false,"id":"g01-s01","inputs":[{"error":"API token cannot be empty.","id":"api-token","visible":true}],"valid":false}]},"valid":{"type":"boolean","description":"True if the required number of steps is configured and all inputs are valid.","example":false}},"description":"Validation Detail of the step group.","example":{"error":"All steps must be configured.","id":"g01","steps":[{"configured":false,"id":"g01-s01","inputs":[{"error":"API token cannot be empty.","id":"api-token","visible":true}],"valid":false}],"valid":false},"required":["id","valid","steps"]},"StepPayload":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of the step.","example":"g01-s01","minLength":1},"inputs":{"type":"array","items":{"$ref":"#/components/schemas/InputValue"},"description":"Input values.","example":[{"id":"user","value":"user@example.com"},{"id":"api-token","value":"123456"}]}},"description":"Step with input values filled in by user.","example":{"id":"g01-s01","inputs":[{"id":"user","value":"user@example.com"},{"id":"api-token","value":"123456"}]},"required":["id","inputs"]},"StepValidationResult":{"type":"object","properties":{"configured":{"type":"boolean","description":"True if the step was part of the sent payload.","example":false},"id":{"type":"string","description":"Step ID.","example":"g01-s01"},"inputs":{"type":"array","items":{"$ref":"#/components/schemas/InputValidationResult"},"description":"List of Details for the inputs.","example":[{"error":"API token cannot be empty.","id":"api-token","visible":true}]},"valid":{"type":"boolean","description":"True if all inputs in the step are valid.","example":false}},"description":"Validation Detail of the step.","example":{"configured":false,"id":"g01-s01","inputs":[{"error":"API token cannot be empty.","id":"api-token","visible":true}],"valid":false},"required":["id","configured","valid","inputs"]},"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"},"id":{"type":"string","description":"Unique ID of the task.","example":"task_1234"},"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"]},"type":{"type":"string","description":"Task type.","example":"abc123"},"url":{"type":"string","description":"URL of the task.","example":"abc123"}},"description":"An asynchronous task.","example":{"id":"task-1","url":"https://templates.keboola.com/v1/tasks/template.use/2018-01-01T00:00:00.000Z_dIklP","type":"template.use","createdAt":"2018-01-01T00:00:00.000Z","finishedAt":"2018-01-01T00:00:00.000Z","isFinished":true,"duration":123,"result":"task succeeded","outputs":{"instanceId":"V1StGXR8IZ5jdHi6BAmyT"}},"required":["id","type","url","status","isFinished","createdAt"]},"TaskOutputs":{"type":"object","properties":{"instanceId":{"type":"string","description":"ID of the template instance.","example":"V1StGXR8IZ5jdHi6BAmyT"}},"description":"Outputs generated by the task.","example":{"instanceId":"V1StGXR8IZ5jdHi6BAmyT"}},"Template":{"type":"object","properties":{"author":{"$ref":"#/components/schemas/Author"},"categories":{"type":"array","items":{"type":"string","example":"abc123"},"description":"List of categories the template belongs to.","example":["E-commerce","Other","Social Media"]},"components":{"type":"array","items":{"type":"string","example":"abc123"},"description":"List of components used in the template.","example":["ex-generic-v2","keboola.snowflake-transformation"]},"defaultVersion":{"type":"string","description":"Recommended version of the template.","example":"v1.2.3","minLength":1,"maxLength":20},"deprecated":{"type":"boolean","description":"Deprecated template cannot be used.","example":false},"description":{"type":"string","description":"Short description of the template.","example":"Full workflow to load all user accounts from the Service.","minLength":1,"maxLength":200},"id":{"type":"string","description":"ID of the template.","example":"my-template","minLength":1,"maxLength":40},"name":{"type":"string","description":"Template name.","example":"My Template","minLength":1,"maxLength":40},"versions":{"type":"array","items":{"$ref":"#/components/schemas/Version"},"description":"All available versions of the template.","example":[{"version":"v0.1.1","stable":false,"description":"Initial version."},{"version":"v1.1.1","stable":true,"description":""},{"version":"v1.2.3","stable":true,"description":""},{"version":"v2.0.0","stable":false,"description":"Experimental support for new API."}]}},"description":"Template.","example":{"author":{"name":"Keboola","url":"https://www.keboola.com"},"categories":["E-commerce","Other","Social Media"],"components":["ex-generic-v2","keboola.snowflake-transformation"],"defaultVersion":"v1.2.3","deprecated":false,"description":"Full workflow to load all user accounts from the Service.","id":"my-template","name":"My Template","versions":[{"version":"v0.1.1","stable":false,"description":"Initial version."},{"version":"v1.1.1","stable":true,"description":""},{"version":"v1.2.3","stable":true,"description":""},{"version":"v2.0.0","stable":false,"description":"Experimental support for new API."}]},"required":["id","name","deprecated","author","description","defaultVersion","categories","components","versions"]},"TemplateBase":{"type":"object","properties":{"author":{"$ref":"#/components/schemas/Author"},"defaultVersion":{"type":"string","description":"Recommended version of the template.","example":"v1.2.3","minLength":1,"maxLength":20},"deprecated":{"type":"boolean","description":"Deprecated template cannot be used.","example":false},"description":{"type":"string","description":"Short description of the template.","example":"Full workflow to load all user accounts from the Service.","minLength":1,"maxLength":200},"id":{"type":"string","description":"ID of the template.","example":"my-template","minLength":1,"maxLength":40},"name":{"type":"string","description":"Template name.","example":"My Template","minLength":1,"maxLength":40}},"description":"Template base information.","example":{"author":{"name":"Keboola","url":"https://www.keboola.com"},"defaultVersion":"v1.2.3","deprecated":false,"description":"Full workflow to load all user accounts from the Service.","id":"my-template","name":"My Template"},"required":["id","name","deprecated","author","description","defaultVersion"]},"TemplateDetail":{"type":"object","properties":{"author":{"$ref":"#/components/schemas/Author"},"categories":{"type":"array","items":{"type":"string","example":"abc123"},"description":"List of categories the template belongs to.","example":["E-commerce","Other","Social Media"]},"components":{"type":"array","items":{"type":"string","example":"abc123"},"description":"List of components used in the template.","example":["ex-generic-v2","keboola.snowflake-transformation"]},"defaultVersion":{"type":"string","description":"Recommended version of the template.","example":"v1.2.3","minLength":1,"maxLength":20},"deprecated":{"type":"boolean","description":"Deprecated template cannot be used.","example":false},"description":{"type":"string","description":"Short description of the template.","example":"Full workflow to load all user accounts from the Service.","minLength":1,"maxLength":200},"id":{"type":"string","description":"ID of the template.","example":"my-template","minLength":1,"maxLength":40},"name":{"type":"string","description":"Template name.","example":"My Template","minLength":1,"maxLength":40},"repository":{"$ref":"#/components/schemas/Repository"},"versions":{"type":"array","items":{"$ref":"#/components/schemas/Version"},"description":"All available versions of the template.","example":[{"version":"v0.1.1","stable":false,"description":"Initial version."},{"version":"v1.1.1","stable":true,"description":""},{"version":"v1.2.3","stable":true,"description":""},{"version":"v2.0.0","stable":false,"description":"Experimental support for new API."}]}},"example":{"id":"my-template","name":"My Template","deprecated":false,"categories":["E-commerce","Other","Social Media"],"components":["ex-generic-v2","keboola.snowflake-transformation"],"author":{"name":"Keboola","url":"https://www.keboola.com"},"description":"Full workflow to load all user accounts from the Service.","defaultVersion":"v1.2.3","versions":[{"version":"v0.1.1","stable":false,"description":"Initial version."},{"version":"v1.1.1","stable":true,"description":""},{"version":"v1.2.3","stable":true,"description":""},{"version":"v2.0.0","stable":false,"description":"Experimental support for new API."}],"repository":{"name":"keboola","url":"https://github.com/keboola/keboola-as-code-templates","ref":"main","author":{"name":"Keboola","url":"https://www.keboola.com"}}},"required":["id","name","deprecated","author","description","defaultVersion","repository","categories","components","versions"]},"TemplateRequest":{"type":"object","properties":{"repository":{"type":"string","description":"Name of the template repository. Use \"keboola\" for default Keboola repository.","example":"keboola"},"template":{"type":"string","description":"ID of the template.","example":"my-template","minLength":1,"maxLength":40}},"example":{"repository":"keboola","template":"my-template"},"required":["template","repository"]},"TemplateVersionRequest":{"type":"object","properties":{"repository":{"type":"string","description":"Name of the template repository. Use \"keboola\" for default Keboola repository.","example":"keboola"},"template":{"type":"string","description":"ID of the template.","example":"my-template","minLength":1,"maxLength":40},"version":{"type":"string","description":"Semantic version of the template. Use \"default\" for default version.","example":"v1.2.3"}},"example":{"repository":"keboola","template":"my-template","version":"v1.2.3"},"required":["version","template","repository"]},"Templates":{"type":"object","properties":{"repository":{"$ref":"#/components/schemas/Repository"},"templates":{"type":"array","items":{"$ref":"#/components/schemas/Template"},"description":"All template defined in the repository.","example":[{"author":{"name":"Keboola","url":"https://www.keboola.com"},"categories":["E-commerce","Other","Social Media"],"components":["ex-generic-v2","keboola.snowflake-transformation"],"defaultVersion":"v1.2.3","deprecated":false,"description":"Full workflow to load all user accounts from the Service.","id":"my-template","name":"My Template","versions":[{"version":"v0.1.1","stable":false,"description":"Initial version."},{"version":"v1.1.1","stable":true,"description":""},{"version":"v1.2.3","stable":true,"description":""},{"version":"v2.0.0","stable":false,"description":"Experimental support for new API."}]}]}},"description":"List of the templates.","example":{"repository":{"name":"keboola","url":"https://github.com/keboola/keboola-as-code-templates","ref":"main","author":{"name":"Keboola","url":"https://www.keboola.com"}},"templates":[{"id":"my-template","name":"My Template","deprecated":false,"categories":["E-commerce","Other","Social Media"],"components":["ex-generic-v2","keboola.snowflake-transformation"],"author":{"name":"Keboola","url":"https://www.keboola.com"},"description":"Full workflow to load all user accounts from the Service.","defaultVersion":"v1.2.3","versions":[{"version":"v0.1.1","stable":false,"description":"Initial version."},{"version":"v1.1.1","stable":true,"description":""},{"version":"v1.2.3","stable":true,"description":""},{"version":"v2.0.0","stable":false,"description":"Experimental support for new API."}]},{"id":"maximum-length-template-id-dolor-sit-an","name":"Maximum length template name ipsum dolo","deprecated":false,"categories":["E-commerce","Other","Social Media"],"components":["ex-generic-v2","keboola.snowflake-transformation"],"author":{"name":"Keboola","url":"https://www.keboola.com"},"description":"Maximum length template description dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascet.","defaultVersion":"v4.5.6","versions":[{"version":"v4.5.6","stable":true,"description":"Maximum length version description abc."}]}]},"required":["repository","templates"]},"UpdateInstanceRequest":{"type":"object","properties":{"branch":{"type":"string","description":"ID of the branch. Use \"default\" for default branch.","example":"default"},"instanceId":{"type":"string","description":"ID of the template instance.","example":"V1StGXR8IZ5jdHi6BAmyT"},"name":{"type":"string","description":"New name of the instance.","example":"My Great Instance"}},"example":{"branch":"default","instanceId":"V1StGXR8IZ5jdHi6BAmyT","name":"My Great Instance"},"required":["name","instanceId","branch"]},"UpdateInstanceRequestBody":{"type":"object","properties":{"name":{"type":"string","description":"New name of the instance.","example":"My Great Instance"}},"example":{"name":"My Great Instance"},"required":["name"]},"UpgradeInstanceRequest":{"type":"object","properties":{"branch":{"type":"string","description":"ID of the branch. Use \"default\" for default branch.","example":"default"},"instanceId":{"type":"string","description":"ID of the template instance.","example":"V1StGXR8IZ5jdHi6BAmyT"},"steps":{"type":"array","items":{"$ref":"#/components/schemas/StepPayload"},"description":"Steps with input values filled in by user.","example":[{"id":"g01-s01","inputs":[{"id":"user","value":"user@example.com"},{"id":"api-token","value":"123456"}]}]},"version":{"type":"string","description":"Semantic version of the template. Use \"default\" for default version.","example":"v1.2.3"}},"example":{"branch":"default","instanceId":"V1StGXR8IZ5jdHi6BAmyT","steps":[{"id":"g01-s01","inputs":[{"id":"user","value":"user@example.com"},{"id":"api-token","value":"123456"}]}],"version":"v1.2.3"},"required":["version","instanceId","branch","steps"]},"UseTemplateRequest":{"type":"object","properties":{"branch":{"type":"string","description":"ID of the branch. Use \"default\" for default branch.","example":"default"},"name":{"type":"string","description":"Name of the new template instance.","example":"My Instance"},"repository":{"type":"string","description":"Name of the template repository. Use \"keboola\" for default Keboola repository.","example":"keboola"},"steps":{"type":"array","items":{"$ref":"#/components/schemas/StepPayload"},"description":"Steps with input values filled in by user.","example":[{"id":"g01-s01","inputs":[{"id":"user","value":"user@example.com"},{"id":"api-token","value":"123456"}]}]},"template":{"type":"string","description":"ID of the template.","example":"my-template","minLength":1,"maxLength":40},"version":{"type":"string","description":"Semantic version of the template. Use \"default\" for default version.","example":"v1.2.3"}},"example":{"branch":"default","name":"My Instance","repository":"keboola","steps":[{"id":"g01-s01","inputs":[{"id":"user","value":"user@example.com"},{"id":"api-token","value":"123456"}]}],"template":"my-template","version":"v1.2.3"},"required":["name","branch","version","template","repository","steps"]},"UseTemplateVersionRequestBody":{"type":"object","properties":{"branch":{"type":"string","description":"ID of the branch. Use \"default\" for default branch.","example":"default"},"name":{"type":"string","description":"Name of the new template instance.","example":"My Instance"},"steps":{"type":"array","items":{"$ref":"#/components/schemas/StepPayload"},"description":"Steps with input values filled in by user.","example":[{"id":"g01-s01","inputs":[{"id":"user","value":"user@example.com"},{"id":"api-token","value":"123456"}]}]}},"example":{"branch":"default","name":"My Instance","steps":[{"id":"g01-s01","inputs":[{"id":"user","value":"user@example.com"},{"id":"api-token","value":"123456"}]}]},"required":["name","branch","steps"]},"ValidateInputsRequest":{"type":"object","properties":{"repository":{"type":"string","description":"Name of the template repository. Use \"keboola\" for default Keboola repository.","example":"keboola"},"steps":{"type":"array","items":{"$ref":"#/components/schemas/StepPayload"},"description":"Steps with input values filled in by user.","example":[{"id":"g01-s01","inputs":[{"id":"user","value":"user@example.com"},{"id":"api-token","value":"123456"}]}]},"template":{"type":"string","description":"ID of the template.","example":"my-template","minLength":1,"maxLength":40},"version":{"type":"string","description":"Semantic version of the template. Use \"default\" for default version.","example":"v1.2.3"}},"example":{"repository":"keboola","steps":[{"id":"g01-s01","inputs":[{"id":"user","value":"user@example.com"},{"id":"api-token","value":"123456"}]}],"template":"my-template","version":"v1.2.3"},"required":["version","template","repository","steps"]},"ValidationError":{"type":"object","properties":{"ValidationResult":{"$ref":"#/components/schemas/ValidationResult"},"error":{"type":"string","description":"Name of error.","example":"InvalidPayload"},"message":{"type":"string","description":"Error message.","example":"Inputs are not valid."}},"example":{"ValidationResult":{"valid":false,"stepGroups":[{"id":"g01","valid":false,"error":"All steps must be configured.","steps":[{"id":"g01-s01","configured":true,"valid":false,"inputs":[{"id":"api-token","visible":true,"error":"Value cannot be empty."},{"id":"password","visible":false,"error":null}]}]},{"id":"g02","valid":true,"error":null,"steps":[{"id":"g02-s01","configured":false,"valid":true,"inputs":[]},{"id":"g02-s02","configured":true,"valid":true,"inputs":[{"id":"username","visible":true,"error":null}]}]}]},"error":"InvalidPayload","message":"Inputs are not valid."},"required":["error","message","ValidationResult"]},"ValidationResult":{"type":"object","properties":{"stepGroups":{"type":"array","items":{"$ref":"#/components/schemas/StepGroupValidationResult"},"description":"List of Details for the step groups.","example":[{"error":"All steps must be configured.","id":"g01","steps":[{"configured":false,"id":"g01-s01","inputs":[{"error":"API token cannot be empty.","id":"api-token","visible":true}],"valid":false}],"valid":false}]},"valid":{"type":"boolean","description":"True if all groups and inputs are valid.","example":false}},"description":"Detail of the inputs validation.","example":{"valid":false,"stepGroups":[{"id":"g01","valid":false,"error":"All steps must be configured.","steps":[{"id":"g01-s01","configured":true,"valid":false,"inputs":[{"id":"api-token","visible":true,"error":"Value cannot be empty."},{"id":"password","visible":false,"error":null}]}]},{"id":"g02","valid":true,"error":null,"steps":[{"id":"g02-s01","configured":false,"valid":true,"inputs":[]},{"id":"g02-s02","configured":true,"valid":true,"inputs":[{"id":"username","visible":true,"error":null}]}]}]},"required":["valid","stepGroups"]},"Version":{"type":"object","properties":{"description":{"type":"string","description":"Optional short description of the version. Can be empty.","example":"Experimental support for new API.","minLength":0,"maxLength":40},"stable":{"type":"boolean","description":"If true, then the version is ready for production use.","example":true},"version":{"type":"string","description":"Semantic version.","example":"v1.2.3","minLength":1,"maxLength":20}},"description":"Template version.","example":{"version":"v1.2.3","stable":true,"description":"Stable version."},"required":["version","stable","description"]},"VersionDetail":{"type":"object","properties":{"components":{"type":"array","items":{"type":"string","example":"abc123"},"description":"List of components used in the template version.","example":["ex-generic-v2","keboola.snowflake-transformation"]},"description":{"type":"string","description":"Optional short description of the version. Can be empty.","example":"Experimental support for new API.","minLength":0,"maxLength":40},"longDescription":{"type":"string","description":"Extended description of the template in Markdown format.","example":"**Full workflow** to load all user accounts from [the Service](https://service.com). With *extended* explanation ...","minLength":1},"readme":{"type":"string","description":"Readme of the template version in Markdown format.","example":"Lorem markdownum quod discenda [aegide lapidem](http://www.nequeuntoffensa.io/)","minLength":1},"stable":{"type":"boolean","description":"If true, then the version is ready for production use.","example":true},"version":{"type":"string","description":"Semantic version.","example":"v1.2.3","minLength":1,"maxLength":20}},"example":{"version":"v1.2.3","stable":true,"description":"Stable version.","components":["ex-generic-v2","keboola.snowflake-transformation"],"longDescription":"Maximum length template **description** dolor sit amet, consectetuer adipiscing elit","readme":"Lorem markdownum quod discenda [aegide lapidem](http://www.nequeuntoffensa.io/)"},"required":["version","stable","description","components","longDescription","readme"]},"VersionDetailExtended":{"type":"object","properties":{"components":{"type":"array","items":{"type":"string","example":"abc123"},"description":"List of components used in the template version.","example":["ex-generic-v2","keboola.snowflake-transformation"]},"description":{"type":"string","description":"Optional short description of the version. Can be empty.","example":"Experimental support for new API.","minLength":0,"maxLength":40},"longDescription":{"type":"string","description":"Extended description of the template in Markdown format.","example":"**Full workflow** to load all user accounts from [the Service](https://service.com). With *extended* explanation ...","minLength":1},"readme":{"type":"string","description":"Readme of the template version in Markdown format.","example":"Lorem markdownum quod discenda [aegide lapidem](http://www.nequeuntoffensa.io/)","minLength":1},"repository":{"$ref":"#/components/schemas/Repository"},"stable":{"type":"boolean","description":"If true, then the version is ready for production use.","example":true},"template":{"$ref":"#/components/schemas/Template"},"version":{"type":"string","description":"Semantic version.","example":"v1.2.3","minLength":1,"maxLength":20}},"example":{"version":"v1.2.3","stable":true,"description":"Stable version.","components":["ex-generic-v2","keboola.snowflake-transformation"],"longDescription":"Maximum length template **description** dolor sit amet, consectetuer adipiscing elit","readme":"Lorem markdownum quod discenda [aegide lapidem](http://www.nequeuntoffensa.io/)","repository":{"name":"keboola","url":"https://github.com/keboola/keboola-as-code-templates","ref":"main","author":{"name":"Keboola","url":"https://www.keboola.com"}},"template":{"id":"my-template","name":"My Template","deprecated":false,"author":{"name":"Keboola","url":"https://www.keboola.com"},"description":"Full workflow to load all user accounts from the Service.","defaultVersion":"v1.2.3"}},"required":["version","stable","description","components","longDescription","readme","repository","template"]}},"securitySchemes":{"storage-api-token":{"type":"apiKey","description":"Storage Api Token Authentication.","name":"X-StorageApi-Token","in":"header"}}},"tags":[{"name":"templates","description":"Service for applying templates to Keboola projects."}]} \ No newline at end of file +{"openapi":"3.0.3","info":{"title":"Templates Service","description":"A service for applying templates to Keboola projects.","version":"1.0"},"servers":[{"url":"https://templates.{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:8000"}],"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":"templates","documentation":"https://templates.keboola.com/v1/documentation"}}}}}}},"/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/project/{branch}/instances":{"get":{"tags":["instance"],"summary":"List instances","operationId":"InstancesIndex","parameters":[{"name":"branch","in":"path","description":"ID of the branch. Use \"default\" for default branch.","required":true,"schema":{"type":"string","description":"ID of the branch. Use \"default\" for default branch.","example":"default"},"example":"default"}],"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Instances"},"example":{"instances":[{"branch":"5876","configurations":[{"componentId":"keboola.ex-db-mysql","configId":"7954825835","name":"My Extractor"}],"created":{"date":"2022-04-28T14:20:04+00:00","tokenId":"245941"},"instanceId":"abc123","mainConfig":{"componentId":"keboola.orchestrator","configId":"7954825835"},"name":"My Instance","repositoryName":"keboola","templateId":"aa","updated":{"date":"2022-04-28T14:20:04+00:00","tokenId":"245941"},"version":"v1.1.0"}]}}}},"404":{"description":"templates.branchNotFound: Branch not found error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenericError"},"example":{"statusCode":404,"error":"templates.branchNotFound","message":"Branch \"123\" not found."}}}}},"security":[{"storage-api-token":[]}]}},"/v1/project/{branch}/instances/{instanceId}":{"delete":{"tags":["instance"],"summary":"Delete instance","operationId":"DeleteInstance","parameters":[{"name":"branch","in":"path","description":"ID of the branch. Use \"default\" for default branch.","required":true,"schema":{"type":"string","description":"ID of the branch. Use \"default\" for default branch.","example":"default"},"example":"default"},{"name":"instanceId","in":"path","required":true,"schema":{"type":"string","description":"ID of the template instance.","example":"V1StGXR8IZ5jdHi6BAmyT"},"example":"V1StGXR8IZ5jdHi6BAmyT"}],"responses":{"202":{"description":"Accepted response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Task"},"example":{"id":"task-1","url":"https://templates.keboola.com/v1/tasks/template.use/2018-01-01T00:00:00.000Z_dIklP","type":"template.use","createdAt":"2018-01-01T00:00:00.000Z","finishedAt":"2018-01-01T00:00:00.000Z","isFinished":true,"duration":123,"result":"task succeeded","outputs":{"instanceId":"V1StGXR8IZ5jdHi6BAmyT"}}}}},"404":{"description":"templates.instanceNotFound: Instance not found error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenericError"},"example":{"statusCode":404,"error":"templates.instanceNotFound","message":"Instance \"V1StGXR8IZ5jdHi6BAmyT\" not found."}}}},"503":{"description":"templates.projectLocked: Access to branch metadata must be atomic, so only one write operation can run at a time. If this error occurs, the client should make retries, see Retry-After header.","headers":{"Retry-After":{"description":"Indicates how long the user agent should wait before making a follow-up request.","schema":{"type":"string","description":"Indicates how long the user agent should wait before making a follow-up request.","example":"\u003chttp-date\u003e/\u003cdelay-seconds\u003e"},"example":"\u003chttp-date\u003e/\u003cdelay-seconds\u003e"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectLockedError4"},"example":{"statusCode":503,"error":"templates.projectLocked","message":"The project is locked, another operation is in progress, please try again later."}}}}},"security":[{"storage-api-token":[]}]},"get":{"tags":["instance"],"summary":"Get instance detail","operationId":"InstanceIndex","parameters":[{"name":"branch","in":"path","description":"ID of the branch. Use \"default\" for default branch.","required":true,"schema":{"type":"string","description":"ID of the branch. Use \"default\" for default branch.","example":"default"},"example":"default"},{"name":"instanceId","in":"path","required":true,"schema":{"type":"string","description":"ID of the template instance.","example":"V1StGXR8IZ5jdHi6BAmyT"},"example":"V1StGXR8IZ5jdHi6BAmyT"}],"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InstanceDetail"},"example":{"branch":"5876","configurations":[{"componentId":"keboola.ex-db-mysql","configId":"7954825835","name":"My Extractor"}],"created":{"date":"2022-04-28T14:20:04+00:00","tokenId":"245941"},"instanceId":"abc123","mainConfig":{"componentId":"keboola.orchestrator","configId":"7954825835"},"name":"My Instance","repositoryName":"abc123","templateDetail":{"author":{"name":"Keboola","url":"https://www.keboola.com"},"defaultVersion":"v1.2.3","deprecated":false,"description":"Full workflow to load all user accounts from the Service.","id":"aa","name":"My Template"},"templateId":"abc123","updated":{"date":"2022-04-28T14:20:04+00:00","tokenId":"245941"},"version":"abc123","versionDetail":{"version":"v1.2.3","stable":true,"description":"Stable version.","components":["ex-generic-v2","keboola.snowflake-transformation"],"longDescription":"Maximum length template **description** dolor sit amet, consectetuer adipiscing elit","readme":"Lorem markdownum quod discenda [aegide lapidem](http://www.nequeuntoffensa.io/)"}}}}},"404":{"description":"templates.instanceNotFound: Instance not found error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenericError"},"example":{"statusCode":404,"error":"templates.instanceNotFound","message":"Instance \"V1StGXR8IZ5jdHi6BAmyT\" not found."}}}}},"security":[{"storage-api-token":[]}]},"put":{"tags":["instance"],"summary":"Update instance name","operationId":"UpdateInstance","parameters":[{"name":"branch","in":"path","description":"ID of the branch. Use \"default\" for default branch.","required":true,"schema":{"type":"string","description":"ID of the branch. Use \"default\" for default branch.","example":"default"},"example":"default"},{"name":"instanceId","in":"path","required":true,"schema":{"type":"string","description":"ID of the template instance.","example":"V1StGXR8IZ5jdHi6BAmyT"},"example":"V1StGXR8IZ5jdHi6BAmyT"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateInstanceRequestBody"},"example":{"name":"My Great Instance"}}}},"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InstanceDetail"},"example":{"branch":"5876","configurations":[{"componentId":"keboola.ex-db-mysql","configId":"7954825835","name":"My Extractor"}],"created":{"date":"2022-04-28T14:20:04+00:00","tokenId":"245941"},"instanceId":"abc123","mainConfig":{"componentId":"keboola.orchestrator","configId":"7954825835"},"name":"My Instance","repositoryName":"abc123","templateDetail":{"author":{"name":"Keboola","url":"https://www.keboola.com"},"defaultVersion":"v1.2.3","deprecated":false,"description":"Full workflow to load all user accounts from the Service.","id":"aa","name":"My Template"},"templateId":"abc123","updated":{"date":"2022-04-28T14:20:04+00:00","tokenId":"245941"},"version":"abc123","versionDetail":{"version":"v1.2.3","stable":true,"description":"Stable version.","components":["ex-generic-v2","keboola.snowflake-transformation"],"longDescription":"Maximum length template **description** dolor sit amet, consectetuer adipiscing elit","readme":"Lorem markdownum quod discenda [aegide lapidem](http://www.nequeuntoffensa.io/)"}}}}},"404":{"description":"templates.instanceNotFound: Instance not found error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenericError"},"example":{"statusCode":404,"error":"templates.instanceNotFound","message":"Instance \"V1StGXR8IZ5jdHi6BAmyT\" not found."}}}},"503":{"description":"templates.projectLocked: Access to branch metadata must be atomic, so only one write operation can run at a time. If this error occurs, the client should make retries, see Retry-After header.","headers":{"Retry-After":{"description":"Indicates how long the user agent should wait before making a follow-up request.","schema":{"type":"string","description":"Indicates how long the user agent should wait before making a follow-up request.","example":"\u003chttp-date\u003e/\u003cdelay-seconds\u003e"},"example":"\u003chttp-date\u003e/\u003cdelay-seconds\u003e"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectLockedError3"},"example":{"statusCode":503,"error":"templates.projectLocked","message":"The project is locked, another operation is in progress, please try again later."}}}}},"security":[{"storage-api-token":[]}]}},"/v1/project/{branch}/instances/{instanceId}/upgrade/{version}":{"post":{"tags":["instance"],"summary":"Re-generate the instance in the same or different version","operationId":"UpgradeInstance","parameters":[{"name":"branch","in":"path","description":"ID of the branch. Use \"default\" for default branch.","required":true,"schema":{"type":"string","description":"ID of the branch. Use \"default\" for default branch.","example":"default"},"example":"default"},{"name":"instanceId","in":"path","required":true,"schema":{"type":"string","description":"ID of the template instance.","example":"V1StGXR8IZ5jdHi6BAmyT"},"example":"V1StGXR8IZ5jdHi6BAmyT"},{"name":"version","in":"path","description":"Semantic version of the template. Use \"default\" for default version.","required":true,"schema":{"type":"string","description":"Semantic version of the template. Use \"default\" for default version.","example":"v1.2.3"},"example":"v1.2.3"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InputsPayload"},"example":{"steps":[{"id":"g01-s01","inputs":[{"id":"user","value":"user@example.com"},{"id":"api-token","value":"123456"}]}]}}}},"responses":{"202":{"description":"Accepted response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Task"},"example":{"id":"task-1","url":"https://templates.keboola.com/v1/tasks/template.use/2018-01-01T00:00:00.000Z_dIklP","type":"template.use","createdAt":"2018-01-01T00:00:00.000Z","finishedAt":"2018-01-01T00:00:00.000Z","isFinished":true,"duration":123,"result":"task succeeded","outputs":{"instanceId":"V1StGXR8IZ5jdHi6BAmyT"}}}}},"400":{"description":"InvalidInputs: Inputs are not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationError"},"example":{"ValidationResult":{"valid":false,"stepGroups":[{"id":"g01","valid":false,"error":"All steps must be configured.","steps":[{"id":"g01-s01","configured":true,"valid":false,"inputs":[{"id":"api-token","visible":true,"error":"Value cannot be empty."},{"id":"password","visible":false,"error":null}]}]},{"id":"g02","valid":true,"error":null,"steps":[{"id":"g02-s01","configured":false,"valid":true,"inputs":[]},{"id":"g02-s02","configured":true,"valid":true,"inputs":[{"id":"username","visible":true,"error":null}]}]}]},"error":"InvalidPayload","message":"Inputs are not valid."}}}},"404":{"description":"templates.versionNotFound: Version not found error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenericError"},"example":{"statusCode":404,"error":"templates.versionNotFound","message":"Version \"v1.2.3\" not found."}}}},"503":{"description":"templates.projectLocked: Access to branch metadata must be atomic, so only one write operation can run at a time. If this error occurs, the client should make retries, see Retry-After header.","headers":{"Retry-After":{"description":"Indicates how long the user agent should wait before making a follow-up request.","schema":{"type":"string","description":"Indicates how long the user agent should wait before making a follow-up request.","example":"\u003chttp-date\u003e/\u003cdelay-seconds\u003e"},"example":"\u003chttp-date\u003e/\u003cdelay-seconds\u003e"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectLockedError5"},"example":{"statusCode":503,"error":"templates.projectLocked","message":"The project is locked, another operation is in progress, please try again later."}}}}},"security":[{"storage-api-token":[]}]}},"/v1/project/{branch}/instances/{instanceId}/upgrade/{version}/inputs":{"get":{"tags":["instance"],"summary":"Get inputs for upgrade operation","operationId":"UpgradeInstanceInputsIndex","parameters":[{"name":"branch","in":"path","description":"ID of the branch. Use \"default\" for default branch.","required":true,"schema":{"type":"string","description":"ID of the branch. Use \"default\" for default branch.","example":"default"},"example":"default"},{"name":"instanceId","in":"path","required":true,"schema":{"type":"string","description":"ID of the template instance.","example":"V1StGXR8IZ5jdHi6BAmyT"},"example":"V1StGXR8IZ5jdHi6BAmyT"},{"name":"version","in":"path","description":"Semantic version of the template. Use \"default\" for default version.","required":true,"schema":{"type":"string","description":"Semantic version of the template. Use \"default\" for default version.","example":"v1.2.3"},"example":"v1.2.3"}],"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Inputs"},"example":{"initialState":{"valid":false,"stepGroups":[{"id":"g01","valid":false,"error":"All steps must be configured.","steps":[{"id":"g01-s01","configured":true,"valid":false,"inputs":[{"id":"api-token","visible":true,"error":"Value cannot be empty."},{"id":"password","visible":false,"error":null}]}]},{"id":"g02","valid":true,"error":null,"steps":[{"id":"g02-s01","configured":false,"valid":true,"inputs":[]},{"id":"g02-s02","configured":true,"valid":true,"inputs":[{"id":"username","visible":true,"error":null}]}]}]},"stepGroups":[{"id":"g01","description":"Choose one of the eshop platforms.","required":"atLeastOne","step":[{"id":"g01-s01","icon":"common:download","name":"Super Ecommerce","description":"Sell online with the Super E-commerce website.","dialogName":"Super Ecommerce","dialogDescription":"Please configure credentials to your Super Ecommerce account.","inputs":[{"id":"user","name":"User Name","description":"","type":"string","kind":"input","default":"john","options":null},{"id":"api-token","name":"API Token","description":"Insert Service API Token.","type":"string","kind":"hidden","default":"","options":null},{"id":"export-description","name":"Description","description":"Please enter a short description of what this export is for.","type":"string","kind":"textarea","default":"This export exports data to ...","options":null},{"id":"country","name":"Country","description":"Please select one country.","type":"string","kind":"select","default":"value1","options":[{"label":"Country 1","value":"value1"},{"label":"Country 2","value":"value2"},{"label":"Country 3","value":"value3"}]},{"id":"limit","name":"Limit","description":"Enter the maximum number of records.","type":"int","kind":"input","default":1000,"options":null},{"id":"person-height","name":"Person Height","description":"","type":"double","kind":"input","default":178.5,"options":null},{"id":"dummy-data","name":"Generate dummy data","description":"Do you want to generate dummy data?","type":"bool","kind":"confirm","default":true,"options":null},{"id":"countries","name":"Countries","description":"Please select at least one country.","type":"string[]","kind":"multiselect","default":["value1","value3"],"options":[{"label":"Country 1","value":"value1"},{"label":"Country 2","value":"value2"},{"label":"Country 3","value":"value3"}]}]},{"id":"g01-s02","icon":"common:download","name":"Other Ecommerce","description":"Alternative ecommerce solution.","dialogName":"Other Ecommerce","dialogDescription":"Alternative ecommerce solution.","inputs":[{"id":"host","name":"Service Host","description":"Base path of the Service API.","type":"string","kind":"input","default":"example.com","options":null},{"id":"token","name":"Service Token","description":"Service API token.","type":"string","kind":"hidden","default":"","options":null}]}]},{"id":"g02","description":"","required":"all","step":[{"id":"g02-s01","icon":"common:download","name":"Snowflake","description":"Transformation.","dialogName":"Snowflake","dialogDescription":"Step without inputs, locked, for illustration only.","inputs":[]}]},{"id":"g03","description":"Select some destinations if you want.","required":"optional","step":[{"id":"g03-s01","icon":"common:upload","name":"Service 1","description":"Some external service.","dialogName":"Snowflake","dialogDescription":"Some external service.","inputs":[{"id":"host","name":"Service Host","description":"Base path of the Service API.","type":"string","kind":"input","default":"example.com","options":null}]},{"id":"g03-s02","icon":"common:upload","name":"Maximum length step name","description":"Maximum length desc lorem ipsum dolor sit amet consectetur.","dialogName":"Maximum dialog step name","dialogDescription":"Maximum dialog description lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nas.","inputs":[{"id":"host","name":"Input With Max Length Xy","description":"Far far away, behind the word mountains, far from the countr","type":"string","kind":"input","default":"A wonderful serenity has taken possession of my entire soul, like these sweet mornings of spring white...","options":null}]},{"id":"g03-s03","icon":"common:upload","name":"Service 3","description":"Some external service.","dialogName":"Service 3","dialogDescription":"Some external service.","inputs":[]},{"id":"g03-s04","icon":"common:upload","name":"Service 4","description":"Some external service.","dialogName":"Service 4","dialogDescription":"Some external service.","inputs":[{"id":"host","name":"Service Host","description":"Base path of the Service API.","type":"string","kind":"input","default":"example.com","options":null}]},{"id":"g03-s05","icon":"common:upload","name":"Service 5","description":"Some external service.","dialogName":"Service 5 Dialog Name","dialogDescription":"Some external service.","inputs":[{"id":"host","name":"Service Host","description":"Base path of the Service API.","type":"string","kind":"input","default":"example.com","options":null}]}]}]}}}},"404":{"description":"templates.versionNotFound: Version not found error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenericError"},"example":{"statusCode":404,"error":"templates.versionNotFound","message":"Version \"v1.2.3\" not found."}}}}},"security":[{"storage-api-token":[]}]},"post":{"tags":["instance"],"summary":"Validate inputs for upgrade operation","operationId":"UpgradeInstanceValidateInputs","parameters":[{"name":"branch","in":"path","description":"ID of the branch. Use \"default\" for default branch.","required":true,"schema":{"type":"string","description":"ID of the branch. Use \"default\" for default branch.","example":"default"},"example":"default"},{"name":"instanceId","in":"path","required":true,"schema":{"type":"string","description":"ID of the template instance.","example":"V1StGXR8IZ5jdHi6BAmyT"},"example":"V1StGXR8IZ5jdHi6BAmyT"},{"name":"version","in":"path","description":"Semantic version of the template. Use \"default\" for default version.","required":true,"schema":{"type":"string","description":"Semantic version of the template. Use \"default\" for default version.","example":"v1.2.3"},"example":"v1.2.3"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InputsPayload"},"example":{"steps":[{"id":"g01-s01","inputs":[{"id":"user","value":"user@example.com"},{"id":"api-token","value":"123456"}]}]}}}},"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationResult"},"example":{"valid":false,"stepGroups":[{"id":"g01","valid":false,"error":"All steps must be configured.","steps":[{"id":"g01-s01","configured":true,"valid":false,"inputs":[{"id":"api-token","visible":true,"error":"Value cannot be empty."},{"id":"password","visible":false,"error":null}]}]},{"id":"g02","valid":true,"error":null,"steps":[{"id":"g02-s01","configured":false,"valid":true,"inputs":[]},{"id":"g02-s02","configured":true,"valid":true,"inputs":[{"id":"username","visible":true,"error":null}]}]}]}}}},"404":{"description":"templates.versionNotFound: Version not found error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenericError"},"example":{"statusCode":404,"error":"templates.versionNotFound","message":"Version \"v1.2.3\" not found."}}}}},"security":[{"storage-api-token":[]}]}},"/v1/repositories":{"get":{"tags":["template"],"summary":"List template repositories","description":"List all template repositories defined in the project.","operationId":"RepositoriesIndex","responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Repositories"},"example":{"repositories":[{"name":"keboola","url":"https://github.com/keboola/keboola-as-code-templates","ref":"main","author":{"name":"Keboola","url":"https://www.keboola.com"}}]}}}}},"security":[{"storage-api-token":[]}]}},"/v1/repositories/{repository}":{"get":{"tags":["template"],"summary":"Get template repository detail","description":"Get details of specified repository. Use \"keboola\" for default Keboola repository.","operationId":"RepositoryIndex","parameters":[{"name":"repository","in":"path","description":"Name of the template repository. Use \"keboola\" for default Keboola repository.","required":true,"schema":{"type":"string","description":"Name of the template repository. Use \"keboola\" for default Keboola repository.","example":"keboola"},"example":"keboola"}],"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Repository"},"example":{"name":"keboola","url":"https://github.com/keboola/keboola-as-code-templates","ref":"main","author":{"name":"Keboola","url":"https://www.keboola.com"}}}}},"404":{"description":"templates.repositoryNotFound: Repository not found error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenericError"},"example":{"statusCode":404,"error":"templates.repositoryNotFound","message":"Repository \"name\" not found."}}}}},"security":[{"storage-api-token":[]}]}},"/v1/repositories/{repository}/templates":{"get":{"tags":["template"],"summary":"List templates in the repository","description":"List all templates defined in the repository.","operationId":"TemplatesIndex","parameters":[{"name":"filter","in":"query","description":"The 'filter' attribute specifies the category of templates to retrieve from the repository.","allowEmptyValue":true,"schema":{"type":"string","description":"The 'filter' attribute specifies the category of templates to retrieve from the repository.","example":"keboola.data-apps","enum":["keboola.components","keboola.data-apps"]},"example":"keboola.data-apps"},{"name":"repository","in":"path","description":"Name of the template repository. Use \"keboola\" for default Keboola repository.","required":true,"schema":{"type":"string","description":"Name of the template repository. Use \"keboola\" for default Keboola repository.","example":"keboola"},"example":"keboola"}],"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Templates"},"example":{"repository":{"name":"keboola","url":"https://github.com/keboola/keboola-as-code-templates","ref":"main","author":{"name":"Keboola","url":"https://www.keboola.com"}},"templates":[{"id":"my-template","name":"My Template","deprecated":false,"categories":["E-commerce","Other","Social Media"],"components":["ex-generic-v2","keboola.snowflake-transformation"],"author":{"name":"Keboola","url":"https://www.keboola.com"},"description":"Full workflow to load all user accounts from the Service.","defaultVersion":"v1.2.3","versions":[{"version":"v0.1.1","stable":false,"description":"Initial version."},{"version":"v1.1.1","stable":true,"description":""},{"version":"v1.2.3","stable":true,"description":""},{"version":"v2.0.0","stable":false,"description":"Experimental support for new API."}]},{"id":"maximum-length-template-id-dolor-sit-an","name":"Maximum length template name ipsum dolo","deprecated":false,"categories":["E-commerce","Other","Social Media"],"components":["ex-generic-v2","keboola.snowflake-transformation"],"author":{"name":"Keboola","url":"https://www.keboola.com"},"description":"Maximum length template description dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascet.","defaultVersion":"v4.5.6","versions":[{"version":"v4.5.6","stable":true,"description":"Maximum length version description abc."}]}]}}}},"404":{"description":"templates.repositoryNotFound: Repository not found error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenericError"},"example":{"statusCode":404,"error":"templates.repositoryNotFound","message":"Repository \"name\" not found."}}}}},"security":[{"storage-api-token":[]}]}},"/v1/repositories/{repository}/templates/{template}":{"get":{"tags":["template"],"summary":"Get template detail and versions","description":"Get detail and versions of specified template.","operationId":"TemplateIndex","parameters":[{"name":"repository","in":"path","description":"Name of the template repository. Use \"keboola\" for default Keboola repository.","required":true,"schema":{"type":"string","description":"Name of the template repository. Use \"keboola\" for default Keboola repository.","example":"keboola"},"example":"keboola"},{"name":"template","in":"path","required":true,"schema":{"type":"string","description":"ID of the template.","example":"my-template","minLength":1,"maxLength":40},"example":"my-template"}],"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TemplateDetail"},"example":{"id":"my-template","name":"My Template","deprecated":false,"categories":["E-commerce","Other","Social Media"],"components":["ex-generic-v2","keboola.snowflake-transformation"],"author":{"name":"Keboola","url":"https://www.keboola.com"},"description":"Full workflow to load all user accounts from the Service.","defaultVersion":"v1.2.3","versions":[{"version":"v0.1.1","stable":false,"description":"Initial version."},{"version":"v1.1.1","stable":true,"description":""},{"version":"v1.2.3","stable":true,"description":""},{"version":"v2.0.0","stable":false,"description":"Experimental support for new API."}],"repository":{"name":"keboola","url":"https://github.com/keboola/keboola-as-code-templates","ref":"main","author":{"name":"Keboola","url":"https://www.keboola.com"}}}}}},"404":{"description":"templates.templateNotFound: Template not found error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenericError"},"example":{"statusCode":404,"error":"templates.templateNotFound","message":"Template \"id\" not found."}}}}},"security":[{"storage-api-token":[]}]}},"/v1/repositories/{repository}/templates/{template}/{version}":{"get":{"tags":["template"],"summary":"Get version detail","description":"Get details of specified template version.","operationId":"VersionIndex","parameters":[{"name":"repository","in":"path","description":"Name of the template repository. Use \"keboola\" for default Keboola repository.","required":true,"schema":{"type":"string","description":"Name of the template repository. Use \"keboola\" for default Keboola repository.","example":"keboola"},"example":"keboola"},{"name":"template","in":"path","required":true,"schema":{"type":"string","description":"ID of the template.","example":"my-template","minLength":1,"maxLength":40},"example":"my-template"},{"name":"version","in":"path","description":"Semantic version of the template. Use \"default\" for default version.","required":true,"schema":{"type":"string","description":"Semantic version of the template. Use \"default\" for default version.","example":"v1.2.3"},"example":"v1.2.3"}],"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VersionDetailExtended"},"example":{"version":"v1.2.3","stable":true,"description":"Stable version.","components":["ex-generic-v2","keboola.snowflake-transformation"],"longDescription":"Maximum length template **description** dolor sit amet, consectetuer adipiscing elit","readme":"Lorem markdownum quod discenda [aegide lapidem](http://www.nequeuntoffensa.io/)","repository":{"name":"keboola","url":"https://github.com/keboola/keboola-as-code-templates","ref":"main","author":{"name":"Keboola","url":"https://www.keboola.com"}},"template":{"id":"my-template","name":"My Template","deprecated":false,"author":{"name":"Keboola","url":"https://www.keboola.com"},"description":"Full workflow to load all user accounts from the Service.","defaultVersion":"v1.2.3"}}}}},"404":{"description":"templates.versionNotFound: Version not found error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenericError"},"example":{"statusCode":404,"error":"templates.versionNotFound","message":"Version \"v1.2.3\" not found."}}}}},"security":[{"storage-api-token":[]}]}},"/v1/repositories/{repository}/templates/{template}/{version}/inputs":{"get":{"tags":["template"],"summary":"Get inputs","description":"Get inputs for the \"use\" API call.","operationId":"InputsIndex","parameters":[{"name":"repository","in":"path","description":"Name of the template repository. Use \"keboola\" for default Keboola repository.","required":true,"schema":{"type":"string","description":"Name of the template repository. Use \"keboola\" for default Keboola repository.","example":"keboola"},"example":"keboola"},{"name":"template","in":"path","required":true,"schema":{"type":"string","description":"ID of the template.","example":"my-template","minLength":1,"maxLength":40},"example":"my-template"},{"name":"version","in":"path","description":"Semantic version of the template. Use \"default\" for default version.","required":true,"schema":{"type":"string","description":"Semantic version of the template. Use \"default\" for default version.","example":"v1.2.3"},"example":"v1.2.3"}],"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Inputs"},"example":{"initialState":{"valid":false,"stepGroups":[{"id":"g01","valid":false,"error":"All steps must be configured.","steps":[{"id":"g01-s01","configured":true,"valid":false,"inputs":[{"id":"api-token","visible":true,"error":"Value cannot be empty."},{"id":"password","visible":false,"error":null}]}]},{"id":"g02","valid":true,"error":null,"steps":[{"id":"g02-s01","configured":false,"valid":true,"inputs":[]},{"id":"g02-s02","configured":true,"valid":true,"inputs":[{"id":"username","visible":true,"error":null}]}]}]},"stepGroups":[{"id":"g01","description":"Choose one of the eshop platforms.","required":"atLeastOne","step":[{"id":"g01-s01","icon":"common:download","name":"Super Ecommerce","description":"Sell online with the Super E-commerce website.","dialogName":"Super Ecommerce","dialogDescription":"Please configure credentials to your Super Ecommerce account.","inputs":[{"id":"user","name":"User Name","description":"","type":"string","kind":"input","default":"john","options":null},{"id":"api-token","name":"API Token","description":"Insert Service API Token.","type":"string","kind":"hidden","default":"","options":null},{"id":"export-description","name":"Description","description":"Please enter a short description of what this export is for.","type":"string","kind":"textarea","default":"This export exports data to ...","options":null},{"id":"country","name":"Country","description":"Please select one country.","type":"string","kind":"select","default":"value1","options":[{"label":"Country 1","value":"value1"},{"label":"Country 2","value":"value2"},{"label":"Country 3","value":"value3"}]},{"id":"limit","name":"Limit","description":"Enter the maximum number of records.","type":"int","kind":"input","default":1000,"options":null},{"id":"person-height","name":"Person Height","description":"","type":"double","kind":"input","default":178.5,"options":null},{"id":"dummy-data","name":"Generate dummy data","description":"Do you want to generate dummy data?","type":"bool","kind":"confirm","default":true,"options":null},{"id":"countries","name":"Countries","description":"Please select at least one country.","type":"string[]","kind":"multiselect","default":["value1","value3"],"options":[{"label":"Country 1","value":"value1"},{"label":"Country 2","value":"value2"},{"label":"Country 3","value":"value3"}]}]},{"id":"g01-s02","icon":"common:download","name":"Other Ecommerce","description":"Alternative ecommerce solution.","dialogName":"Other Ecommerce","dialogDescription":"Alternative ecommerce solution.","inputs":[{"id":"host","name":"Service Host","description":"Base path of the Service API.","type":"string","kind":"input","default":"example.com","options":null},{"id":"token","name":"Service Token","description":"Service API token.","type":"string","kind":"hidden","default":"","options":null}]}]},{"id":"g02","description":"","required":"all","step":[{"id":"g02-s01","icon":"common:download","name":"Snowflake","description":"Transformation.","dialogName":"Snowflake","dialogDescription":"Step without inputs, locked, for illustration only.","inputs":[]}]},{"id":"g03","description":"Select some destinations if you want.","required":"optional","step":[{"id":"g03-s01","icon":"common:upload","name":"Service 1","description":"Some external service.","dialogName":"Snowflake","dialogDescription":"Some external service.","inputs":[{"id":"host","name":"Service Host","description":"Base path of the Service API.","type":"string","kind":"input","default":"example.com","options":null}]},{"id":"g03-s02","icon":"common:upload","name":"Maximum length step name","description":"Maximum length desc lorem ipsum dolor sit amet consectetur.","dialogName":"Maximum dialog step name","dialogDescription":"Maximum dialog description lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nas.","inputs":[{"id":"host","name":"Input With Max Length Xy","description":"Far far away, behind the word mountains, far from the countr","type":"string","kind":"input","default":"A wonderful serenity has taken possession of my entire soul, like these sweet mornings of spring white...","options":null}]},{"id":"g03-s03","icon":"common:upload","name":"Service 3","description":"Some external service.","dialogName":"Service 3","dialogDescription":"Some external service.","inputs":[]},{"id":"g03-s04","icon":"common:upload","name":"Service 4","description":"Some external service.","dialogName":"Service 4","dialogDescription":"Some external service.","inputs":[{"id":"host","name":"Service Host","description":"Base path of the Service API.","type":"string","kind":"input","default":"example.com","options":null}]},{"id":"g03-s05","icon":"common:upload","name":"Service 5","description":"Some external service.","dialogName":"Service 5 Dialog Name","dialogDescription":"Some external service.","inputs":[{"id":"host","name":"Service Host","description":"Base path of the Service API.","type":"string","kind":"input","default":"example.com","options":null}]}]}]}}}},"404":{"description":"templates.versionNotFound: Version not found error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenericError"},"example":{"statusCode":404,"error":"templates.versionNotFound","message":"Version \"v1.2.3\" not found."}}}}},"security":[{"storage-api-token":[]}]}},"/v1/repositories/{repository}/templates/{template}/{version}/use":{"post":{"tags":["template"],"summary":"Use template","description":"Validate inputs and use template in the branch.\nOnly configured steps should be send.","operationId":"UseTemplateVersion","parameters":[{"name":"repository","in":"path","description":"Name of the template repository. Use \"keboola\" for default Keboola repository.","required":true,"schema":{"type":"string","description":"Name of the template repository. Use \"keboola\" for default Keboola repository.","example":"keboola"},"example":"keboola"},{"name":"template","in":"path","required":true,"schema":{"type":"string","description":"ID of the template.","example":"my-template","minLength":1,"maxLength":40},"example":"my-template"},{"name":"version","in":"path","description":"Semantic version of the template. Use \"default\" for default version.","required":true,"schema":{"type":"string","description":"Semantic version of the template. Use \"default\" for default version.","example":"v1.2.3"},"example":"v1.2.3"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UseTemplateVersionRequestBody"},"example":{"branch":"default","name":"My Instance","steps":[{"id":"g01-s01","inputs":[{"id":"user","value":"user@example.com"},{"id":"api-token","value":"123456"}]}]}}}},"responses":{"202":{"description":"Accepted response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Task"},"example":{"id":"task-1","url":"https://templates.keboola.com/v1/tasks/template.use/2018-01-01T00:00:00.000Z_dIklP","type":"template.use","createdAt":"2018-01-01T00:00:00.000Z","finishedAt":"2018-01-01T00:00:00.000Z","isFinished":true,"duration":123,"result":"task succeeded","outputs":{"instanceId":"V1StGXR8IZ5jdHi6BAmyT"}}}}},"400":{"description":"InvalidInputs: Inputs are not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationError"},"example":{"ValidationResult":{"valid":false,"stepGroups":[{"id":"g01","valid":false,"error":"All steps must be configured.","steps":[{"id":"g01-s01","configured":true,"valid":false,"inputs":[{"id":"api-token","visible":true,"error":"Value cannot be empty."},{"id":"password","visible":false,"error":null}]}]},{"id":"g02","valid":true,"error":null,"steps":[{"id":"g02-s01","configured":false,"valid":true,"inputs":[]},{"id":"g02-s02","configured":true,"valid":true,"inputs":[{"id":"username","visible":true,"error":null}]}]}]},"error":"InvalidPayload","message":"Inputs are not valid."}}}},"404":{"description":"templates.versionNotFound: Version not found error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenericError"},"example":{"statusCode":404,"error":"templates.versionNotFound","message":"Version \"v1.2.3\" not found."}}}},"503":{"description":"templates.projectLocked: Access to branch metadata must be atomic, so only one write operation can run at a time. If this error occurs, the client should make retries, see Retry-After header.","headers":{"Retry-After":{"description":"Indicates how long the user agent should wait before making a follow-up request.","schema":{"type":"string","description":"Indicates how long the user agent should wait before making a follow-up request.","example":"\u003chttp-date\u003e/\u003cdelay-seconds\u003e"},"example":"\u003chttp-date\u003e/\u003cdelay-seconds\u003e"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectLockedError2"},"example":{"statusCode":503,"error":"templates.projectLocked","message":"The project is locked, another operation is in progress, please try again later."}}}}},"security":[{"storage-api-token":[]}]}},"/v1/repositories/{repository}/templates/{template}/{version}/validate":{"post":{"tags":["template"],"summary":"Validate inputs","description":"Validate inputs for the \"use\" API call.\nOnly configured steps should be send.","operationId":"ValidateInputs","parameters":[{"name":"repository","in":"path","description":"Name of the template repository. Use \"keboola\" for default Keboola repository.","required":true,"schema":{"type":"string","description":"Name of the template repository. Use \"keboola\" for default Keboola repository.","example":"keboola"},"example":"keboola"},{"name":"template","in":"path","required":true,"schema":{"type":"string","description":"ID of the template.","example":"my-template","minLength":1,"maxLength":40},"example":"my-template"},{"name":"version","in":"path","description":"Semantic version of the template. Use \"default\" for default version.","required":true,"schema":{"type":"string","description":"Semantic version of the template. Use \"default\" for default version.","example":"v1.2.3"},"example":"v1.2.3"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InputsPayload"},"example":{"steps":[{"id":"g01-s01","inputs":[{"id":"user","value":"user@example.com"},{"id":"api-token","value":"123456"}]}]}}}},"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationResult"},"example":{"valid":false,"stepGroups":[{"id":"g01","valid":false,"error":"All steps must be configured.","steps":[{"id":"g01-s01","configured":true,"valid":false,"inputs":[{"id":"api-token","visible":true,"error":"Value cannot be empty."},{"id":"password","visible":false,"error":null}]}]},{"id":"g02","valid":true,"error":null,"steps":[{"id":"g02-s01","configured":false,"valid":true,"inputs":[]},{"id":"g02-s02","configured":true,"valid":true,"inputs":[{"id":"username","visible":true,"error":null}]}]}]}}}},"404":{"description":"templates.versionNotFound: Version not found error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenericError"},"example":{"statusCode":404,"error":"templates.versionNotFound","message":"Version \"v1.2.3\" not found."}}}}},"security":[{"storage-api-token":[]}]}},"/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":{"id":"task-1","url":"https://templates.keboola.com/v1/tasks/template.use/2018-01-01T00:00:00.000Z_dIklP","type":"template.use","createdAt":"2018-01-01T00:00:00.000Z","finishedAt":"2018-01-01T00:00:00.000Z","isFinished":true,"duration":123,"result":"task succeeded","outputs":{"instanceId":"V1StGXR8IZ5jdHi6BAmyT"}}}}},"404":{"description":"templates.taskNotFound: Task not found error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenericError"},"example":{"statusCode":404,"error":"templates.taskNotFound","message":"Task \"001\" not found."}}}}},"security":[{"storage-api-token":[]}]}}},"components":{"schemas":{"Author":{"type":"object","properties":{"name":{"type":"string","description":"Name of the author.","example":"Keboola","minLength":1},"url":{"type":"string","description":"Link to the author website.","example":"https://www.keboola.com","minLength":1}},"description":"Author of template or repository.","example":{"name":"Keboola","url":"https://www.keboola.com"},"required":["name","url"]},"BranchRequest":{"type":"object","properties":{"branch":{"type":"string","description":"ID of the branch. Use \"default\" for default branch.","example":"default"}},"example":{"branch":"default"},"required":["branch"]},"ChangeInfo":{"type":"object","properties":{"date":{"type":"string","description":"Date and time of the change.","example":"2022-04-28T14:20:04+00:00","format":"date-time"},"tokenId":{"type":"string","description":"The token by which the change was made.","example":"245941"}},"description":"Date of change and who made it.","example":{"date":"2022-04-28T14:20:04+00:00","tokenId":"245941"},"required":["date","tokenId"]},"Config":{"type":"object","properties":{"componentId":{"type":"string","description":"Component ID.","example":"keboola.ex-db-mysql"},"configId":{"type":"string","description":"Configuration ID.","example":"7954825835"},"name":{"type":"string","description":"Name of the configuration.","example":"My Extractor"}},"description":"The configuration that is part of the template instance.","example":{"componentId":"keboola.ex-db-mysql","configId":"7954825835","name":"My Extractor"},"required":["componentId","configId","name"]},"GenericError":{"type":"object","properties":{"error":{"type":"string","description":"Name of error.","example":"templates.internalError"},"message":{"type":"string","description":"Error message.","example":"Internal Error"},"statusCode":{"type":"integer","description":"HTTP status code.","example":500,"format":"int64"}},"description":"Generic error","example":{"error":"templates.internalError","message":"Internal Error","statusCode":500},"required":["statusCode","error","message"]},"GetTaskRequest":{"type":"object","properties":{"taskId":{"type":"string","description":"Unique ID of the task.","example":"task_1234"}},"example":{"taskId":"task_1234"},"required":["taskId"]},"Input":{"type":"object","properties":{"componentId":{"type":"string","description":"Component id for \"oauth\" kind inputs.","example":"keboola.ex-component"},"default":{"description":"Default value, match defined type.","example":"foo bar","oneOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"items":{"type":"string"},"type":"array"},{"type":"object"}]},"description":{"type":"string","description":"Description of the input.","example":"Insert Service API Token.","minLength":1,"maxLength":60},"id":{"type":"string","description":"Unique ID of the input.","example":"api-token","minLength":1},"kind":{"type":"string","description":"Kind of the input.","example":"input","enum":["input","hidden","textarea","confirm","select","multiselect","oauth","oauthAccounts"]},"name":{"type":"string","description":"Name of the input.","example":"API Token","minLength":1,"maxLength":25},"oauthInputId":{"type":"string","description":"OAuth input id for \"oauthAccounts\" kind inputs.","example":"oauthInput"},"options":{"type":"array","items":{"$ref":"#/components/schemas/InputOption"},"description":"Input options for type = select OR multiselect.","example":[{"label":"Country 1","value":"value1"},{"label":"Country 2","value":"value2"},{"label":"Country 3","value":"value3"}]},"type":{"type":"string","description":"Type of the input.","example":"string","enum":["string","int","double","bool","string[]","object"]}},"description":"User input.","example":{"id":"api-token","name":"API Token","description":"Insert Service API Token.","type":"string","kind":"hidden","default":"","options":null},"required":["id","name","description","type","kind","default"]},"InputOption":{"type":"object","properties":{"label":{"type":"string","description":"Visible label of the option.","example":"Label","minLength":1,"maxLength":25},"value":{"type":"string","description":"Value of the option.","example":"value","minLength":0,"maxLength":100}},"description":"Input option for type = select OR multiselect.","example":{"label":"Label","value":"value"},"required":["label","value"]},"InputValidationResult":{"type":"object","properties":{"error":{"type":"string","description":"Error message.","example":"API token cannot be empty."},"id":{"type":"string","description":"Input ID.","example":"api-token"},"visible":{"type":"boolean","description":"If false, the input should be hidden to user.","example":true}},"description":"Validation Detail of the input.","example":{"error":"API token cannot be empty.","id":"api-token","visible":true},"required":["id","visible"]},"InputValue":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of the input.","example":"g01-s01","minLength":1},"value":{"description":"Input value filled in by user in the required type.","example":"foo bar"}},"description":"Input value filled in by user.","example":{"id":"user","value":"user@example.com"},"required":["id","value"]},"Inputs":{"type":"object","properties":{"initialState":{"$ref":"#/components/schemas/ValidationResult"},"stepGroups":{"type":"array","items":{"$ref":"#/components/schemas/StepGroup"},"description":"List of the step groups.","example":[{"id":"g01","description":"Choose one of the eshop platforms.","required":"atLeastOne","step":[{"id":"g01-s01","icon":"common:download","name":"Super Ecommerce","description":"Sell online with the Super E-commerce website.","dialogName":"Super Ecommerce","dialogDescription":"Please configure credentials to your Super Ecommerce account.","inputs":[{"id":"user","name":"User Name","description":"","type":"string","kind":"input","default":"john","options":null},{"id":"api-token","name":"API Token","description":"Insert Service API Token.","type":"string","kind":"hidden","default":"","options":null},{"id":"export-description","name":"Description","description":"Please enter a short description of what this export is for.","type":"string","kind":"textarea","default":"This export exports data to ...","options":null},{"id":"country","name":"Country","description":"Please select one country.","type":"string","kind":"select","default":"value1","options":[{"label":"Country 1","value":"value1"},{"label":"Country 2","value":"value2"},{"label":"Country 3","value":"value3"}]},{"id":"limit","name":"Limit","description":"Enter the maximum number of records.","type":"int","kind":"input","default":1000,"options":null},{"id":"person-height","name":"Person Height","description":"","type":"double","kind":"input","default":178.5,"options":null},{"id":"dummy-data","name":"Generate dummy data","description":"Do you want to generate dummy data?","type":"bool","kind":"confirm","default":true,"options":null},{"id":"countries","name":"Countries","description":"Please select at least one country.","type":"string[]","kind":"multiselect","default":["value1","value3"],"options":[{"label":"Country 1","value":"value1"},{"label":"Country 2","value":"value2"},{"label":"Country 3","value":"value3"}]}]},{"id":"g01-s02","icon":"common:download","name":"Other Ecommerce","description":"Alternative ecommerce solution.","dialogName":"Other Ecommerce","dialogDescription":"Alternative ecommerce solution.","inputs":[{"id":"host","name":"Service Host","description":"Base path of the Service API.","type":"string","kind":"input","default":"example.com","options":null},{"id":"token","name":"Service Token","description":"Service API token.","type":"string","kind":"hidden","default":"","options":null}]}]},{"id":"g02","description":"","required":"all","step":[{"id":"g02-s01","icon":"common:download","name":"Snowflake","description":"Transformation.","dialogName":"Snowflake","dialogDescription":"Step without inputs, locked, for illustration only.","inputs":[]}]},{"id":"g03","description":"Select some destinations if you want.","required":"optional","step":[{"id":"g03-s01","icon":"common:upload","name":"Service 1","description":"Some external service.","dialogName":"Snowflake","dialogDescription":"Some external service.","inputs":[{"id":"host","name":"Service Host","description":"Base path of the Service API.","type":"string","kind":"input","default":"example.com","options":null}]},{"id":"g03-s02","icon":"common:upload","name":"Maximum length step name","description":"Maximum length desc lorem ipsum dolor sit amet consectetur.","dialogName":"Maximum dialog step name","dialogDescription":"Maximum dialog description lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nas.","inputs":[{"id":"host","name":"Input With Max Length Xy","description":"Far far away, behind the word mountains, far from the countr","type":"string","kind":"input","default":"A wonderful serenity has taken possession of my entire soul, like these sweet mornings of spring white...","options":null}]},{"id":"g03-s03","icon":"common:upload","name":"Service 3","description":"Some external service.","dialogName":"Service 3","dialogDescription":"Some external service.","inputs":[]},{"id":"g03-s04","icon":"common:upload","name":"Service 4","description":"Some external service.","dialogName":"Service 4","dialogDescription":"Some external service.","inputs":[{"id":"host","name":"Service Host","description":"Base path of the Service API.","type":"string","kind":"input","default":"example.com","options":null}]},{"id":"g03-s05","icon":"common:upload","name":"Service 5","description":"Some external service.","dialogName":"Service 5 Dialog Name","dialogDescription":"Some external service.","inputs":[{"id":"host","name":"Service Host","description":"Base path of the Service API.","type":"string","kind":"input","default":"example.com","options":null}]}]}],"minItems":1}},"description":"List of the inputs divided to step groups and steps.","example":{"initialState":{"valid":false,"stepGroups":[{"id":"g01","valid":false,"error":"All steps must be configured.","steps":[{"id":"g01-s01","configured":true,"valid":false,"inputs":[{"id":"api-token","visible":true,"error":"Value cannot be empty."},{"id":"password","visible":false,"error":null}]}]},{"id":"g02","valid":true,"error":null,"steps":[{"id":"g02-s01","configured":false,"valid":true,"inputs":[]},{"id":"g02-s02","configured":true,"valid":true,"inputs":[{"id":"username","visible":true,"error":null}]}]}]},"stepGroups":[{"id":"g01","description":"Choose one of the eshop platforms.","required":"atLeastOne","step":[{"id":"g01-s01","icon":"common:download","name":"Super Ecommerce","description":"Sell online with the Super E-commerce website.","dialogName":"Super Ecommerce","dialogDescription":"Please configure credentials to your Super Ecommerce account.","inputs":[{"id":"user","name":"User Name","description":"","type":"string","kind":"input","default":"john","options":null},{"id":"api-token","name":"API Token","description":"Insert Service API Token.","type":"string","kind":"hidden","default":"","options":null},{"id":"export-description","name":"Description","description":"Please enter a short description of what this export is for.","type":"string","kind":"textarea","default":"This export exports data to ...","options":null},{"id":"country","name":"Country","description":"Please select one country.","type":"string","kind":"select","default":"value1","options":[{"label":"Country 1","value":"value1"},{"label":"Country 2","value":"value2"},{"label":"Country 3","value":"value3"}]},{"id":"limit","name":"Limit","description":"Enter the maximum number of records.","type":"int","kind":"input","default":1000,"options":null},{"id":"person-height","name":"Person Height","description":"","type":"double","kind":"input","default":178.5,"options":null},{"id":"dummy-data","name":"Generate dummy data","description":"Do you want to generate dummy data?","type":"bool","kind":"confirm","default":true,"options":null},{"id":"countries","name":"Countries","description":"Please select at least one country.","type":"string[]","kind":"multiselect","default":["value1","value3"],"options":[{"label":"Country 1","value":"value1"},{"label":"Country 2","value":"value2"},{"label":"Country 3","value":"value3"}]}]},{"id":"g01-s02","icon":"common:download","name":"Other Ecommerce","description":"Alternative ecommerce solution.","dialogName":"Other Ecommerce","dialogDescription":"Alternative ecommerce solution.","inputs":[{"id":"host","name":"Service Host","description":"Base path of the Service API.","type":"string","kind":"input","default":"example.com","options":null},{"id":"token","name":"Service Token","description":"Service API token.","type":"string","kind":"hidden","default":"","options":null}]}]},{"id":"g02","description":"","required":"all","step":[{"id":"g02-s01","icon":"common:download","name":"Snowflake","description":"Transformation.","dialogName":"Snowflake","dialogDescription":"Step without inputs, locked, for illustration only.","inputs":[]}]},{"id":"g03","description":"Select some destinations if you want.","required":"optional","step":[{"id":"g03-s01","icon":"common:upload","name":"Service 1","description":"Some external service.","dialogName":"Snowflake","dialogDescription":"Some external service.","inputs":[{"id":"host","name":"Service Host","description":"Base path of the Service API.","type":"string","kind":"input","default":"example.com","options":null}]},{"id":"g03-s02","icon":"common:upload","name":"Maximum length step name","description":"Maximum length desc lorem ipsum dolor sit amet consectetur.","dialogName":"Maximum dialog step name","dialogDescription":"Maximum dialog description lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nas.","inputs":[{"id":"host","name":"Input With Max Length Xy","description":"Far far away, behind the word mountains, far from the countr","type":"string","kind":"input","default":"A wonderful serenity has taken possession of my entire soul, like these sweet mornings of spring white...","options":null}]},{"id":"g03-s03","icon":"common:upload","name":"Service 3","description":"Some external service.","dialogName":"Service 3","dialogDescription":"Some external service.","inputs":[]},{"id":"g03-s04","icon":"common:upload","name":"Service 4","description":"Some external service.","dialogName":"Service 4","dialogDescription":"Some external service.","inputs":[{"id":"host","name":"Service Host","description":"Base path of the Service API.","type":"string","kind":"input","default":"example.com","options":null}]},{"id":"g03-s05","icon":"common:upload","name":"Service 5","description":"Some external service.","dialogName":"Service 5 Dialog Name","dialogDescription":"Some external service.","inputs":[{"id":"host","name":"Service Host","description":"Base path of the Service API.","type":"string","kind":"input","default":"example.com","options":null}]}]}]},"required":["stepGroups","initialState"]},"InputsPayload":{"type":"object","properties":{"steps":{"type":"array","items":{"$ref":"#/components/schemas/StepPayload"},"description":"Steps with input values filled in by user.","example":[{"id":"g01-s01","inputs":[{"id":"user","value":"user@example.com"},{"id":"api-token","value":"123456"}]}]}},"example":{"steps":[{"id":"g01-s01","inputs":[{"id":"user","value":"user@example.com"},{"id":"api-token","value":"123456"}]}]},"required":["steps"]},"Instance":{"type":"object","properties":{"branch":{"type":"string","description":"ID of the branch.","example":"5876"},"configurations":{"type":"array","items":{"$ref":"#/components/schemas/Config"},"description":"All configurations from the instance.","example":[{"componentId":"keboola.ex-db-mysql","configId":"7954825835","name":"My Extractor"}]},"created":{"$ref":"#/components/schemas/ChangeInfo"},"instanceId":{"type":"string","description":"ID of the template instance.","example":"V1StGXR8IZ5jdHi6BAmyT"},"mainConfig":{"$ref":"#/components/schemas/MainConfig"},"name":{"type":"string","description":"Name of the instance.","example":"My Instance"},"repositoryName":{"type":"string","description":"Name of the template repository.","example":"keboola"},"templateId":{"type":"string","description":"ID of the template.","example":"my-template","minLength":1,"maxLength":40},"updated":{"$ref":"#/components/schemas/ChangeInfo"},"version":{"type":"string","description":"Semantic version of the template.","example":"v1.1.0"}},"description":"Template instance.","example":{"branch":"5876","configurations":[{"componentId":"keboola.ex-db-mysql","configId":"7954825835","name":"My Extractor"}],"created":{"date":"2022-04-28T14:20:04+00:00","tokenId":"245941"},"instanceId":"V1StGXR8IZ5jdHi6BAmyT","mainConfig":{"componentId":"keboola.orchestrator","configId":"7954825835"},"name":"My Instance","repositoryName":"keboola","templateId":"my-template","updated":{"date":"2022-04-28T14:20:04+00:00","tokenId":"245941"},"version":"v1.1.0"},"required":["instanceId","templateId","version","repositoryName","branch","name","created","updated","configurations"]},"InstanceBase":{"type":"object","properties":{"branch":{"type":"string","description":"ID of the branch.","example":"5876"},"created":{"$ref":"#/components/schemas/ChangeInfo"},"instanceId":{"type":"string","description":"ID of the template instance.","example":"V1StGXR8IZ5jdHi6BAmyT"},"mainConfig":{"$ref":"#/components/schemas/MainConfig"},"name":{"type":"string","description":"Name of the instance.","example":"My Instance"},"updated":{"$ref":"#/components/schemas/ChangeInfo"}},"description":"Instance base information.","example":{"branch":"5876","created":{"date":"2022-04-28T14:20:04+00:00","tokenId":"245941"},"instanceId":"V1StGXR8IZ5jdHi6BAmyT","mainConfig":{"componentId":"keboola.orchestrator","configId":"7954825835"},"name":"My Instance","updated":{"date":"2022-04-28T14:20:04+00:00","tokenId":"245941"}},"required":["instanceId","branch","name","created","updated"]},"InstanceDetail":{"type":"object","properties":{"branch":{"type":"string","description":"ID of the branch.","example":"5876"},"configurations":{"type":"array","items":{"$ref":"#/components/schemas/Config"},"description":"All configurations from the instance.","example":[{"componentId":"keboola.ex-db-mysql","configId":"7954825835","name":"My Extractor"}]},"created":{"$ref":"#/components/schemas/ChangeInfo"},"instanceId":{"type":"string","description":"ID of the template instance.","example":"V1StGXR8IZ5jdHi6BAmyT"},"mainConfig":{"$ref":"#/components/schemas/MainConfig"},"name":{"type":"string","description":"Name of the instance.","example":"My Instance"},"repositoryName":{"type":"string","example":"abc123"},"templateDetail":{"$ref":"#/components/schemas/TemplateBase"},"templateId":{"type":"string","example":"abc123"},"updated":{"$ref":"#/components/schemas/ChangeInfo"},"version":{"type":"string","example":"abc123"},"versionDetail":{"$ref":"#/components/schemas/VersionDetail"}},"example":{"branch":"5876","configurations":[{"componentId":"keboola.ex-db-mysql","configId":"7954825835","name":"My Extractor"}],"created":{"date":"2022-04-28T14:20:04+00:00","tokenId":"245941"},"instanceId":"V1StGXR8IZ5jdHi6BAmyT","mainConfig":{"componentId":"keboola.orchestrator","configId":"7954825835"},"name":"My Instance","repositoryName":"abc123","templateDetail":{"author":{"name":"Keboola","url":"https://www.keboola.com"},"defaultVersion":"v1.2.3","deprecated":false,"description":"Full workflow to load all user accounts from the Service.","id":"my-template","name":"My Template"},"templateId":"abc123","updated":{"date":"2022-04-28T14:20:04+00:00","tokenId":"245941"},"version":"abc123","versionDetail":{"version":"v1.2.3","stable":true,"description":"Stable version.","components":["ex-generic-v2","keboola.snowflake-transformation"],"longDescription":"Maximum length template **description** dolor sit amet, consectetuer adipiscing elit","readme":"Lorem markdownum quod discenda [aegide lapidem](http://www.nequeuntoffensa.io/)"}},"required":["instanceId","templateId","version","repositoryName","branch","name","created","updated","templateDetail","versionDetail","configurations"]},"InstanceInputsRequest":{"type":"object","properties":{"branch":{"type":"string","description":"ID of the branch. Use \"default\" for default branch.","example":"default"},"instanceId":{"type":"string","description":"ID of the template instance.","example":"V1StGXR8IZ5jdHi6BAmyT"},"version":{"type":"string","description":"Semantic version of the template. Use \"default\" for default version.","example":"v1.2.3"}},"example":{"branch":"default","instanceId":"V1StGXR8IZ5jdHi6BAmyT","version":"v1.2.3"},"required":["version","instanceId","branch"]},"InstanceRequest":{"type":"object","properties":{"branch":{"type":"string","description":"ID of the branch. Use \"default\" for default branch.","example":"default"},"instanceId":{"type":"string","description":"ID of the template instance.","example":"V1StGXR8IZ5jdHi6BAmyT"}},"example":{"branch":"default","instanceId":"V1StGXR8IZ5jdHi6BAmyT"},"required":["instanceId","branch"]},"Instances":{"type":"object","properties":{"instances":{"type":"array","items":{"$ref":"#/components/schemas/Instance"},"description":"All instances found in branch.","example":[{"branch":"5876","configurations":[{"componentId":"keboola.ex-db-mysql","configId":"7954825835","name":"My Extractor"}],"created":{"date":"2022-04-28T14:20:04+00:00","tokenId":"245941"},"instanceId":"V1StGXR8IZ5jdHi6BAmyT","mainConfig":{"componentId":"keboola.orchestrator","configId":"7954825835"},"name":"My Instance","repositoryName":"keboola","templateId":"my-template","updated":{"date":"2022-04-28T14:20:04+00:00","tokenId":"245941"},"version":"v1.1.0"}]}},"description":"List of the instances.","example":{"instances":[{"branch":"5876","configurations":[{"componentId":"keboola.ex-db-mysql","configId":"7954825835","name":"My Extractor"}],"created":{"date":"2022-04-28T14:20:04+00:00","tokenId":"245941"},"instanceId":"V1StGXR8IZ5jdHi6BAmyT","mainConfig":{"componentId":"keboola.orchestrator","configId":"7954825835"},"name":"My Instance","repositoryName":"keboola","templateId":"my-template","updated":{"date":"2022-04-28T14:20:04+00:00","tokenId":"245941"},"version":"v1.1.0"}]},"required":["instances"]},"MainConfig":{"type":"object","properties":{"componentId":{"type":"string","description":"Component ID.","example":"keboola.orchestrator"},"configId":{"type":"string","description":"Configuration ID.","example":"7954825835"}},"description":"Main config of the instance, usually an orchestration. Optional.","example":{"componentId":"keboola.orchestrator","configId":"7954825835"},"required":["componentId","configId"]},"ProjectLockedError":{"type":"object","properties":{"error":{"type":"string","description":"Name of error.","example":"templates.internalError"},"message":{"type":"string","description":"Error message.","example":"The project is locked, another operation is in progress, please try again later."},"retryAfter":{"type":"string","description":"Indicates how long the user agent should wait before making a follow-up request.","example":"\u003chttp-date\u003e/\u003cdelay-seconds\u003e"},"statusCode":{"type":"integer","description":"HTTP status code.","example":503,"format":"int64"}},"description":"Project locked error","example":{"error":"templates.internalError","message":"The project is locked, another operation is in progress, please try again later.","retryAfter":"\u003chttp-date\u003e/\u003cdelay-seconds\u003e","statusCode":503},"required":["statusCode","error","message","retryAfter"]},"ProjectLockedError2":{"type":"object","properties":{"error":{"type":"string","description":"Name of error.","example":"templates.internalError"},"message":{"type":"string","description":"Error message.","example":"The project is locked, another operation is in progress, please try again later."},"statusCode":{"type":"integer","description":"HTTP status code.","example":503,"format":"int64"}},"description":"Access to branch metadata must be atomic, so only one write operation can run at a time. If this error occurs, the client should make retries, see Retry-After header.","example":{"statusCode":503,"error":"templates.projectLocked","message":"The project is locked, another operation is in progress, please try again later."},"required":["statusCode","error","message"]},"ProjectLockedError3":{"type":"object","properties":{"error":{"type":"string","description":"Name of error.","example":"templates.internalError"},"message":{"type":"string","description":"Error message.","example":"The project is locked, another operation is in progress, please try again later."},"statusCode":{"type":"integer","description":"HTTP status code.","example":503,"format":"int64"}},"description":"Access to branch metadata must be atomic, so only one write operation can run at a time. If this error occurs, the client should make retries, see Retry-After header.","example":{"statusCode":503,"error":"templates.projectLocked","message":"The project is locked, another operation is in progress, please try again later."},"required":["statusCode","error","message"]},"ProjectLockedError4":{"type":"object","properties":{"error":{"type":"string","description":"Name of error.","example":"templates.internalError"},"message":{"type":"string","description":"Error message.","example":"The project is locked, another operation is in progress, please try again later."},"statusCode":{"type":"integer","description":"HTTP status code.","example":503,"format":"int64"}},"description":"Access to branch metadata must be atomic, so only one write operation can run at a time. If this error occurs, the client should make retries, see Retry-After header.","example":{"statusCode":503,"error":"templates.projectLocked","message":"The project is locked, another operation is in progress, please try again later."},"required":["statusCode","error","message"]},"ProjectLockedError5":{"type":"object","properties":{"error":{"type":"string","description":"Name of error.","example":"templates.internalError"},"message":{"type":"string","description":"Error message.","example":"The project is locked, another operation is in progress, please try again later."},"statusCode":{"type":"integer","description":"HTTP status code.","example":503,"format":"int64"}},"description":"Access to branch metadata must be atomic, so only one write operation can run at a time. If this error occurs, the client should make retries, see Retry-After header.","example":{"statusCode":503,"error":"templates.projectLocked","message":"The project is locked, another operation is in progress, please try again later."},"required":["statusCode","error","message"]},"Repositories":{"type":"object","properties":{"repositories":{"type":"array","items":{"$ref":"#/components/schemas/Repository"},"description":"All template repositories defined in the project.","example":[{"name":"keboola","url":"https://github.com/keboola/keboola-as-code-templates","ref":"main","author":{"name":"Keboola","url":"https://www.keboola.com"}}]}},"description":"List of the repositories.","example":{"repositories":[{"name":"keboola","url":"https://github.com/keboola/keboola-as-code-templates","ref":"main","author":{"name":"Keboola","url":"https://www.keboola.com"}}]},"required":["repositories"]},"Repository":{"type":"object","properties":{"author":{"$ref":"#/components/schemas/Author"},"name":{"type":"string","description":"Template repository name. Use \"keboola\" for default Keboola repository.","example":"keboola","minLength":1,"maxLength":40},"ref":{"type":"string","description":"Git branch or tag.","example":"main","minLength":1},"url":{"type":"string","description":"Git URL to the repository.","example":"https://github.com/keboola/keboola-as-code-templates","minLength":1}},"description":"Template repository.","example":{"name":"keboola","url":"https://github.com/keboola/keboola-as-code-templates","ref":"main","author":{"name":"Keboola","url":"https://www.keboola.com"}},"required":["name","url","ref","author"]},"RepositoryRequest":{"type":"object","properties":{"repository":{"type":"string","description":"Name of the template repository. Use \"keboola\" for default Keboola repository.","example":"keboola"}},"example":{"repository":"keboola"},"required":["repository"]},"ServiceDetail":{"type":"object","properties":{"api":{"type":"string","description":"Name of the API","example":"templates"},"documentation":{"type":"string","description":"URL of the API documentation.","example":"https://templates.keboola.com/v1/documentation"}},"description":"Information about the service","example":{"api":"templates","documentation":"https://templates.keboola.com/v1/documentation"},"required":["api","documentation"]},"Step":{"type":"object","properties":{"description":{"type":"string","description":"Description of the step.","example":"Sell online with the Super E-commerce website.","minLength":1,"maxLength":60},"dialogDescription":{"type":"string","description":"Description of the dialog with inputs.","example":"Please configure the connection to your Super Ecommerce account.","minLength":1,"maxLength":200},"dialogName":{"type":"string","description":"Name of the dialog with inputs.","example":"Super Ecommerce","minLength":1,"maxLength":25},"icon":{"type":"string","description":"Icon for UI. Component icon if it starts with \"component:...\", or a common icon if it starts with \"common:...\".","example":"common:download","minLength":1,"maxLength":40},"id":{"type":"string","description":"Unique ID of the step.","example":"g01-s01","minLength":1},"inputs":{"type":"array","items":{"$ref":"#/components/schemas/Input"},"description":"Inputs in the step.","example":[{"id":"user","name":"User Name","description":"","type":"string","kind":"input","default":"john","options":null},{"id":"api-token","name":"API Token","description":"Insert Service API Token.","type":"string","kind":"hidden","default":"","options":null},{"id":"export-description","name":"Description","description":"Please enter a short description of what this export is for.","type":"string","kind":"textarea","default":"This export exports data to ...","options":null},{"id":"country","name":"Country","description":"Please select one country.","type":"string","kind":"select","default":"value1","options":[{"label":"Country 1","value":"value1"},{"label":"Country 2","value":"value2"},{"label":"Country 3","value":"value3"}]},{"id":"limit","name":"Limit","description":"Enter the maximum number of records.","type":"int","kind":"input","default":1000,"options":null},{"id":"person-height","name":"Person Height","description":"","type":"double","kind":"input","default":178.5,"options":null},{"id":"dummy-data","name":"Generate dummy data","description":"Do you want to generate dummy data?","type":"bool","kind":"confirm","default":true,"options":null},{"id":"countries","name":"Countries","description":"Please select at least one country.","type":"string[]","kind":"multiselect","default":["value1","value3"],"options":[{"label":"Country 1","value":"value1"},{"label":"Country 2","value":"value2"},{"label":"Country 3","value":"value3"}]}],"minItems":0},"name":{"type":"string","description":"Name of the step.","example":"Super Ecommerce","minLength":1,"maxLength":25}},"description":"Step is a container for inputs.","example":{"description":"Sell online with the Super E-commerce website.","dialogDescription":"Please configure the connection to your Super Ecommerce account.","dialogName":"Super Ecommerce","icon":"common:download","id":"g01-s01","inputs":[{"id":"user","name":"User Name","description":"","type":"string","kind":"input","default":"john","options":null},{"id":"api-token","name":"API Token","description":"Insert Service API Token.","type":"string","kind":"hidden","default":"","options":null},{"id":"export-description","name":"Description","description":"Please enter a short description of what this export is for.","type":"string","kind":"textarea","default":"This export exports data to ...","options":null},{"id":"country","name":"Country","description":"Please select one country.","type":"string","kind":"select","default":"value1","options":[{"label":"Country 1","value":"value1"},{"label":"Country 2","value":"value2"},{"label":"Country 3","value":"value3"}]},{"id":"limit","name":"Limit","description":"Enter the maximum number of records.","type":"int","kind":"input","default":1000,"options":null},{"id":"person-height","name":"Person Height","description":"","type":"double","kind":"input","default":178.5,"options":null},{"id":"dummy-data","name":"Generate dummy data","description":"Do you want to generate dummy data?","type":"bool","kind":"confirm","default":true,"options":null},{"id":"countries","name":"Countries","description":"Please select at least one country.","type":"string[]","kind":"multiselect","default":["value1","value3"],"options":[{"label":"Country 1","value":"value1"},{"label":"Country 2","value":"value2"},{"label":"Country 3","value":"value3"}]}],"name":"Super Ecommerce"},"required":["id","icon","name","description","dialogName","dialogDescription","inputs"]},"StepGroup":{"type":"object","properties":{"description":{"type":"string","description":"Description of the step group, a tooltip explaining what needs to be configured.","example":"Choose one of the eshop platforms.","minLength":1,"maxLength":80},"id":{"type":"string","description":"Unique ID of the step group.","example":"g01"},"required":{"type":"string","description":"The number of steps that must be configured.","example":"atLeastOne","enum":["all","atLeastOne","exactlyOne","zeroOrOne","optional"]},"steps":{"type":"array","items":{"$ref":"#/components/schemas/Step"},"description":"Steps in the group.","example":[{"id":"g01-s01","icon":"common:download","name":"Super Ecommerce","description":"Sell online with the Super E-commerce website.","dialogName":"Super Ecommerce","dialogDescription":"Please configure credentials to your Super Ecommerce account.","inputs":[{"id":"user","name":"User Name","description":"","type":"string","kind":"input","default":"john","options":null},{"id":"api-token","name":"API Token","description":"Insert Service API Token.","type":"string","kind":"hidden","default":"","options":null},{"id":"export-description","name":"Description","description":"Please enter a short description of what this export is for.","type":"string","kind":"textarea","default":"This export exports data to ...","options":null},{"id":"country","name":"Country","description":"Please select one country.","type":"string","kind":"select","default":"value1","options":[{"label":"Country 1","value":"value1"},{"label":"Country 2","value":"value2"},{"label":"Country 3","value":"value3"}]},{"id":"limit","name":"Limit","description":"Enter the maximum number of records.","type":"int","kind":"input","default":1000,"options":null},{"id":"person-height","name":"Person Height","description":"","type":"double","kind":"input","default":178.5,"options":null},{"id":"dummy-data","name":"Generate dummy data","description":"Do you want to generate dummy data?","type":"bool","kind":"confirm","default":true,"options":null},{"id":"countries","name":"Countries","description":"Please select at least one country.","type":"string[]","kind":"multiselect","default":["value1","value3"],"options":[{"label":"Country 1","value":"value1"},{"label":"Country 2","value":"value2"},{"label":"Country 3","value":"value3"}]}]}],"minItems":1}},"description":"Step group is a container for steps.","example":{"description":"Choose one of the eshop platforms.","id":"g01","required":"atLeastOne","steps":[{"id":"g01-s01","icon":"common:download","name":"Super Ecommerce","description":"Sell online with the Super E-commerce website.","dialogName":"Super Ecommerce","dialogDescription":"Please configure credentials to your Super Ecommerce account.","inputs":[{"id":"user","name":"User Name","description":"","type":"string","kind":"input","default":"john","options":null},{"id":"api-token","name":"API Token","description":"Insert Service API Token.","type":"string","kind":"hidden","default":"","options":null},{"id":"export-description","name":"Description","description":"Please enter a short description of what this export is for.","type":"string","kind":"textarea","default":"This export exports data to ...","options":null},{"id":"country","name":"Country","description":"Please select one country.","type":"string","kind":"select","default":"value1","options":[{"label":"Country 1","value":"value1"},{"label":"Country 2","value":"value2"},{"label":"Country 3","value":"value3"}]},{"id":"limit","name":"Limit","description":"Enter the maximum number of records.","type":"int","kind":"input","default":1000,"options":null},{"id":"person-height","name":"Person Height","description":"","type":"double","kind":"input","default":178.5,"options":null},{"id":"dummy-data","name":"Generate dummy data","description":"Do you want to generate dummy data?","type":"bool","kind":"confirm","default":true,"options":null},{"id":"countries","name":"Countries","description":"Please select at least one country.","type":"string[]","kind":"multiselect","default":["value1","value3"],"options":[{"label":"Country 1","value":"value1"},{"label":"Country 2","value":"value2"},{"label":"Country 3","value":"value3"}]}]}]},"required":["id","description","required","steps"]},"StepGroupValidationResult":{"type":"object","properties":{"error":{"type":"string","description":"Are all inputs valid?","example":"All steps must be configured."},"id":{"type":"string","description":"Step group ID.","example":"g01"},"steps":{"type":"array","items":{"$ref":"#/components/schemas/StepValidationResult"},"description":"List of Details for the steps.","example":[{"configured":false,"id":"g01-s01","inputs":[{"error":"API token cannot be empty.","id":"api-token","visible":true}],"valid":false}]},"valid":{"type":"boolean","description":"True if the required number of steps is configured and all inputs are valid.","example":false}},"description":"Validation Detail of the step group.","example":{"error":"All steps must be configured.","id":"g01","steps":[{"configured":false,"id":"g01-s01","inputs":[{"error":"API token cannot be empty.","id":"api-token","visible":true}],"valid":false}],"valid":false},"required":["id","valid","steps"]},"StepPayload":{"type":"object","properties":{"id":{"type":"string","description":"Unique ID of the step.","example":"g01-s01","minLength":1},"inputs":{"type":"array","items":{"$ref":"#/components/schemas/InputValue"},"description":"Input values.","example":[{"id":"user","value":"user@example.com"},{"id":"api-token","value":"123456"}]}},"description":"Step with input values filled in by user.","example":{"id":"g01-s01","inputs":[{"id":"user","value":"user@example.com"},{"id":"api-token","value":"123456"}]},"required":["id","inputs"]},"StepValidationResult":{"type":"object","properties":{"configured":{"type":"boolean","description":"True if the step was part of the sent payload.","example":false},"id":{"type":"string","description":"Step ID.","example":"g01-s01"},"inputs":{"type":"array","items":{"$ref":"#/components/schemas/InputValidationResult"},"description":"List of Details for the inputs.","example":[{"error":"API token cannot be empty.","id":"api-token","visible":true}]},"valid":{"type":"boolean","description":"True if all inputs in the step are valid.","example":false}},"description":"Validation Detail of the step.","example":{"configured":false,"id":"g01-s01","inputs":[{"error":"API token cannot be empty.","id":"api-token","visible":true}],"valid":false},"required":["id","configured","valid","inputs"]},"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"},"id":{"type":"string","description":"Unique ID of the task.","example":"task_1234"},"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"]},"type":{"type":"string","description":"Task type.","example":"abc123"},"url":{"type":"string","description":"URL of the task.","example":"abc123"}},"description":"An asynchronous task.","example":{"id":"task-1","url":"https://templates.keboola.com/v1/tasks/template.use/2018-01-01T00:00:00.000Z_dIklP","type":"template.use","createdAt":"2018-01-01T00:00:00.000Z","finishedAt":"2018-01-01T00:00:00.000Z","isFinished":true,"duration":123,"result":"task succeeded","outputs":{"instanceId":"V1StGXR8IZ5jdHi6BAmyT"}},"required":["id","type","url","status","isFinished","createdAt"]},"TaskOutputs":{"type":"object","properties":{"instanceId":{"type":"string","description":"ID of the template instance.","example":"V1StGXR8IZ5jdHi6BAmyT"}},"description":"Outputs generated by the task.","example":{"instanceId":"V1StGXR8IZ5jdHi6BAmyT"}},"Template":{"type":"object","properties":{"author":{"$ref":"#/components/schemas/Author"},"categories":{"type":"array","items":{"type":"string","example":"abc123"},"description":"List of categories the template belongs to.","example":["E-commerce","Other","Social Media"]},"components":{"type":"array","items":{"type":"string","example":"abc123"},"description":"List of components used in the template.","example":["ex-generic-v2","keboola.snowflake-transformation"]},"defaultVersion":{"type":"string","description":"Recommended version of the template.","example":"v1.2.3","minLength":1,"maxLength":20},"deprecated":{"type":"boolean","description":"Deprecated template cannot be used.","example":false},"description":{"type":"string","description":"Short description of the template.","example":"Full workflow to load all user accounts from the Service.","minLength":1,"maxLength":200},"id":{"type":"string","description":"ID of the template.","example":"my-template","minLength":1,"maxLength":40},"name":{"type":"string","description":"Template name.","example":"My Template","minLength":1,"maxLength":40},"versions":{"type":"array","items":{"$ref":"#/components/schemas/Version"},"description":"All available versions of the template.","example":[{"version":"v0.1.1","stable":false,"description":"Initial version."},{"version":"v1.1.1","stable":true,"description":""},{"version":"v1.2.3","stable":true,"description":""},{"version":"v2.0.0","stable":false,"description":"Experimental support for new API."}]}},"description":"Template.","example":{"author":{"name":"Keboola","url":"https://www.keboola.com"},"categories":["E-commerce","Other","Social Media"],"components":["ex-generic-v2","keboola.snowflake-transformation"],"defaultVersion":"v1.2.3","deprecated":false,"description":"Full workflow to load all user accounts from the Service.","id":"my-template","name":"My Template","versions":[{"version":"v0.1.1","stable":false,"description":"Initial version."},{"version":"v1.1.1","stable":true,"description":""},{"version":"v1.2.3","stable":true,"description":""},{"version":"v2.0.0","stable":false,"description":"Experimental support for new API."}]},"required":["id","name","deprecated","author","description","defaultVersion","categories","components","versions"]},"TemplateBase":{"type":"object","properties":{"author":{"$ref":"#/components/schemas/Author"},"defaultVersion":{"type":"string","description":"Recommended version of the template.","example":"v1.2.3","minLength":1,"maxLength":20},"deprecated":{"type":"boolean","description":"Deprecated template cannot be used.","example":false},"description":{"type":"string","description":"Short description of the template.","example":"Full workflow to load all user accounts from the Service.","minLength":1,"maxLength":200},"id":{"type":"string","description":"ID of the template.","example":"my-template","minLength":1,"maxLength":40},"name":{"type":"string","description":"Template name.","example":"My Template","minLength":1,"maxLength":40}},"description":"Template base information.","example":{"author":{"name":"Keboola","url":"https://www.keboola.com"},"defaultVersion":"v1.2.3","deprecated":false,"description":"Full workflow to load all user accounts from the Service.","id":"my-template","name":"My Template"},"required":["id","name","deprecated","author","description","defaultVersion"]},"TemplateDetail":{"type":"object","properties":{"author":{"$ref":"#/components/schemas/Author"},"categories":{"type":"array","items":{"type":"string","example":"abc123"},"description":"List of categories the template belongs to.","example":["E-commerce","Other","Social Media"]},"components":{"type":"array","items":{"type":"string","example":"abc123"},"description":"List of components used in the template.","example":["ex-generic-v2","keboola.snowflake-transformation"]},"defaultVersion":{"type":"string","description":"Recommended version of the template.","example":"v1.2.3","minLength":1,"maxLength":20},"deprecated":{"type":"boolean","description":"Deprecated template cannot be used.","example":false},"description":{"type":"string","description":"Short description of the template.","example":"Full workflow to load all user accounts from the Service.","minLength":1,"maxLength":200},"id":{"type":"string","description":"ID of the template.","example":"my-template","minLength":1,"maxLength":40},"name":{"type":"string","description":"Template name.","example":"My Template","minLength":1,"maxLength":40},"repository":{"$ref":"#/components/schemas/Repository"},"versions":{"type":"array","items":{"$ref":"#/components/schemas/Version"},"description":"All available versions of the template.","example":[{"version":"v0.1.1","stable":false,"description":"Initial version."},{"version":"v1.1.1","stable":true,"description":""},{"version":"v1.2.3","stable":true,"description":""},{"version":"v2.0.0","stable":false,"description":"Experimental support for new API."}]}},"example":{"id":"my-template","name":"My Template","deprecated":false,"categories":["E-commerce","Other","Social Media"],"components":["ex-generic-v2","keboola.snowflake-transformation"],"author":{"name":"Keboola","url":"https://www.keboola.com"},"description":"Full workflow to load all user accounts from the Service.","defaultVersion":"v1.2.3","versions":[{"version":"v0.1.1","stable":false,"description":"Initial version."},{"version":"v1.1.1","stable":true,"description":""},{"version":"v1.2.3","stable":true,"description":""},{"version":"v2.0.0","stable":false,"description":"Experimental support for new API."}],"repository":{"name":"keboola","url":"https://github.com/keboola/keboola-as-code-templates","ref":"main","author":{"name":"Keboola","url":"https://www.keboola.com"}}},"required":["id","name","deprecated","author","description","defaultVersion","repository","categories","components","versions"]},"TemplateRequest":{"type":"object","properties":{"repository":{"type":"string","description":"Name of the template repository. Use \"keboola\" for default Keboola repository.","example":"keboola"},"template":{"type":"string","description":"ID of the template.","example":"my-template","minLength":1,"maxLength":40}},"example":{"repository":"keboola","template":"my-template"},"required":["template","repository"]},"TemplateVersionRequest":{"type":"object","properties":{"repository":{"type":"string","description":"Name of the template repository. Use \"keboola\" for default Keboola repository.","example":"keboola"},"template":{"type":"string","description":"ID of the template.","example":"my-template","minLength":1,"maxLength":40},"version":{"type":"string","description":"Semantic version of the template. Use \"default\" for default version.","example":"v1.2.3"}},"example":{"repository":"keboola","template":"my-template","version":"v1.2.3"},"required":["version","template","repository"]},"Templates":{"type":"object","properties":{"repository":{"$ref":"#/components/schemas/Repository"},"templates":{"type":"array","items":{"$ref":"#/components/schemas/Template"},"description":"All template defined in the repository.","example":[{"author":{"name":"Keboola","url":"https://www.keboola.com"},"categories":["E-commerce","Other","Social Media"],"components":["ex-generic-v2","keboola.snowflake-transformation"],"defaultVersion":"v1.2.3","deprecated":false,"description":"Full workflow to load all user accounts from the Service.","id":"my-template","name":"My Template","versions":[{"version":"v0.1.1","stable":false,"description":"Initial version."},{"version":"v1.1.1","stable":true,"description":""},{"version":"v1.2.3","stable":true,"description":""},{"version":"v2.0.0","stable":false,"description":"Experimental support for new API."}]}]}},"description":"List of the templates.","example":{"repository":{"name":"keboola","url":"https://github.com/keboola/keboola-as-code-templates","ref":"main","author":{"name":"Keboola","url":"https://www.keboola.com"}},"templates":[{"id":"my-template","name":"My Template","deprecated":false,"categories":["E-commerce","Other","Social Media"],"components":["ex-generic-v2","keboola.snowflake-transformation"],"author":{"name":"Keboola","url":"https://www.keboola.com"},"description":"Full workflow to load all user accounts from the Service.","defaultVersion":"v1.2.3","versions":[{"version":"v0.1.1","stable":false,"description":"Initial version."},{"version":"v1.1.1","stable":true,"description":""},{"version":"v1.2.3","stable":true,"description":""},{"version":"v2.0.0","stable":false,"description":"Experimental support for new API."}]},{"id":"maximum-length-template-id-dolor-sit-an","name":"Maximum length template name ipsum dolo","deprecated":false,"categories":["E-commerce","Other","Social Media"],"components":["ex-generic-v2","keboola.snowflake-transformation"],"author":{"name":"Keboola","url":"https://www.keboola.com"},"description":"Maximum length template description dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascet.","defaultVersion":"v4.5.6","versions":[{"version":"v4.5.6","stable":true,"description":"Maximum length version description abc."}]}]},"required":["repository","templates"]},"TemplatesRequest":{"type":"object","properties":{"filter":{"type":"string","description":"The 'filter' attribute specifies the category of templates to retrieve from the repository.","example":"keboola.data-apps","enum":["keboola.components","keboola.data-apps"]},"repository":{"type":"string","description":"Name of the template repository. Use \"keboola\" for default Keboola repository.","example":"keboola"}},"example":{"filter":"keboola.data-apps","repository":"keboola"},"required":["repository"]},"UpdateInstanceRequest":{"type":"object","properties":{"branch":{"type":"string","description":"ID of the branch. Use \"default\" for default branch.","example":"default"},"instanceId":{"type":"string","description":"ID of the template instance.","example":"V1StGXR8IZ5jdHi6BAmyT"},"name":{"type":"string","description":"New name of the instance.","example":"My Great Instance"}},"example":{"branch":"default","instanceId":"V1StGXR8IZ5jdHi6BAmyT","name":"My Great Instance"},"required":["name","instanceId","branch"]},"UpdateInstanceRequestBody":{"type":"object","properties":{"name":{"type":"string","description":"New name of the instance.","example":"My Great Instance"}},"example":{"name":"My Great Instance"},"required":["name"]},"UpgradeInstanceRequest":{"type":"object","properties":{"branch":{"type":"string","description":"ID of the branch. Use \"default\" for default branch.","example":"default"},"instanceId":{"type":"string","description":"ID of the template instance.","example":"V1StGXR8IZ5jdHi6BAmyT"},"steps":{"type":"array","items":{"$ref":"#/components/schemas/StepPayload"},"description":"Steps with input values filled in by user.","example":[{"id":"g01-s01","inputs":[{"id":"user","value":"user@example.com"},{"id":"api-token","value":"123456"}]}]},"version":{"type":"string","description":"Semantic version of the template. Use \"default\" for default version.","example":"v1.2.3"}},"example":{"branch":"default","instanceId":"V1StGXR8IZ5jdHi6BAmyT","steps":[{"id":"g01-s01","inputs":[{"id":"user","value":"user@example.com"},{"id":"api-token","value":"123456"}]}],"version":"v1.2.3"},"required":["version","instanceId","branch","steps"]},"UseTemplateRequest":{"type":"object","properties":{"branch":{"type":"string","description":"ID of the branch. Use \"default\" for default branch.","example":"default"},"name":{"type":"string","description":"Name of the new template instance.","example":"My Instance"},"repository":{"type":"string","description":"Name of the template repository. Use \"keboola\" for default Keboola repository.","example":"keboola"},"steps":{"type":"array","items":{"$ref":"#/components/schemas/StepPayload"},"description":"Steps with input values filled in by user.","example":[{"id":"g01-s01","inputs":[{"id":"user","value":"user@example.com"},{"id":"api-token","value":"123456"}]}]},"template":{"type":"string","description":"ID of the template.","example":"my-template","minLength":1,"maxLength":40},"version":{"type":"string","description":"Semantic version of the template. Use \"default\" for default version.","example":"v1.2.3"}},"example":{"branch":"default","name":"My Instance","repository":"keboola","steps":[{"id":"g01-s01","inputs":[{"id":"user","value":"user@example.com"},{"id":"api-token","value":"123456"}]}],"template":"my-template","version":"v1.2.3"},"required":["name","branch","version","template","repository","steps"]},"UseTemplateVersionRequestBody":{"type":"object","properties":{"branch":{"type":"string","description":"ID of the branch. Use \"default\" for default branch.","example":"default"},"name":{"type":"string","description":"Name of the new template instance.","example":"My Instance"},"steps":{"type":"array","items":{"$ref":"#/components/schemas/StepPayload"},"description":"Steps with input values filled in by user.","example":[{"id":"g01-s01","inputs":[{"id":"user","value":"user@example.com"},{"id":"api-token","value":"123456"}]}]}},"example":{"branch":"default","name":"My Instance","steps":[{"id":"g01-s01","inputs":[{"id":"user","value":"user@example.com"},{"id":"api-token","value":"123456"}]}]},"required":["name","branch","steps"]},"ValidateInputsRequest":{"type":"object","properties":{"repository":{"type":"string","description":"Name of the template repository. Use \"keboola\" for default Keboola repository.","example":"keboola"},"steps":{"type":"array","items":{"$ref":"#/components/schemas/StepPayload"},"description":"Steps with input values filled in by user.","example":[{"id":"g01-s01","inputs":[{"id":"user","value":"user@example.com"},{"id":"api-token","value":"123456"}]}]},"template":{"type":"string","description":"ID of the template.","example":"my-template","minLength":1,"maxLength":40},"version":{"type":"string","description":"Semantic version of the template. Use \"default\" for default version.","example":"v1.2.3"}},"example":{"repository":"keboola","steps":[{"id":"g01-s01","inputs":[{"id":"user","value":"user@example.com"},{"id":"api-token","value":"123456"}]}],"template":"my-template","version":"v1.2.3"},"required":["version","template","repository","steps"]},"ValidationError":{"type":"object","properties":{"ValidationResult":{"$ref":"#/components/schemas/ValidationResult"},"error":{"type":"string","description":"Name of error.","example":"InvalidPayload"},"message":{"type":"string","description":"Error message.","example":"Inputs are not valid."}},"example":{"ValidationResult":{"valid":false,"stepGroups":[{"id":"g01","valid":false,"error":"All steps must be configured.","steps":[{"id":"g01-s01","configured":true,"valid":false,"inputs":[{"id":"api-token","visible":true,"error":"Value cannot be empty."},{"id":"password","visible":false,"error":null}]}]},{"id":"g02","valid":true,"error":null,"steps":[{"id":"g02-s01","configured":false,"valid":true,"inputs":[]},{"id":"g02-s02","configured":true,"valid":true,"inputs":[{"id":"username","visible":true,"error":null}]}]}]},"error":"InvalidPayload","message":"Inputs are not valid."},"required":["error","message","ValidationResult"]},"ValidationResult":{"type":"object","properties":{"stepGroups":{"type":"array","items":{"$ref":"#/components/schemas/StepGroupValidationResult"},"description":"List of Details for the step groups.","example":[{"error":"All steps must be configured.","id":"g01","steps":[{"configured":false,"id":"g01-s01","inputs":[{"error":"API token cannot be empty.","id":"api-token","visible":true}],"valid":false}],"valid":false}]},"valid":{"type":"boolean","description":"True if all groups and inputs are valid.","example":false}},"description":"Detail of the inputs validation.","example":{"valid":false,"stepGroups":[{"id":"g01","valid":false,"error":"All steps must be configured.","steps":[{"id":"g01-s01","configured":true,"valid":false,"inputs":[{"id":"api-token","visible":true,"error":"Value cannot be empty."},{"id":"password","visible":false,"error":null}]}]},{"id":"g02","valid":true,"error":null,"steps":[{"id":"g02-s01","configured":false,"valid":true,"inputs":[]},{"id":"g02-s02","configured":true,"valid":true,"inputs":[{"id":"username","visible":true,"error":null}]}]}]},"required":["valid","stepGroups"]},"Version":{"type":"object","properties":{"description":{"type":"string","description":"Optional short description of the version. Can be empty.","example":"Experimental support for new API.","minLength":0,"maxLength":40},"stable":{"type":"boolean","description":"If true, then the version is ready for production use.","example":true},"version":{"type":"string","description":"Semantic version.","example":"v1.2.3","minLength":1,"maxLength":20}},"description":"Template version.","example":{"version":"v1.2.3","stable":true,"description":"Stable version."},"required":["version","stable","description"]},"VersionDetail":{"type":"object","properties":{"components":{"type":"array","items":{"type":"string","example":"abc123"},"description":"List of components used in the template version.","example":["ex-generic-v2","keboola.snowflake-transformation"]},"description":{"type":"string","description":"Optional short description of the version. Can be empty.","example":"Experimental support for new API.","minLength":0,"maxLength":40},"longDescription":{"type":"string","description":"Extended description of the template in Markdown format.","example":"**Full workflow** to load all user accounts from [the Service](https://service.com). With *extended* explanation ...","minLength":1},"readme":{"type":"string","description":"Readme of the template version in Markdown format.","example":"Lorem markdownum quod discenda [aegide lapidem](http://www.nequeuntoffensa.io/)","minLength":1},"stable":{"type":"boolean","description":"If true, then the version is ready for production use.","example":true},"version":{"type":"string","description":"Semantic version.","example":"v1.2.3","minLength":1,"maxLength":20}},"example":{"version":"v1.2.3","stable":true,"description":"Stable version.","components":["ex-generic-v2","keboola.snowflake-transformation"],"longDescription":"Maximum length template **description** dolor sit amet, consectetuer adipiscing elit","readme":"Lorem markdownum quod discenda [aegide lapidem](http://www.nequeuntoffensa.io/)"},"required":["version","stable","description","components","longDescription","readme"]},"VersionDetailExtended":{"type":"object","properties":{"components":{"type":"array","items":{"type":"string","example":"abc123"},"description":"List of components used in the template version.","example":["ex-generic-v2","keboola.snowflake-transformation"]},"description":{"type":"string","description":"Optional short description of the version. Can be empty.","example":"Experimental support for new API.","minLength":0,"maxLength":40},"longDescription":{"type":"string","description":"Extended description of the template in Markdown format.","example":"**Full workflow** to load all user accounts from [the Service](https://service.com). With *extended* explanation ...","minLength":1},"readme":{"type":"string","description":"Readme of the template version in Markdown format.","example":"Lorem markdownum quod discenda [aegide lapidem](http://www.nequeuntoffensa.io/)","minLength":1},"repository":{"$ref":"#/components/schemas/Repository"},"stable":{"type":"boolean","description":"If true, then the version is ready for production use.","example":true},"template":{"$ref":"#/components/schemas/Template"},"version":{"type":"string","description":"Semantic version.","example":"v1.2.3","minLength":1,"maxLength":20}},"example":{"version":"v1.2.3","stable":true,"description":"Stable version.","components":["ex-generic-v2","keboola.snowflake-transformation"],"longDescription":"Maximum length template **description** dolor sit amet, consectetuer adipiscing elit","readme":"Lorem markdownum quod discenda [aegide lapidem](http://www.nequeuntoffensa.io/)","repository":{"name":"keboola","url":"https://github.com/keboola/keboola-as-code-templates","ref":"main","author":{"name":"Keboola","url":"https://www.keboola.com"}},"template":{"id":"my-template","name":"My Template","deprecated":false,"author":{"name":"Keboola","url":"https://www.keboola.com"},"description":"Full workflow to load all user accounts from the Service.","defaultVersion":"v1.2.3"}},"required":["version","stable","description","components","longDescription","readme","repository","template"]}},"securitySchemes":{"storage-api-token":{"type":"apiKey","description":"Storage Api Token Authentication.","name":"X-StorageApi-Token","in":"header"}}},"tags":[{"name":"templates","description":"Service for applying templates to Keboola projects."}]} \ No newline at end of file diff --git a/internal/pkg/service/templates/api/openapi/openapi3.yaml b/internal/pkg/service/templates/api/openapi/openapi3.yaml index 325455b5c5..d606e083bd 100644 --- a/internal/pkg/service/templates/api/openapi/openapi3.yaml +++ b/internal/pkg/service/templates/api/openapi/openapi3.yaml @@ -969,6 +969,18 @@ paths: description: List all templates defined in the repository. operationId: TemplatesIndex parameters: + - name: filter + in: query + description: The 'filter' attribute specifies the category of templates to retrieve from the repository. + allowEmptyValue: true + schema: + type: string + description: The 'filter' attribute specifies the category of templates to retrieve from the repository. + example: keboola.data-apps + enum: + - keboola.components + - keboola.data-apps + example: keboola.data-apps - name: repository in: path description: Name of the template repository. Use "keboola" for default Keboola repository. @@ -4032,6 +4044,25 @@ components: required: - repository - templates + TemplatesRequest: + type: object + properties: + filter: + type: string + description: The 'filter' attribute specifies the category of templates to retrieve from the repository. + example: keboola.data-apps + enum: + - keboola.components + - keboola.data-apps + repository: + type: string + description: Name of the template repository. Use "keboola" for default Keboola repository. + example: keboola + example: + filter: keboola.data-apps + repository: keboola + required: + - repository UpdateInstanceRequest: type: object properties: diff --git a/internal/pkg/service/templates/api/service/mapper.go b/internal/pkg/service/templates/api/service/mapper.go index c17ea72f54..18587e2715 100644 --- a/internal/pkg/service/templates/api/service/mapper.go +++ b/internal/pkg/service/templates/api/service/mapper.go @@ -3,6 +3,7 @@ package service import ( "context" "fmt" + "slices" "sort" "time" @@ -25,6 +26,11 @@ import ( "github.com/keboola/keboola-as-code/internal/pkg/utils/errors" ) +const ( + KeboolaDataApps = "keboola.data-apps" + KeboolaComponents = "keboola.components" +) + type Mapper struct { apiHost string } @@ -119,7 +125,7 @@ func RepositoryResponse(ctx context.Context, d dependencies.ProjectRequestScope, } } -func TemplatesResponse(ctx context.Context, d dependencies.ProjectRequestScope, repo *repository.Repository, templates []repository.TemplateRecord) (out *Templates, err error) { +func TemplatesResponse(ctx context.Context, d dependencies.ProjectRequestScope, repo *repository.Repository, templates []repository.TemplateRecord, filterBy *string) (out *Templates, err error) { ctx, span := d.Telemetry().Tracer().Start(ctx, "api.server.templates.mapper.TemplatesResponse") defer span.End(&err) @@ -130,6 +136,25 @@ func TemplatesResponse(ctx context.Context, d dependencies.ProjectRequestScope, continue } + if filterBy != nil && *filterBy != "" { + t, found := tmpl.DefaultVersion() + if !found { + continue + } + + filterString := *filterBy + switch filterString { + case KeboolaDataApps: + if !slices.Contains(t.Components, filterString) { + continue + } + case KeboolaComponents: + if slices.Contains(t.Components, KeboolaDataApps) { + continue + } + } + } + if !hasRequirements(tmpl, d) { continue } diff --git a/internal/pkg/service/templates/api/service/service.go b/internal/pkg/service/templates/api/service/service.go index 0065f01cc5..300200a768 100644 --- a/internal/pkg/service/templates/api/service/service.go +++ b/internal/pkg/service/templates/api/service/service.go @@ -116,7 +116,7 @@ func (s *service) TemplatesIndex(ctx context.Context, d dependencies.ProjectRequ if err != nil { return nil, err } - return TemplatesResponse(ctx, d, repo, repo.Templates()) + return TemplatesResponse(ctx, d, repo, repo.Templates(), payload.Filter) } func (s *service) TemplateIndex(ctx context.Context, d dependencies.ProjectRequestScope, payload *TemplateIndexPayload) (res *TemplateDetail, err error) { diff --git a/test/templates/api/repositories/template-list-filter/001-list-ok/expected-response.json b/test/templates/api/repositories/template-list-filter/001-list-ok/expected-response.json index 478a278c2b..610793ae1f 100644 --- a/test/templates/api/repositories/template-list-filter/001-list-ok/expected-response.json +++ b/test/templates/api/repositories/template-list-filter/001-list-ok/expected-response.json @@ -47,6 +47,32 @@ "categories": [ "Other" ], + "components": [ + "keboola.wr-%s", + "foo.bar", + "keboola.data-apps" + ], + "versions": [ + { + "version": "1.2.3", + "stable": false, + "description": "" + } + ] + }, + { + "id": "my-template-id-6", + "name": "My Template-snowflake-6", + "deprecated": false, + "author": { + "name": "Example Author", + "url": "https://example.com" + }, + "description": "Full workflow to ...", + "defaultVersion": "1.2.3", + "categories": [ + "Other" + ], "components": [ "keboola.wr-%s", "foo.bar" @@ -58,6 +84,32 @@ "description": "" } ] + }, + { + "id": "my-template-id-7", + "name": "My Template-snowflake-7", + "deprecated": false, + "author": { + "name": "Example Author", + "url": "https://example.com" + }, + "description": "Full workflow to ...", + "defaultVersion": "1.2.3", + "categories": [ + "Other" + ], + "components": [ + "keboola.wr-%s", + "foo.bar", + "keboola.data-apps" + ], + "versions": [ + { + "version": "1.2.3", + "stable": false, + "description": "" + } + ] } ] } diff --git a/test/templates/api/repositories/template-list-filter/002-list-ok-data-apps-only/expected-http-code b/test/templates/api/repositories/template-list-filter/002-list-ok-data-apps-only/expected-http-code new file mode 100644 index 0000000000..08839f6bb2 --- /dev/null +++ b/test/templates/api/repositories/template-list-filter/002-list-ok-data-apps-only/expected-http-code @@ -0,0 +1 @@ +200 diff --git a/test/templates/api/repositories/template-list-filter/002-list-ok-data-apps-only/expected-response.json b/test/templates/api/repositories/template-list-filter/002-list-ok-data-apps-only/expected-response.json new file mode 100644 index 0000000000..bcfbca7d16 --- /dev/null +++ b/test/templates/api/repositories/template-list-filter/002-list-ok-data-apps-only/expected-response.json @@ -0,0 +1,65 @@ +{ + "repository": { + "name": "keboola", + "url": "%s/test/templates/api/repositories/template-list-filter/repository", + "ref": "", + "author": { + "name": "Example Author", + "url": "https://example.com" + } + }, + "templates": [ + { + "id": "my-template-id-5", + "name": "My Template-snowflake-5", + "deprecated": false, + "author": { + "name": "Example Author", + "url": "https://example.com" + }, + "description": "Full workflow to ...", + "defaultVersion": "1.2.3", + "categories": [ + "Other" + ], + "components": [ + "keboola.wr-%s", + "foo.bar", + "keboola.data-apps" + ], + "versions": [ + { + "version": "1.2.3", + "stable": false, + "description": "" + } + ] + }, + { + "id": "my-template-id-7", + "name": "My Template-snowflake-7", + "deprecated": false, + "author": { + "name": "Example Author", + "url": "https://example.com" + }, + "description": "Full workflow to ...", + "defaultVersion": "1.2.3", + "categories": [ + "Other" + ], + "components": [ + "keboola.wr-%s", + "foo.bar", + "keboola.data-apps" + ], + "versions": [ + { + "version": "1.2.3", + "stable": false, + "description": "" + } + ] + } + ] +} diff --git a/test/templates/api/repositories/template-list-filter/002-list-ok-data-apps-only/request.json b/test/templates/api/repositories/template-list-filter/002-list-ok-data-apps-only/request.json new file mode 100644 index 0000000000..8b5319e5c9 --- /dev/null +++ b/test/templates/api/repositories/template-list-filter/002-list-ok-data-apps-only/request.json @@ -0,0 +1,9 @@ +{ + "path": "/v1/repositories/keboola/templates?filter=keboola.data-apps", + "method": "GET", + "headers": { + "Content-Type": "application/json", + "X-StorageApi-Token": "%%TEST_KBC_STORAGE_API_TOKEN%%" + }, + "body": {} +} diff --git a/test/templates/api/repositories/template-list-filter/003-list-ok-components-only/expected-http-code b/test/templates/api/repositories/template-list-filter/003-list-ok-components-only/expected-http-code new file mode 100644 index 0000000000..08839f6bb2 --- /dev/null +++ b/test/templates/api/repositories/template-list-filter/003-list-ok-components-only/expected-http-code @@ -0,0 +1 @@ +200 diff --git a/test/templates/api/repositories/template-list-filter/003-list-ok-components-only/expected-response.json b/test/templates/api/repositories/template-list-filter/003-list-ok-components-only/expected-response.json new file mode 100644 index 0000000000..d27b17d61c --- /dev/null +++ b/test/templates/api/repositories/template-list-filter/003-list-ok-components-only/expected-response.json @@ -0,0 +1,63 @@ +{ + "repository": { + "name": "keboola", + "url": "%s/test/templates/api/repositories/template-list-filter/repository", + "ref": "", + "author": { + "name": "Example Author", + "url": "https://example.com" + } + }, + "templates": [ + { + "id": "my-template-id-3", + "name": "My Template-snowflake-3", + "deprecated": false, + "author": { + "name": "Example Author", + "url": "https://example.com" + }, + "description": "Full workflow to ...", + "defaultVersion": "1.2.3", + "categories": [ + "Other" + ], + "components": [ + "keboola.wr-%s", + "foo.bar" + ], + "versions": [ + { + "version": "1.2.3", + "stable": false, + "description": "" + } + ] + }, + { + "id": "my-template-id-6", + "name": "My Template-snowflake-6", + "deprecated": false, + "author": { + "name": "Example Author", + "url": "https://example.com" + }, + "description": "Full workflow to ...", + "defaultVersion": "1.2.3", + "categories": [ + "Other" + ], + "components": [ + "keboola.wr-%s", + "foo.bar" + ], + "versions": [ + { + "version": "1.2.3", + "stable": false, + "description": "" + } + ] + } + ] +} diff --git a/test/templates/api/repositories/template-list-filter/003-list-ok-components-only/request.json b/test/templates/api/repositories/template-list-filter/003-list-ok-components-only/request.json new file mode 100644 index 0000000000..8090a62559 --- /dev/null +++ b/test/templates/api/repositories/template-list-filter/003-list-ok-components-only/request.json @@ -0,0 +1,9 @@ +{ + "path": "/v1/repositories/keboola/templates?filter=keboola.components", + "method": "GET", + "headers": { + "Content-Type": "application/json", + "X-StorageApi-Token": "%%TEST_KBC_STORAGE_API_TOKEN%%" + }, + "body": {} +} diff --git a/test/templates/api/repositories/template-list-filter/004-list-ok-wrong-id/expected-http-code b/test/templates/api/repositories/template-list-filter/004-list-ok-wrong-id/expected-http-code new file mode 100644 index 0000000000..d411bb7c1a --- /dev/null +++ b/test/templates/api/repositories/template-list-filter/004-list-ok-wrong-id/expected-http-code @@ -0,0 +1 @@ +400 diff --git a/test/templates/api/repositories/template-list-filter/004-list-ok-wrong-id/expected-response.json b/test/templates/api/repositories/template-list-filter/004-list-ok-wrong-id/expected-response.json new file mode 100644 index 0000000000..24cd685dfa --- /dev/null +++ b/test/templates/api/repositories/template-list-filter/004-list-ok-wrong-id/expected-response.json @@ -0,0 +1,5 @@ +{ + "statusCode": 400, + "error": "templates.invalidEnumValue", + "message": "Value of filter must be one of \"keboola.components\", \"keboola.data-apps\" but got value \"312312\"." +} diff --git a/test/templates/api/repositories/template-list-filter/004-list-ok-wrong-id/request.json b/test/templates/api/repositories/template-list-filter/004-list-ok-wrong-id/request.json new file mode 100644 index 0000000000..50207a0302 --- /dev/null +++ b/test/templates/api/repositories/template-list-filter/004-list-ok-wrong-id/request.json @@ -0,0 +1,9 @@ +{ + "path": "/v1/repositories/keboola/templates?filter=312312", + "method": "GET", + "headers": { + "Content-Type": "application/json", + "X-StorageApi-Token": "%%TEST_KBC_STORAGE_API_TOKEN%%" + }, + "body": {} +} diff --git a/test/templates/api/repositories/template-list-filter/repository/.keboola/repository.json b/test/templates/api/repositories/template-list-filter/repository/.keboola/repository.json index e013459a34..8a4c7f4eb6 100644 --- a/test/templates/api/repositories/template-list-filter/repository/.keboola/repository.json +++ b/test/templates/api/repositories/template-list-filter/repository/.keboola/repository.json @@ -113,7 +113,8 @@ "path": "v1", "components": [ "", - "foo.bar" + "foo.bar", + "keboola.data-apps" ] } ] @@ -128,6 +129,30 @@ "snowflake" ] }, + "versions": [ + { + "version": "1.2.3", + "description": "", + "stable": false, + "path": "v1", + "components": [ + "", + "foo.bar", + "keboola.data-apps" + ] + } + ] + }, + { + "id": "my-template-id-6", + "name": "My Template-snowflake-6", + "description": "Full workflow to ...", + "path": "my-template", + "requirements": { + "backends":[ + "snowflake" + ] + }, "versions": [ { "version": "1.2.3", @@ -140,6 +165,30 @@ ] } ] + }, + { + "id": "my-template-id-7", + "name": "My Template-snowflake-7", + "description": "Full workflow to ...", + "path": "my-template", + "requirements": { + "backends":[ + "snowflake" + ] + }, + "versions": [ + { + "version": "1.2.3", + "description": "", + "stable": false, + "path": "v1", + "components": [ + "", + "foo.bar", + "keboola.data-apps" + ] + } + ] } ] }