Skip to content

Commit

Permalink
openapi changes
Browse files Browse the repository at this point in the history
  • Loading branch information
stephanieslamb committed Oct 16, 2024
1 parent 1bfc649 commit 537f62c
Show file tree
Hide file tree
Showing 4 changed files with 457 additions and 16 deletions.
248 changes: 238 additions & 10 deletions packages/go/openapi/doc/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -12166,23 +12166,22 @@
"get": {
"operationId": "ListDomainAttackPathsDetails",
"summary": "List domain attack paths details",
"description": "Lists detailed data about attack paths for a domain.",
"description": "Lists detailed data about attack paths for a domain. \n\n__Note:__ __Note:__ `ImpactCount`, `ImpactPercentage`, `ExposureCount`, and `ExposurePercentage` will have a value other than zero when butterfly analysis is enabled.\n",
"tags": [
"Attack Paths",
"Enterprise"
],
"parameters": [
{
"name": "finding",
"x-go-name": "FindingDeprecated",
"in": "query",
"schema": {
"$ref": "#/components/schemas/api.params.predicate.filter.string"
}
},
{
"name": "sort_by",
"description": "Sortable columns are `domain_sid`, `index`, `AcceptedUntil`, `id`, `created_at`, `updated_at`, `deleted_at`. Relationship risks can be sorted on `FromPrincipal` and `ToPrincipal` in addition to the sortable columns for List Risks.",
"description": "Sortable columns are `domain_sid`, `index`, `AcceptedUntil`, `id`, `created_at`, `updated_at`, `deleted_at`, `exposure_percent`, `impact_percent`. Relationship risks can be sorted on `FromPrincipal` and `ToPrincipal` in addition to the sortable columns for List Risks.",
"in": "query",
"schema": {
"$ref": "#/components/schemas/api.params.query.sort-by"
Expand All @@ -12191,7 +12190,6 @@
{
"name": "FromPrincipal",
"deprecated": true,
"x-go-name": "FromPrincipalDeprecated",
"in": "query",
"schema": {
"$ref": "#/components/schemas/api.params.predicate.filter.string"
Expand All @@ -12200,7 +12198,6 @@
{
"name": "ToPrincipal",
"deprecated": true,
"x-go-name": "ToPrincipalDeprecated",
"in": "query",
"schema": {
"$ref": "#/components/schemas/api.params.predicate.filter.string"
Expand Down Expand Up @@ -12237,7 +12234,6 @@
{
"name": "AcceptedUntil",
"deprecated": true,
"x-go-name": "AcceptedUntilDeprecated",
"in": "query",
"schema": {
"$ref": "#/components/schemas/api.params.predicate.filter.time"
Expand All @@ -12259,6 +12255,7 @@
},
{
"name": "Finding",
"deprecated": true,
"in": "query",
"schema": {
"$ref": "#/components/schemas/api.params.predicate.filter.string"
Expand Down Expand Up @@ -12362,6 +12359,186 @@
]
}
]
},
"examples": {
"Butterfly Relationship Finding": {
"summary": "Butterfly Relationship Finding",
"description": "When the butterfly analysis feature flag is on, impact count/percentage and exposure count/percentage will have a value other than zero.",
"value": {
"count": 0,
"skip": 0,
"limit": 0,
"data": [
{
"id": 0,
"created_at": "2024-08-28T21:21:40.845Z",
"updated_at": "2024-08-28T21:21:40.845Z",
"deleted_at": {
"time": "2024-08-28T21:21:40.845Z",
"valid": true
},
"FromPrincipal": "string",
"ToPrincipal": "string",
"FromPrincipalProps": {
"additionalProp1": {},
"additionalProp2": {},
"additionalProp3": {}
},
"FromPrincipalKind": "string",
"ToPrincipalProps": {
"additionalProp1": {},
"additionalProp2": {},
"additionalProp3": {}
},
"ToPrincipalKind": "string",
"RelProps": {
"additionalProp1": {},
"additionalProp2": {},
"additionalProp3": {}
},
"ComboGraphRelationID": {
"int64": 0,
"valid": true
},
"Finding": "string",
"DomainSID": "string",
"PrincipalHash": "string",
"AcceptedUntil": "2024-08-28T21:21:40.845Z",
"ImpactPercentage": 12,
"ImpactCount": 2,
"ExposurePercentage": 24,
"ExposureCount": 4,
"Severity": "high",
"Accepted": true
}
]
}
},
"Metatree Relationship Finding": {
"summary": "Metatree Relationship Finding",
"description": "When the butterfly analysis feature flag is off and metatree is running, impact count/percentage and exposure count/percentage will have a value of zero.",
"value": {
"count": 0,
"skip": 0,
"limit": 0,
"data": [
{
"id": 0,
"created_at": "2024-08-28T21:21:40.845Z",
"updated_at": "2024-08-28T21:21:40.845Z",
"deleted_at": {
"time": "2024-08-28T21:21:40.845Z",
"valid": true
},
"FromPrincipal": "string",
"ToPrincipal": "string",
"FromPrincipalProps": {
"additionalProp1": {},
"additionalProp2": {},
"additionalProp3": {}
},
"FromPrincipalKind": "string",
"ToPrincipalProps": {
"additionalProp1": {},
"additionalProp2": {},
"additionalProp3": {}
},
"ToPrincipalKind": "string",
"RelProps": {
"additionalProp1": {},
"additionalProp2": {},
"additionalProp3": {}
},
"ComboGraphRelationID": {
"int64": 0,
"valid": true
},
"Finding": "string",
"DomainSID": "string",
"PrincipalHash": "string",
"AcceptedUntil": "2024-08-28T21:21:40.845Z",
"ImpactPercentage": 0,
"ImpactCount": 0,
"ExposurePercentage": 0,
"ExposureCount": 0,
"Severity": "",
"Accepted": true
}
]
}
},
"Butterfly List Finding": {
"summary": "Butterfly List Finding",
"description": "When the butterfly analysis feature flag is on, impact count/percentage and exposure count/percentage will have a value other than zero.",
"value": {
"count": "0,",
"skip": "0,",
"limit": "0,",
"data": [
{
"id": 0,
"created_at": "2024-08-28T21:42:18.844Z",
"updated_at": "2024-08-28T21:42:18.844Z",
"deleted_at": {
"time": "2024-08-28T21:42:18.844Z",
"valid": true
},
"Principal": "string",
"PrincipalKind": "string",
"Finding": "string",
"DomainSID": "string",
"Props": {
"additionalProp1": {},
"additionalProp2": {},
"additionalProp3": {}
},
"accepted_until": "2024-08-28T21:42:18.844Z",
"ImpactPercentage": 12,
"ImpactCount": 2,
"ExposurePercentage": 24,
"ExposureCount": 4,
"Severity": "high",
"Accepted": true
}
]
}
},
"Metatree List Finding": {
"summary": "Metatree List Finding",
"description": "When the butterfly analysis feature flag is off and metatree is running, impact count/percentage and exposure count/percentage will have a value of zero.",
"value": {
"count": "0,",
"skip": "0,",
"limit": "0,",
"data": [
{
"id": 0,
"created_at": "2024-08-28T21:42:18.844Z",
"updated_at": "2024-08-28T21:42:18.844Z",
"deleted_at": {
"time": "2024-08-28T21:42:18.844Z",
"valid": true
},
"Principal": "string",
"PrincipalKind": "string",
"Finding": "string",
"DomainSID": "string",
"Props": {
"additionalProp1": {},
"additionalProp2": {},
"additionalProp3": {}
},
"accepted_until": "2024-08-28T21:42:18.844Z",
"ImpactPercentage": 0,
"ImpactCount": 0,
"ExposurePercentage": 0,
"ExposureCount": 0,
"Severity": "",
"Accepted": true
}
]
}
}
}
}
}
Expand Down Expand Up @@ -12881,15 +13058,14 @@
},
"query.entity.type": {
"name": "type",
"description": "The type of return data requested. If no type is provided, query will default to `list`.\nThe only supported type is `list`, but unsupported `graph` and `count` can be used.\nAn invalid type will result in a `count` query. Some entity query endpoints do not\nsupport the `graph` type.\n",
"description": "The type of return data requested. If no type is provided, query will default to `list`.\nThe only supported type is `list`, but the unsupported `graph` type can be used.\nSome entity query endpoints do not support the `graph` type. For those interested in\nusing the undocumented graph type parameter, the response type is described in the schema\n`model.bh-graph.graph`.\n",
"in": "query",
"schema": {
"type": "string",
"default": "list",
"enum": [
"list",
"graph",
"count"
"graph"
]
}
},
Expand Down Expand Up @@ -15400,6 +15576,32 @@
"AcceptedUntil": {
"type": "string",
"format": "date-time"
},
"ImpactPercentage": {
"type": "number",
"format": "double"
},
"ImpactCount": {
"type": "integer",
"format": "int64"
},
"ExposurePercentage": {
"type": "number",
"format": "double"
},
"ExposureCount": {
"type": "integer",
"format": "int64"
},
"Severity": {
"type": "string",
"enum": [
"critical",
"high",
"moderate",
"low",
""
]
}
}
}
Expand Down Expand Up @@ -15437,6 +15639,32 @@
"accepted_until": {
"type": "string",
"format": "date-time"
},
"ImpactPercentage": {
"type": "number",
"format": "double"
},
"ImpactCount": {
"type": "integer",
"format": "int64"
},
"ExposurePercentage": {
"type": "number",
"format": "double"
},
"ExposureCount": {
"type": "integer",
"format": "int64"
},
"Severity": {
"type": "string",
"enum": [
"critical",
"high",
"moderate",
"low",
""
]
}
}
}
Expand Down Expand Up @@ -15709,7 +15937,7 @@
}
},
"related-entity-query-results": {
"description": "**OK**\n\nThis endpoint returns a response, dependent upon which return type is requested by the `type` parameter.\nThe only supported `type` parameter is `list`.\nWhile `list` is the only supported `type` parameter, the `count` or `graph` parameters can be used\nand will result in a different response structure then documented here.\nFor those interested in using the undocumented graph type parameter, the response type is described in the schema\nmodel.bh-graph.graph.\n",
"description": "**OK**\n\nThis endpoint returns a response, dependent upon which return type is requested by the `type` parameter.\nThe only supported `type` parameter is `list`.\nWhile `list` is the only supported `type` parameter, the `graph` parameter can be used\nand will result in a different response structure then documented here.\nFor those interested in using the undocumented graph type parameter, the response type is described in the schema\n`model.bh-graph.graph`.\n",
"content": {
"application/json": {
"schema": {
Expand Down
Loading

0 comments on commit 537f62c

Please sign in to comment.