Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
172 changes: 171 additions & 1 deletion runzero-api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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."