From c510317ad55eb3cc12abba65c42b1b9f5cf96db1 Mon Sep 17 00:00:00 2001 From: Marek Aufart Date: Fri, 6 Oct 2023 14:13:15 +0200 Subject: [PATCH 01/34] Add Pathfinder assessment migration to CLI Extending tackle CLI tool with option to export Pathfinder assessments and import it to Konveyor API assessments endpoint. ```$ ./tackle migrate-assessments``` Related to https://github.com/konveyor/tackle2-hub/issues/489 Signed-off-by: Marek Aufart --- hack/tool/tackle | 78 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 78 insertions(+) diff --git a/hack/tool/tackle b/hack/tool/tackle index 9ddc2242f..38752bbb9 100755 --- a/hack/tool/tackle +++ b/hack/tool/tackle @@ -126,6 +126,9 @@ def apiJSON(url, token, data=None, method='GET', ignoreErrors=False): elif method == 'PATCH': debugPrint("PATCH data: %s" % json.dumps(data)) r = requests.patch(url, data=json.dumps(data), headers={"Authorization": "Bearer %s" % token, "Content-Type": "application/json"}, verify=False) + elif method == 'PUT': + debugPrint("PUT data: %s" % json.dumps(data)) + r = requests.put(url, data=json.dumps(data), headers={"Authorization": "Bearer %s" % token, "Content-Type": "application/json"}, verify=False) else: # GET r = requests.get(url, headers={"Authorization": "Bearer %s" % token, "Content-Type": "application/json"}, verify=False) @@ -722,6 +725,65 @@ class TackleTool: # Push the updated assessment apiJSON(self.tackle2Url + tackle2path("assessments/%d" % assmnt2['id']), self.tackle2Token, data=assmnt2, method='PATCH', ignoreErrors=ignoreErrors) + def migrateAssessments(self, assessmentsFileName="assessments", ignoreErrors=False): + cnt = 0 + ## Export Pathfinder data for each Application + #for app in apiJSON(self.tackle2Url + "/hub/applications", self.tackle2Token): + # for assm2 in apiJSON(self.tackle2Url + "/hub/pathfinder/assessments?applicationId=%d" % app.id, self.tackle2Token): + # # Prepare Assessment and find its ID + # assm = Tackle2Object() + # assm.id = assm2['id'] + # assm.applicationId = assm2['applicationId'] + # assm.status = assm2['status'] + # # Prepare Assessment questions and answers + # asqa2 = apiJSON(self.tackle2Url + "/hub/pathfinder/assessments/%d" % assm.id, self.tackle2Token) + # asqa = Tackle2Object() + # asqa.id = asqa2['id'] + # asqa.applicationId = asqa2['applicationId'] + # asqa.status = asqa2['status'] + # asqa.stakeholders = asqa2['stakeholders'] + # asqa.stakeholderGroups = asqa2['stakeholderGroups'] + # asqa.questionnaire = asqa2['questionnaire'] + # self.add('assessments', asqa) + #saveJSON(os.path.join(self.dataDir, assessmentsFileName), self.data["assessments"]) + + # Upload assessment to Konveyor (expecting Pathfinder hard-coded questionnaire) + dictCollection = loadDump(os.path.join(self.dataDir, assessmentsFileName + '.json')) + print("Processing Pathfinder assessments..") + for passmnt in dictCollection: + print("# Assessment for Application %s" % passmnt["applicationId"]) + # Skip if Assessment for given Application already exists + if len(apiJSON(self.tackle2Url + "/hub/applications/%d/assessments" % passmnt["applicationId"], self.tackle2Token, data={"questionnaire": {"id": 1}})) > 0: + print(" Assessment already exists, skipping.") + continue + # Create new assessment + assmnt = apiJSON(self.tackle2Url + "/hub/applications/%d/assessments" % passmnt["applicationId"], self.tackle2Token, data={"questionnaire": {"id": 1}}, method='POST') + for category in passmnt['questionnaire']['categories']: + print("Category %s %s" % (category["order"], category["title"])) + for question in category['questions']: + print(" Question %s %s" % (question["order"], question["question"])) + for option in question['options']: + if option['checked'] == True: + # Find corresponding option in newly created assessment and check it + destSection = next(cat for cat in assmnt['sections'] if cat['order'] == category['order']) + destQuestion = next(que for que in destSection['questions'] if que['order'] == question['order']) + destOption = next(opt for opt in destQuestion['answers'] if opt['order'] == option['order']) + print(" Answer %d %s" % (destOption['order'], destOption['text'])) + destOption['selected'] = True + # Set remaining assessment attributes + assmnt['status'] = passmnt['status'] + assmnt['stakeholders'] = [] + for sh in passmnt['stakeholders']: + assmnt['stakeholders'].append({"id": sh}) + assmnt['stakeholderGroups'] = [] + for shg in passmnt['stakeholderGroups']: + assmnt['stakeholderGroups'].append({"id": shg}) + # Push the updated assessment + apiJSON(self.tackle2Url + "/hub/assessments/%d" % assmnt['id'], self.tackle2Token, data=assmnt, method='PUT') + cnt += 1 + print("PUT filled Assessment.") + return cnt + def preImportCheck(self): # Compatibility checks # TagCategories on Hub API @@ -953,6 +1015,22 @@ if cmdWanted(args, "clean-all"): print("Cleaning ALL data in Tackle2") tool.cleanAllTackle2() +# Migrate Pathfinder Assessments to Konveyor Assessments +if cmdWanted(args, "migrate-assessments"): + cmdExecuted = True + # Gather Keycloak access token for Tackle 2 + token2 = getHubToken(c['url'], c['username'], c['password']) + + # Setup Tackle data migration object + tool = TackleTool(args.data_dir, '', '', c['url'], token2) + + # Run the import + print("Starting Pathfinder Assessments to Konveyor Assessment migration.") + appCnt = tool.migrateAssessments(ignoreErrors=args.ignoreImportErrors) + + print("Done. %d new Assessment(s) for Application(s) were migrated!" % appCnt) + + # Print help if action was not specified if not cmdExecuted: print("Unknown action, use tackle --help to see usage.") From ffa9dba2179fd118f48d2e32e4d5a8e22e7b5551 Mon Sep 17 00:00:00 2001 From: Marek Aufart Date: Tue, 10 Oct 2023 15:17:29 +0200 Subject: [PATCH 02/34] Single POST transformed assessment Signed-off-by: Marek Aufart --- hack/tool/tackle | 51 ++++++++++++++++++++++++++++-------------------- 1 file changed, 30 insertions(+), 21 deletions(-) diff --git a/hack/tool/tackle b/hack/tool/tackle index 38752bbb9..7e73bb20a 100755 --- a/hack/tool/tackle +++ b/hack/tool/tackle @@ -752,36 +752,45 @@ class TackleTool: print("Processing Pathfinder assessments..") for passmnt in dictCollection: print("# Assessment for Application %s" % passmnt["applicationId"]) + appAssessmentsPath = "/hub/applications/%d/assessments" % passmnt["applicationId"] # Skip if Assessment for given Application already exists - if len(apiJSON(self.tackle2Url + "/hub/applications/%d/assessments" % passmnt["applicationId"], self.tackle2Token, data={"questionnaire": {"id": 1}})) > 0: + if len(apiJSON(self.tackle2Url + appAssessmentsPath, self.tackle2Token, data={"questionnaire": {"id": 1}})) > 0: print(" Assessment already exists, skipping.") continue - # Create new assessment - assmnt = apiJSON(self.tackle2Url + "/hub/applications/%d/assessments" % passmnt["applicationId"], self.tackle2Token, data={"questionnaire": {"id": 1}}, method='POST') - for category in passmnt['questionnaire']['categories']: - print("Category %s %s" % (category["order"], category["title"])) - for question in category['questions']: - print(" Question %s %s" % (question["order"], question["question"])) - for option in question['options']: - if option['checked'] == True: - # Find corresponding option in newly created assessment and check it - destSection = next(cat for cat in assmnt['sections'] if cat['order'] == category['order']) - destQuestion = next(que for que in destSection['questions'] if que['order'] == question['order']) - destOption = next(opt for opt in destQuestion['answers'] if opt['order'] == option['order']) - print(" Answer %d %s" % (destOption['order'], destOption['text'])) - destOption['selected'] = True - # Set remaining assessment attributes - assmnt['status'] = passmnt['status'] - assmnt['stakeholders'] = [] + + # Prepare new Assessment + assmnt = dict() + assmnt['questionnaire'] = {"id": 1} # Default new Questionnaire "Pathfinder Legacy" + assmnt['application'] = {"id": passmnt["applicationId"]} + assmnt['stakeholders'] = [] for sh in passmnt['stakeholders']: assmnt['stakeholders'].append({"id": sh}) assmnt['stakeholderGroups'] = [] for shg in passmnt['stakeholderGroups']: assmnt['stakeholderGroups'].append({"id": shg}) - # Push the updated assessment - apiJSON(self.tackle2Url + "/hub/assessments/%d" % assmnt['id'], self.tackle2Token, data=assmnt, method='PUT') + + # Transformate Questions, Answers and related structures + for category in passmnt['questionnaire']['categories']: + del category['id'] + category['name'] = category.pop('title') + for question in category["questions"]: + del question['id'] + question["text"] = question.pop('question') + question["explanation"] = question.pop('description') + question["answers"] = question.pop('options') + for answer in question['answers']: + del answer['id'] + answer['text'] = answer.pop('option') + answer['selected'] = answer.pop('checked') + answer['risk'] = answer['risk'].lower() + if answer['risk'] == "amber": + answer['risk'] = "yellow" + assmnt['sections'] = passmnt['questionnaire']['categories'] + + # Post the Assessment + apiJSON(self.tackle2Url + appAssessmentsPath, self.tackle2Token, data=assmnt, method='POST') cnt += 1 - print("PUT filled Assessment.") + print("Assessment submitted.") return cnt def preImportCheck(self): From a06f7d0d18e78ed99fe3256b59478cd978468cfb Mon Sep 17 00:00:00 2001 From: Marek Aufart Date: Fri, 27 Oct 2023 14:38:12 +0200 Subject: [PATCH 03/34] Update migration assessment on-flight Signed-off-by: Marek Aufart --- hack/tool/tackle | 162 +++++++++++++++++++++++------------------------ 1 file changed, 79 insertions(+), 83 deletions(-) diff --git a/hack/tool/tackle b/hack/tool/tackle index 7e73bb20a..2decde9c9 100755 --- a/hack/tool/tackle +++ b/hack/tool/tackle @@ -35,6 +35,10 @@ parser.add_argument('-n','--no-auth', dest='noAuth', action='store_const', const help='Skip Keycloak token creation, use empty Auth token in Tackle API calls.') parser.add_argument('-b','--skip-buckets', dest='skipBuckets', action='store_const', const=True, default=False, help='Skip Tackle 2 Buckets content export.') +parser.add_argument('-t','--token', type=str, help='Bearer auth token for Hub API (login/password is a fallback to create it).', + nargs='?', default='') +parser.add_argument('-p','--pathfinder-url', type=str, help='In-cluster Pathfinder endpoint URL.', + nargs='?', default='') args = parser.parse_args() ############################################################################### @@ -82,20 +86,24 @@ def debugPrint(str): if args.verbose: print(str) -def getHubToken(host, username, password): - print("Getting auth token via Hub from %s" % host) - url = "%s/hub/auth/login" % host - data = '{"user": "%s", "password": "%s"}' % (username, password) - - r = requests.post(url, data=data, verify=False) - if r.ok: - respData = json.loads(r.text) - debugPrint("Got access token: %s" % respData['token']) - return respData['token'] +def getHubToken(host, username, password, token): + if token: + print("Skipping login, using provided auth token.") + return token else: - print("ERROR getting auth token from %s" % url) - print(data, r) - exit(1) + print("Getting auth token via Hub from %s" % host) + url = "%s/hub/auth/login" % host + data = '{"user": "%s", "password": "%s"}' % (username, password) + + r = requests.post(url, data=data, verify=False) + if r.ok: + respData = json.loads(r.text) + debugPrint("Got access token: %s" % respData['token']) + return respData['token'] + else: + print("ERROR getting auth token from %s" % url) + print(data, r) + exit(1) def getKeycloakToken(host, username, password, client_id='tackle-ui', realm='tackle'): if args.noAuth: @@ -725,72 +733,54 @@ class TackleTool: # Push the updated assessment apiJSON(self.tackle2Url + tackle2path("assessments/%d" % assmnt2['id']), self.tackle2Token, data=assmnt2, method='PATCH', ignoreErrors=ignoreErrors) - def migrateAssessments(self, assessmentsFileName="assessments", ignoreErrors=False): + # Migrate Pathfinder Assessment to Konveyor (expecting Pathfinder hard-coded questionnaire ID=1) + def migrateAssessments(self, pathfinderUrl, ignoreErrors=False): cnt = 0 - ## Export Pathfinder data for each Application - #for app in apiJSON(self.tackle2Url + "/hub/applications", self.tackle2Token): - # for assm2 in apiJSON(self.tackle2Url + "/hub/pathfinder/assessments?applicationId=%d" % app.id, self.tackle2Token): - # # Prepare Assessment and find its ID - # assm = Tackle2Object() - # assm.id = assm2['id'] - # assm.applicationId = assm2['applicationId'] - # assm.status = assm2['status'] - # # Prepare Assessment questions and answers - # asqa2 = apiJSON(self.tackle2Url + "/hub/pathfinder/assessments/%d" % assm.id, self.tackle2Token) - # asqa = Tackle2Object() - # asqa.id = asqa2['id'] - # asqa.applicationId = asqa2['applicationId'] - # asqa.status = asqa2['status'] - # asqa.stakeholders = asqa2['stakeholders'] - # asqa.stakeholderGroups = asqa2['stakeholderGroups'] - # asqa.questionnaire = asqa2['questionnaire'] - # self.add('assessments', asqa) - #saveJSON(os.path.join(self.dataDir, assessmentsFileName), self.data["assessments"]) - - # Upload assessment to Konveyor (expecting Pathfinder hard-coded questionnaire) - dictCollection = loadDump(os.path.join(self.dataDir, assessmentsFileName + '.json')) - print("Processing Pathfinder assessments..") - for passmnt in dictCollection: - print("# Assessment for Application %s" % passmnt["applicationId"]) - appAssessmentsPath = "/hub/applications/%d/assessments" % passmnt["applicationId"] - # Skip if Assessment for given Application already exists - if len(apiJSON(self.tackle2Url + appAssessmentsPath, self.tackle2Token, data={"questionnaire": {"id": 1}})) > 0: - print(" Assessment already exists, skipping.") - continue + apps = apiJSON(self.tackle2Url + "/hub/applications", self.tackle2Token) + print("There are %d Applications, looking for their Assessments.." % len(apps)) + for app in apps: + # Export Pathfinder data for each Application + for passmnt in apiJSON(pathfinderUrl + "/assessments?applicationId=%d" % app['id'], self.tackle2Token): + print("# Assessment for Application %s" % passmnt["applicationId"]) + appAssessmentsPath = "/hub/applications/%d/assessments" % passmnt["applicationId"] + # Skip if Assessment for given Application already exists + if len(apiJSON(self.tackle2Url + appAssessmentsPath, self.tackle2Token, data={"questionnaire": {"id": 1}})) > 0: + print(" Assessment already exists, skipping.") + continue - # Prepare new Assessment - assmnt = dict() - assmnt['questionnaire'] = {"id": 1} # Default new Questionnaire "Pathfinder Legacy" - assmnt['application'] = {"id": passmnt["applicationId"]} - assmnt['stakeholders'] = [] - for sh in passmnt['stakeholders']: - assmnt['stakeholders'].append({"id": sh}) - assmnt['stakeholderGroups'] = [] - for shg in passmnt['stakeholderGroups']: - assmnt['stakeholderGroups'].append({"id": shg}) - - # Transformate Questions, Answers and related structures - for category in passmnt['questionnaire']['categories']: - del category['id'] - category['name'] = category.pop('title') - for question in category["questions"]: - del question['id'] - question["text"] = question.pop('question') - question["explanation"] = question.pop('description') - question["answers"] = question.pop('options') - for answer in question['answers']: - del answer['id'] - answer['text'] = answer.pop('option') - answer['selected'] = answer.pop('checked') - answer['risk'] = answer['risk'].lower() - if answer['risk'] == "amber": - answer['risk'] = "yellow" - assmnt['sections'] = passmnt['questionnaire']['categories'] - - # Post the Assessment - apiJSON(self.tackle2Url + appAssessmentsPath, self.tackle2Token, data=assmnt, method='POST') - cnt += 1 - print("Assessment submitted.") + # Prepare new Assessment + assmnt = dict() + assmnt['questionnaire'] = {"id": 1} # Default new Questionnaire "Pathfinder Legacy" + assmnt['application'] = {"id": passmnt["applicationId"]} + assmnt['stakeholders'] = [] + for sh in passmnt['stakeholders']: + assmnt['stakeholders'].append({"id": sh}) + assmnt['stakeholderGroups'] = [] + for shg in passmnt['stakeholderGroups']: + assmnt['stakeholderGroups'].append({"id": shg}) + + # Transformate Questions, Answers and related structures + for category in passmnt['questionnaire']['categories']: + del category['id'] + category['name'] = category.pop('title') + for question in category["questions"]: + del question['id'] + question["text"] = question.pop('question') + question["explanation"] = question.pop('description') + question["answers"] = question.pop('options') + for answer in question['answers']: + del answer['id'] + answer['text'] = answer.pop('option') + answer['selected'] = answer.pop('checked') + answer['risk'] = answer['risk'].lower() + if answer['risk'] == "amber": + answer['risk'] = "yellow" + assmnt['sections'] = passmnt['questionnaire']['categories'] + + # Post the Assessment + apiJSON(self.tackle2Url + appAssessmentsPath, self.tackle2Token, data=assmnt, method='POST') + cnt += 1 + print("Assessment submitted.") return cnt def preImportCheck(self): @@ -956,7 +946,7 @@ if cmdWanted(args, "export-tackle1"): if cmdWanted(args, "export"): cmdExecuted = True # Gather Keycloak access tokens for Tackle2 - token2 = getHubToken(c['url'], c['username'], c['password']) + token2 = getHubToken(c['url'], c['username'], c['password'], args.token) # Setup data migration object tool = TackleTool(args.data_dir, '', '', c['url'], token2, c['encryption_passphase']) @@ -979,7 +969,7 @@ if cmdWanted(args, "export"): if cmdWanted(args, "import"): cmdExecuted = True # Gather Keycloak access token for Tackle 2 - token2 = getHubToken(c['url'], c['username'], c['password']) + token2 = getHubToken(c['url'], c['username'], c['password'], args.token) # Setup Tackle 1.2->2.0 data migration object tool = TackleTool(args.data_dir, '', '', c['url'], token2, c['encryption_passphase']) @@ -1001,7 +991,7 @@ if cmdWanted(args, "import"): if cmdWanted(args, "clean"): cmdExecuted = True # Gather Keycloak access token for Tackle 2 - token2 = getHubToken(c['url'], c['username'], c['password']) + token2 = getHubToken(c['url'], c['username'], c['password'], args.token) # Setup Tackle 1.2->2.0 data migration object tool = TackleTool(args.data_dir, '', '', c['url'], token2) @@ -1015,7 +1005,7 @@ if cmdWanted(args, "clean"): if cmdWanted(args, "clean-all"): cmdExecuted = True # Gather Keycloak access token for Tackle 2 - token2 = getHubToken(c['url'], c['username'], c['password']) + token2 = getHubToken(c['url'], c['username'], c['password'], args.token) # Setup Tackle 1.2->2.0 data migration object tool = TackleTool(args.data_dir, '', '', c['url'], token2) @@ -1027,15 +1017,21 @@ if cmdWanted(args, "clean-all"): # Migrate Pathfinder Assessments to Konveyor Assessments if cmdWanted(args, "migrate-assessments"): cmdExecuted = True + + # Check Pathfinder URL arg + if not args.pathfinder_url: + print("Error: Pathfinder URL is required, specify it with -p or --pathfinder-url option.") + exit(1) + # Gather Keycloak access token for Tackle 2 - token2 = getHubToken(c['url'], c['username'], c['password']) + token2 = getHubToken(c['url'], c['username'], c['password'], args.token) # Setup Tackle data migration object tool = TackleTool(args.data_dir, '', '', c['url'], token2) # Run the import print("Starting Pathfinder Assessments to Konveyor Assessment migration.") - appCnt = tool.migrateAssessments(ignoreErrors=args.ignoreImportErrors) + appCnt = tool.migrateAssessments(args.pathfinder_url) print("Done. %d new Assessment(s) for Application(s) were migrated!" % appCnt) From b35baa74be862411c5aaae860ecec3a24a2633c9 Mon Sep 17 00:00:00 2001 From: Jeff Ortel Date: Thu, 5 Oct 2023 08:54:43 -0500 Subject: [PATCH 04/34] :bug: Fix latest analayis report. (#504) The `/applications/:id/analysis` and `/applications/:id/analysis/report` returned the report for: analysis.ID=:id (application ID) instead of the Last analysis for the application.ID = :id. Potentially related to: https://issues.redhat.com/browse/MTA-1344 Signed-off-by: Jeff Ortel --- api/analysis.go | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/api/analysis.go b/api/analysis.go index 251fafefb..d04d7c6e0 100644 --- a/api/analysis.go +++ b/api/analysis.go @@ -130,7 +130,7 @@ func (h AnalysisHandler) AppLatest(ctx *gin.Context) { return } writer := AnalysisWriter{ctx: ctx} - path, err := writer.Create(id) + path, err := writer.Create(m.ID) if err != nil { _ = ctx.Error(err) return @@ -152,8 +152,16 @@ func (h AnalysisHandler) AppLatest(ctx *gin.Context) { // @param id path string true "Application ID" func (h AnalysisHandler) AppLatestReport(ctx *gin.Context) { id := h.pk(ctx) + m := &model.Analysis{} + db := h.DB(ctx) + db = db.Where("ApplicationID", id) + err := db.Last(&m).Error + if err != nil { + _ = ctx.Error(err) + return + } reportWriter := ReportWriter{ctx: ctx} - reportWriter.Write(id) + reportWriter.Write(m.ID) } // AppList godoc @@ -2315,6 +2323,7 @@ func (r *ReportWriter) buildOutput(id uint) (path string, err error) { r.begin() r.field("id").write(strconv.Itoa(int(m.Application.ID))) r.field("name").writeStr(m.Application.Name) + r.field("analysis").writeStr(strconv.Itoa(int(m.ID))) aWriter := AnalysisWriter{ctx: r.ctx} aWriter.encoder = r.encoder err = aWriter.addIssues(m) From 003362afe7b3824038d5eb6864384061ab7206af Mon Sep 17 00:00:00 2001 From: Jeff Ortel Date: Thu, 5 Oct 2023 10:48:17 -0500 Subject: [PATCH 05/34] :ghost: Support seed build args. (#503) Better support for test run analysis with seed PRs using `--build-arg SEED_PROJECT ` `--build-arg SEED_BRANCH ` Example: ``` $ docker build . -t quay.io/jortel/tackle2-hub:latest \ --build-arg 'SEED_PROJECT=jortel/tackle2-seed' \ --build-arg 'SEED_BRANCH=add-targets' \ && docker push quay.io/jortel/tackle2-hub:latest ``` Signed-off-by: Jeff Ortel --- Dockerfile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index a29319844..2aa1e3695 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,7 +2,9 @@ FROM registry.access.redhat.com/ubi9/go-toolset:latest as builder ENV GOPATH=$APP_ROOT COPY --chown=1001:0 . . RUN make docker -RUN git clone https://github.com/konveyor/tackle2-seed +ARG SEED_PROJECT=konveyor/tackle2-seed +ARG SEED_BRANCH=main +RUN git clone --branch ${SEED_BRANCH} https://github.com/${SEED_PROJECT} FROM quay.io/konveyor/static-report as report From 720212e3e4db679d3ff6b2732ecfb8e4177150c2 Mon Sep 17 00:00:00 2001 From: Samuel Lucidi Date: Thu, 5 Oct 2023 16:25:03 -0400 Subject: [PATCH 06/34] :bug: Only marshal assessment sections if not empty (#506) Marshalling the Assessment resource's `Sections` field unconditionally results in populating the model's `Sections` with the byte string `null`, which breaks the test for empty sections, making it always look like the assessment is being imported with sections "as-is". To fix this, only marshal the sections in the Assessment's `Model()` method if they are not empty. Additionally, replace the `if m.Sections == nil` test with a test for length, which works on nil as well as empty slices. Signed-off-by: Sam Lucidi --- api/application.go | 4 ++-- api/archetype.go | 4 ++-- api/assessment.go | 4 +++- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/api/application.go b/api/application.go index 2e048bfa4..c0e982347 100644 --- a/api/application.go +++ b/api/application.go @@ -1072,9 +1072,9 @@ func (h ApplicationHandler) AssessmentCreate(ctx *gin.Context) { m.Thresholds = q.Thresholds m.RiskMessages = q.RiskMessages m.CreateUser = h.CurrentUser(ctx) - // if sections aren't nil that indicates that this assessment is being + // if sections aren't empty that indicates that this assessment is being // created "as-is" and should not have its sections populated or autofilled. - if m.Sections == nil { + if len(m.Sections) == 0 { m.Sections = q.Sections resolver, rErr := assessment.NewTagResolver(h.DB(ctx)) if rErr != nil { diff --git a/api/archetype.go b/api/archetype.go index 2388e0572..bb605a545 100644 --- a/api/archetype.go +++ b/api/archetype.go @@ -315,9 +315,9 @@ func (h ArchetypeHandler) AssessmentCreate(ctx *gin.Context) { m.Thresholds = q.Thresholds m.RiskMessages = q.RiskMessages m.CreateUser = h.CurrentUser(ctx) - // if sections aren't nil that indicates that this assessment is being + // if sections aren't empty that indicates that this assessment is being // created "as-is" and should not have its sections populated or autofilled. - if m.Sections == nil { + if len(m.Sections) == 0 { m.Sections = q.Sections resolver, rErr := assessment.NewTagResolver(h.DB(ctx)) if rErr != nil { diff --git a/api/assessment.go b/api/assessment.go index 5eb56f92f..b6bbc326a 100644 --- a/api/assessment.go +++ b/api/assessment.go @@ -220,7 +220,9 @@ func (r *Assessment) With(m *model.Assessment) { func (r *Assessment) Model() (m *model.Assessment) { m = &model.Assessment{} m.ID = r.ID - m.Sections, _ = json.Marshal(r.Sections) + if r.Sections != nil { + m.Sections, _ = json.Marshal(r.Sections) + } m.QuestionnaireID = r.Questionnaire.ID if r.Archetype != nil { m.ArchetypeID = &r.Archetype.ID From c61ea495fc530e28be805ca61cee7408e3409382 Mon Sep 17 00:00:00 2001 From: Samuel Lucidi Date: Fri, 6 Oct 2023 11:19:41 -0400 Subject: [PATCH 07/34] :bug: PrepareForArchetype should use criteria and tags (#508) Previously PrepareForArchetype was using only the membership criteria to autofill assessments, but the enhancement specifies that it should use the archetype tags as well as the criteria tags. Fixes https://issues.redhat.com/browse/MTA-1396 Signed-off-by: Sam Lucidi --- assessment/pkg.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/assessment/pkg.go b/assessment/pkg.go index c1c70238d..6476314bd 100644 --- a/assessment/pkg.go +++ b/assessment/pkg.go @@ -103,6 +103,9 @@ func PrepareForArchetype(tagResolver *TagResolver, archetype *model.Archetype, a for _, t := range archetype.CriteriaTags { tagSet.Add(t.ID) } + for _, t := range archetype.Tags { + tagSet.Add(t.ID) + } assessment.Sections, _ = json.Marshal(prepareSections(tagResolver, tagSet, sections)) From 697b50292071f0c758ffb698ed4fedf85ef5065f Mon Sep 17 00:00:00 2001 From: Samuel Lucidi Date: Tue, 10 Oct 2023 11:02:59 -0400 Subject: [PATCH 08/34] :bug: Increment assessment counter when a new one is created (#511) Fixes https://github.com/konveyor/tackle2-hub/issues/510 Signed-off-by: Sam Lucidi --- api/application.go | 6 ++++++ api/archetype.go | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/api/application.go b/api/application.go index c0e982347..2ef87ef0a 100644 --- a/api/application.go +++ b/api/application.go @@ -4,6 +4,7 @@ import ( "encoding/json" "github.com/gin-gonic/gin" "github.com/konveyor/tackle2-hub/assessment" + "github.com/konveyor/tackle2-hub/metrics" "github.com/konveyor/tackle2-hub/model" "gorm.io/gorm/clause" "net/http" @@ -1074,6 +1075,7 @@ func (h ApplicationHandler) AssessmentCreate(ctx *gin.Context) { m.CreateUser = h.CurrentUser(ctx) // if sections aren't empty that indicates that this assessment is being // created "as-is" and should not have its sections populated or autofilled. + newAssessment := false if len(m.Sections) == 0 { m.Sections = q.Sections resolver, rErr := assessment.NewTagResolver(h.DB(ctx)) @@ -1082,12 +1084,16 @@ func (h ApplicationHandler) AssessmentCreate(ctx *gin.Context) { return } assessment.PrepareForApplication(resolver, application, m) + newAssessment = true } result = h.DB(ctx).Create(m) if result.Error != nil { _ = ctx.Error(result.Error) return } + if newAssessment { + metrics.AssessmentsInitiated.Inc() + } r.With(m) h.Respond(ctx, http.StatusCreated, r) diff --git a/api/archetype.go b/api/archetype.go index bb605a545..f15a7b68b 100644 --- a/api/archetype.go +++ b/api/archetype.go @@ -3,6 +3,7 @@ package api import ( "github.com/gin-gonic/gin" "github.com/konveyor/tackle2-hub/assessment" + "github.com/konveyor/tackle2-hub/metrics" "github.com/konveyor/tackle2-hub/model" "gorm.io/gorm/clause" "net/http" @@ -317,6 +318,7 @@ func (h ArchetypeHandler) AssessmentCreate(ctx *gin.Context) { m.CreateUser = h.CurrentUser(ctx) // if sections aren't empty that indicates that this assessment is being // created "as-is" and should not have its sections populated or autofilled. + newAssessment := false if len(m.Sections) == 0 { m.Sections = q.Sections resolver, rErr := assessment.NewTagResolver(h.DB(ctx)) @@ -325,12 +327,16 @@ func (h ArchetypeHandler) AssessmentCreate(ctx *gin.Context) { return } assessment.PrepareForArchetype(resolver, archetype, m) + newAssessment = true } result = h.DB(ctx).Create(m) if result.Error != nil { _ = ctx.Error(result.Error) return } + if newAssessment { + metrics.AssessmentsInitiated.Inc() + } r.With(m) h.Respond(ctx, http.StatusCreated, r) From 855f10d990eefe98f5b89a40b6f90eb0c9458998 Mon Sep 17 00:00:00 2001 From: Samuel Lucidi Date: Tue, 10 Oct 2023 12:27:32 -0400 Subject: [PATCH 09/34] :bug: Protect builtin questionnaires from update/delete (#512) Only changing the `required` field is permitted for builtin questionnaires, all other changes and deletion are disallowed. --------- Signed-off-by: Sam Lucidi --- api/questionnaire.go | 38 ++++++++++++++++++++++++++----- migration/v10/model/assessment.go | 6 +++++ 2 files changed, 38 insertions(+), 6 deletions(-) diff --git a/api/questionnaire.go b/api/questionnaire.go index 890ffb2d2..cc7d3699e 100644 --- a/api/questionnaire.go +++ b/api/questionnaire.go @@ -123,6 +123,10 @@ func (h QuestionnaireHandler) Delete(ctx *gin.Context) { _ = ctx.Error(result.Error) return } + if m.Builtin() { + h.Status(ctx, http.StatusForbidden) + return + } result = h.DB(ctx).Delete(m) if result.Error != nil { _ = ctx.Error(result.Error) @@ -134,7 +138,9 @@ func (h QuestionnaireHandler) Delete(ctx *gin.Context) { // Update godoc // @summary Update a questionnaire. -// @description Update a questionnaire. +// @description Update a questionnaire. If the Questionnaire +// @description is builtin, only its "required" field can be changed +// @description and all other fields will be ignored. // @tags questionnaires // @accept json // @success 204 @@ -149,12 +155,30 @@ func (h QuestionnaireHandler) Update(ctx *gin.Context) { _ = ctx.Error(err) return } - m := r.Model() - m.ID = id - m.UpdateUser = h.CurrentUser(ctx) - db := h.DB(ctx).Model(m) + m := &model.Questionnaire{} + db := h.DB(ctx) + result := db.First(m, id) + if result.Error != nil { + _ = ctx.Error(result.Error) + return + } + + updated := r.Model() + updated.ID = id + updated.UpdateUser = h.CurrentUser(ctx) + var fields map[string]interface{} + if m.Builtin() { + fields = map[string]interface{}{ + "updateUser": updated.UpdateUser, + "required": updated.Required, + } + } else { + fields = h.fields(updated) + } + + db = h.DB(ctx).Model(m) db = db.Omit(clause.Associations) - result := db.Updates(h.fields(m)) + result = db.Updates(fields) if result.Error != nil { _ = ctx.Error(result.Error) return @@ -171,6 +195,7 @@ type Questionnaire struct { Sections []assessment.Section `json:"sections" yaml:"sections" binding:"required"` Thresholds assessment.Thresholds `json:"thresholds" yaml:"thresholds" binding:"required"` RiskMessages assessment.RiskMessages `json:"riskMessages" yaml:"riskMessages" binding:"required"` + Builtin bool `json:"builtin,omitempty" yaml:"builtin,omitempty"` } // With updates the resource with the model. @@ -179,6 +204,7 @@ func (r *Questionnaire) With(m *model.Questionnaire) { r.Name = m.Name r.Description = m.Description r.Required = m.Required + r.Builtin = m.Builtin() _ = json.Unmarshal(m.Sections, &r.Sections) _ = json.Unmarshal(m.Thresholds, &r.Thresholds) _ = json.Unmarshal(m.RiskMessages, &r.RiskMessages) diff --git a/migration/v10/model/assessment.go b/migration/v10/model/assessment.go index f3eeddfa0..a8cc0b6fe 100644 --- a/migration/v10/model/assessment.go +++ b/migration/v10/model/assessment.go @@ -12,6 +12,12 @@ type Questionnaire struct { Assessments []Assessment `gorm:"constraint:OnDelete:CASCADE"` } +// +// Builtin returns true if this is a Konveyor-provided questionnaire. +func (r *Questionnaire) Builtin() bool { + return r.UUID != nil +} + type Assessment struct { Model ApplicationID *uint `gorm:"uniqueIndex:AssessmentA"` From 20a08750465383e090338dd4df2644cb3a9f2889 Mon Sep 17 00:00:00 2001 From: Jeff Ortel Date: Wed, 11 Oct 2023 09:22:05 -0500 Subject: [PATCH 10/34] :bug: Fix HTML analysis report. (#513) The HTML report (tarball) is composed/streamed by the hub in steps: 1. Add the static report directory (template). 2. Add the composed `output.js` file which contains the analysis data. Using this method, the ReportWriter was adding the `output.js` (entry) twice in the tar. First from the static report (template) and the second generated by the hub. The tar command line seems to deal with this by overwriting the file. However the _extract_ functionality used by browsers ignores the 2nd occurrence. The fix is to filter out the 1st output.js when using tar.Writer.AddDir(). The `Filter` in the `tar` package only supported _include_ filtering. This PR updates the `tar.Filter` to support both _included_ and _excluded_ patterns. Refitted and tested the /bucket. --------- Signed-off-by: Jeff Ortel --- api/analysis.go | 4 ++ api/bucket.go | 6 +-- tar/filter.go | 97 ++++++++++++++++++++++++++++++++++++++++++++----- 3 files changed, 93 insertions(+), 14 deletions(-) diff --git a/api/analysis.go b/api/analysis.go index d04d7c6e0..459581996 100644 --- a/api/analysis.go +++ b/api/analysis.go @@ -2270,6 +2270,7 @@ func (r *ReportWriter) db() (db *gorm.DB) { // // Write builds and streams the analysis report. func (r *ReportWriter) Write(id uint) { + reportDir := Settings.Analysis.ReportPath path, err := r.buildOutput(id) if err != nil { _ = r.ctx.Error(err) @@ -2282,6 +2283,9 @@ func (r *ReportWriter) Write(id uint) { defer func() { tarWriter.Close() }() + filter := tar.NewFilter(reportDir) + filter.Exclude("output.js") + tarWriter.Filter = filter err = tarWriter.AssertDir(Settings.Analysis.ReportPath) if err != nil { _ = r.ctx.Error(err) diff --git a/api/bucket.go b/api/bucket.go index 2ca45908f..42d4c0934 100644 --- a/api/bucket.go +++ b/api/bucket.go @@ -231,10 +231,8 @@ func (h *BucketOwner) bucketGet(ctx *gin.Context, id uint) { return } if st.IsDir() { - filter := tar.Filter{ - Pattern: ctx.Query(Filter), - Root: path, - } + filter := tar.NewFilter(path) + filter.Include(ctx.Query(Filter)) if h.Accepted(ctx, binding.MIMEHTML) { h.getFile(ctx, m) } else { diff --git a/tar/filter.go b/tar/filter.go index 36b683fe3..63fdd5a1c 100644 --- a/tar/filter.go +++ b/tar/filter.go @@ -5,28 +5,105 @@ import ( "path/filepath" ) +// +// NewFilter returns a filter. +func NewFilter(root string) (f Filter) { + f = Filter{Root: root} + return +} + // // Filter supports glob-style filtering. type Filter struct { - Root string - Pattern string - cache map[string]bool + included FilterSet + excluded FilterSet + Root string } // // Match determines if path matches the filter. func (r *Filter) Match(path string) (b bool) { - if r.Pattern == "" { - b = true + r.included.root = r.Root + r.excluded.root = r.Root + if r.included.Len() > 0 { + included := r.included.Match(path) + if !included { + return + } + } + b = true + if r.excluded.Len() > 0 { + excluded := r.excluded.Match(path) + if excluded { + b = false + return + } + } + return +} + +// +// Include adds included patterns. +// Empty ("") patterns are ignored. +func (r *Filter) Include(patterns ...string) { + r.included.Add(patterns...) +} + +// +// Exclude adds excluded patterns. +// Empty ("") patterns are ignored. +func (r *Filter) Exclude(patterns ...string) { + r.excluded.Add(patterns...) +} + +// +// FilterSet is a collection of filter patterns. +type FilterSet struct { + root string + patterns []string + cache map[string]bool +} + +// +// Match returns true when the path matches. +func (r *FilterSet) Match(path string) (match bool) { + r.build() + _, match = r.cache[path] + return +} + +// +// Add pattern. +// Empty ("") patterns are ignored. +func (r *FilterSet) Add(patterns ...string) { + for _, p := range patterns { + if p == "" { + continue + } + r.cache = nil + r.patterns = append( + r.patterns, + p) + } +} + +// +// Len returns number of patterns. +func (r *FilterSet) Len() (n int) { + return len(r.patterns) +} + +// +// build populates the cache as needed. +func (r *FilterSet) build() { + if r.cache != nil { return } - if r.cache == nil { - r.cache = map[string]bool{} - matches, _ := filepath.Glob(pathlib.Join(r.Root, r.Pattern)) + r.cache = make(map[string]bool) + for i := range r.patterns { + matches, _ := filepath.Glob(pathlib.Join(r.root, r.patterns[i])) for _, p := range matches { r.cache[p] = true } } - _, b = r.cache[path] - return } From bf0d4731d8e45e9108fd9683366b12ef5ef8d899 Mon Sep 17 00:00:00 2001 From: Jeff Ortel Date: Wed, 11 Oct 2023 11:19:49 -0500 Subject: [PATCH 11/34] :bug: Fix business service filter of issues. (#515) https://issues.redhat.com/browse/MTA-1298 Signed-off-by: Jeff Ortel --- api/analysis.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/analysis.go b/api/analysis.go index 459581996..680b73a69 100644 --- a/api/analysis.go +++ b/api/analysis.go @@ -1652,7 +1652,7 @@ func (h *AnalysisHandler) appIDs(ctx *gin.Context, f qf.Filter) (q *gorm.DB) { iq = iq.Model(&model.BusinessService{}) iq = iq.Select("ID") iq = bsFilter.Where(iq) - q = q.Where("ID IN (?)", iq) + q = q.Where("BusinessServiceID IN (?)", iq) return } return From e6678eb19b1c99920648289fa50ff153d72e623c Mon Sep 17 00:00:00 2001 From: Samuel Lucidi Date: Wed, 11 Oct 2023 15:22:23 -0400 Subject: [PATCH 12/34] :sparkles: Add `comment` string field to Section (#516) This was missing from the Assessment/Questionnaire sections and is necessary to completely implement the enhancement. Signed-off-by: Sam Lucidi --- assessment/section.go | 1 + 1 file changed, 1 insertion(+) diff --git a/assessment/section.go b/assessment/section.go index ce3db2af6..9cbea46b8 100644 --- a/assessment/section.go +++ b/assessment/section.go @@ -6,6 +6,7 @@ type Section struct { Order uint `json:"order" yaml:"order" binding:"required"` Name string `json:"name" yaml:"name"` Questions []Question `json:"questions" yaml:"questions"` + Comment string `json:"comment,omitempty" yaml:"comment,omitempty"` } // From e8a2a4f6e4cf664b1bfae94e512940090233a14a Mon Sep 17 00:00:00 2001 From: Jeff Ortel Date: Wed, 11 Oct 2023 15:24:01 -0500 Subject: [PATCH 13/34] :bug: Static report app id needs to be a string. (#518) The static report JS needs the app ID to be a string. Signed-off-by: Jeff Ortel --- api/analysis.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/analysis.go b/api/analysis.go index 680b73a69..1bcdecec8 100644 --- a/api/analysis.go +++ b/api/analysis.go @@ -2325,7 +2325,7 @@ func (r *ReportWriter) buildOutput(id uint) (path string, err error) { r.encoder = &jsonEncoder{output: file} r.write("window[\"apps\"]=[") r.begin() - r.field("id").write(strconv.Itoa(int(m.Application.ID))) + r.field("id").writeStr(strconv.Itoa(int(m.Application.ID))) r.field("name").writeStr(m.Application.Name) r.field("analysis").writeStr(strconv.Itoa(int(m.ID))) aWriter := AnalysisWriter{ctx: r.ctx} From 23a290c12c6fcf23ee8305fccb41968d0f25c716 Mon Sep 17 00:00:00 2001 From: Marek Aufart Date: Thu, 12 Oct 2023 06:47:04 +0200 Subject: [PATCH 14/34] :seedling: Fix Identity API test Maven sample (#514) Updating Maven Identity sample to use (currently) correct "maven" kind instead of "mvn" to make it working with addon https://github.com/konveyor/tackle2-addon-analyzer/blob/61027b29f36ffa5b884ceac81c61d74341bdd762/cmd/mode.go#L151-L153 Signed-off-by: Marek Aufart --- test/api/identity/samples.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/test/api/identity/samples.go b/test/api/identity/samples.go index a7aededfa..89e588ac3 100644 --- a/test/api/identity/samples.go +++ b/test/api/identity/samples.go @@ -35,8 +35,8 @@ var ( `, } Mvn = api.Identity{ - Kind: "mvn", - Name: "mvn-settings", + Kind: "maven", + Name: "maven-settings", Settings: ` - tackle-testapp + tackle-testapp-public GITHUB_USER GITHUB_TOKEN @@ -70,8 +70,8 @@ var ( https://repo1.maven.org/maven2 - tackle-testapp - https://maven.pkg.github.com/konveyor/tackle-testapp + tackle-testapp-public + https://maven.pkg.github.com/konveyor/tackle-testapp-public true From 57dbd78d42c2a78f7d23ef664e0fa5a42b2a5ed7 Mon Sep 17 00:00:00 2001 From: Yash Khare Date: Thu, 12 Oct 2023 12:29:29 +0530 Subject: [PATCH 15/34] :seedling: add ticket API test (#477) Add the ticket API Test --------- Signed-off-by: Yash Khare --- binding/richclient.go | 4 + binding/ticket.go | 42 ++++++++++ docs/test-api-matrix.md | 2 +- test/api/ticket/api_test.go | 152 ++++++++++++++++++++++++++++++++++++ test/api/ticket/pkg.go | 31 ++++++++ test/api/ticket/samples.go | 21 +++++ 6 files changed, 251 insertions(+), 1 deletion(-) create mode 100644 binding/ticket.go create mode 100644 test/api/ticket/api_test.go create mode 100644 test/api/ticket/pkg.go create mode 100644 test/api/ticket/samples.go diff --git a/binding/richclient.go b/binding/richclient.go index 6302ed07a..ccca92cbe 100644 --- a/binding/richclient.go +++ b/binding/richclient.go @@ -40,6 +40,7 @@ type RichClient struct { TagCategory TagCategory Target Target Task Task + Ticket Ticket Tracker Tracker // A REST client. @@ -112,6 +113,9 @@ func New(baseUrl string) (r *RichClient) { Task: Task{ client: client, }, + Ticket: Ticket{ + client: client, + }, Tracker: Tracker{ client: client, }, diff --git a/binding/ticket.go b/binding/ticket.go new file mode 100644 index 000000000..60c294dd1 --- /dev/null +++ b/binding/ticket.go @@ -0,0 +1,42 @@ +package binding + +import ( + "github.com/konveyor/tackle2-hub/api" +) + +// +// Ticket API. +type Ticket struct { + client *Client +} + +// +// Create a Ticket. +func (h *Ticket) Create(r *api.Ticket) (err error) { + err = h.client.Post(api.TicketsRoot, &r) + return +} + +// +// Get a Ticket by ID. +func (h *Ticket) Get(id uint) (r *api.Ticket, err error) { + r = &api.Ticket{} + path := Path(api.TicketRoot).Inject(Params{api.ID: id}) + err = h.client.Get(path, r) + return +} + +// +// List Tickets.. +func (h *Ticket) List() (list []api.Ticket, err error) { + list = []api.Ticket{} + err = h.client.Get(api.TicketsRoot, &list) + return +} + +// +// Delete a Ticket. +func (h *Ticket) Delete(id uint) (err error) { + err = h.client.Delete(Path(api.TicketRoot).Inject(Params{api.ID: id})) + return +} diff --git a/docs/test-api-matrix.md b/docs/test-api-matrix.md index 1c4a1e635..774be208c 100644 --- a/docs/test-api-matrix.md +++ b/docs/test-api-matrix.md @@ -25,7 +25,7 @@ ruleset|:heavy_check_mark:|:heavy_check_mark:|| **Migrationwaves and Jira**|||| batch|||| migrationwave|:heavy_check_mark:|:heavy_check_mark:|| -ticket|||| +ticket|:heavy_check_mark:|:heavy_check_mark:|| tracker|:heavy_check_mark:|:heavy_check_mark:|| **Assessments**|||| archetype|||| diff --git a/test/api/ticket/api_test.go b/test/api/ticket/api_test.go new file mode 100644 index 000000000..af6f277c1 --- /dev/null +++ b/test/api/ticket/api_test.go @@ -0,0 +1,152 @@ +package ticket + +import ( + "testing" + + "github.com/konveyor/tackle2-hub/api" + TrackerSamples "github.com/konveyor/tackle2-hub/test/api/tracker" + "github.com/konveyor/tackle2-hub/test/assert" +) + +func TestTicketCRUD(t *testing.T) { + for _, r := range Samples { + t.Run("Ticket "+r.Kind+" CRUD", func(t *testing.T) { + + // Create a sample Application for the ticket. + app := api.Application{ + Name: r.Application.Name, + } + assert.Must(t, Application.Create(&app)) + + createdIdentities := []api.Identity{} + createdTrackers := []api.Tracker{} + for _, tracker := range TrackerSamples.Samples { + // Create a sample identity for the tracker + identity := api.Identity{ + Name: tracker.Identity.Name, + Kind: tracker.Kind, + } + assert.Must(t, Identity.Create(&identity)) + createdIdentities = append(createdIdentities, identity) + assert.Must(t, Tracker.Create(&tracker)) + createdTrackers = append(createdTrackers, tracker) + } + + // Create a sample ticket + assert.Must(t, Ticket.Create(&r)) + + // Get. + got, err := Ticket.Get(r.ID) + if err != nil { + t.Errorf(err.Error()) + } + + // Compare got values with expected values. + AssertEqualTickets(t, got, r) + + // Delete ticket and its related resources. + assert.Must(t, Ticket.Delete(r.ID)) + for _, tracker := range createdTrackers { + assert.Must(t, Tracker.Delete(tracker.ID)) + } + for _, identity := range createdIdentities { + assert.Must(t, Identity.Delete(identity.ID)) + } + assert.Must(t, Application.Delete(app.ID)) + + // Check if the Ticket is present even after deletion or not. + _, err = Ticket.Get(r.ID) + if err == nil { + t.Errorf("Resource exits, but should be deleted: %v", r) + } + }) + } +} + +func TestTicketList(t *testing.T) { + for _, r := range Samples { + + createdTickets := []api.Ticket{} + // Create a sample Application for the ticket. + app := api.Application{ + Name: r.Application.Name, + } + assert.Must(t, Application.Create(&app)) + + createdIdentities := []api.Identity{} + createdTrackers := []api.Tracker{} + for _, tracker := range TrackerSamples.Samples { + // Create a sample identity for the tracker + identity := api.Identity{ + Name: tracker.Identity.Name, + Kind: tracker.Kind, + } + assert.Must(t, Identity.Create(&identity)) + createdIdentities = append(createdIdentities, identity) + assert.Must(t, Tracker.Create(&tracker)) + createdTrackers = append(createdTrackers, tracker) + } + + // Create a sample ticket + assert.Must(t, Ticket.Create(&r)) + createdTickets = append(createdTickets, r) + + // List Tickets. + got, err := Ticket.List() + if err != nil { + t.Errorf(err.Error()) + } + + for _, createdTicket := range createdTickets { + found := false + for _, retrievedTicket := range got { + if assert.FlatEqual(createdTicket.ID, retrievedTicket.ID) { + found = true + break + } + } + if !found { + t.Errorf("Expected ticket not found in the list: %v", createdTicket) + } + } + + // Delete tickets and related resources. + for _, ticket := range createdTickets { + assert.Must(t, Ticket.Delete(ticket.ID)) + assert.Must(t, Application.Delete(ticket.ID)) + } + for _, tracker := range createdTrackers { + assert.Must(t, Tracker.Delete(tracker.ID)) + } + for _, identity := range createdIdentities { + assert.Must(t, Identity.Delete(identity.ID)) + } + } +} + +func AssertEqualTickets(t *testing.T, got *api.Ticket, expected api.Ticket) { + if got.Kind != expected.Kind { + t.Errorf("Different Kind Got %v, expected %v", got.Kind, expected.Kind) + } + if got.Reference != expected.Reference { + t.Errorf("Different Tracker Reference Got %v, expected %v", got.Reference, expected.Reference) + } + if got.Link != expected.Link { + t.Errorf("Different Url Got %v, expected %v", got.Link, expected.Link) + } + if got.Parent != expected.Parent { + t.Errorf("Different Parent Got %v, expected %v", got.Parent, expected.Parent) + } + if got.Message != expected.Message { + t.Errorf("Different Message Got %v, expected %v", got.Message, expected.Message) + } + if got.Status != expected.Status { + t.Errorf("Different Status Got %v, expected %v", got.Status, expected.Status) + } + if got.Application.Name != expected.Application.Name { + t.Errorf("Different Application's Name Got %v, expected %v", got.Application.Name, expected.Application.Name) + } + if got.Tracker.Name != expected.Tracker.Name { + t.Errorf("Different Tracker's Name Got %v, expected %v", got.Tracker.Name, expected.Tracker.Name) + } +} diff --git a/test/api/ticket/pkg.go b/test/api/ticket/pkg.go new file mode 100644 index 000000000..f6f5aab7f --- /dev/null +++ b/test/api/ticket/pkg.go @@ -0,0 +1,31 @@ +package ticket + +import ( + "github.com/konveyor/tackle2-hub/binding" + "github.com/konveyor/tackle2-hub/test/api/client" +) + +var ( + RichClient *binding.RichClient + Ticket binding.Ticket + Tracker binding.Tracker + Identity binding.Identity + Application binding.Application +) + +func init() { + // Prepare RichClient and login to Hub API (configured from env variables). + RichClient = client.PrepareRichClient() + + // Shortcut for Ticket-related RichClient methods. + Ticket = RichClient.Ticket + + // Shortcut for Tracker-related RichClient methods. + Tracker = RichClient.Tracker + + // Shortcut for Identity-related RichClient methods. + Identity = RichClient.Identity + + // Shortcut for Application-related RichClient methods. + Application = RichClient.Application +} diff --git a/test/api/ticket/samples.go b/test/api/ticket/samples.go new file mode 100644 index 000000000..5a74246ad --- /dev/null +++ b/test/api/ticket/samples.go @@ -0,0 +1,21 @@ +package ticket + +import ( + "github.com/konveyor/tackle2-hub/api" + TrackerSamples "github.com/konveyor/tackle2-hub/test/api/tracker" +) + +var Samples = []api.Ticket{ + { + Kind: "10001", + Parent: "10000", + Application: api.Ref{ + ID: 1, + Name: "Sample Application1", + }, + Tracker: api.Ref{ + ID: 1, + Name: TrackerSamples.Samples[0].Name, + }, + }, +} From de4595837f9f3dd638d19163010e9645920790c7 Mon Sep 17 00:00:00 2001 From: Samuel Lucidi Date: Thu, 12 Oct 2023 10:46:56 -0400 Subject: [PATCH 16/34] :bug: Deduplicate tags on imported apps (#517) Signed-off-by: Sam Lucidi --- importer/manager.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/importer/manager.go b/importer/manager.go index 3b1487539..96bc78732 100644 --- a/importer/manager.go +++ b/importer/manager.go @@ -200,6 +200,7 @@ func (m *Manager) createApplication(imp *model.Import) (ok bool) { db := m.DB.Preload("Category") db.Find(&allTags) + seenTags := make(map[uint]bool) appTags := []model.ApplicationTag{} for _, impTag := range imp.ImportTags { // Prepare normalized names for importTag @@ -270,8 +271,10 @@ func (m *Manager) createApplication(imp *model.Import) (ok bool) { return } } - - appTags = append(appTags, model.ApplicationTag{TagID: tag.ID, Source: ""}) + if !seenTags[tag.ID] { + seenTags[tag.ID] = true + appTags = append(appTags, model.ApplicationTag{TagID: tag.ID, Source: ""}) + } } result := m.DB.Create(app) From 1b5261261e05d7a12df56829609a53c492fef4ed Mon Sep 17 00:00:00 2001 From: Dylan Murray Date: Mon, 16 Oct 2023 14:18:11 -0400 Subject: [PATCH 17/34] :bug: Bump x/net to 0.17.0 (#519) Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=2242803. CVE which impacts http/2 and rapid reset DDOS attacks. Signed-off-by: Dylan Murray --- go.mod | 10 +++++----- go.sum | 20 ++++++++++---------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/go.mod b/go.mod index de8b5f734..fc631351c 100644 --- a/go.mod +++ b/go.mod @@ -16,7 +16,7 @@ require ( github.com/onsi/gomega v1.27.6 github.com/prometheus/client_golang v1.15.0 github.com/swaggo/swag v1.16.1 - golang.org/x/sys v0.7.0 + golang.org/x/sys v0.13.0 gopkg.in/yaml.v2 v2.4.0 gorm.io/datatypes v1.2.0 gorm.io/driver/sqlite v1.5.2 @@ -84,11 +84,11 @@ require ( github.com/ugorji/go/codec v1.2.9 // indirect go.uber.org/zap v1.24.0 // indirect golang.org/x/arch v0.0.0-20210923205945-b76863e36670 // indirect - golang.org/x/crypto v0.7.0 // indirect - golang.org/x/net v0.8.0 // indirect + golang.org/x/crypto v0.14.0 // indirect + golang.org/x/net v0.17.0 // indirect golang.org/x/oauth2 v0.5.0 // indirect - golang.org/x/term v0.6.0 // indirect - golang.org/x/text v0.8.0 // indirect + golang.org/x/term v0.13.0 // indirect + golang.org/x/text v0.13.0 // indirect golang.org/x/time v0.3.0 // indirect golang.org/x/tools v0.7.0 // indirect gomodules.xyz/jsonpatch/v2 v2.2.0 // indirect diff --git a/go.sum b/go.sum index 30856dc6a..4d94c6145 100644 --- a/go.sum +++ b/go.sum @@ -237,8 +237,8 @@ golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACk golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.7.0 h1:AvwMYaRytfdeVt3u6mLaxYtErKYjxA2OXjJ1HHq6t3A= -golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU= +golang.org/x/crypto v0.14.0 h1:wBqGXzWJW6m1XrIKlAH0Hs1JJ7+9KBwnIO8v66Q9cHc= +golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= @@ -259,8 +259,8 @@ golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.0.0-20210421230115-4e50805a0758/go.mod h1:72T/g9IO56b78aLF+1Kcs5dz7/ng1VjMUvfKvpfy+jM= golang.org/x/net v0.0.0-20210928044308-7d9f5e0b762b/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.8.0 h1:Zrh2ngAOFYneWTAIAPethzeaQLuHwhuBkuV6ZiRnUaQ= -golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= +golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM= +golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.5.0 h1:HuArIo48skDwlrvM3sEdHXElYslAMsf3KwRkkW4MC4s= golang.org/x/oauth2 v0.5.0/go.mod h1:9/XBHVqLaWO3/BRHs5jbpYCnOZVjj5V0ndyaAM7KB4I= @@ -283,19 +283,19 @@ golang.org/x/sys v0.0.0-20220330033206-e17cdc41300f/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.7.0 h1:3jlCCIQZPdOYu1h8BkNvLz8Kgwtae2cagcG/VamtZRU= -golang.org/x/sys v0.7.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE= +golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.6.0 h1:clScbb1cHjoCkyRbWwBEUZ5H/tIFu5TAXIqaZD0Gcjw= -golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= +golang.org/x/term v0.13.0 h1:bb+I9cTfFazGW51MZqBVmZy7+JEJMouUHTUSKVQLBek= +golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.8.0 h1:57P1ETyNKtuIjB4SRd15iJxuhj8Gc416Y78H3qgMh68= -golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= +golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= +golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4= golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= From 2f2a07b2d14b5826c7ec4b2dea721e1747b2d287 Mon Sep 17 00:00:00 2001 From: Jeff Ortel Date: Mon, 16 Oct 2023 16:50:12 -0500 Subject: [PATCH 18/34] :sparkles: Better pod OOM reporting. (#521) Using the container status `Reason` for more accurate reporting. ``` state: Failed image: quay.io/jortel/tackle2-addon-analyzer:debug pod: konveyor-tackle/task-13-gcmjs retries: 1 started: 2023-10-16T10:36:30.221282042-07:00 terminated: 2023-10-16T10:36:40.301254088-07:00 bucket: id: 17 name: "" errors: - severity: Error description: 'Pod failed: OOMKilled' ``` Also, the RWX should be disabled by default. --------- Signed-off-by: Jeff Ortel --- settings/hub.go | 2 -- task/manager.go | 5 ++++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/settings/hub.go b/settings/hub.go index d7d984e87..deaf0c00f 100644 --- a/settings/hub.go +++ b/settings/hub.go @@ -106,8 +106,6 @@ func (r *Hub) Load() (err error) { if found { b, _ := strconv.ParseBool(s) r.Cache.RWX = b - } else { - r.Cache.RWX = true } r.Cache.PVC, found = os.LookupEnv(EnvCachePvc) if !found { diff --git a/task/manager.go b/task/manager.go index 524923d27..172fc0f8b 100644 --- a/task/manager.go +++ b/task/manager.go @@ -356,7 +356,10 @@ func (r *Task) Reflect(client k8s.Client) (err error) { r.State = Succeeded r.Terminated = &mark case core.PodFailed: - r.Error("Error", "Pod failed: %s", pod.Status.Message) + r.Error( + "Error", + "Pod failed: %s", + pod.Status.ContainerStatuses[0].State.Terminated.Reason) switch pod.Status.ContainerStatuses[0].State.Terminated.ExitCode { case 137: // Killed. if r.Retries < Settings.Hub.Task.Retries { From 71b73795f9ab7aa62703ac7bb32878f52e90de5b Mon Sep 17 00:00:00 2001 From: Jeff Ortel Date: Tue, 17 Oct 2023 10:23:38 -0500 Subject: [PATCH 19/34] :ghost: Update 0.1.2 for License. (#522) Fixes FOSSA complaint. Signed-off-by: Jeff Ortel --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index fc631351c..311679f40 100644 --- a/go.mod +++ b/go.mod @@ -10,7 +10,7 @@ require ( github.com/go-playground/validator/v10 v10.13.0 github.com/golang-jwt/jwt/v4 v4.5.0 github.com/google/uuid v1.3.0 - github.com/jortel/go-utils v0.1.1 + github.com/jortel/go-utils v0.1.2 github.com/konveyor/tackle2-seed v0.0.0-20230928184719-4a383c5aa887 github.com/mattn/go-sqlite3 v1.14.17 github.com/onsi/gomega v1.27.6 diff --git a/go.sum b/go.sum index 4d94c6145..0ac63456a 100644 --- a/go.sum +++ b/go.sum @@ -129,8 +129,8 @@ github.com/jinzhu/inflection v1.0.0/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkr github.com/jinzhu/now v1.1.4/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8= github.com/jinzhu/now v1.1.5 h1:/o9tlHleP7gOFmsnYNz3RGnqzefHA47wQpKrrdTIwXQ= github.com/jinzhu/now v1.1.5/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8= -github.com/jortel/go-utils v0.1.1 h1:zkAAA+i5Z+151zUG7lkjILGxSo3pQ4bkLTRcPTCy3hs= -github.com/jortel/go-utils v0.1.1/go.mod h1:sl6vav63ODI0sUfSz8e0pImNmCVFnVsuOFhZmwe9GDk= +github.com/jortel/go-utils v0.1.2 h1:R0TcGRCcwoL793CymcKC5AF9idWXT2cR6eQ2xpBUsoI= +github.com/jortel/go-utils v0.1.2/go.mod h1:sl6vav63ODI0sUfSz8e0pImNmCVFnVsuOFhZmwe9GDk= github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= From d4b18221fc808f9e61b905243c57bd1a5abfee03 Mon Sep 17 00:00:00 2001 From: Samuel Lucidi Date: Tue, 17 Oct 2023 16:06:01 -0400 Subject: [PATCH 20/34] :book: Update OpenAPI spec w/ Assessment changes (#520) `ArchivedIssue` in the API package being an alias to another type confuses the swag tool. To mitigate this, I had to overwrite the swagger type of that field on the Analysis resource with `object`. This means that the api documentation for that field will be unhelpfully vague, but it allows the documentation to build. Signed-off-by: Sam Lucidi --- api/analysis.go | 2 +- api/archetype.go | 2 +- docs/docs.go | 1026 +++++++++++++++++++++++++++++++++++++++++---- docs/index.html | 410 +++++++++++------- docs/swagger.json | 1021 ++++++++++++++++++++++++++++++++++++++++---- docs/swagger.yaml | 610 ++++++++++++++++++++++++++- 6 files changed, 2761 insertions(+), 310 deletions(-) diff --git a/api/analysis.go b/api/analysis.go index 1bcdecec8..35d977ec6 100644 --- a/api/analysis.go +++ b/api/analysis.go @@ -1811,7 +1811,7 @@ type Analysis struct { Archived bool `json:"archived,omitempty" yaml:",omitempty"` Issues []Issue `json:"issues,omitempty" yaml:",omitempty"` Dependencies []TechDependency `json:"dependencies,omitempty" yaml:",omitempty"` - Summary []ArchivedIssue `json:"summary,omitempty" yaml:",omitempty"` + Summary []ArchivedIssue `json:"summary,omitempty" yaml:",omitempty" swaggertype:"object"` } // diff --git a/api/archetype.go b/api/archetype.go index f15a7b68b..06f0c9358 100644 --- a/api/archetype.go +++ b/api/archetype.go @@ -45,7 +45,7 @@ func (h ArchetypeHandler) AddRoutes(e *gin.Engine) { // @description Get an archetype by ID. // @tags archetypes // @produce json -// @success 200 {object} api.Archetypes +// @success 200 {object} api.Archetype // @router /archetypes/{id} [get] // @param id path string true "Archetype ID" func (h ArchetypeHandler) Get(ctx *gin.Context) { diff --git a/docs/docs.go b/docs/docs.go index d7fa02cf5..3ffbf7bef 100644 --- a/docs/docs.go +++ b/docs/docs.go @@ -1,5 +1,4 @@ -// Package docs GENERATED BY SWAG; DO NOT EDIT -// This file was generated by swaggo/swag +// Package docs Code generated by swaggo/swag. DO NOT EDIT package docs import "github.com/swaggo/swag" @@ -314,7 +313,7 @@ const docTemplate = `{ "get": { "description": "Get an analysis (report) by ID.", "produces": [ - "application/json" + "application/octet-stream" ], "tags": [ "analyses" @@ -612,7 +611,7 @@ const docTemplate = `{ "get": { "description": "Get the latest analysis for an application.", "produces": [ - "application/json" + "application/octet-stream" ], "tags": [ "analyses" @@ -637,6 +636,93 @@ const docTemplate = `{ } } }, + "/applications/{id}/analysis/report": { + "get": { + "description": "Get the latest analysis (static) report.", + "produces": [ + "application/octet-stream" + ], + "tags": [ + "analyses" + ], + "summary": "Get the latest analysis (static) report.", + "parameters": [ + { + "type": "string", + "description": "Application ID", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/applications/{id}/assessments": { + "get": { + "description": "List the assessments of an Application and any it inherits from its archetypes.", + "tags": [ + "applications" + ], + "summary": "List the assessments of an Application and any it inherits from its archetypes.", + "parameters": [ + { + "type": "integer", + "description": "Application ID", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/api.Assessment" + } + } + } + } + }, + "post": { + "description": "Create an application assessment.", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "applications" + ], + "summary": "Create an application assessment.", + "parameters": [ + { + "description": "Assessment data", + "name": "assessment", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/api.Assessment" + } + } + ], + "responses": { + "201": { + "description": "Created", + "schema": { + "$ref": "#/definitions/api.Assessment" + } + } + } + } + }, "/applications/{id}/bucket/{wildcard}": { "get": { "description": "Get bucket content by ID and path.\nReturns index.html for directories when Accept=text/html else a tarball.\n?filter=glob supports directory content filtering.", @@ -968,6 +1054,36 @@ const docTemplate = `{ } }, "/applications/{id}/tags": { + "get": { + "description": "List tag references.", + "produces": [ + "application/json" + ], + "tags": [ + "applications" + ], + "summary": "List tag references.", + "parameters": [ + { + "type": "string", + "description": "Application ID", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/api.Ref" + } + } + } + } + }, "post": { "description": "Ensure tag is associated with the application.", "consumes": [ @@ -1043,20 +1159,185 @@ const docTemplate = `{ } } }, - "/applications/{id}/tags/id": { + "/applications/{id}/tags/{sid}": { + "delete": { + "description": "Ensure tag is not associated with the application.", + "tags": [ + "applications" + ], + "summary": "Delete tag association.", + "parameters": [ + { + "type": "string", + "description": "Application ID", + "name": "id", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Tag ID", + "name": "sid", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "description": "No Content" + } + } + } + }, + "/archetypes": { "get": { - "description": "List tag references.", + "description": "List all archetypes.", "produces": [ "application/json" ], "tags": [ - "applications" + "archetypes" ], - "summary": "List tag references.", + "summary": "List all archetypes.", + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/api.Archetype" + } + } + } + } + }, + "post": { + "description": "Create an archetype.", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "archetypes" + ], + "summary": "Create an archetype.", + "parameters": [ + { + "description": "Archetype data", + "name": "archetype", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/api.Archetype" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/api.Archetype" + } + } + } + } + }, + "/archetypes/{id}": { + "get": { + "description": "Get an archetype by ID.", + "produces": [ + "application/json" + ], + "tags": [ + "archetypes" + ], + "summary": "Get an archetype by ID.", "parameters": [ { "type": "string", - "description": "Application ID", + "description": "Archetype ID", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/api.Archetype" + } + } + } + }, + "put": { + "description": "Update an archetype.", + "consumes": [ + "application/json" + ], + "tags": [ + "archetypes" + ], + "summary": "Update an archetype.", + "parameters": [ + { + "type": "string", + "description": "Archetype ID", + "name": "id", + "in": "path", + "required": true + }, + { + "description": "Archetype data", + "name": "archetype", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/api.Archetype" + } + } + ], + "responses": { + "204": { + "description": "No Content" + } + } + }, + "delete": { + "description": "Delete an archetype.", + "tags": [ + "archetypes" + ], + "summary": "Delete an archetype.", + "parameters": [ + { + "type": "string", + "description": "Archetype ID", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "description": "No Content" + } + } + } + }, + "/archetypes/{id}/assessments": { + "get": { + "description": "List the assessments of an archetype.", + "tags": [ + "archetypes" + ], + "summary": "List the assessments of an archetype.", + "parameters": [ + { + "type": "integer", + "description": "Archetype ID", "name": "id", "in": "path", "required": true @@ -1068,32 +1349,140 @@ const docTemplate = `{ "schema": { "type": "array", "items": { - "$ref": "#/definitions/api.Ref" + "$ref": "#/definitions/api.Assessment" } } } } + }, + "post": { + "description": "Create an archetype assessment.", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "archetypes" + ], + "summary": "Create an archetype assessment.", + "parameters": [ + { + "description": "Assessment data", + "name": "assessment", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/api.Assessment" + } + } + ], + "responses": { + "201": { + "description": "Created", + "schema": { + "$ref": "#/definitions/api.Assessment" + } + } + } } }, - "/applications/{id}/tags/{sid}": { - "delete": { - "description": "Ensure tag is not associated with the application.", + "/assessments": { + "get": { + "description": "List all assessments.", + "produces": [ + "application/json" + ], "tags": [ - "applications" + "assessments" + ], + "summary": "List all assessments.", + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/api.Assessment" + } + } + } + } + } + }, + "/assessments/{id}": { + "get": { + "description": "Get an assessment by ID.", + "produces": [ + "application/json" + ], + "tags": [ + "questionnaires" + ], + "summary": "Get an assessment by ID.", + "parameters": [ + { + "type": "string", + "description": "Assessment ID", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/api.Assessment" + } + } + } + }, + "put": { + "description": "Update an assessment.", + "consumes": [ + "application/json" + ], + "tags": [ + "assessments" ], - "summary": "Delete tag association.", + "summary": "Update an assessment.", "parameters": [ { "type": "string", - "description": "Application ID", + "description": "Assessment ID", "name": "id", "in": "path", "required": true }, + { + "description": "Assessment data", + "name": "assessment", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/api.Assessment" + } + } + ], + "responses": { + "204": { + "description": "No Content" + } + } + }, + "delete": { + "description": "Delete an assessment.", + "tags": [ + "assessments" + ], + "summary": "Delete an assessment.", + "parameters": [ { "type": "string", - "description": "Tag ID", - "name": "sid", + "description": "Assessment ID", + "name": "id", "in": "path", "required": true } @@ -2560,6 +2949,144 @@ const docTemplate = `{ } } }, + "/questionnaires": { + "get": { + "description": "List all questionnaires.", + "produces": [ + "application/json" + ], + "tags": [ + "questionnaires" + ], + "summary": "List all questionnaires.", + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/api.Questionnaire" + } + } + } + } + }, + "post": { + "description": "Create a questionnaire.", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "questionnaires" + ], + "summary": "Create a questionnaire.", + "parameters": [ + { + "description": "Questionnaire data", + "name": "questionnaire", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/api.Questionnaire" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/api.Questionnaire" + } + } + } + } + }, + "/questionnaires/{id}": { + "get": { + "description": "Get a questionnaire by ID.", + "produces": [ + "application/json" + ], + "tags": [ + "questionnaires" + ], + "summary": "Get a questionnaire by ID.", + "parameters": [ + { + "type": "string", + "description": "Questionnaire ID", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/api.Questionnaire" + } + } + } + }, + "put": { + "description": "Update a questionnaire. If the Questionnaire\nis builtin, only its \"required\" field can be changed\nand all other fields will be ignored.", + "consumes": [ + "application/json" + ], + "tags": [ + "questionnaires" + ], + "summary": "Update a questionnaire.", + "parameters": [ + { + "type": "string", + "description": "Questionnaire ID", + "name": "id", + "in": "path", + "required": true + }, + { + "description": "Questionnaire data", + "name": "questionnaire", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/api.Questionnaire" + } + } + ], + "responses": { + "204": { + "description": "No Content" + } + } + }, + "delete": { + "description": "Delete a questionnaire.", + "tags": [ + "questionnaires" + ], + "summary": "Delete a questionnaire.", + "parameters": [ + { + "type": "string", + "description": "Questionnaire ID", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "description": "No Content" + } + } + } + }, "/reviews": { "get": { "description": "List all reviews.", @@ -2728,7 +3255,7 @@ const docTemplate = `{ }, "/rulesets": { "get": { - "description": "List all bindings.", + "description": "List all bindings.\nfilters:\n- name\n- labels", "produces": [ "application/json" ], @@ -4759,47 +5286,204 @@ const docTemplate = `{ } } } - } - } - } - }, - "definitions": { - "api.Addon": { - "type": "object", - "properties": { - "image": { - "type": "string" + } + } + } + }, + "definitions": { + "api.Addon": { + "type": "object", + "properties": { + "image": { + "type": "string" + }, + "name": { + "type": "string" + } + } + }, + "api.Analysis": { + "type": "object", + "properties": { + "archived": { + "type": "boolean" + }, + "createTime": { + "type": "string" + }, + "createUser": { + "type": "string" + }, + "dependencies": { + "type": "array", + "items": { + "$ref": "#/definitions/api.TechDependency" + } + }, + "effort": { + "type": "integer" + }, + "id": { + "type": "integer" + }, + "issues": { + "type": "array", + "items": { + "$ref": "#/definitions/api.Issue" + } + }, + "summary": { + "type": "object" + }, + "updateUser": { + "type": "string" + } + } + }, + "api.Application": { + "type": "object", + "required": [ + "name" + ], + "properties": { + "archetypes": { + "type": "array", + "items": { + "$ref": "#/definitions/api.Ref" + } + }, + "assessed": { + "type": "boolean" + }, + "assessments": { + "type": "array", + "items": { + "$ref": "#/definitions/api.Ref" + } + }, + "binary": { + "type": "string" + }, + "bucket": { + "$ref": "#/definitions/api.Ref" + }, + "businessService": { + "$ref": "#/definitions/api.Ref" + }, + "comments": { + "type": "string" + }, + "contributors": { + "type": "array", + "items": { + "$ref": "#/definitions/api.Ref" + } + }, + "createTime": { + "type": "string" + }, + "createUser": { + "type": "string" + }, + "description": { + "type": "string" + }, + "id": { + "type": "integer" + }, + "identities": { + "type": "array", + "items": { + "$ref": "#/definitions/api.Ref" + } + }, + "migrationWave": { + "$ref": "#/definitions/api.Ref" + }, + "name": { + "type": "string" + }, + "owner": { + "$ref": "#/definitions/api.Ref" + }, + "repository": { + "$ref": "#/definitions/api.Repository" + }, + "review": { + "$ref": "#/definitions/api.Ref" + }, + "tags": { + "type": "array", + "items": { + "$ref": "#/definitions/api.TagRef" + } }, - "name": { + "updateUser": { "type": "string" } } }, - "api.Analysis": { + "api.Archetype": { "type": "object", "properties": { + "applications": { + "type": "array", + "items": { + "$ref": "#/definitions/api.Ref" + } + }, + "assessed": { + "type": "boolean" + }, + "assessments": { + "type": "array", + "items": { + "$ref": "#/definitions/api.Ref" + } + }, + "comments": { + "type": "string" + }, "createTime": { "type": "string" }, "createUser": { "type": "string" }, - "dependencies": { + "criteria": { "type": "array", "items": { - "$ref": "#/definitions/api.TechDependency" + "$ref": "#/definitions/api.TagRef" } }, - "effort": { - "type": "integer" + "description": { + "type": "string" }, "id": { "type": "integer" }, - "issues": { + "name": { + "type": "string" + }, + "review": { + "$ref": "#/definitions/api.Ref" + }, + "stakeholderGroups": { "type": "array", "items": { - "$ref": "#/definitions/api.Issue" + "$ref": "#/definitions/api.Ref" + } + }, + "stakeholders": { + "type": "array", + "items": { + "$ref": "#/definitions/api.Ref" + } + }, + "tags": { + "type": "array", + "items": { + "$ref": "#/definitions/api.TagRef" } }, "updateUser": { @@ -4807,29 +5491,20 @@ const docTemplate = `{ } } }, - "api.Application": { + "api.Assessment": { "type": "object", "required": [ - "name" + "questionnaire" ], "properties": { - "binary": { - "type": "string" - }, - "bucket": { + "application": { "$ref": "#/definitions/api.Ref" }, - "businessService": { + "archetype": { "$ref": "#/definitions/api.Ref" }, - "comments": { - "type": "string" - }, - "contributors": { - "type": "array", - "items": { - "$ref": "#/definitions/api.Ref" - } + "confidence": { + "type": "integer" }, "createTime": { "type": "string" @@ -4837,39 +5512,43 @@ const docTemplate = `{ "createUser": { "type": "string" }, - "description": { - "type": "string" - }, "id": { "type": "integer" }, - "identities": { - "type": "array", - "items": { - "$ref": "#/definitions/api.Ref" - } - }, - "migrationWave": { + "questionnaire": { "$ref": "#/definitions/api.Ref" }, - "name": { + "risk": { + "description": "read only", "type": "string" }, - "owner": { - "$ref": "#/definitions/api.Ref" + "riskMessages": { + "$ref": "#/definitions/assessment.RiskMessages" }, - "repository": { - "$ref": "#/definitions/api.Repository" + "sections": { + "type": "array", + "items": { + "$ref": "#/definitions/assessment.Section" + } }, - "review": { - "$ref": "#/definitions/api.Ref" + "stakeholderGroups": { + "type": "array", + "items": { + "$ref": "#/definitions/api.Ref" + } }, - "tags": { + "stakeholders": { "type": "array", "items": { - "$ref": "#/definitions/api.TagRef" + "$ref": "#/definitions/api.Ref" } }, + "status": { + "type": "string" + }, + "thresholds": { + "$ref": "#/definitions/assessment.Thresholds" + }, "updateUser": { "type": "string" } @@ -5538,6 +6217,53 @@ const docTemplate = `{ } } }, + "api.Questionnaire": { + "type": "object", + "required": [ + "name", + "riskMessages", + "sections", + "thresholds" + ], + "properties": { + "builtin": { + "type": "boolean" + }, + "createTime": { + "type": "string" + }, + "createUser": { + "type": "string" + }, + "description": { + "type": "string" + }, + "id": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "required": { + "type": "boolean" + }, + "riskMessages": { + "$ref": "#/definitions/assessment.RiskMessages" + }, + "sections": { + "type": "array", + "items": { + "$ref": "#/definitions/assessment.Section" + } + }, + "thresholds": { + "$ref": "#/definitions/assessment.Thresholds" + }, + "updateUser": { + "type": "string" + } + } + }, "api.Ref": { "type": "object", "required": [ @@ -5574,13 +6300,13 @@ const docTemplate = `{ }, "api.Review": { "type": "object", - "required": [ - "application" - ], "properties": { "application": { "$ref": "#/definitions/api.Ref" }, + "archetype": { + "$ref": "#/definitions/api.Ref" + }, "businessCriticality": { "type": "integer" }, @@ -5695,6 +6421,9 @@ const docTemplate = `{ "$ref": "#/definitions/api.Ref" } }, + "description": { + "type": "string" + }, "id": { "type": "integer" }, @@ -5958,6 +6687,9 @@ const docTemplate = `{ }, "source": { "type": "string" + }, + "virtual": { + "type": "boolean" } } }, @@ -6332,6 +7064,150 @@ const docTemplate = `{ "type": "string" } } + }, + "assessment.Answer": { + "type": "object", + "required": [ + "order" + ], + "properties": { + "applyTags": { + "type": "array", + "items": { + "$ref": "#/definitions/assessment.CategorizedTag" + } + }, + "autoAnswerFor": { + "type": "array", + "items": { + "$ref": "#/definitions/assessment.CategorizedTag" + } + }, + "autoAnswered": { + "type": "boolean" + }, + "mitigation": { + "type": "string" + }, + "order": { + "type": "integer" + }, + "rationale": { + "type": "string" + }, + "risk": { + "type": "string", + "enum": [ + "red" + ] + }, + "selected": { + "type": "boolean" + }, + "text": { + "type": "string" + } + } + }, + "assessment.CategorizedTag": { + "type": "object", + "properties": { + "category": { + "type": "string" + }, + "tag": { + "type": "string" + } + } + }, + "assessment.Question": { + "type": "object", + "required": [ + "order" + ], + "properties": { + "answers": { + "type": "array", + "items": { + "$ref": "#/definitions/assessment.Answer" + } + }, + "excludeFor": { + "type": "array", + "items": { + "$ref": "#/definitions/assessment.CategorizedTag" + } + }, + "explanation": { + "type": "string" + }, + "includeFor": { + "type": "array", + "items": { + "$ref": "#/definitions/assessment.CategorizedTag" + } + }, + "order": { + "type": "integer" + }, + "text": { + "type": "string" + } + } + }, + "assessment.RiskMessages": { + "type": "object", + "properties": { + "green": { + "type": "string" + }, + "red": { + "type": "string" + }, + "unknown": { + "type": "string" + }, + "yellow": { + "type": "string" + } + } + }, + "assessment.Section": { + "type": "object", + "required": [ + "order" + ], + "properties": { + "comment": { + "type": "string" + }, + "name": { + "type": "string" + }, + "order": { + "type": "integer" + }, + "questions": { + "type": "array", + "items": { + "$ref": "#/definitions/assessment.Question" + } + } + } + }, + "assessment.Thresholds": { + "type": "object", + "properties": { + "red": { + "type": "integer" + }, + "unknown": { + "type": "integer" + }, + "yellow": { + "type": "integer" + } + } } } }` @@ -6346,6 +7222,8 @@ var SwaggerInfo = &swag.Spec{ Description: "", InfoInstanceName: "swagger", SwaggerTemplate: docTemplate, + LeftDelim: "{{", + RightDelim: "}}", } func init() { diff --git a/docs/index.html b/docs/index.html index 8a264074c..bea91c0c5 100644 --- a/docs/index.html +++ b/docs/index.html @@ -2098,7 +2098,7 @@ -

Response samples

Content type
application/json
{ }

analyses

List analyses.

List analyses for an application. Resources do not include relations.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Get an analysis (report) by ID.

Get an analysis (report) by ID.

+

Response samples

Content type
application/json
[
  • {
    }
]

Get an analysis (report) by ID.

Get an analysis (report) by ID.

path Parameters
id
required
string

Analysis ID

Responses

Response samples

Content type
application/json
{
  • "createTime": "string",
  • "createUser": "string",
  • "dependencies": [
    ],
  • "effort": 0,
  • "id": 0,
  • "issues": [
    ],
  • "updateUser": "string"
}

Delete an analysis by ID.

Delete an analysis by ID.

+

Delete an analysis by ID.

Delete an analysis by ID.

path Parameters
id
required
string

Analysis ID

Responses

Create an analysis.

Create an analysis. @@ -2141,12 +2141,16 @@

  • dependencies: file that multiple api.TechDependency resources.
  • Responses

    Response samples

    Content type
    application/json
    {
    • "createTime": "string",
    • "createUser": "string",
    • "dependencies": [
      ],
    • "effort": 0,
    • "id": 0,
    • "issues": [
      ],
    • "updateUser": "string"
    }

    Get the latest analysis.

    Get the latest analysis for an application.

    +

    Response samples

    Content type
    application/json
    {
    • "archived": true,
    • "createTime": "string",
    • "createUser": "string",
    • "dependencies": [
      ],
    • "effort": 0,
    • "id": 0,
    • "issues": [
      ],
    • "summary": { },
    • "updateUser": "string"
    }

    Get the latest analysis.

    Get the latest analysis for an application.

    path Parameters
    id
    required
    string

    Application ID

    Responses

    Response samples

    Content type
    application/json
    {
    • "createTime": "string",
    • "createUser": "string",
    • "dependencies": [
      ],
    • "effort": 0,
    • "id": 0,
    • "issues": [
      ],
    • "updateUser": "string"
    }

    dependencies

    List dependency reports.

    Each report collates dependencies by name and SHA. +

    Get the latest analysis (static) report.

    Get the latest analysis (static) report.

    +
    path Parameters
    id
    required
    string

    Application ID

    +

    Responses

    dependencies

    List dependency reports.

    Each report collates dependencies by name and SHA. filters:

      +
    • provider
    • name
    • version
    • sha
    • @@ -2154,14 +2158,17 @@
    • labels
    • application.id
    • application.name
    • +
    • businessService.id
    • +
    • businessService.name
    • tag.id sort:
    • +
    • provider
    • name
    • version
    • sha

    Responses

    Response samples

    Content type
    application/json
    [
    • {
      }
    ]

    List application dependencies.

    List application dependencies. +

    Response samples

    Content type
    application/json
    [
    • {
      }
    ]

    List application dependencies.

    List application dependencies. filters:

    • name
    • @@ -2172,15 +2179,15 @@
    path Parameters
    id
    required
    string

    Application ID

    Responses

    Response samples

    Content type
    application/json
    [
    • {
      }
    ]

    List all dependencies.

    List all dependencies.

    +

    Response samples

    Content type
    application/json
    [
    • {
      }
    ]

    List all dependencies.

    List all dependencies.

    Responses

    Response samples

    Content type
    application/json
    [
    • {
      }
    ]

    Create a dependency.

    Create a dependency.

    +

    Response samples

    Content type
    application/json
    [
    • {
      }
    ]

    Create a dependency.

    Create a dependency.

    Request Body schema: application/json

    Dependency data

    createTime
    string
    createUser
    string
    object (api.Ref)
    id
    integer
    object (api.Ref)
    updateUser
    string

    Responses

    Request samples

    Content type
    application/json
    {
    • "createTime": "string",
    • "createUser": "string",
    • "from": {
      },
    • "id": 0,
    • "to": {
      },
    • "updateUser": "string"
    }

    Response samples

    Content type
    application/json
    {
    • "createTime": "string",
    • "createUser": "string",
    • "from": {
      },
    • "id": 0,
    • "to": {
      },
    • "updateUser": "string"
    }

    Get a dependency by ID.

    Get a dependency by ID.

    +

    Request samples

    Content type
    application/json
    {
    • "createTime": "string",
    • "createUser": "string",
    • "from": {
      },
    • "id": 0,
    • "to": {
      },
    • "updateUser": "string"
    }

    Response samples

    Content type
    application/json
    {
    • "createTime": "string",
    • "createUser": "string",
    • "from": {
      },
    • "id": 0,
    • "to": {
      },
    • "updateUser": "string"
    }

    Get a dependency by ID.

    Get a dependency by ID.

    path Parameters
    id
    required
    string

    Dependency ID

    Responses

    Response samples

    Content type
    application/json
    {
    • "createTime": "string",
    • "createUser": "string",
    • "from": {
      },
    • "id": 0,
    • "to": {
      },
    • "updateUser": "string"
    }

    Delete a dependency.

    Delete a dependency.

    +

    Response samples

    Content type
    application/json
    {
    • "createTime": "string",
    • "createUser": "string",
    • "from": {
      },
    • "id": 0,
    • "to": {
      },
    • "updateUser": "string"
    }

    Delete a dependency.

    Delete a dependency.

    path Parameters
    id
    required
    string

    Dependency id

    Responses

    issues

    List all issues.

    List all issues. @@ -2197,7 +2204,7 @@

  • tag.id
  • Responses

    Response samples

    Content type
    application/json
    [
    • {
      }
    ]

    List application issues.

    List application issues. +

    Response samples

    Content type
    application/json
    [
    • {
      }
    ]

    List application issues.

    List application issues. filters:

    • ruleset
    • @@ -2209,45 +2216,65 @@
    path Parameters
    id
    required
    string

    Application ID

    Responses

    Response samples

    Content type
    application/json
    [
    • {
      }
    ]

    issue

    Get an issue.

    Get an issue.

    +

    Response samples

    Content type
    application/json
    [
    • {
      }
    ]

    issue

    Get an issue.

    Get an issue.

    Responses

    Response samples

    Content type
    application/json
    {
    • "category": "string",
    • "createTime": "string",
    • "createUser": "string",
    • "description": "string",
    • "effort": 0,
    • "facts": { },
    • "id": 0,
    • "incidents": [
      ],
    • "labels": [
      ],
    • "links": [
      ],
    • "name": "string",
    • "rule": "string",
    • "ruleset": "string",
    • "updateUser": "string"
    }

    incidents

    List incidents for an issue.

    List incidents for an issue. +

    Response samples

    Content type
    application/json
    {
    • "category": "string",
    • "createTime": "string",
    • "createUser": "string",
    • "description": "string",
    • "effort": 0,
    • "facts": { },
    • "id": 0,
    • "incidents": [
      ],
    • "labels": [
      ],
    • "links": [
      ],
    • "name": "string",
    • "rule": "string",
    • "ruleset": "string",
    • "updateUser": "string"
    }

    incidents

    List incidents for an issue.

    List incidents for an issue. filters:

    • file

    Responses

    Response samples

    Content type
    application/json
    [
    • {
      }
    ]

    appreports

    List application reports.

    List application reports. +

    Response samples

    Content type
    application/json
    [
    • {
      }
    ]

    depappreports

    List application reports.

    List application reports. filters:

    • id
    • name
    • description
    • businessService
    • -
    • effort
    • -
    • incidents
    • -
    • files
    • -
    • issue.id
    • -
    • issue.name
    • -
    • issue.ruleset
    • -
    • issue.rule
    • -
    • issue.category
    • -
    • issue.effort
    • -
    • issue.labels
    • +
    • provider
    • +
    • name
    • +
    • version
    • +
    • sha
    • +
    • indirect
    • +
    • dep.provider
    • +
    • dep.name
    • +
    • dep.version
    • +
    • dep.sha
    • +
    • dep.indirect
    • +
    • dep.labels
    • application.id
    • application.name
    • +
    • businessService.id
    • businessService.name sort:
    • -
    • id
    • name
    • description
    • businessService
    • +
    • provider
    • +
    • name
    • +
    • version
    • +
    • sha
    • +
    • indirect
    • +
    +

    Responses

    Response samples

    Content type
    application/json
    [
    • {
      }
    ]

    issuereport

    List application issue reports.

    Each report collates issues by ruleset/rule. +filters:

    +
      +
    • ruleset
    • +
    • rule
    • +
    • category
    • +
    • effort
    • +
    • labels +sort:
    • +
    • ruleset
    • +
    • rule
    • +
    • category
    • effort
    • -
    • incidents
    • files
    -

    Responses

    Response samples

    Content type
    application/json
    [
    • {
      }
    ]

    filereports

    List incident file reports.

    Each report collates incidents by file. +

    path Parameters
    id
    required
    string

    Application ID

    +

    Responses

    Response samples

    Content type
    application/json
    [
    • {
      }
    ]

    filereports

    List incident file reports.

    Each report collates incidents by file. filters:

    • file
    • @@ -2259,7 +2286,7 @@
    • incidents

    Responses

    Response samples

    Content type
    application/json
    [
    • {
      }
    ]

    rulereports

    List rule reports.

    Each report collates issues by ruleset/rule. +

    Response samples

    Content type
    application/json
    [
    • {
      }
    ]

    rulereports

    List rule reports.

    Each report collates issues by ruleset/rule. filters:

    • ruleset
    • @@ -2270,6 +2297,8 @@
    • applications
    • application.id
    • application.name
    • +
    • businessService.id
    • +
    • businessService.name
    • tag.id sort:
    • ruleset
    • @@ -2279,25 +2308,32 @@
    • applications

    Responses

    Response samples

    Content type
    application/json
    [
    • {
      }
    ]

    applications

    List all applications.

    List all applications.

    +

    Response samples

    Content type
    application/json
    [
    • {
      }
    ]

    applications

    List all applications.

    List all applications.

    Responses

    Response samples

    Content type
    application/json
    [
    • {
      }
    ]

    Create an application.

    Create an application.

    +

    Response samples

    Content type
    application/json
    [
    • {
      }
    ]

    Create an application.

    Create an application.

    Request Body schema: application/json

    Application data

    -
    binary
    string
    object (api.Ref)
    object (api.Ref)
    comments
    string
    Array of objects (api.Ref) [ items ]
    createTime
    string
    createUser
    string
    description
    string
    id
    integer
    Array of objects (api.Ref) [ items ]
    object (api.Ref)
    name
    required
    string
    object (api.Ref)
    object (api.Repository)
    object (api.Ref)
    Array of objects (api.TagRef) [ items ]
    updateUser
    string

    Responses

    Request samples

    Content type
    application/json
    {
    • "binary": "string",
    • "bucket": {
      },
    • "businessService": {
      },
    • "comments": "string",
    • "contributors": [
      ],
    • "createTime": "string",
    • "createUser": "string",
    • "description": "string",
    • "id": 0,
    • "identities": [
      ],
    • "migrationWave": {
      },
    • "name": "string",
    • "owner": {
      },
    • "repository": {
      },
    • "review": {
      },
    • "tags": [
      ],
    • "updateUser": "string"
    }

    Response samples

    Content type
    application/json
    {
    • "binary": "string",
    • "bucket": {
      },
    • "businessService": {
      },
    • "comments": "string",
    • "contributors": [
      ],
    • "createTime": "string",
    • "createUser": "string",
    • "description": "string",
    • "id": 0,
    • "identities": [
      ],
    • "migrationWave": {
      },
    • "name": "string",
    • "owner": {
      },
    • "repository": {
      },
    • "review": {
      },
    • "tags": [
      ],
    • "updateUser": "string"
    }

    Delete a applications.

    Delete applications.

    +
    Array of objects (api.Ref) [ items ]
    assessed
    boolean
    Array of objects (api.Ref) [ items ]
    binary
    string
    object (api.Ref)
    object (api.Ref)
    comments
    string
    Array of objects (api.Ref) [ items ]
    createTime
    string
    createUser
    string
    description
    string
    id
    integer
    Array of objects (api.Ref) [ items ]
    object (api.Ref)
    name
    required
    string
    object (api.Ref)
    object (api.Repository)
    object (api.Ref)
    Array of objects (api.TagRef) [ items ]
    updateUser
    string

    Responses

    Request samples

    Content type
    application/json
    {
    • "archetypes": [
      ],
    • "assessed": true,
    • "assessments": [
      ],
    • "binary": "string",
    • "bucket": {
      },
    • "businessService": {
      },
    • "comments": "string",
    • "contributors": [
      ],
    • "createTime": "string",
    • "createUser": "string",
    • "description": "string",
    • "id": 0,
    • "identities": [
      ],
    • "migrationWave": {
      },
    • "name": "string",
    • "owner": {
      },
    • "repository": {
      },
    • "review": {
      },
    • "tags": [
      ],
    • "updateUser": "string"
    }

    Response samples

    Content type
    application/json
    {
    • "archetypes": [
      ],
    • "assessed": true,
    • "assessments": [
      ],
    • "binary": "string",
    • "bucket": {
      },
    • "businessService": {
      },
    • "comments": "string",
    • "contributors": [
      ],
    • "createTime": "string",
    • "createUser": "string",
    • "description": "string",
    • "id": 0,
    • "identities": [
      ],
    • "migrationWave": {
      },
    • "name": "string",
    • "owner": {
      },
    • "repository": {
      },
    • "review": {
      },
    • "tags": [
      ],
    • "updateUser": "string"
    }

    Delete a applications.

    Delete applications.

    Request Body schema: application/json

    List of id

    Array
    integer

    Responses

    Request samples

    Content type
    application/json
    [
    • 0
    ]

    Get an application by ID.

    Get an application by ID.

    +

    Request samples

    Content type
    application/json
    [
    • 0
    ]

    Get an application by ID.

    Get an application by ID.

    path Parameters
    id
    required
    integer

    Application ID

    Responses

    Response samples

    Content type
    application/json
    {
    • "binary": "string",
    • "bucket": {
      },
    • "businessService": {
      },
    • "comments": "string",
    • "contributors": [
      ],
    • "createTime": "string",
    • "createUser": "string",
    • "description": "string",
    • "id": 0,
    • "identities": [
      ],
    • "migrationWave": {
      },
    • "name": "string",
    • "owner": {
      },
    • "repository": {
      },
    • "review": {
      },
    • "tags": [
      ],
    • "updateUser": "string"
    }

    Update an application.

    Update an application.

    +

    Response samples

    Content type
    application/json
    {
    • "archetypes": [
      ],
    • "assessed": true,
    • "assessments": [
      ],
    • "binary": "string",
    • "bucket": {
      },
    • "businessService": {
      },
    • "comments": "string",
    • "contributors": [
      ],
    • "createTime": "string",
    • "createUser": "string",
    • "description": "string",
    • "id": 0,
    • "identities": [
      ],
    • "migrationWave": {
      },
    • "name": "string",
    • "owner": {
      },
    • "repository": {
      },
    • "review": {
      },
    • "tags": [
      ],
    • "updateUser": "string"
    }

    Update an application.

    Update an application.

    path Parameters
    id
    required
    integer

    Application id

    Request Body schema: application/json

    Application data

    -
    binary
    string
    object (api.Ref)
    object (api.Ref)
    comments
    string
    Array of objects (api.Ref) [ items ]
    createTime
    string
    createUser
    string
    description
    string
    id
    integer
    Array of objects (api.Ref) [ items ]
    object (api.Ref)
    name
    required
    string
    object (api.Ref)
    object (api.Repository)
    object (api.Ref)
    Array of objects (api.TagRef) [ items ]
    updateUser
    string

    Responses

    Request samples

    Content type
    application/json
    {
    • "binary": "string",
    • "bucket": {
      },
    • "businessService": {
      },
    • "comments": "string",
    • "contributors": [
      ],
    • "createTime": "string",
    • "createUser": "string",
    • "description": "string",
    • "id": 0,
    • "identities": [
      ],
    • "migrationWave": {
      },
    • "name": "string",
    • "owner": {
      },
    • "repository": {
      },
    • "review": {
      },
    • "tags": [
      ],
    • "updateUser": "string"
    }

    Delete an application.

    Delete an application.

    +
    Array of objects (api.Ref) [ items ]
    assessed
    boolean
    Array of objects (api.Ref) [ items ]
    binary
    string
    object (api.Ref)
    object (api.Ref)
    comments
    string
    Array of objects (api.Ref) [ items ]
    createTime
    string
    createUser
    string
    description
    string
    id
    integer
    Array of objects (api.Ref) [ items ]
    object (api.Ref)
    name
    required
    string
    object (api.Ref)
    object (api.Repository)
    object (api.Ref)
    Array of objects (api.TagRef) [ items ]
    updateUser
    string

    Responses

    Request samples

    Content type
    application/json
    {
    • "archetypes": [
      ],
    • "assessed": true,
    • "assessments": [
      ],
    • "binary": "string",
    • "bucket": {
      },
    • "businessService": {
      },
    • "comments": "string",
    • "contributors": [
      ],
    • "createTime": "string",
    • "createUser": "string",
    • "description": "string",
    • "id": 0,
    • "identities": [
      ],
    • "migrationWave": {
      },
    • "name": "string",
    • "owner": {
      },
    • "repository": {
      },
    • "review": {
      },
    • "tags": [
      ],
    • "updateUser": "string"
    }

    Delete an application.

    Delete an application.

    path Parameters
    id
    required
    integer

    Application id

    Responses

    Get bucket content by ID and path.

    Get bucket content by ID and path. +

    List the assessments of an Application and any it inherits from its archetypes.

    List the assessments of an Application and any it inherits from its archetypes.

    +
    path Parameters
    id
    required
    integer

    Application ID

    +

    Responses

    Create an application assessment.

    Create an application assessment.

    +
    Request Body schema: application/json

    Assessment data

    +
    object (api.Ref)
    object (api.Ref)
    confidence
    integer
    createTime
    string
    createUser
    string
    id
    integer
    required
    object (api.Ref)
    risk
    string

    read only

    +
    object (assessment.RiskMessages)
    Array of objects (assessment.Section) [ items ]
    Array of objects (api.Ref) [ items ]
    Array of objects (api.Ref) [ items ]
    status
    string
    object (assessment.Thresholds)
    updateUser
    string

    Responses

    Request samples

    Content type
    application/json
    {
    • "application": {
      },
    • "archetype": {
      },
    • "confidence": 0,
    • "createTime": "string",
    • "createUser": "string",
    • "id": 0,
    • "questionnaire": {
      },
    • "risk": "string",
    • "riskMessages": {
      },
    • "sections": [
      ],
    • "stakeholderGroups": [
      ],
    • "stakeholders": [
      ],
    • "status": "string",
    • "thresholds": {
      },
    • "updateUser": "string"
    }

    Response samples

    Content type
    application/json
    {
    • "application": {
      },
    • "archetype": {
      },
    • "confidence": 0,
    • "createTime": "string",
    • "createUser": "string",
    • "id": 0,
    • "questionnaire": {
      },
    • "risk": "string",
    • "riskMessages": {
      },
    • "sections": [
      ],
    • "stakeholderGroups": [
      ],
    • "stakeholders": [
      ],
    • "status": "string",
    • "thresholds": {
      },
    • "updateUser": "string"
    }

    Get bucket content by ID and path.

    Get bucket content by ID and path. Returns index.html for directories when Accept=text/html else a tarball. ?filter=glob supports directory content filtering.

    path Parameters
    id
    required
    string

    Application ID

    @@ -2313,18 +2349,18 @@
    path Parameters
    id
    required
    string

    Application ID

    Request Body schema: application/json

    Fact data

    key
    string
    source
    string
    value
    any

    Responses

    Request samples

    Content type
    application/json
    {
    • "key": "string",
    • "source": "string",
    • "value": null
    }

    Get fact by name.

    Get fact by name. +

    Request samples

    Content type
    application/json
    {
    • "key": "string",
    • "source": "string",
    • "value": null
    }

    Get fact by name.

    Get fact by name. see api.FactKey for details on key parameter format.

    path Parameters
    id
    required
    string

    Application ID

    key
    required
    string

    Fact key

    Responses

    Response samples

    Content type
    application/json
    { }

    Update (or create) a fact.

    Update (or create) a fact. +

    Response samples

    Content type
    application/json
    { }

    Update (or create) a fact.

    Update (or create) a fact. see api.FactKey for details on key parameter format.

    path Parameters
    id
    required
    string

    Application ID

    key
    required
    string

    Fact key

    Request Body schema: application/json

    Fact value

    object

    Responses

    Request samples

    Content type
    application/json
    { }

    Delete a fact.

    Delete a fact. +

    Request samples

    Content type
    application/json
    { }

    Delete a fact.

    Delete a fact. see api.FactKey for details on key parameter format.

    path Parameters
    id
    required
    string

    Application ID

    key
    required
    string

    Fact key

    @@ -2334,79 +2370,131 @@
    path Parameters
    id
    required
    string

    Application ID

    source
    required
    string

    Source key

    Responses

    Response samples

    Content type
    application/json
    { }

    Replace all facts from a source.

    Replace all facts from a source. +

    Response samples

    Content type
    application/json
    { }

    Replace all facts from a source.

    Replace all facts from a source. see api.FactKey for details on key parameter format.

    path Parameters
    id
    required
    string

    Application ID

    source
    required
    string

    Fact key

    Request Body schema: application/json

    Fact map

    property name*
    any

    Responses

    Request samples

    Content type
    application/json
    { }

    Update the owner and contributors of an Application.

    Update the owner and contributors of an Application.

    +

    Request samples

    Content type
    application/json
    { }

    Update the owner and contributors of an Application.

    Update the owner and contributors of an Application.

    path Parameters
    id
    required
    integer

    Application ID

    Request Body schema: application/json

    Application stakeholders

    Array of objects (api.Ref) [ items ]
    object (api.Ref)

    Responses

    Request samples

    Content type
    application/json
    {
    • "contributors": [
      ],
    • "owner": {
      }
    }

    Add tag association.

    Ensure tag is associated with the application.

    +

    Request samples

    Content type
    application/json
    {
    • "contributors": [
      ],
    • "owner": {
      }
    }

    List tag references.

    List tag references.

    +
    path Parameters
    id
    required
    string

    Application ID

    +

    Responses

    Response samples

    Content type
    application/json
    [
    • {
      }
    ]

    Add tag association.

    Ensure tag is associated with the application.

    Request Body schema: application/json

    Tag data

    id
    required
    integer
    name
    string

    Responses

    Request samples

    Content type
    application/json
    {
    • "id": 0,
    • "name": "string"
    }

    Response samples

    Content type
    application/json
    {
    • "id": 0,
    • "name": "string"
    }

    Replace tag associations.

    Replace tag associations.

    +

    Request samples

    Content type
    application/json
    {
    • "id": 0,
    • "name": "string"
    }

    Response samples

    Content type
    application/json
    {
    • "id": 0,
    • "name": "string"
    }

    Replace tag associations.

    Replace tag associations.

    path Parameters
    id
    required
    string

    Application ID

    query Parameters
    source
    string

    Source

    Request Body schema: application/json

    Tag references

    -
    Array
    id
    required
    integer
    name
    string
    source
    string

    Responses

    Request samples

    Content type
    application/json
    [
    • {
      }
    ]

    List tag references.

    List tag references.

    -
    path Parameters
    id
    required
    string

    Application ID

    -

    Responses

    Response samples

    Content type
    application/json
    [
    • {
      }
    ]

    Delete tag association.

    Ensure tag is not associated with the application.

    +
    Array
    id
    required
    integer
    name
    string
    source
    string
    virtual
    boolean

    Responses

    Request samples

    Content type
    application/json
    [
    • {
      }
    ]

    Delete tag association.

    Ensure tag is not associated with the application.

    path Parameters
    id
    required
    string

    Application ID

    sid
    required
    string

    Tag ID

    Responses

    auth

    Login and obtain a bearer token.

    Login and obtain a bearer token.

    +

    archetypes

    List all archetypes.

    List all archetypes.

    +

    Responses

    Response samples

    Content type
    application/json
    [
    • {
      }
    ]

    Create an archetype.

    Create an archetype.

    +
    Request Body schema: application/json

    Archetype data

    +
    Array of objects (api.Ref) [ items ]
    assessed
    boolean
    Array of objects (api.Ref) [ items ]
    comments
    string
    createTime
    string
    createUser
    string
    Array of objects (api.TagRef) [ items ]
    description
    string
    id
    integer
    name
    string
    object (api.Ref)
    Array of objects (api.Ref) [ items ]
    Array of objects (api.Ref) [ items ]
    Array of objects (api.TagRef) [ items ]
    updateUser
    string

    Responses

    Request samples

    Content type
    application/json
    {
    • "applications": [
      ],
    • "assessed": true,
    • "assessments": [
      ],
    • "comments": "string",
    • "createTime": "string",
    • "createUser": "string",
    • "criteria": [
      ],
    • "description": "string",
    • "id": 0,
    • "name": "string",
    • "review": {
      },
    • "stakeholderGroups": [
      ],
    • "stakeholders": [
      ],
    • "tags": [
      ],
    • "updateUser": "string"
    }

    Response samples

    Content type
    application/json
    {
    • "applications": [
      ],
    • "assessed": true,
    • "assessments": [
      ],
    • "comments": "string",
    • "createTime": "string",
    • "createUser": "string",
    • "criteria": [
      ],
    • "description": "string",
    • "id": 0,
    • "name": "string",
    • "review": {
      },
    • "stakeholderGroups": [
      ],
    • "stakeholders": [
      ],
    • "tags": [
      ],
    • "updateUser": "string"
    }

    Get an archetype by ID.

    Get an archetype by ID.

    +
    path Parameters
    id
    required
    string

    Archetype ID

    +

    Responses

    Response samples

    Content type
    application/json
    {
    • "applications": [
      ],
    • "assessed": true,
    • "assessments": [
      ],
    • "comments": "string",
    • "createTime": "string",
    • "createUser": "string",
    • "criteria": [
      ],
    • "description": "string",
    • "id": 0,
    • "name": "string",
    • "review": {
      },
    • "stakeholderGroups": [
      ],
    • "stakeholders": [
      ],
    • "tags": [
      ],
    • "updateUser": "string"
    }

    Update an archetype.

    Update an archetype.

    +
    path Parameters
    id
    required
    string

    Archetype ID

    +
    Request Body schema: application/json

    Archetype data

    +
    Array of objects (api.Ref) [ items ]
    assessed
    boolean
    Array of objects (api.Ref) [ items ]
    comments
    string
    createTime
    string
    createUser
    string
    Array of objects (api.TagRef) [ items ]
    description
    string
    id
    integer
    name
    string
    object (api.Ref)
    Array of objects (api.Ref) [ items ]
    Array of objects (api.Ref) [ items ]
    Array of objects (api.TagRef) [ items ]
    updateUser
    string

    Responses

    Request samples

    Content type
    application/json
    {
    • "applications": [
      ],
    • "assessed": true,
    • "assessments": [
      ],
    • "comments": "string",
    • "createTime": "string",
    • "createUser": "string",
    • "criteria": [
      ],
    • "description": "string",
    • "id": 0,
    • "name": "string",
    • "review": {
      },
    • "stakeholderGroups": [
      ],
    • "stakeholders": [
      ],
    • "tags": [
      ],
    • "updateUser": "string"
    }

    Delete an archetype.

    Delete an archetype.

    +
    path Parameters
    id
    required
    string

    Archetype ID

    +

    Responses

    List the assessments of an archetype.

    List the assessments of an archetype.

    +
    path Parameters
    id
    required
    integer

    Archetype ID

    +

    Responses

    Create an archetype assessment.

    Create an archetype assessment.

    +
    Request Body schema: application/json

    Assessment data

    +
    object (api.Ref)
    object (api.Ref)
    confidence
    integer
    createTime
    string
    createUser
    string
    id
    integer
    required
    object (api.Ref)
    risk
    string

    read only

    +
    object (assessment.RiskMessages)
    Array of objects (assessment.Section) [ items ]
    Array of objects (api.Ref) [ items ]
    Array of objects (api.Ref) [ items ]
    status
    string
    object (assessment.Thresholds)
    updateUser
    string

    Responses

    Request samples

    Content type
    application/json
    {
    • "application": {
      },
    • "archetype": {
      },
    • "confidence": 0,
    • "createTime": "string",
    • "createUser": "string",
    • "id": 0,
    • "questionnaire": {
      },
    • "risk": "string",
    • "riskMessages": {
      },
    • "sections": [
      ],
    • "stakeholderGroups": [
      ],
    • "stakeholders": [
      ],
    • "status": "string",
    • "thresholds": {
      },
    • "updateUser": "string"
    }

    Response samples

    Content type
    application/json
    {
    • "application": {
      },
    • "archetype": {
      },
    • "confidence": 0,
    • "createTime": "string",
    • "createUser": "string",
    • "id": 0,
    • "questionnaire": {
      },
    • "risk": "string",
    • "riskMessages": {
      },
    • "sections": [
      ],
    • "stakeholderGroups": [
      ],
    • "stakeholders": [
      ],
    • "status": "string",
    • "thresholds": {
      },
    • "updateUser": "string"
    }

    assessments

    List all assessments.

    List all assessments.

    +

    Responses

    Response samples

    Content type
    application/json
    [
    • {
      }
    ]

    Update an assessment.

    Update an assessment.

    +
    path Parameters
    id
    required
    string

    Assessment ID

    +
    Request Body schema: application/json

    Assessment data

    +
    object (api.Ref)
    object (api.Ref)
    confidence
    integer
    createTime
    string
    createUser
    string
    id
    integer
    required
    object (api.Ref)
    risk
    string

    read only

    +
    object (assessment.RiskMessages)
    Array of objects (assessment.Section) [ items ]
    Array of objects (api.Ref) [ items ]
    Array of objects (api.Ref) [ items ]
    status
    string
    object (assessment.Thresholds)
    updateUser
    string

    Responses

    Request samples

    Content type
    application/json
    {
    • "application": {
      },
    • "archetype": {
      },
    • "confidence": 0,
    • "createTime": "string",
    • "createUser": "string",
    • "id": 0,
    • "questionnaire": {
      },
    • "risk": "string",
    • "riskMessages": {
      },
    • "sections": [
      ],
    • "stakeholderGroups": [
      ],
    • "stakeholders": [
      ],
    • "status": "string",
    • "thresholds": {
      },
    • "updateUser": "string"
    }

    Delete an assessment.

    Delete an assessment.

    +
    path Parameters
    id
    required
    string

    Assessment ID

    +

    Responses

    questionnaires

    Get an assessment by ID.

    Get an assessment by ID.

    +
    path Parameters
    id
    required
    string

    Assessment ID

    +

    Responses

    Response samples

    Content type
    application/json
    {
    • "application": {
      },
    • "archetype": {
      },
    • "confidence": 0,
    • "createTime": "string",
    • "createUser": "string",
    • "id": 0,
    • "questionnaire": {
      },
    • "risk": "string",
    • "riskMessages": {
      },
    • "sections": [
      ],
    • "stakeholderGroups": [
      ],
    • "stakeholders": [
      ],
    • "status": "string",
    • "thresholds": {
      },
    • "updateUser": "string"
    }

    List all questionnaires.

    List all questionnaires.

    +

    Responses

    Response samples

    Content type
    application/json
    [
    • {
      }
    ]

    Create a questionnaire.

    Create a questionnaire.

    +
    Request Body schema: application/json

    Questionnaire data

    +
    builtin
    boolean
    createTime
    string
    createUser
    string
    description
    string
    id
    integer
    name
    required
    string
    required
    boolean
    required
    object (assessment.RiskMessages)
    required
    Array of objects (assessment.Section) [ items ]
    required
    object (assessment.Thresholds)
    updateUser
    string

    Responses

    Request samples

    Content type
    application/json
    {
    • "builtin": true,
    • "createTime": "string",
    • "createUser": "string",
    • "description": "string",
    • "id": 0,
    • "name": "string",
    • "required": true,
    • "riskMessages": {
      },
    • "sections": [
      ],
    • "thresholds": {
      },
    • "updateUser": "string"
    }

    Response samples

    Content type
    application/json
    {
    • "builtin": true,
    • "createTime": "string",
    • "createUser": "string",
    • "description": "string",
    • "id": 0,
    • "name": "string",
    • "required": true,
    • "riskMessages": {
      },
    • "sections": [
      ],
    • "thresholds": {
      },
    • "updateUser": "string"
    }

    Get a questionnaire by ID.

    Get a questionnaire by ID.

    +
    path Parameters
    id
    required
    string

    Questionnaire ID

    +

    Responses

    Response samples

    Content type
    application/json
    {
    • "builtin": true,
    • "createTime": "string",
    • "createUser": "string",
    • "description": "string",
    • "id": 0,
    • "name": "string",
    • "required": true,
    • "riskMessages": {
      },
    • "sections": [
      ],
    • "thresholds": {
      },
    • "updateUser": "string"
    }

    Update a questionnaire.

    Update a questionnaire. If the Questionnaire +is builtin, only its "required" field can be changed +and all other fields will be ignored.

    +
    path Parameters
    id
    required
    string

    Questionnaire ID

    +
    Request Body schema: application/json

    Questionnaire data

    +
    builtin
    boolean
    createTime
    string
    createUser
    string
    description
    string
    id
    integer
    name
    required
    string
    required
    boolean
    required
    object (assessment.RiskMessages)
    required
    Array of objects (assessment.Section) [ items ]
    required
    object (assessment.Thresholds)
    updateUser
    string

    Responses

    Request samples

    Content type
    application/json
    {
    • "builtin": true,
    • "createTime": "string",
    • "createUser": "string",
    • "description": "string",
    • "id": 0,
    • "name": "string",
    • "required": true,
    • "riskMessages": {
      },
    • "sections": [
      ],
    • "thresholds": {
      },
    • "updateUser": "string"
    }

    Delete a questionnaire.

    Delete a questionnaire.

    +
    path Parameters
    id
    required
    string

    Questionnaire ID

    +

    Responses

    auth

    Login and obtain a bearer token.

    Login and obtain a bearer token.

    Responses

    Response samples

    Content type
    application/json
    {
    • "expiry": 0,
    • "password": "string",
    • "refresh": "string",
    • "token": "string",
    • "user": "string"
    }

    Refresh bearer token.

    Refresh bearer token.

    +

    Response samples

    Content type
    application/json
    {
    • "expiry": 0,
    • "password": "string",
    • "refresh": "string",
    • "token": "string",
    • "user": "string"
    }

    Refresh bearer token.

    Refresh bearer token.

    Responses

    Response samples

    Content type
    application/json
    {
    • "expiry": 0,
    • "password": "string",
    • "refresh": "string",
    • "token": "string",
    • "user": "string"
    }

    batch

    Batch-create Tags.

    Batch-create Tags.

    +

    Response samples

    Content type
    application/json
    {
    • "expiry": 0,
    • "password": "string",
    • "refresh": "string",
    • "token": "string",
    • "user": "string"
    }

    batch

    Batch-create Tags.

    Batch-create Tags.

    Request Body schema: application/json

    Tags data

    Array
    required
    object (api.Ref)
    createTime
    string
    createUser
    string
    id
    integer
    name
    required
    string
    updateUser
    string

    Responses

    Request samples

    Content type
    application/json
    [
    • {
      }
    ]

    Response samples

    Content type
    application/json
    [
    • {
      }
    ]

    Batch-create Tickets.

    Batch-create Tickets.

    +

    Request samples

    Content type
    application/json
    [
    • {
      }
    ]

    Response samples

    Content type
    application/json
    [
    • {
      }
    ]

    Batch-create Tickets.

    Batch-create Tickets.

    Request Body schema: application/json

    Tickets data

    Array
    required
    object (api.Ref)
    createTime
    string
    createUser
    string
    error
    boolean
    object (api.Fields)
    id
    integer
    kind
    required
    string
    lastUpdated
    string
    link
    string
    message
    string
    parent
    required
    string
    reference
    string
    status
    string
    required
    object (api.Ref)
    updateUser
    string

    Responses

    Request samples

    Content type
    application/json
    [
    • {
      }
    ]

    Response samples

    Content type
    application/json
    [
    • {
      }
    ]

    tags

    Batch-create Tags.

    Batch-create Tags.

    +

    Request samples

    Content type
    application/json
    [
    • {
      }
    ]

    Response samples

    Content type
    application/json
    [
    • {
      }
    ]

    tags

    Batch-create Tags.

    Batch-create Tags.

    Request Body schema: application/json

    Tags data

    Array
    required
    object (api.Ref)
    createTime
    string
    createUser
    string
    id
    integer
    name
    required
    string
    updateUser
    string

    Responses

    Request samples

    Content type
    application/json
    [
    • {
      }
    ]

    Response samples

    Content type
    application/json
    [
    • {
      }
    ]

    List all tags.

    List all tags.

    +

    Request samples

    Content type
    application/json
    [
    • {
      }
    ]

    Response samples

    Content type
    application/json
    [
    • {
      }
    ]

    List all tags.

    List all tags.

    Responses

    Response samples

    Content type
    application/json
    [
    • {
      }
    ]

    Create a tag.

    Create a tag.

    +

    Response samples

    Content type
    application/json
    [
    • {
      }
    ]

    Create a tag.

    Create a tag.

    Request Body schema: application/json

    Tag data

    required
    object (api.Ref)
    createTime
    string
    createUser
    string
    id
    integer
    name
    required
    string
    updateUser
    string

    Responses

    Request samples

    Content type
    application/json
    {
    • "category": {
      },
    • "createTime": "string",
    • "createUser": "string",
    • "id": 0,
    • "name": "string",
    • "updateUser": "string"
    }

    Response samples

    Content type
    application/json
    {
    • "category": {
      },
    • "createTime": "string",
    • "createUser": "string",
    • "id": 0,
    • "name": "string",
    • "updateUser": "string"
    }

    Get a tag by ID.

    Get a tag by ID.

    +

    Request samples

    Content type
    application/json
    {
    • "category": {
      },
    • "createTime": "string",
    • "createUser": "string",
    • "id": 0,
    • "name": "string",
    • "updateUser": "string"
    }

    Response samples

    Content type
    application/json
    {
    • "category": {
      },
    • "createTime": "string",
    • "createUser": "string",
    • "id": 0,
    • "name": "string",
    • "updateUser": "string"
    }

    Get a tag by ID.

    Get a tag by ID.

    path Parameters
    id
    required
    string

    Tag ID

    Responses

    Response samples

    Content type
    application/json
    {
    • "category": {
      },
    • "createTime": "string",
    • "createUser": "string",
    • "id": 0,
    • "name": "string",
    • "updateUser": "string"
    }

    Update a tag.

    Update a tag.

    +

    Response samples

    Content type
    application/json
    {
    • "category": {
      },
    • "createTime": "string",
    • "createUser": "string",
    • "id": 0,
    • "name": "string",
    • "updateUser": "string"
    }

    Update a tag.

    Update a tag.

    path Parameters
    id
    required
    string

    Tag ID

    Request Body schema: application/json

    Tag data

    required
    object (api.Ref)
    createTime
    string
    createUser
    string
    id
    integer
    name
    required
    string
    updateUser
    string

    Responses

    Request samples

    Content type
    application/json
    {
    • "category": {
      },
    • "createTime": "string",
    • "createUser": "string",
    • "id": 0,
    • "name": "string",
    • "updateUser": "string"
    }

    Delete a tag.

    Delete a tag.

    +

    Request samples

    Content type
    application/json
    {
    • "category": {
      },
    • "createTime": "string",
    • "createUser": "string",
    • "id": 0,
    • "name": "string",
    • "updateUser": "string"
    }

    Delete a tag.

    Delete a tag.

    path Parameters
    id
    required
    string

    Tag ID

    Responses

    tickets

    Batch-create Tickets.

    Batch-create Tickets.

    Request Body schema: application/json

    Tickets data

    Array
    required
    object (api.Ref)
    createTime
    string
    createUser
    string
    error
    boolean
    object (api.Fields)
    id
    integer
    kind
    required
    string
    lastUpdated
    string
    link
    string
    message
    string
    parent
    required
    string
    reference
    string
    status
    string
    required
    object (api.Ref)
    updateUser
    string

    Responses

    Request samples

    Content type
    application/json
    [
    • {
      }
    ]

    Response samples

    Content type
    application/json
    [
    • {
      }
    ]

    List all tickets.

    List all tickets.

    +

    Request samples

    Content type
    application/json
    [
    • {
      }
    ]

    Response samples

    Content type
    application/json
    [
    • {
      }
    ]

    List all tickets.

    List all tickets.

    Responses

    Response samples

    Content type
    application/json
    [
    • {
      }
    ]

    Create a ticket.

    Create a ticket.

    +

    Response samples

    Content type
    application/json
    [
    • {
      }
    ]

    Create a ticket.

    Create a ticket.

    Request Body schema: application/json

    Ticket data

    required
    object (api.Ref)
    createTime
    string
    createUser
    string
    error
    boolean
    object (api.Fields)
    id
    integer
    kind
    required
    string
    lastUpdated
    string
    link
    string
    message
    string
    parent
    required
    string
    reference
    string
    status
    string
    required
    object (api.Ref)
    updateUser
    string

    Responses

    Request samples

    Content type
    application/json
    {
    • "application": {
      },
    • "createTime": "string",
    • "createUser": "string",
    • "error": true,
    • "fields": { },
    • "id": 0,
    • "kind": "string",
    • "lastUpdated": "string",
    • "link": "string",
    • "message": "string",
    • "parent": "string",
    • "reference": "string",
    • "status": "string",
    • "tracker": {
      },
    • "updateUser": "string"
    }

    Response samples

    Content type
    application/json
    {
    • "application": {
      },
    • "createTime": "string",
    • "createUser": "string",
    • "error": true,
    • "fields": { },
    • "id": 0,
    • "kind": "string",
    • "lastUpdated": "string",
    • "link": "string",
    • "message": "string",
    • "parent": "string",
    • "reference": "string",
    • "status": "string",
    • "tracker": {
      },
    • "updateUser": "string"
    }

    Get a ticket by ID.

    Get a ticket by ID.

    +

    Request samples

    Content type
    application/json
    {
    • "application": {
      },
    • "createTime": "string",
    • "createUser": "string",
    • "error": true,
    • "fields": { },
    • "id": 0,
    • "kind": "string",
    • "lastUpdated": "string",
    • "link": "string",
    • "message": "string",
    • "parent": "string",
    • "reference": "string",
    • "status": "string",
    • "tracker": {
      },
    • "updateUser": "string"
    }

    Response samples

    Content type
    application/json
    {
    • "application": {
      },
    • "createTime": "string",
    • "createUser": "string",
    • "error": true,
    • "fields": { },
    • "id": 0,
    • "kind": "string",
    • "lastUpdated": "string",
    • "link": "string",
    • "message": "string",
    • "parent": "string",
    • "reference": "string",
    • "status": "string",
    • "tracker": {
      },
    • "updateUser": "string"
    }

    Get a ticket by ID.

    Get a ticket by ID.

    path Parameters
    id
    required
    string

    Ticket ID

    Responses

    Response samples

    Content type
    application/json
    {
    • "application": {
      },
    • "createTime": "string",
    • "createUser": "string",
    • "error": true,
    • "fields": { },
    • "id": 0,
    • "kind": "string",
    • "lastUpdated": "string",
    • "link": "string",
    • "message": "string",
    • "parent": "string",
    • "reference": "string",
    • "status": "string",
    • "tracker": {
      },
    • "updateUser": "string"
    }

    Delete a ticket.

    Delete a ticket.

    +

    Response samples

    Content type
    application/json
    {
    • "application": {
      },
    • "createTime": "string",
    • "createUser": "string",
    • "error": true,
    • "fields": { },
    • "id": 0,
    • "kind": "string",
    • "lastUpdated": "string",
    • "link": "string",
    • "message": "string",
    • "parent": "string",
    • "reference": "string",
    • "status": "string",
    • "tracker": {
      },
    • "updateUser": "string"
    }

    Delete a ticket.

    Delete a ticket.

    path Parameters
    id
    required
    integer

    Ticket id

    Responses

    buckets

    List all buckets.

    List all buckets.

    Responses

    Response samples

    Content type
    application/json
    [
    • {
      }
    ]

    Create a bucket.

    Create a bucket.

    +

    Response samples

    Content type
    application/json
    [
    • {
      }
    ]

    Create a bucket.

    Create a bucket.

    path Parameters
    name
    required
    string

    Bucket name

    Responses

    Response samples

    Content type
    application/json
    {
    • "createTime": "string",
    • "createUser": "string",
    • "expiration": "string",
    • "id": 0,
    • "path": "string",
    • "updateUser": "string"
    }

    Get a bucket by ID.

    Get a bucket by ID. +

    Response samples

    Content type
    application/json
    {
    • "createTime": "string",
    • "createUser": "string",
    • "expiration": "string",
    • "id": 0,
    • "path": "string",
    • "updateUser": "string"
    }

    Get a bucket by ID.

    Get a bucket by ID. Returns api.Bucket when Accept=application/json. Else returns index.html when Accept=text/html. Else returns tarball.

    @@ -2431,17 +2519,17 @@

    Responses

    businessservices

    List all business services.

    List all business services.

    Responses

    Response samples

    Content type
    application/json
    {
    • "createTime": "string",
    • "createUser": "string",
    • "description": "string",
    • "id": 0,
    • "name": "string",
    • "owner": {
      },
    • "updateUser": "string"
    }

    Create a business service.

    Create a business service.

    +

    Response samples

    Content type
    application/json
    {
    • "createTime": "string",
    • "createUser": "string",
    • "description": "string",
    • "id": 0,
    • "name": "string",
    • "owner": {
      },
    • "updateUser": "string"
    }

    Create a business service.

    Create a business service.

    Request Body schema: application/json

    Business service data

    createTime
    string
    createUser
    string
    description
    string
    id
    integer
    name
    required
    string
    object (api.Ref)
    updateUser
    string

    Responses

    Request samples

    Content type
    application/json
    {
    • "createTime": "string",
    • "createUser": "string",
    • "description": "string",
    • "id": 0,
    • "name": "string",
    • "owner": {
      },
    • "updateUser": "string"
    }

    Response samples

    Content type
    application/json
    {
    • "createTime": "string",
    • "createUser": "string",
    • "description": "string",
    • "id": 0,
    • "name": "string",
    • "owner": {
      },
    • "updateUser": "string"
    }

    Get a business service by ID.

    Get a business service by ID.

    +

    Request samples

    Content type
    application/json
    {
    • "createTime": "string",
    • "createUser": "string",
    • "description": "string",
    • "id": 0,
    • "name": "string",
    • "owner": {
      },
    • "updateUser": "string"
    }

    Response samples

    Content type
    application/json
    {
    • "createTime": "string",
    • "createUser": "string",
    • "description": "string",
    • "id": 0,
    • "name": "string",
    • "owner": {
      },
    • "updateUser": "string"
    }

    Get a business service by ID.

    Get a business service by ID.

    path Parameters
    id
    required
    string

    Business Service ID

    Responses

    Response samples

    Content type
    application/json
    {
    • "createTime": "string",
    • "createUser": "string",
    • "description": "string",
    • "id": 0,
    • "name": "string",
    • "owner": {
      },
    • "updateUser": "string"
    }

    Update a business service.

    Update a business service.

    +

    Response samples

    Content type
    application/json
    {
    • "createTime": "string",
    • "createUser": "string",
    • "description": "string",
    • "id": 0,
    • "name": "string",
    • "owner": {
      },
    • "updateUser": "string"
    }

    Update a business service.

    Update a business service.

    path Parameters
    id
    required
    string

    Business service ID

    Request Body schema: application/json

    Business service data

    createTime
    string
    createUser
    string
    description
    string
    id
    integer
    name
    required
    string
    object (api.Ref)
    updateUser
    string

    Responses

    Request samples

    Content type
    application/json
    {
    • "createTime": "string",
    • "createUser": "string",
    • "description": "string",
    • "id": 0,
    • "name": "string",
    • "owner": {
      },
    • "updateUser": "string"
    }

    Delete a business service.

    Delete a business service.

    +

    Request samples

    Content type
    application/json
    {
    • "createTime": "string",
    • "createUser": "string",
    • "description": "string",
    • "id": 0,
    • "name": "string",
    • "owner": {
      },
    • "updateUser": "string"
    }

    Delete a business service.

    Delete a business service.

    path Parameters
    id
    required
    string

    Business service ID

    Responses

    cache

    Delete a directory within the cache.

    Delete a directory within the cache.

    @@ -2449,12 +2537,12 @@

    Get the cache.

    Get the cache.

    path Parameters
    name
    required
    string

    Cache DIR

    Responses

    Response samples

    Content type
    application/json
    {
    • "capacity": "string",
    • "exists": true,
    • "path": "string",
    • "used": "string"
    }

    file

    List all files.

    List all files.

    +

    Response samples

    Content type
    application/json
    {
    • "capacity": "string",
    • "exists": true,
    • "path": "string",
    • "used": "string"
    }

    file

    List all files.

    List all files.

    Responses

    Response samples

    Content type
    application/json
    [
    • {
      }
    ]

    Create a file.

    Create a file.

    +

    Response samples

    Content type
    application/json
    [
    • {
      }
    ]

    Create a file.

    Create a file.

    path Parameters
    name
    required
    string

    File name

    Responses

    Response samples

    Content type
    application/json
    {
    • "createTime": "string",
    • "createUser": "string",
    • "expiration": "string",
    • "id": 0,
    • "name": "string",
    • "path": "string",
    • "updateUser": "string"
    }

    Get a file by ID.

    Get a file by ID. Returns api.File when Accept=application/json else the file content.

    +

    Response samples

    Content type
    application/json
    {
    • "createTime": "string",
    • "createUser": "string",
    • "expiration": "string",
    • "id": 0,
    • "name": "string",
    • "path": "string",
    • "updateUser": "string"
    }

    Get a file by ID.

    Get a file by ID. Returns api.File when Accept=application/json else the file content.

    path Parameters
    id
    required
    string

    File ID

    Responses

    Delete a file.

    Delete a file.

    @@ -2462,53 +2550,53 @@

    Responses

    identities

    List all identities.

    List all identities.

    Responses

    Response samples

    Content type
    application/json
    [
    • {
      }
    ]

    Create an identity.

    Create an identity.

    +

    Response samples

    Content type
    application/json
    [
    • {
      }
    ]

    Create an identity.

    Create an identity.

    Request Body schema: application/json

    Identity data

    createTime
    string
    createUser
    string
    description
    string
    id
    integer
    key
    string
    kind
    required
    string
    name
    required
    string
    password
    string
    settings
    string
    updateUser
    string
    user
    string

    Responses

    Request samples

    Content type
    application/json
    {
    • "createTime": "string",
    • "createUser": "string",
    • "description": "string",
    • "id": 0,
    • "key": "string",
    • "kind": "string",
    • "name": "string",
    • "password": "string",
    • "settings": "string",
    • "updateUser": "string",
    • "user": "string"
    }

    Response samples

    Content type
    application/json
    {
    • "createTime": "string",
    • "createUser": "string",
    • "description": "string",
    • "id": 0,
    • "key": "string",
    • "kind": "string",
    • "name": "string",
    • "password": "string",
    • "settings": "string",
    • "updateUser": "string",
    • "user": "string"
    }

    Get an identity by ID.

    Get an identity by ID.

    +

    Request samples

    Content type
    application/json
    {
    • "createTime": "string",
    • "createUser": "string",
    • "description": "string",
    • "id": 0,
    • "key": "string",
    • "kind": "string",
    • "name": "string",
    • "password": "string",
    • "settings": "string",
    • "updateUser": "string",
    • "user": "string"
    }

    Response samples

    Content type
    application/json
    {
    • "createTime": "string",
    • "createUser": "string",
    • "description": "string",
    • "id": 0,
    • "key": "string",
    • "kind": "string",
    • "name": "string",
    • "password": "string",
    • "settings": "string",
    • "updateUser": "string",
    • "user": "string"
    }

    Get an identity by ID.

    Get an identity by ID.

    path Parameters
    id
    required
    string

    Identity ID

    Responses

    Response samples

    Content type
    application/json
    {
    • "createTime": "string",
    • "createUser": "string",
    • "description": "string",
    • "id": 0,
    • "key": "string",
    • "kind": "string",
    • "name": "string",
    • "password": "string",
    • "settings": "string",
    • "updateUser": "string",
    • "user": "string"
    }

    Update an identity.

    Update an identity.

    +

    Response samples

    Content type
    application/json
    {
    • "createTime": "string",
    • "createUser": "string",
    • "description": "string",
    • "id": 0,
    • "key": "string",
    • "kind": "string",
    • "name": "string",
    • "password": "string",
    • "settings": "string",
    • "updateUser": "string",
    • "user": "string"
    }

    Update an identity.

    Update an identity.

    path Parameters
    id
    required
    string

    Identity ID

    Request Body schema: application/json

    Identity data

    createTime
    string
    createUser
    string
    description
    string
    id
    integer
    key
    string
    kind
    required
    string
    name
    required
    string
    password
    string
    settings
    string
    updateUser
    string
    user
    string

    Responses

    Request samples

    Content type
    application/json
    {
    • "createTime": "string",
    • "createUser": "string",
    • "description": "string",
    • "id": 0,
    • "key": "string",
    • "kind": "string",
    • "name": "string",
    • "password": "string",
    • "settings": "string",
    • "updateUser": "string",
    • "user": "string"
    }

    Delete an identity.

    Delete an identity.

    +

    Request samples

    Content type
    application/json
    {
    • "createTime": "string",
    • "createUser": "string",
    • "description": "string",
    • "id": 0,
    • "key": "string",
    • "kind": "string",
    • "name": "string",
    • "password": "string",
    • "settings": "string",
    • "updateUser": "string",
    • "user": "string"
    }

    Delete an identity.

    Delete an identity.

    path Parameters
    id
    required
    string

    Identity ID

    Responses

    imports

    List imports.

    List imports.

    Responses

    Response samples

    Content type
    application/json
    [
    • { }
    ]

    Get an import by ID.

    Get an import by ID.

    +

    Response samples

    Content type
    application/json
    [
    • { }
    ]

    Get an import by ID.

    Get an import by ID.

    path Parameters
    id
    required
    string

    Import ID

    Responses

    Response samples

    Content type
    application/json
    { }

    Delete an import.

    Delete an import. This leaves any created application or dependency.

    +

    Response samples

    Content type
    application/json
    { }

    Delete an import.

    Delete an import. This leaves any created application or dependency.

    path Parameters
    id
    required
    string

    Import ID

    Responses

    List import summaries.

    List import summaries.

    Responses

    Response samples

    Content type
    application/json
    [
    • {
      }
    ]

    Export the source CSV for a particular import summary.

    Export the source CSV for a particular import summary.

    +

    Response samples

    Content type
    application/json
    [
    • {
      }
    ]

    Export the source CSV for a particular import summary.

    Export the source CSV for a particular import summary.

    query Parameters
    importSummary.id
    required
    string

    ImportSummary ID

    Responses

    Upload a CSV containing applications and dependencies to import.

    Upload a CSV containing applications and dependencies to import.

    Responses

    Response samples

    Content type
    application/json
    {
    • "createEntities": true,
    • "createTime": "string",
    • "createUser": "string",
    • "filename": "string",
    • "id": 0,
    • "importStatus": "string",
    • "importTime": "string",
    • "invalidCount": 0,
    • "updateUser": "string",
    • "validCount": 0
    }

    Get an import summary by ID.

    Get an import by ID.

    +

    Response samples

    Content type
    application/json
    {
    • "createEntities": true,
    • "createTime": "string",
    • "createUser": "string",
    • "filename": "string",
    • "id": 0,
    • "importStatus": "string",
    • "importTime": "string",
    • "invalidCount": 0,
    • "updateUser": "string",
    • "validCount": 0
    }

    Get an import summary by ID.

    Get an import by ID.

    path Parameters
    id
    required
    string

    ImportSummary ID

    Responses

    Response samples

    Content type
    application/json
    {
    • "createEntities": true,
    • "createTime": "string",
    • "createUser": "string",
    • "filename": "string",
    • "id": 0,
    • "importStatus": "string",
    • "importTime": "string",
    • "invalidCount": 0,
    • "updateUser": "string",
    • "validCount": 0
    }

    Delete an import summary and associated import records.

    Delete an import summary and associated import records.

    +

    Response samples

    Content type
    application/json
    {
    • "createEntities": true,
    • "createTime": "string",
    • "createUser": "string",
    • "filename": "string",
    • "id": 0,
    • "importStatus": "string",
    • "importTime": "string",
    • "invalidCount": 0,
    • "updateUser": "string",
    • "validCount": 0
    }

    Delete an import summary and associated import records.

    Delete an import summary and associated import records.

    path Parameters
    id
    required
    string

    ImportSummary ID

    Responses

    jobfunctions

    List all job functions.

    List all job functions.

    Responses

    Response samples

    Content type
    application/json
    [
    • {
      }
    ]

    Create a job function.

    Create a job function.

    +

    Response samples

    Content type
    application/json
    [
    • {
      }
    ]

    Create a job function.

    Create a job function.

    Request Body schema: application/json

    Job Function data

    createTime
    string
    createUser
    string
    id
    integer
    name
    required
    string
    Array of objects (api.Ref) [ items ]
    updateUser
    string

    Responses

    Request samples

    Content type
    application/json
    {
    • "createTime": "string",
    • "createUser": "string",
    • "id": 0,
    • "name": "string",
    • "stakeholders": [
      ],
    • "updateUser": "string"
    }

    Response samples

    Content type
    application/json
    {
    • "createTime": "string",
    • "createUser": "string",
    • "id": 0,
    • "name": "string",
    • "stakeholders": [
      ],
    • "updateUser": "string"
    }

    Get a job function by ID.

    Get a job function by ID.

    +

    Request samples

    Content type
    application/json
    {
    • "createTime": "string",
    • "createUser": "string",
    • "id": 0,
    • "name": "string",
    • "stakeholders": [
      ],
    • "updateUser": "string"
    }

    Response samples

    Content type
    application/json
    {
    • "createTime": "string",
    • "createUser": "string",
    • "id": 0,
    • "name": "string",
    • "stakeholders": [
      ],
    • "updateUser": "string"
    }

    Get a job function by ID.

    Get a job function by ID.

    path Parameters
    id
    required
    string

    Job Function ID

    Responses

    Response samples

    Content type
    application/json
    {
    • "createTime": "string",
    • "createUser": "string",
    • "id": 0,
    • "name": "string",
    • "stakeholders": [
      ],
    • "updateUser": "string"
    }

    Update a job function.

    Update a job function.

    +

    Response samples

    Content type
    application/json
    {
    • "createTime": "string",
    • "createUser": "string",
    • "id": 0,
    • "name": "string",
    • "stakeholders": [
      ],
    • "updateUser": "string"
    }

    Update a job function.

    Update a job function.

    path Parameters
    id
    required
    string

    Job Function ID

    Request Body schema: application/json

    Job Function data

    createTime
    string
    createUser
    string
    id
    integer
    name
    required
    string
    Array of objects (api.Ref) [ items ]
    updateUser
    string

    Responses

    Request samples

    Content type
    application/json
    {
    • "createTime": "string",
    • "createUser": "string",
    • "id": 0,
    • "name": "string",
    • "stakeholders": [
      ],
    • "updateUser": "string"
    }

    Delete a job function.

    Delete a job function.

    +

    Request samples

    Content type
    application/json
    {
    • "createTime": "string",
    • "createUser": "string",
    • "id": 0,
    • "name": "string",
    • "stakeholders": [
      ],
    • "updateUser": "string"
    }

    Delete a job function.

    Delete a job function.

    path Parameters
    id
    required
    string

    Job Function ID

    Responses

    metrics

    Get Prometheus metrics.

    Get Prometheus metrics. @@ -2517,149 +2605,169 @@

    Responses

    migrationwaves

    List all migration waves.

    List all migration waves.

    Responses

    Response samples

    Content type
    application/json
    [
    • {
      }
    ]

    Create a migration wave.

    Create a migration wave.

    +

    Response samples

    Content type
    application/json
    [
    • {
      }
    ]

    Create a migration wave.

    Create a migration wave.

    Request Body schema: application/json

    Migration Wave data

    Array of objects (api.Ref) [ items ]
    createTime
    string
    createUser
    string
    endDate
    string
    id
    integer
    name
    string
    Array of objects (api.Ref) [ items ]
    Array of objects (api.Ref) [ items ]
    startDate
    string
    updateUser
    string

    Responses

    Request samples

    Content type
    application/json
    {
    • "applications": [
      ],
    • "createTime": "string",
    • "createUser": "string",
    • "endDate": "string",
    • "id": 0,
    • "name": "string",
    • "stakeholderGroups": [
      ],
    • "stakeholders": [
      ],
    • "startDate": "string",
    • "updateUser": "string"
    }

    Response samples

    Content type
    application/json
    {
    • "applications": [
      ],
    • "createTime": "string",
    • "createUser": "string",
    • "endDate": "string",
    • "id": 0,
    • "name": "string",
    • "stakeholderGroups": [
      ],
    • "stakeholders": [
      ],
    • "startDate": "string",
    • "updateUser": "string"
    }

    Get a migration wave by ID.

    Get a migration wave by ID.

    +

    Request samples

    Content type
    application/json
    {
    • "applications": [
      ],
    • "createTime": "string",
    • "createUser": "string",
    • "endDate": "string",
    • "id": 0,
    • "name": "string",
    • "stakeholderGroups": [
      ],
    • "stakeholders": [
      ],
    • "startDate": "string",
    • "updateUser": "string"
    }

    Response samples

    Content type
    application/json
    {
    • "applications": [
      ],
    • "createTime": "string",
    • "createUser": "string",
    • "endDate": "string",
    • "id": 0,
    • "name": "string",
    • "stakeholderGroups": [
      ],
    • "stakeholders": [
      ],
    • "startDate": "string",
    • "updateUser": "string"
    }

    Get a migration wave by ID.

    Get a migration wave by ID.

    path Parameters
    id
    required
    integer

    Migration Wave ID

    Responses

    Response samples

    Content type
    application/json
    {
    • "applications": [
      ],
    • "createTime": "string",
    • "createUser": "string",
    • "endDate": "string",
    • "id": 0,
    • "name": "string",
    • "stakeholderGroups": [
      ],
    • "stakeholders": [
      ],
    • "startDate": "string",
    • "updateUser": "string"
    }

    Update a migration wave.

    Update a migration wave.

    +

    Response samples

    Content type
    application/json
    {
    • "applications": [
      ],
    • "createTime": "string",
    • "createUser": "string",
    • "endDate": "string",
    • "id": 0,
    • "name": "string",
    • "stakeholderGroups": [
      ],
    • "stakeholders": [
      ],
    • "startDate": "string",
    • "updateUser": "string"
    }

    Update a migration wave.

    Update a migration wave.

    path Parameters
    id
    required
    integer

    MigrationWave id

    Request Body schema: application/json

    MigrationWave data

    Array of objects (api.Ref) [ items ]
    createTime
    string
    createUser
    string
    endDate
    string
    id
    integer
    name
    string
    Array of objects (api.Ref) [ items ]
    Array of objects (api.Ref) [ items ]
    startDate
    string
    updateUser
    string

    Responses

    Request samples

    Content type
    application/json
    {
    • "applications": [
      ],
    • "createTime": "string",
    • "createUser": "string",
    • "endDate": "string",
    • "id": 0,
    • "name": "string",
    • "stakeholderGroups": [
      ],
    • "stakeholders": [
      ],
    • "startDate": "string",
    • "updateUser": "string"
    }

    Delete a migration wave.

    Delete a migration wave.

    +

    Request samples

    Content type
    application/json
    {
    • "applications": [
      ],
    • "createTime": "string",
    • "createUser": "string",
    • "endDate": "string",
    • "id": 0,
    • "name": "string",
    • "stakeholderGroups": [
      ],
    • "stakeholders": [
      ],
    • "startDate": "string",
    • "updateUser": "string"
    }

    Delete a migration wave.

    Delete a migration wave.

    path Parameters
    id
    required
    integer

    MigrationWave id

    Responses

    proxies

    List all proxies.

    List all proxies.

    Responses

    Response samples

    Content type
    application/json
    [
    • {
      }
    ]

    Create an proxy.

    Create an proxy.

    +

    Response samples

    Content type
    application/json
    [
    • {
      }
    ]

    Create an proxy.

    Create an proxy.

    Request Body schema: application/json

    Proxy data

    createTime
    string
    createUser
    string
    enabled
    boolean
    excluded
    Array of strings
    host
    string
    id
    integer
    object (api.Ref)
    kind
    string
    Enum: "http" "https"
    port
    integer
    updateUser
    string

    Responses

    Request samples

    Content type
    application/json
    {
    • "createTime": "string",
    • "createUser": "string",
    • "enabled": true,
    • "excluded": [
      ],
    • "host": "string",
    • "id": 0,
    • "identity": {
      },
    • "kind": "http",
    • "port": 0,
    • "updateUser": "string"
    }

    Response samples

    Content type
    application/json
    {
    • "createTime": "string",
    • "createUser": "string",
    • "enabled": true,
    • "excluded": [
      ],
    • "host": "string",
    • "id": 0,
    • "identity": {
      },
    • "kind": "http",
    • "port": 0,
    • "updateUser": "string"
    }

    Get an proxy by ID.

    Get an proxy by ID.

    +

    Request samples

    Content type
    application/json
    {
    • "createTime": "string",
    • "createUser": "string",
    • "enabled": true,
    • "excluded": [
      ],
    • "host": "string",
    • "id": 0,
    • "identity": {
      },
    • "kind": "http",
    • "port": 0,
    • "updateUser": "string"
    }

    Response samples

    Content type
    application/json
    {
    • "createTime": "string",
    • "createUser": "string",
    • "enabled": true,
    • "excluded": [
      ],
    • "host": "string",
    • "id": 0,
    • "identity": {
      },
    • "kind": "http",
    • "port": 0,
    • "updateUser": "string"
    }

    Get an proxy by ID.

    Get an proxy by ID.

    path Parameters
    id
    required
    string

    Proxy ID

    Responses

    Response samples

    Content type
    application/json
    {
    • "createTime": "string",
    • "createUser": "string",
    • "enabled": true,
    • "excluded": [
      ],
    • "host": "string",
    • "id": 0,
    • "identity": {
      },
    • "kind": "http",
    • "port": 0,
    • "updateUser": "string"
    }

    Update an proxy.

    Update an proxy.

    +

    Response samples

    Content type
    application/json
    {
    • "createTime": "string",
    • "createUser": "string",
    • "enabled": true,
    • "excluded": [
      ],
    • "host": "string",
    • "id": 0,
    • "identity": {
      },
    • "kind": "http",
    • "port": 0,
    • "updateUser": "string"
    }

    Update an proxy.

    Update an proxy.

    path Parameters
    id
    required
    string

    Proxy ID

    Request Body schema: application/json

    Proxy data

    createTime
    string
    createUser
    string
    enabled
    boolean
    excluded
    Array of strings
    host
    string
    id
    integer
    object (api.Ref)
    kind
    string
    Enum: "http" "https"
    port
    integer
    updateUser
    string

    Responses

    Request samples

    Content type
    application/json
    {
    • "createTime": "string",
    • "createUser": "string",
    • "enabled": true,
    • "excluded": [
      ],
    • "host": "string",
    • "id": 0,
    • "identity": {
      },
    • "kind": "http",
    • "port": 0,
    • "updateUser": "string"
    }

    Delete an proxy.

    Delete an proxy.

    +

    Request samples

    Content type
    application/json
    {
    • "createTime": "string",
    • "createUser": "string",
    • "enabled": true,
    • "excluded": [
      ],
    • "host": "string",
    • "id": 0,
    • "identity": {
      },
    • "kind": "http",
    • "port": 0,
    • "updateUser": "string"
    }

    Delete an proxy.

    Delete an proxy.

    path Parameters
    id
    required
    string

    Proxy ID

    Responses

    reviews

    List all reviews.

    List all reviews.

    Responses

    Response samples

    Content type
    application/json
    [
    • {
      }
    ]

    Create a review.

    Create a review.

    +

    Response samples

    Content type
    application/json
    [
    • {
      }
    ]

    Create a review.

    Create a review.

    Request Body schema: application/json

    Review data

    -
    required
    object (api.Ref)
    businessCriticality
    integer
    comments
    string
    createTime
    string
    createUser
    string
    effortEstimate
    string
    id
    integer
    proposedAction
    string
    updateUser
    string
    workPriority
    integer

    Responses

    Request samples

    Content type
    application/json
    {
    • "application": {
      },
    • "businessCriticality": 0,
    • "comments": "string",
    • "createTime": "string",
    • "createUser": "string",
    • "effortEstimate": "string",
    • "id": 0,
    • "proposedAction": "string",
    • "updateUser": "string",
    • "workPriority": 0
    }

    Response samples

    Content type
    application/json
    {
    • "application": {
      },
    • "businessCriticality": 0,
    • "comments": "string",
    • "createTime": "string",
    • "createUser": "string",
    • "effortEstimate": "string",
    • "id": 0,
    • "proposedAction": "string",
    • "updateUser": "string",
    • "workPriority": 0
    }

    Copy a review from one application to others.

    Copy a review from one application to others.

    +
    object (api.Ref)
    object (api.Ref)
    businessCriticality
    integer
    comments
    string
    createTime
    string
    createUser
    string
    effortEstimate
    string
    id
    integer
    proposedAction
    string
    updateUser
    string
    workPriority
    integer

    Responses

    Request samples

    Content type
    application/json
    {
    • "application": {
      },
    • "archetype": {
      },
    • "businessCriticality": 0,
    • "comments": "string",
    • "createTime": "string",
    • "createUser": "string",
    • "effortEstimate": "string",
    • "id": 0,
    • "proposedAction": "string",
    • "updateUser": "string",
    • "workPriority": 0
    }

    Response samples

    Content type
    application/json
    {
    • "application": {
      },
    • "archetype": {
      },
    • "businessCriticality": 0,
    • "comments": "string",
    • "createTime": "string",
    • "createUser": "string",
    • "effortEstimate": "string",
    • "id": 0,
    • "proposedAction": "string",
    • "updateUser": "string",
    • "workPriority": 0
    }

    Copy a review from one application to others.

    Copy a review from one application to others.

    Request Body schema: application/json

    Review copy request data

    sourceReview
    required
    integer
    targetApplications
    required
    Array of integers[ items ]

    Responses

    Request samples

    Content type
    application/json
    {
    • "sourceReview": 0,
    • "targetApplications": [
      ]
    }

    Get a review by ID.

    Get a review by ID.

    +

    Request samples

    Content type
    application/json
    {
    • "sourceReview": 0,
    • "targetApplications": [
      ]
    }

    Get a review by ID.

    Get a review by ID.

    path Parameters
    id
    required
    string

    Review ID

    Responses

    Response samples

    Content type
    application/json
    {
    • "application": {
      },
    • "businessCriticality": 0,
    • "comments": "string",
    • "createTime": "string",
    • "createUser": "string",
    • "effortEstimate": "string",
    • "id": 0,
    • "proposedAction": "string",
    • "updateUser": "string",
    • "workPriority": 0
    }

    Update a review.

    Update a review.

    +

    Response samples

    Content type
    application/json
    {
    • "application": {
      },
    • "archetype": {
      },
    • "businessCriticality": 0,
    • "comments": "string",
    • "createTime": "string",
    • "createUser": "string",
    • "effortEstimate": "string",
    • "id": 0,
    • "proposedAction": "string",
    • "updateUser": "string",
    • "workPriority": 0
    }

    Update a review.

    Update a review.

    path Parameters
    id
    required
    string

    Review ID

    Request Body schema: application/json

    Review data

    -
    required
    object (api.Ref)
    businessCriticality
    integer
    comments
    string
    createTime
    string
    createUser
    string
    effortEstimate
    string
    id
    integer
    proposedAction
    string
    updateUser
    string
    workPriority
    integer

    Responses

    Request samples

    Content type
    application/json
    {
    • "application": {
      },
    • "businessCriticality": 0,
    • "comments": "string",
    • "createTime": "string",
    • "createUser": "string",
    • "effortEstimate": "string",
    • "id": 0,
    • "proposedAction": "string",
    • "updateUser": "string",
    • "workPriority": 0
    }

    Delete a review.

    Delete a review.

    +
    object (api.Ref)
    object (api.Ref)
    businessCriticality
    integer
    comments
    string
    createTime
    string
    createUser
    string
    effortEstimate
    string
    id
    integer
    proposedAction
    string
    updateUser
    string
    workPriority
    integer

    Responses

    Request samples

    Content type
    application/json
    {
    • "application": {
      },
    • "archetype": {
      },
    • "businessCriticality": 0,
    • "comments": "string",
    • "createTime": "string",
    • "createUser": "string",
    • "effortEstimate": "string",
    • "id": 0,
    • "proposedAction": "string",
    • "updateUser": "string",
    • "workPriority": 0
    }

    Delete a review.

    Delete a review.

    path Parameters
    id
    required
    string

    Review ID

    Responses

    rulesets

    List all bindings.

    List all bindings.

    +

    rulesets

    List all bindings.

    List all bindings. +filters:

    +
      +
    • name
    • +
    • labels
    • +

    Responses

    Response samples

    Content type
    application/json
    [
    • {
      }
    ]

    Create a ruleset.

    Create a ruleset.

    +

    Response samples

    Content type
    application/json
    [
    • {
      }
    ]

    Create a ruleset.

    Create a ruleset.

    Request Body schema: application/json

    RuleSet data

    -
    createTime
    string
    createUser
    string
    custom
    boolean
    description
    string
    id
    integer
    object (api.Ref)
    object (api.Ref)
    kind
    string
    name
    string
    object (api.Repository)
    Array of objects (api.Rule) [ items ]
    updateUser
    string

    Responses

    Request samples

    Content type
    application/json
    {
    • "createTime": "string",
    • "createUser": "string",
    • "custom": true,
    • "description": "string",
    • "id": 0,
    • "identity": {
      },
    • "image": {
      },
    • "kind": "string",
    • "name": "string",
    • "repository": {
      },
    • "rules": [
      ],
    • "updateUser": "string"
    }

    Response samples

    Content type
    application/json
    {
    • "createTime": "string",
    • "createUser": "string",
    • "custom": true,
    • "description": "string",
    • "id": 0,
    • "identity": {
      },
    • "image": {
      },
    • "kind": "string",
    • "name": "string",
    • "repository": {
      },
    • "rules": [
      ],
    • "updateUser": "string"
    }

    Get a RuleSet by ID.

    Get a RuleSet by ID.

    +
    createTime
    string
    createUser
    string
    Array of objects (api.Ref) [ items ]
    description
    string
    id
    integer
    object (api.Ref)
    kind
    string
    name
    string
    object (api.Repository)
    Array of objects (api.Rule) [ items ]
    updateUser
    string

    Responses

    Request samples

    Content type
    application/json
    {
    • "createTime": "string",
    • "createUser": "string",
    • "dependsOn": [
      ],
    • "description": "string",
    • "id": 0,
    • "identity": {
      },
    • "kind": "string",
    • "name": "string",
    • "repository": {
      },
    • "rules": [
      ],
    • "updateUser": "string"
    }

    Response samples

    Content type
    application/json
    {
    • "createTime": "string",
    • "createUser": "string",
    • "dependsOn": [
      ],
    • "description": "string",
    • "id": 0,
    • "identity": {
      },
    • "kind": "string",
    • "name": "string",
    • "repository": {
      },
    • "rules": [
      ],
    • "updateUser": "string"
    }

    Get a RuleSet by ID.

    Get a RuleSet by ID.

    path Parameters
    id
    required
    string

    RuleSet ID

    Responses

    Response samples

    Content type
    application/json
    {
    • "createTime": "string",
    • "createUser": "string",
    • "custom": true,
    • "description": "string",
    • "id": 0,
    • "identity": {
      },
    • "image": {
      },
    • "kind": "string",
    • "name": "string",
    • "repository": {
      },
    • "rules": [
      ],
    • "updateUser": "string"
    }

    Update a ruleset.

    Update a ruleset.

    +

    Response samples

    Content type
    application/json
    {
    • "createTime": "string",
    • "createUser": "string",
    • "dependsOn": [
      ],
    • "description": "string",
    • "id": 0,
    • "identity": {
      },
    • "kind": "string",
    • "name": "string",
    • "repository": {
      },
    • "rules": [
      ],
    • "updateUser": "string"
    }

    Update a ruleset.

    Update a ruleset.

    path Parameters
    id
    required
    string

    RuleSet ID

    Request Body schema: application/json

    RuleSet data

    -
    createTime
    string
    createUser
    string
    custom
    boolean
    description
    string
    id
    integer
    object (api.Ref)
    object (api.Ref)
    kind
    string
    name
    string
    object (api.Repository)
    Array of objects (api.Rule) [ items ]
    updateUser
    string

    Responses

    Request samples

    Content type
    application/json
    {
    • "createTime": "string",
    • "createUser": "string",
    • "custom": true,
    • "description": "string",
    • "id": 0,
    • "identity": {
      },
    • "image": {
      },
    • "kind": "string",
    • "name": "string",
    • "repository": {
      },
    • "rules": [
      ],
    • "updateUser": "string"
    }

    Delete a ruleset.

    Delete a ruleset.

    +
    createTime
    string
    createUser
    string
    Array of objects (api.Ref) [ items ]
    description
    string
    id
    integer
    object (api.Ref)
    kind
    string
    name
    string
    object (api.Repository)
    Array of objects (api.Rule) [ items ]
    updateUser
    string

    Responses

    Request samples

    Content type
    application/json
    {
    • "createTime": "string",
    • "createUser": "string",
    • "dependsOn": [
      ],
    • "description": "string",
    • "id": 0,
    • "identity": {
      },
    • "kind": "string",
    • "name": "string",
    • "repository": {
      },
    • "rules": [
      ],
    • "updateUser": "string"
    }

    Delete a ruleset.

    Delete a ruleset.

    path Parameters
    id
    required
    string

    RuleSet ID

    Responses

    schema

    Get the API schema.

    Get the API schema.

    Responses

    Response samples

    Content type
    application/json
    {
    • "paths": [
      ],
    • "version": "string"
    }

    settings

    List all settings.

    List all settings.

    +

    Response samples

    Content type
    application/json
    {
    • "paths": [
      ],
    • "version": "string"
    }

    settings

    List all settings.

    List all settings.

    Responses

    Response samples

    Content type
    application/json
    [
    • {
      }
    ]

    Create a setting.

    Create a setting.

    +

    Response samples

    Content type
    application/json
    [
    • {
      }
    ]

    Create a setting.

    Create a setting.

    Request Body schema: application/json

    Setting data

    key
    string
    value
    any

    Responses

    Request samples

    Content type
    application/json
    {
    • "key": "string",
    • "value": null
    }

    Response samples

    Content type
    application/json
    {
    • "key": "string",
    • "value": null
    }

    Get a setting by its key.

    Get a setting by its key.

    +

    Request samples

    Content type
    application/json
    {
    • "key": "string",
    • "value": null
    }

    Response samples

    Content type
    application/json
    {
    • "key": "string",
    • "value": null
    }

    Get a setting by its key.

    Get a setting by its key.

    path Parameters
    key
    required
    string

    Key

    Responses

    Response samples

    Content type
    application/json
    {
    • "key": "string",
    • "value": null
    }

    Update a setting.

    Update a setting.

    +

    Response samples

    Content type
    application/json
    {
    • "key": "string",
    • "value": null
    }

    Update a setting.

    Update a setting.

    path Parameters
    key
    required
    string

    Key

    Responses

    Create a setting.

    Create a setting.

    Request Body schema: application/json

    Setting value

    key
    string
    value
    any

    Responses

    Request samples

    Content type
    application/json
    {
    • "key": "string",
    • "value": null
    }

    Delete a setting.

    Delete a setting.

    +

    Request samples

    Content type
    application/json
    {
    • "key": "string",
    • "value": null
    }

    Delete a setting.

    Delete a setting.

    path Parameters
    key
    required
    string

    Key

    Responses

    stakeholdergroups

    List all stakeholder groups.

    List all stakeholder groups.

    Responses

    Response samples

    Content type
    application/json
    [
    • {
      }
    ]

    Create a stakeholder group.

    Create a stakeholder group.

    +

    Response samples

    Content type
    application/json
    [
    • {
      }
    ]

    Create a stakeholder group.

    Create a stakeholder group.

    Request Body schema: application/json

    Stakeholder Group data

    createTime
    string
    createUser
    string
    description
    string
    id
    integer
    Array of objects (api.Ref) [ items ]
    name
    required
    string
    Array of objects (api.Ref) [ items ]
    updateUser
    string

    Responses

    Request samples

    Content type
    application/json
    {
    • "createTime": "string",
    • "createUser": "string",
    • "description": "string",
    • "id": 0,
    • "migrationWaves": [
      ],
    • "name": "string",
    • "stakeholders": [
      ],
    • "updateUser": "string"
    }

    Response samples

    Content type
    application/json
    {
    • "createTime": "string",
    • "createUser": "string",
    • "description": "string",
    • "id": 0,
    • "migrationWaves": [
      ],
    • "name": "string",
    • "stakeholders": [
      ],
    • "updateUser": "string"
    }

    Get a stakeholder group by ID.

    Get a stakeholder group by ID.

    +

    Request samples

    Content type
    application/json
    {
    • "createTime": "string",
    • "createUser": "string",
    • "description": "string",
    • "id": 0,
    • "migrationWaves": [
      ],
    • "name": "string",
    • "stakeholders": [
      ],
    • "updateUser": "string"
    }

    Response samples

    Content type
    application/json
    {
    • "createTime": "string",
    • "createUser": "string",
    • "description": "string",
    • "id": 0,
    • "migrationWaves": [
      ],
    • "name": "string",
    • "stakeholders": [
      ],
    • "updateUser": "string"
    }

    Get a stakeholder group by ID.

    Get a stakeholder group by ID.

    path Parameters
    id
    required
    string

    Stakeholder Group ID

    Responses

    Response samples

    Content type
    application/json
    {
    • "createTime": "string",
    • "createUser": "string",
    • "description": "string",
    • "id": 0,
    • "migrationWaves": [
      ],
    • "name": "string",
    • "stakeholders": [
      ],
    • "updateUser": "string"
    }

    Update a stakeholder group.

    Update a stakeholder group.

    +

    Response samples

    Content type
    application/json
    {
    • "createTime": "string",
    • "createUser": "string",
    • "description": "string",
    • "id": 0,
    • "migrationWaves": [
      ],
    • "name": "string",
    • "stakeholders": [
      ],
    • "updateUser": "string"
    }

    Update a stakeholder group.

    Update a stakeholder group.

    path Parameters
    id
    required
    string

    Stakeholder Group ID

    Request Body schema: application/json

    Stakeholder Group data

    createTime
    string
    createUser
    string
    description
    string
    id
    integer
    Array of objects (api.Ref) [ items ]
    name
    required
    string
    Array of objects (api.Ref) [ items ]
    updateUser
    string

    Responses

    Request samples

    Content type
    application/json
    {
    • "createTime": "string",
    • "createUser": "string",
    • "description": "string",
    • "id": 0,
    • "migrationWaves": [
      ],
    • "name": "string",
    • "stakeholders": [
      ],
    • "updateUser": "string"
    }

    Delete a stakeholder group.

    Delete a stakeholder group.

    +

    Request samples

    Content type
    application/json
    {
    • "createTime": "string",
    • "createUser": "string",
    • "description": "string",
    • "id": 0,
    • "migrationWaves": [
      ],
    • "name": "string",
    • "stakeholders": [
      ],
    • "updateUser": "string"
    }

    Delete a stakeholder group.

    Delete a stakeholder group.

    path Parameters
    id
    required
    string

    Stakeholder Group ID

    Responses

    stakeholders

    List all stakeholders.

    List all stakeholders.

    Responses

    Response samples

    Content type
    application/json
    [
    • {
      }
    ]

    Create a stakeholder.

    Create a stakeholder.

    +

    Response samples

    Content type
    application/json
    [
    • {
      }
    ]

    Create a stakeholder.

    Create a stakeholder.

    Request Body schema: application/json

    Stakeholder data

    Array of objects (api.Ref) [ items ]
    Array of objects (api.Ref) [ items ]
    createTime
    string
    createUser
    string
    email
    required
    string
    id
    integer
    object (api.Ref)
    Array of objects (api.Ref) [ items ]
    name
    required
    string
    Array of objects (api.Ref) [ items ]
    Array of objects (api.Ref) [ items ]
    updateUser
    string

    Responses

    Request samples

    Content type
    application/json
    {
    • "businessServices": [
      ],
    • "contributes": [
      ],
    • "createTime": "string",
    • "createUser": "string",
    • "email": "string",
    • "id": 0,
    • "jobFunction": {
      },
    • "migrationWaves": [
      ],
    • "name": "string",
    • "owns": [
      ],
    • "stakeholderGroups": [
      ],
    • "updateUser": "string"
    }

    Response samples

    Content type
    application/json
    {
    • "businessServices": [
      ],
    • "contributes": [
      ],
    • "createTime": "string",
    • "createUser": "string",
    • "email": "string",
    • "id": 0,
    • "jobFunction": {
      },
    • "migrationWaves": [
      ],
    • "name": "string",
    • "owns": [
      ],
    • "stakeholderGroups": [
      ],
    • "updateUser": "string"
    }

    Get a stakeholder by ID.

    Get a stakeholder by ID.

    +

    Request samples

    Content type
    application/json
    {
    • "businessServices": [
      ],
    • "contributes": [
      ],
    • "createTime": "string",
    • "createUser": "string",
    • "email": "string",
    • "id": 0,
    • "jobFunction": {
      },
    • "migrationWaves": [
      ],
    • "name": "string",
    • "owns": [
      ],
    • "stakeholderGroups": [
      ],
    • "updateUser": "string"
    }

    Response samples

    Content type
    application/json
    {
    • "businessServices": [
      ],
    • "contributes": [
      ],
    • "createTime": "string",
    • "createUser": "string",
    • "email": "string",
    • "id": 0,
    • "jobFunction": {
      },
    • "migrationWaves": [
      ],
    • "name": "string",
    • "owns": [
      ],
    • "stakeholderGroups": [
      ],
    • "updateUser": "string"
    }

    Get a stakeholder by ID.

    Get a stakeholder by ID.

    path Parameters
    id
    required
    string

    Stakeholder ID

    Responses

    Response samples

    Content type
    application/json
    {
    • "businessServices": [
      ],
    • "contributes": [
      ],
    • "createTime": "string",
    • "createUser": "string",
    • "email": "string",
    • "id": 0,
    • "jobFunction": {
      },
    • "migrationWaves": [
      ],
    • "name": "string",
    • "owns": [
      ],
    • "stakeholderGroups": [
      ],
    • "updateUser": "string"
    }

    Update a stakeholder.

    Update a stakeholder.

    +

    Response samples

    Content type
    application/json
    {
    • "businessServices": [
      ],
    • "contributes": [
      ],
    • "createTime": "string",
    • "createUser": "string",
    • "email": "string",
    • "id": 0,
    • "jobFunction": {
      },
    • "migrationWaves": [
      ],
    • "name": "string",
    • "owns": [
      ],
    • "stakeholderGroups": [
      ],
    • "updateUser": "string"
    }

    Update a stakeholder.

    Update a stakeholder.

    path Parameters
    id
    required
    string

    Stakeholder ID

    Request Body schema: application/json

    Stakeholder data

    Array of objects (api.Ref) [ items ]
    Array of objects (api.Ref) [ items ]
    createTime
    string
    createUser
    string
    email
    required
    string
    id
    integer
    object (api.Ref)
    Array of objects (api.Ref) [ items ]
    name
    required
    string
    Array of objects (api.Ref) [ items ]
    Array of objects (api.Ref) [ items ]
    updateUser
    string

    Responses

    Request samples

    Content type
    application/json
    {
    • "businessServices": [
      ],
    • "contributes": [
      ],
    • "createTime": "string",
    • "createUser": "string",
    • "email": "string",
    • "id": 0,
    • "jobFunction": {
      },
    • "migrationWaves": [
      ],
    • "name": "string",
    • "owns": [
      ],
    • "stakeholderGroups": [
      ],
    • "updateUser": "string"
    }

    Delete a stakeholder.

    Delete a stakeholder.

    +

    Request samples

    Content type
    application/json
    {
    • "businessServices": [
      ],
    • "contributes": [
      ],
    • "createTime": "string",
    • "createUser": "string",
    • "email": "string",
    • "id": 0,
    • "jobFunction": {
      },
    • "migrationWaves": [
      ],
    • "name": "string",
    • "owns": [
      ],
    • "stakeholderGroups": [
      ],
    • "updateUser": "string"
    }

    Delete a stakeholder.

    Delete a stakeholder.

    path Parameters
    id
    required
    string

    Stakeholder ID

    Responses

    tagcategories

    List all tag categories.

    List all tag categories.

    query Parameters
    name
    string

    Optional category name filter

    Responses

    Response samples

    Content type
    application/json
    [
    • {
      }
    ]

    Create a tag category.

    Create a tag category.

    +

    Response samples

    Content type
    application/json
    [
    • {
      }
    ]

    Create a tag category.

    Create a tag category.

    Request Body schema: application/json

    Tag Category data

    colour
    string
    createTime
    string
    createUser
    string
    id
    integer
    name
    required
    string
    rank
    integer
    Array of objects (api.Ref) [ items ]
    updateUser
    string
    username
    string

    Responses

    Request samples

    Content type
    application/json
    {
    • "colour": "string",
    • "createTime": "string",
    • "createUser": "string",
    • "id": 0,
    • "name": "string",
    • "rank": 0,
    • "tags": [
      ],
    • "updateUser": "string",
    • "username": "string"
    }

    Response samples

    Content type
    application/json
    {
    • "colour": "string",
    • "createTime": "string",
    • "createUser": "string",
    • "id": 0,
    • "name": "string",
    • "rank": 0,
    • "tags": [
      ],
    • "updateUser": "string",
    • "username": "string"
    }

    Get a tag category by ID.

    Get a tag category by ID.

    +

    Request samples

    Content type
    application/json
    {
    • "colour": "string",
    • "createTime": "string",
    • "createUser": "string",
    • "id": 0,
    • "name": "string",
    • "rank": 0,
    • "tags": [
      ],
    • "updateUser": "string",
    • "username": "string"
    }

    Response samples

    Content type
    application/json
    {
    • "colour": "string",
    • "createTime": "string",
    • "createUser": "string",
    • "id": 0,
    • "name": "string",
    • "rank": 0,
    • "tags": [
      ],
    • "updateUser": "string",
    • "username": "string"
    }

    Get a tag category by ID.

    Get a tag category by ID.

    path Parameters
    id
    required
    string

    Tag Category ID

    Responses

    Response samples

    Content type
    application/json
    {
    • "colour": "string",
    • "createTime": "string",
    • "createUser": "string",
    • "id": 0,
    • "name": "string",
    • "rank": 0,
    • "tags": [
      ],
    • "updateUser": "string",
    • "username": "string"
    }

    Update a tag category.

    Update a tag category.

    +

    Response samples

    Content type
    application/json
    {
    • "colour": "string",
    • "createTime": "string",
    • "createUser": "string",
    • "id": 0,
    • "name": "string",
    • "rank": 0,
    • "tags": [
      ],
    • "updateUser": "string",
    • "username": "string"
    }

    Update a tag category.

    Update a tag category.

    path Parameters
    id
    required
    string

    Tag Category ID

    Request Body schema: application/json

    Tag Category data

    colour
    string
    createTime
    string
    createUser
    string
    id
    integer
    name
    required
    string
    rank
    integer
    Array of objects (api.Ref) [ items ]
    updateUser
    string
    username
    string

    Responses

    Request samples

    Content type
    application/json
    {
    • "colour": "string",
    • "createTime": "string",
    • "createUser": "string",
    • "id": 0,
    • "name": "string",
    • "rank": 0,
    • "tags": [
      ],
    • "updateUser": "string",
    • "username": "string"
    }

    Delete a tag category.

    Delete a tag category.

    +

    Request samples

    Content type
    application/json
    {
    • "colour": "string",
    • "createTime": "string",
    • "createUser": "string",
    • "id": 0,
    • "name": "string",
    • "rank": 0,
    • "tags": [
      ],
    • "updateUser": "string",
    • "username": "string"
    }

    Delete a tag category.

    Delete a tag category.

    path Parameters
    id
    required
    string

    Tag Category ID

    Responses

    List the tags in the tag category.

    List the tags in the tag category.

    path Parameters
    id
    required
    string

    Tag Category ID

    query Parameters
    name
    string

    Optional tag name filter

    Responses

    Response samples

    Content type
    application/json
    [
    • {
      }
    ]

    taskgroups

    List all task groups.

    List all task groups.

    +

    Response samples

    Content type
    application/json
    [
    • {
      }
    ]

    targets

    List all targets.

    List all targets.

    +

    Responses

    Response samples

    Content type
    application/json
    [
    • {
      }
    ]

    Create a target.

    Create a target.

    +
    Request Body schema: application/json

    Target data

    +
    choice
    boolean
    createTime
    string
    createUser
    string
    custom
    boolean
    description
    string
    id
    integer
    object (api.Ref)
    Array of objects (api.Label) [ items ]
    name
    string
    object (api.RuleSet)
    updateUser
    string

    Responses

    Request samples

    Content type
    application/json
    {
    • "choice": true,
    • "createTime": "string",
    • "createUser": "string",
    • "custom": true,
    • "description": "string",
    • "id": 0,
    • "image": {
      },
    • "labels": [
      ],
    • "name": "string",
    • "ruleset": {
      },
    • "updateUser": "string"
    }

    Response samples

    Content type
    application/json
    {
    • "choice": true,
    • "createTime": "string",
    • "createUser": "string",
    • "custom": true,
    • "description": "string",
    • "id": 0,
    • "image": {
      },
    • "labels": [
      ],
    • "name": "string",
    • "ruleset": {
      },
    • "updateUser": "string"
    }

    Get a Target by ID.

    Get a Target by ID.

    +
    path Parameters
    id
    required
    string

    Target ID

    +

    Responses

    Response samples

    Content type
    application/json
    {
    • "choice": true,
    • "createTime": "string",
    • "createUser": "string",
    • "custom": true,
    • "description": "string",
    • "id": 0,
    • "image": {
      },
    • "labels": [
      ],
    • "name": "string",
    • "ruleset": {
      },
    • "updateUser": "string"
    }

    Update a target.

    Update a target.

    +
    path Parameters
    id
    required
    string

    Target ID

    +
    Request Body schema: application/json

    Target data

    +
    choice
    boolean
    createTime
    string
    createUser
    string
    custom
    boolean
    description
    string
    id
    integer
    object (api.Ref)
    Array of objects (api.Label) [ items ]
    name
    string
    object (api.RuleSet)
    updateUser
    string

    Responses

    Request samples

    Content type
    application/json
    {
    • "choice": true,
    • "createTime": "string",
    • "createUser": "string",
    • "custom": true,
    • "description": "string",
    • "id": 0,
    • "image": {
      },
    • "labels": [
      ],
    • "name": "string",
    • "ruleset": {
      },
    • "updateUser": "string"
    }

    Delete a target.

    Delete a target.

    +
    path Parameters
    id
    required
    string

    Target ID

    +

    Responses

    taskgroups

    List all task groups.

    List all task groups.

    Responses

    Response samples

    Content type
    application/json
    [
    • {
      }
    ]

    Create a task group.

    Create a task group.

    +

    Response samples

    Content type
    application/json
    [
    • {
      }
    ]

    Create a task group.

    Create a task group.

    Request Body schema: application/json

    TaskGroup data

    addon
    string
    object (api.Ref)
    createTime
    string
    createUser
    string
    data
    required
    object
    id
    integer
    name
    string
    state
    string
    Array of objects (api.Task) [ items ]
    updateUser
    string

    Responses

    Request samples

    Content type
    application/json
    {
    • "addon": "string",
    • "bucket": {
      },
    • "createTime": "string",
    • "createUser": "string",
    • "data": { },
    • "id": 0,
    • "name": "string",
    • "state": "string",
    • "tasks": [
      ],
    • "updateUser": "string"
    }

    Response samples

    Content type
    application/json
    {
    • "addon": "string",
    • "bucket": {
      },
    • "createTime": "string",
    • "createUser": "string",
    • "data": { },
    • "id": 0,
    • "name": "string",
    • "state": "string",
    • "tasks": [
      ],
    • "updateUser": "string"
    }

    Get a task group by ID.

    Get a task group by ID.

    +

    Request samples

    Content type
    application/json
    {
    • "addon": "string",
    • "bucket": {
      },
    • "createTime": "string",
    • "createUser": "string",
    • "data": { },
    • "id": 0,
    • "name": "string",
    • "state": "string",
    • "tasks": [
      ],
    • "updateUser": "string"
    }

    Response samples

    Content type
    application/json
    {
    • "addon": "string",
    • "bucket": {
      },
    • "createTime": "string",
    • "createUser": "string",
    • "data": { },
    • "id": 0,
    • "name": "string",
    • "state": "string",
    • "tasks": [
      ],
    • "updateUser": "string"
    }

    Get a task group by ID.

    Get a task group by ID.

    path Parameters
    id
    required
    string

    TaskGroup ID

    Responses

    Response samples

    Content type
    application/json
    {
    • "addon": "string",
    • "bucket": {
      },
    • "createTime": "string",
    • "createUser": "string",
    • "data": { },
    • "id": 0,
    • "name": "string",
    • "state": "string",
    • "tasks": [
      ],
    • "updateUser": "string"
    }

    Update a task group.

    Update a task group.

    +

    Response samples

    Content type
    application/json
    {
    • "addon": "string",
    • "bucket": {
      },
    • "createTime": "string",
    • "createUser": "string",
    • "data": { },
    • "id": 0,
    • "name": "string",
    • "state": "string",
    • "tasks": [
      ],
    • "updateUser": "string"
    }

    Update a task group.

    Update a task group.

    path Parameters
    id
    required
    string

    Task ID

    Request Body schema: application/json

    Task data

    addon
    string
    object (api.Ref)
    createTime
    string
    createUser
    string
    data
    required
    object
    id
    integer
    name
    string
    state
    string
    Array of objects (api.Task) [ items ]
    updateUser
    string

    Responses

    Request samples

    Content type
    application/json
    {
    • "addon": "string",
    • "bucket": {
      },
    • "createTime": "string",
    • "createUser": "string",
    • "data": { },
    • "id": 0,
    • "name": "string",
    • "state": "string",
    • "tasks": [
      ],
    • "updateUser": "string"
    }

    Delete a task group.

    Delete a task group.

    +

    Request samples

    Content type
    application/json
    {
    • "addon": "string",
    • "bucket": {
      },
    • "createTime": "string",
    • "createUser": "string",
    • "data": { },
    • "id": 0,
    • "name": "string",
    • "state": "string",
    • "tasks": [
      ],
    • "updateUser": "string"
    }

    Delete a task group.

    Delete a task group.

    path Parameters
    id
    required
    string

    TaskGroup ID

    Responses

    Get bucket content by ID and path.

    Get bucket content by ID and path. @@ -2678,19 +2786,19 @@

    path Parameters
    id
    required
    string

    TaskGroup ID

    Request Body schema: application/json

    TaskGroup data (optional)

    addon
    string
    object (api.Ref)
    createTime
    string
    createUser
    string
    data
    required
    object
    id
    integer
    name
    string
    state
    string
    Array of objects (api.Task) [ items ]
    updateUser
    string

    Responses

    Request samples

    Content type
    application/json
    {
    • "addon": "string",
    • "bucket": {
      },
    • "createTime": "string",
    • "createUser": "string",
    • "data": { },
    • "id": 0,
    • "name": "string",
    • "state": "string",
    • "tasks": [
      ],
    • "updateUser": "string"
    }

    tasks

    List all tasks.

    List all tasks.

    +

    Request samples

    Content type
    application/json
    {
    • "addon": "string",
    • "bucket": {
      },
    • "createTime": "string",
    • "createUser": "string",
    • "data": { },
    • "id": 0,
    • "name": "string",
    • "state": "string",
    • "tasks": [
      ],
    • "updateUser": "string"
    }

    tasks

    List all tasks.

    List all tasks.

    Responses

    Response samples

    Content type
    application/json
    [
    • {
      }
    ]

    Create a task.

    Create a task.

    +

    Response samples

    Content type
    application/json
    [
    • {
      }
    ]

    Create a task.

    Create a task.

    Request Body schema: application/json

    Task data

    -
    addon
    required
    string
    object (api.Ref)
    object (api.Ref)
    canceled
    boolean
    createTime
    string
    createUser
    string
    data
    required
    object
    error
    string
    id
    integer
    image
    string
    locator
    string
    name
    string
    pod
    string
    policy
    string
    priority
    integer
    purged
    boolean
    object (api.TaskReport)
    retries
    integer
    started
    string
    state
    string
    terminated
    string
    object (api.TTL)
    updateUser
    string
    variant
    string

    Responses

    Request samples

    Content type
    application/json
    {
    • "addon": "string",
    • "application": {
      },
    • "bucket": {
      },
    • "canceled": true,
    • "createTime": "string",
    • "createUser": "string",
    • "data": { },
    • "error": "string",
    • "id": 0,
    • "image": "string",
    • "locator": "string",
    • "name": "string",
    • "pod": "string",
    • "policy": "string",
    • "priority": 0,
    • "purged": true,
    • "report": {
      },
    • "retries": 0,
    • "started": "string",
    • "state": "string",
    • "terminated": "string",
    • "ttl": {
      },
    • "updateUser": "string",
    • "variant": "string"
    }

    Response samples

    Content type
    application/json
    {
    • "addon": "string",
    • "application": {
      },
    • "bucket": {
      },
    • "canceled": true,
    • "createTime": "string",
    • "createUser": "string",
    • "data": { },
    • "error": "string",
    • "id": 0,
    • "image": "string",
    • "locator": "string",
    • "name": "string",
    • "pod": "string",
    • "policy": "string",
    • "priority": 0,
    • "purged": true,
    • "report": {
      },
    • "retries": 0,
    • "started": "string",
    • "state": "string",
    • "terminated": "string",
    • "ttl": {
      },
    • "updateUser": "string",
    • "variant": "string"
    }

    Get a task by ID.

    Get a task by ID.

    +
    activity
    Array of strings
    addon
    required
    string
    object (api.Ref)
    object (api.Ref)
    canceled
    boolean
    createTime
    string
    createUser
    string
    data
    required
    object
    Array of objects (api.TaskError) [ items ]
    id
    integer
    image
    string
    locator
    string
    name
    string
    pod
    string
    policy
    string
    priority
    integer
    purged
    boolean
    retries
    integer
    started
    string
    state
    string
    terminated
    string
    object (api.TTL)
    updateUser
    string
    variant
    string

    Responses

    Request samples

    Content type
    application/json
    {
    • "activity": [
      ],
    • "addon": "string",
    • "application": {
      },
    • "bucket": {
      },
    • "canceled": true,
    • "createTime": "string",
    • "createUser": "string",
    • "data": { },
    • "errors": [
      ],
    • "id": 0,
    • "image": "string",
    • "locator": "string",
    • "name": "string",
    • "pod": "string",
    • "policy": "string",
    • "priority": 0,
    • "purged": true,
    • "retries": 0,
    • "started": "string",
    • "state": "string",
    • "terminated": "string",
    • "ttl": {
      },
    • "updateUser": "string",
    • "variant": "string"
    }

    Response samples

    Content type
    application/json
    {
    • "activity": [
      ],
    • "addon": "string",
    • "application": {
      },
    • "bucket": {
      },
    • "canceled": true,
    • "createTime": "string",
    • "createUser": "string",
    • "data": { },
    • "errors": [
      ],
    • "id": 0,
    • "image": "string",
    • "locator": "string",
    • "name": "string",
    • "pod": "string",
    • "policy": "string",
    • "priority": 0,
    • "purged": true,
    • "retries": 0,
    • "started": "string",
    • "state": "string",
    • "terminated": "string",
    • "ttl": {
      },
    • "updateUser": "string",
    • "variant": "string"
    }

    Get a task by ID.

    Get a task by ID.

    path Parameters
    id
    required
    string

    Task ID

    Responses

    Response samples

    Content type
    application/json
    {
    • "addon": "string",
    • "application": {
      },
    • "bucket": {
      },
    • "canceled": true,
    • "createTime": "string",
    • "createUser": "string",
    • "data": { },
    • "error": "string",
    • "id": 0,
    • "image": "string",
    • "locator": "string",
    • "name": "string",
    • "pod": "string",
    • "policy": "string",
    • "priority": 0,
    • "purged": true,
    • "report": {
      },
    • "retries": 0,
    • "started": "string",
    • "state": "string",
    • "terminated": "string",
    • "ttl": {
      },
    • "updateUser": "string",
    • "variant": "string"
    }

    Update a task.

    Update a task.

    +

    Response samples

    Content type
    application/json
    {
    • "activity": [
      ],
    • "addon": "string",
    • "application": {
      },
    • "bucket": {
      },
    • "canceled": true,
    • "createTime": "string",
    • "createUser": "string",
    • "data": { },
    • "errors": [
      ],
    • "id": 0,
    • "image": "string",
    • "locator": "string",
    • "name": "string",
    • "pod": "string",
    • "policy": "string",
    • "priority": 0,
    • "purged": true,
    • "retries": 0,
    • "started": "string",
    • "state": "string",
    • "terminated": "string",
    • "ttl": {
      },
    • "updateUser": "string",
    • "variant": "string"
    }

    Update a task.

    Update a task.

    path Parameters
    id
    required
    string

    Task ID

    Request Body schema: application/json

    Task data

    -
    addon
    required
    string
    object (api.Ref)
    object (api.Ref)
    canceled
    boolean
    createTime
    string
    createUser
    string
    data
    required
    object
    error
    string
    id
    integer
    image
    string
    locator
    string
    name
    string
    pod
    string
    policy
    string
    priority
    integer
    purged
    boolean
    object (api.TaskReport)
    retries
    integer
    started
    string
    state
    string
    terminated
    string
    object (api.TTL)
    updateUser
    string
    variant
    string

    Responses

    Request samples

    Content type
    application/json
    {
    • "addon": "string",
    • "application": {
      },
    • "bucket": {
      },
    • "canceled": true,
    • "createTime": "string",
    • "createUser": "string",
    • "data": { },
    • "error": "string",
    • "id": 0,
    • "image": "string",
    • "locator": "string",
    • "name": "string",
    • "pod": "string",
    • "policy": "string",
    • "priority": 0,
    • "purged": true,
    • "report": {
      },
    • "retries": 0,
    • "started": "string",
    • "state": "string",
    • "terminated": "string",
    • "ttl": {
      },
    • "updateUser": "string",
    • "variant": "string"
    }

    Delete a task.

    Delete a task.

    +
    activity
    Array of strings
    addon
    required
    string
    object (api.Ref)
    object (api.Ref)
    canceled
    boolean
    createTime
    string
    createUser
    string
    data
    required
    object
    Array of objects (api.TaskError) [ items ]
    id
    integer
    image
    string
    locator
    string
    name
    string
    pod
    string
    policy
    string
    priority
    integer
    purged
    boolean
    retries
    integer
    started
    string
    state
    string
    terminated
    string
    object (api.TTL)
    updateUser
    string
    variant
    string

    Responses

    Request samples

    Content type
    application/json
    {
    • "activity": [
      ],
    • "addon": "string",
    • "application": {
      },
    • "bucket": {
      },
    • "canceled": true,
    • "createTime": "string",
    • "createUser": "string",
    • "data": { },
    • "errors": [
      ],
    • "id": 0,
    • "image": "string",
    • "locator": "string",
    • "name": "string",
    • "pod": "string",
    • "policy": "string",
    • "priority": 0,
    • "purged": true,
    • "retries": 0,
    • "started": "string",
    • "state": "string",
    • "terminated": "string",
    • "ttl": {
      },
    • "updateUser": "string",
    • "variant": "string"
    }

    Delete a task.

    Delete a task.

    path Parameters
    id
    required
    string

    Task ID

    Responses

    Get bucket content by ID and path.

    Get bucket content by ID and path. @@ -2711,47 +2819,47 @@

    Update a task report.

    Update a task report.

    path Parameters
    id
    required
    string

    Task ID

    Request Body schema: application/json

    TaskReport data

    -
    activity
    Array of strings
    completed
    integer
    createTime
    string
    createUser
    string
    error
    string
    id
    integer
    result
    object
    status
    string
    task
    integer
    total
    integer
    updateUser
    string

    Responses

    Request samples

    Content type
    application/json
    {
    • "activity": [
      ],
    • "completed": 0,
    • "createTime": "string",
    • "createUser": "string",
    • "error": "string",
    • "id": 0,
    • "result": { },
    • "status": "string",
    • "task": 0,
    • "total": 0,
    • "updateUser": "string"
    }

    Response samples

    Content type
    application/json
    {
    • "activity": [
      ],
    • "completed": 0,
    • "createTime": "string",
    • "createUser": "string",
    • "error": "string",
    • "id": 0,
    • "result": { },
    • "status": "string",
    • "task": 0,
    • "total": 0,
    • "updateUser": "string"
    }

    Create a task report.

    Update a task report.

    +
    activity
    Array of strings
    completed
    integer
    createTime
    string
    createUser
    string
    Array of objects (api.TaskError) [ items ]
    id
    integer
    result
    object
    status
    string
    task
    integer
    total
    integer
    updateUser
    string

    Responses

    Request samples

    Content type
    application/json
    {
    • "activity": [
      ],
    • "completed": 0,
    • "createTime": "string",
    • "createUser": "string",
    • "errors": [
      ],
    • "id": 0,
    • "result": { },
    • "status": "string",
    • "task": 0,
    • "total": 0,
    • "updateUser": "string"
    }

    Response samples

    Content type
    application/json
    {
    • "activity": [
      ],
    • "completed": 0,
    • "createTime": "string",
    • "createUser": "string",
    • "errors": [
      ],
    • "id": 0,
    • "result": { },
    • "status": "string",
    • "task": 0,
    • "total": 0,
    • "updateUser": "string"
    }

    Create a task report.

    Update a task report.

    path Parameters
    id
    required
    string

    Task ID

    Request Body schema: application/json

    TaskReport data

    -
    activity
    Array of strings
    completed
    integer
    createTime
    string
    createUser
    string
    error
    string
    id
    integer
    result
    object
    status
    string
    task
    integer
    total
    integer
    updateUser
    string

    Responses

    Request samples

    Content type
    application/json
    {
    • "activity": [
      ],
    • "completed": 0,
    • "createTime": "string",
    • "createUser": "string",
    • "error": "string",
    • "id": 0,
    • "result": { },
    • "status": "string",
    • "task": 0,
    • "total": 0,
    • "updateUser": "string"
    }

    Response samples

    Content type
    application/json
    {
    • "activity": [
      ],
    • "completed": 0,
    • "createTime": "string",
    • "createUser": "string",
    • "error": "string",
    • "id": 0,
    • "result": { },
    • "status": "string",
    • "task": 0,
    • "total": 0,
    • "updateUser": "string"
    }

    Delete a task report.

    Delete a task report.

    +
    activity
    Array of strings
    completed
    integer
    createTime
    string
    createUser
    string
    Array of objects (api.TaskError) [ items ]
    id
    integer
    result
    object
    status
    string
    task
    integer
    total
    integer
    updateUser
    string

    Responses

    Request samples

    Content type
    application/json
    {
    • "activity": [
      ],
    • "completed": 0,
    • "createTime": "string",
    • "createUser": "string",
    • "errors": [
      ],
    • "id": 0,
    • "result": { },
    • "status": "string",
    • "task": 0,
    • "total": 0,
    • "updateUser": "string"
    }

    Response samples

    Content type
    application/json
    {
    • "activity": [
      ],
    • "completed": 0,
    • "createTime": "string",
    • "createUser": "string",
    • "errors": [
      ],
    • "id": 0,
    • "result": { },
    • "status": "string",
    • "task": 0,
    • "total": 0,
    • "updateUser": "string"
    }

    Delete a task report.

    Delete a task report.

    path Parameters
    id
    required
    string

    Task ID

    Responses

    Submit a task.

    Submit a task.

    path Parameters
    id
    required
    string

    Task ID

    Request Body schema: application/json

    Task data (optional)

    -
    addon
    required
    string
    object (api.Ref)
    object (api.Ref)
    canceled
    boolean
    createTime
    string
    createUser
    string
    data
    required
    object
    error
    string
    id
    integer
    image
    string
    locator
    string
    name
    string
    pod
    string
    policy
    string
    priority
    integer
    purged
    boolean
    object (api.TaskReport)
    retries
    integer
    started
    string
    state
    string
    terminated
    string
    object (api.TTL)
    updateUser
    string
    variant
    string

    Responses

    Request samples

    Content type
    application/json
    {
    • "addon": "string",
    • "application": {
      },
    • "bucket": {
      },
    • "canceled": true,
    • "createTime": "string",
    • "createUser": "string",
    • "data": { },
    • "error": "string",
    • "id": 0,
    • "image": "string",
    • "locator": "string",
    • "name": "string",
    • "pod": "string",
    • "policy": "string",
    • "priority": 0,
    • "purged": true,
    • "report": {
      },
    • "retries": 0,
    • "started": "string",
    • "state": "string",
    • "terminated": "string",
    • "ttl": {
      },
    • "updateUser": "string",
    • "variant": "string"
    }

    trackers

    List all trackers.

    List all trackers.

    +
    activity
    Array of strings
    addon
    required
    string
    object (api.Ref)
    object (api.Ref)
    canceled
    boolean
    createTime
    string
    createUser
    string
    data
    required
    object
    Array of objects (api.TaskError) [ items ]
    id
    integer
    image
    string
    locator
    string
    name
    string
    pod
    string
    policy
    string
    priority
    integer
    purged
    boolean
    retries
    integer
    started
    string
    state
    string
    terminated
    string
    object (api.TTL)
    updateUser
    string
    variant
    string

    Responses

    Request samples

    Content type
    application/json
    {
    • "activity": [
      ],
    • "addon": "string",
    • "application": {
      },
    • "bucket": {
      },
    • "canceled": true,
    • "createTime": "string",
    • "createUser": "string",
    • "data": { },
    • "errors": [
      ],
    • "id": 0,
    • "image": "string",
    • "locator": "string",
    • "name": "string",
    • "pod": "string",
    • "policy": "string",
    • "priority": 0,
    • "purged": true,
    • "retries": 0,
    • "started": "string",
    • "state": "string",
    • "terminated": "string",
    • "ttl": {
      },
    • "updateUser": "string",
    • "variant": "string"
    }

    trackers

    List all trackers.

    List all trackers.

    Responses

    Response samples

    Content type
    application/json
    [
    • {
      }
    ]

    Create a tracker.

    Create a tracker.

    +

    Response samples

    Content type
    application/json
    [
    • {
      }
    ]

    Create a tracker.

    Create a tracker.

    Request Body schema: application/json

    Tracker data

    connected
    boolean
    createTime
    string
    createUser
    string
    id
    integer
    required
    object (api.Ref)
    insecure
    boolean
    kind
    required
    string
    Enum: "jira-cloud" "jira-onprem"
    lastUpdated
    string
    message
    string
    name
    required
    string
    updateUser
    string
    url
    required
    string

    Responses

    Request samples

    Content type
    application/json
    {
    • "connected": true,
    • "createTime": "string",
    • "createUser": "string",
    • "id": 0,
    • "identity": {
      },
    • "insecure": true,
    • "kind": "jira-cloud",
    • "lastUpdated": "string",
    • "message": "string",
    • "name": "string",
    • "updateUser": "string",
    • "url": "string"
    }

    Response samples

    Content type
    application/json
    {
    • "connected": true,
    • "createTime": "string",
    • "createUser": "string",
    • "id": 0,
    • "identity": {
      },
    • "insecure": true,
    • "kind": "jira-cloud",
    • "lastUpdated": "string",
    • "message": "string",
    • "name": "string",
    • "updateUser": "string",
    • "url": "string"
    }

    Get a tracker by ID.

    Get a tracker by ID.

    +

    Request samples

    Content type
    application/json
    {
    • "connected": true,
    • "createTime": "string",
    • "createUser": "string",
    • "id": 0,
    • "identity": {
      },
    • "insecure": true,
    • "kind": "jira-cloud",
    • "lastUpdated": "string",
    • "message": "string",
    • "name": "string",
    • "updateUser": "string",
    • "url": "string"
    }

    Response samples

    Content type
    application/json
    {
    • "connected": true,
    • "createTime": "string",
    • "createUser": "string",
    • "id": 0,
    • "identity": {
      },
    • "insecure": true,
    • "kind": "jira-cloud",
    • "lastUpdated": "string",
    • "message": "string",
    • "name": "string",
    • "updateUser": "string",
    • "url": "string"
    }

    Get a tracker by ID.

    Get a tracker by ID.

    path Parameters
    id
    required
    string

    Tracker ID

    Responses

    Response samples

    Content type
    application/json
    {
    • "connected": true,
    • "createTime": "string",
    • "createUser": "string",
    • "id": 0,
    • "identity": {
      },
    • "insecure": true,
    • "kind": "jira-cloud",
    • "lastUpdated": "string",
    • "message": "string",
    • "name": "string",
    • "updateUser": "string",
    • "url": "string"
    }

    Update a tracker.

    Update a tracker.

    +

    Response samples

    Content type
    application/json
    {
    • "connected": true,
    • "createTime": "string",
    • "createUser": "string",
    • "id": 0,
    • "identity": {
      },
    • "insecure": true,
    • "kind": "jira-cloud",
    • "lastUpdated": "string",
    • "message": "string",
    • "name": "string",
    • "updateUser": "string",
    • "url": "string"
    }

    Update a tracker.

    Update a tracker.

    path Parameters
    id
    required
    integer

    Tracker id

    Request Body schema: application/json

    Tracker data

    connected
    boolean
    createTime
    string
    createUser
    string
    id
    integer
    required
    object (api.Ref)
    insecure
    boolean
    kind
    required
    string
    Enum: "jira-cloud" "jira-onprem"
    lastUpdated
    string
    message
    string
    name
    required
    string
    updateUser
    string
    url
    required
    string

    Responses

    Request samples

    Content type
    application/json
    {
    • "connected": true,
    • "createTime": "string",
    • "createUser": "string",
    • "id": 0,
    • "identity": {
      },
    • "insecure": true,
    • "kind": "jira-cloud",
    • "lastUpdated": "string",
    • "message": "string",
    • "name": "string",
    • "updateUser": "string",
    • "url": "string"
    }

    Delete a tracker.

    Delete a tracker.

    +

    Request samples

    Content type
    application/json
    {
    • "connected": true,
    • "createTime": "string",
    • "createUser": "string",
    • "id": 0,
    • "identity": {
      },
    • "insecure": true,
    • "kind": "jira-cloud",
    • "lastUpdated": "string",
    • "message": "string",
    • "name": "string",
    • "updateUser": "string",
    • "url": "string"
    }

    Delete a tracker.

    Delete a tracker.

    path Parameters
    id
    required
    integer

    Tracker id

    Responses

    List a tracker's projects.

    List a tracker's projects.

    path Parameters
    id
    required
    string

    Tracker ID

    Responses

    Response samples

    Content type
    application/json
    [
    • {
      }
    ]

    Get a tracker project by ID.

    Get a tracker project by ID.

    +

    Response samples

    Content type
    application/json
    [
    • {
      }
    ]

    Get a tracker project by ID.

    Get a tracker project by ID.

    path Parameters
    id
    required
    string

    Tracker ID

    id2
    required
    string

    Project ID

    Responses

    Response samples

    Content type
    application/json
    {
    • "id": "string",
    • "name": "string"
    }

    List a tracker project's issue types.

    List a tracker project's issue types.

    +

    Response samples

    Content type
    application/json
    {
    • "id": "string",
    • "name": "string"
    }

    List a tracker project's issue types.

    List a tracker project's issue types.

    path Parameters
    id
    required
    string

    Tracker ID

    id2
    required
    string

    Project ID

    Responses

    Response samples

    Content type
    application/json
    [
    • {
      }
    ]
    +

    Response samples

    Content type
    application/json
    [
    • {
      }
    ]