From bc00aaccff9c304da9193419184d0f4927f9f189 Mon Sep 17 00:00:00 2001 From: Ana Cruz Date: Fri, 29 May 2026 19:07:59 -0500 Subject: [PATCH 1/3] Add issues api endpoints --- runzero-api.yml | 172 +++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 171 insertions(+), 1 deletion(-) diff --git a/runzero-api.yml b/runzero-api.yml index 28628ef..37d5ccc 100644 --- a/runzero-api.yml +++ b/runzero-api.yml @@ -2683,6 +2683,68 @@ paths: '404': $ref: '#/components/responses/NotFoundError' + /org/issues: + parameters: + - $ref: '#/components/parameters/orgID' + get: + tags: + - Organization + operationId: getIssues + summary: Get all issues (up to 1000) + parameters: + - in: query + name: search + description: an optional search string for filtering results + required: false + schema: + type: string + responses: + '200': + description: array of issues + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Issue' + '403': + $ref: '#/components/responses/NotAllowedForLicenseError' + '422': + $ref: '#/components/responses/InvalidRequestBodyError' + '500': + $ref: '#/components/responses/InternalServerError' + + /org/issues/{issue_id}: + parameters: + - $ref: '#/components/parameters/orgID' + patch: + tags: + - Organization + operationId: updateIssue + summary: Update issue + requestBody: + description: issue object + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/IssueOptions' + responses: + '200': + description: issue details + content: + application/json: + schema: + $ref: '#/components/schemas/Issue' + '403': + $ref: '#/components/responses/NotAllowedForLicenseError' + '400': + $ref: '#/components/responses/InvalidRequestBodyError' + '404': + $ref: '#/components/responses/NotFoundError' + '500': + $ref: '#/components/responses/InternalServerError' + /account/orgs: get: tags: @@ -7627,7 +7689,7 @@ components: example: "e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8" hosted_zone_id: description: | - The ID of the Hosted Zone which executes the task. If the + The ID of the Hosted Zone which executes the task. type: string format: uuid example: "e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8" @@ -8904,3 +8966,111 @@ components: type: string maxLength: 1024 example: [ "tag1", "tag2" ] + + Issue: + description: A single issue. + type: object + properties: + id: + type: string + format: uuid + example: "e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8" + org_id: + type: string + format: uuid + example: "e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8" + client_id: + type: string + format: uuid + example: "e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8" + name: + type: string + example: "Sample Issue" + description: + type: string + solution: + type: string + created_at: + type: integer + format: int64 + example: 1576300370 + updated_at: + type: integer + format: int64 + example: 1576300370 + created_by: + type: string + example: user@example.com + risk: + type: string + example: "high" + risk_rank: + type: integer + example: 1 + state: + type: string + example: "in progress" + state_rank: + type: integer + example: 1 + due_date: + type: integer + nullable: true + format: int64 + example: 1576300370 + external_sync_config: + type: object + properties: + credential_id: + type: string + format: uuid + example: "e77602e0-3fb8-4734-aef9-fbc6fdcb0fa8" + base_url: + type: string + example: "https://example.com" + external_id: + type: string + external_link: + type: string + instances: + type: integer + example: 1 + remediated_instance_count: + type: integer + example: 1 + recurrence_count: + type: integer + example: 1 + recurrence_at: + type: integer + format: int64 + example: 1576300370 + remediated_at: + type: integer + format: int64 + example: 1576300370 + + IssueOptions: + type: object + properties: + name: + type: string + example: "Sample Issue" + description: + type: string + solution: + type: string + risk: + type: string + example: "high" + state: + type: string + example: "in progress" + due_date: + type: integer + nullable: true + format: int64 + example: 1576300370 + comment: + type: string + example: "This is a comment on the issue." \ No newline at end of file From 6b552eae663878be0dff4a04c1683c988dac145f Mon Sep 17 00:00:00 2001 From: Ana Cruz Date: Mon, 1 Jun 2026 09:56:54 -0500 Subject: [PATCH 2/3] Fix description casing --- runzero-api.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/runzero-api.yml b/runzero-api.yml index 37d5ccc..dcadba4 100644 --- a/runzero-api.yml +++ b/runzero-api.yml @@ -2694,13 +2694,13 @@ paths: parameters: - in: query name: search - description: an optional search string for filtering results + description: An optional search string for filtering results required: false schema: type: string responses: '200': - description: array of issues + description: Array of issues content: application/json: schema: @@ -2723,7 +2723,7 @@ paths: operationId: updateIssue summary: Update issue requestBody: - description: issue object + description: Issue object required: true content: application/json: @@ -2731,7 +2731,7 @@ paths: $ref: '#/components/schemas/IssueOptions' responses: '200': - description: issue details + description: Issue details content: application/json: schema: From 20e591a0579e2fc5401fa671cf6be0fb994fabc3 Mon Sep 17 00:00:00 2001 From: Ana Cruz Date: Mon, 1 Jun 2026 10:47:17 -0500 Subject: [PATCH 3/3] Use search component ref --- runzero-api.yml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/runzero-api.yml b/runzero-api.yml index dcadba4..6e8d87b 100644 --- a/runzero-api.yml +++ b/runzero-api.yml @@ -2692,12 +2692,7 @@ paths: operationId: getIssues summary: Get all issues (up to 1000) parameters: - - in: query - name: search - description: An optional search string for filtering results - required: false - schema: - type: string + - $ref: '#/components/parameters/search' responses: '200': description: Array of issues