2017-06-05 14:37:29 +00:00
{
"swagger" : "2.0" ,
"info" : {
2018-04-04 20:17:49 +00:00
"title" : "api/v3/clairpb/clair.proto" ,
2017-06-05 14:37:29 +00:00
"version" : "version not set"
} ,
"schemes" : [
"http" ,
"https"
] ,
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"paths" : {
"/ancestry" : {
"post" : {
2018-04-05 21:02:13 +00:00
"summary" : "The RPC used to create a new scan of an ancestry." ,
2017-06-05 14:37:29 +00:00
"operationId" : "PostAncestry" ,
"responses" : {
"200" : {
"description" : "" ,
"schema" : {
2018-04-22 19:11:41 +00:00
"$ref" : "#/definitions/clairPostAncestryResponse"
2017-06-05 14:37:29 +00:00
}
}
} ,
"parameters" : [
{
"name" : "body" ,
"in" : "body" ,
"required" : true ,
"schema" : {
2018-04-22 19:11:41 +00:00
"$ref" : "#/definitions/clairPostAncestryRequest"
2017-06-05 14:37:29 +00:00
}
}
] ,
"tags" : [
"AncestryService"
]
}
} ,
"/ancestry/{ancestry_name}" : {
"get" : {
2018-04-05 21:02:13 +00:00
"summary" : "The RPC used to read the results of scanning for a particular ancestry." ,
2017-06-05 14:37:29 +00:00
"operationId" : "GetAncestry" ,
"responses" : {
"200" : {
"description" : "" ,
"schema" : {
2018-04-22 19:11:41 +00:00
"$ref" : "#/definitions/clairGetAncestryResponse"
2017-06-05 14:37:29 +00:00
}
}
} ,
"parameters" : [
{
"name" : "ancestry_name" ,
"in" : "path" ,
"required" : true ,
"type" : "string"
} ,
{
"name" : "with_vulnerabilities" ,
2018-04-05 21:02:13 +00:00
"description" : "Whether to include vulnerabilities or not in the response." ,
2017-06-05 14:37:29 +00:00
"in" : "query" ,
"required" : false ,
"type" : "boolean" ,
"format" : "boolean"
} ,
{
"name" : "with_features" ,
2018-04-05 21:02:13 +00:00
"description" : "Whether to include features or not in the response." ,
2017-06-05 14:37:29 +00:00
"in" : "query" ,
"required" : false ,
"type" : "boolean" ,
"format" : "boolean"
}
] ,
"tags" : [
"AncestryService"
]
}
} ,
"/notifications/{name}" : {
"get" : {
2018-04-05 21:02:13 +00:00
"summary" : "The RPC used to get a particularly Notification." ,
2017-06-05 14:37:29 +00:00
"operationId" : "GetNotification" ,
"responses" : {
"200" : {
"description" : "" ,
"schema" : {
2018-04-22 19:11:41 +00:00
"$ref" : "#/definitions/clairGetNotificationResponse"
2017-06-05 14:37:29 +00:00
}
}
} ,
"parameters" : [
{
"name" : "name" ,
"in" : "path" ,
"required" : true ,
"type" : "string"
} ,
{
2017-07-12 21:04:05 +00:00
"name" : "old_vulnerability_page" ,
2018-04-05 21:02:13 +00:00
"description" : "The current page of previous vulnerabilities for the ancestry.\nThis will be empty when it is the first page." ,
2017-07-12 21:04:05 +00:00
"in" : "query" ,
"required" : false ,
"type" : "string"
} ,
{
"name" : "new_vulnerability_page" ,
2018-04-05 21:02:13 +00:00
"description" : "The current page of vulnerabilities for the ancestry.\nThis will be empty when it is the first page." ,
2017-06-05 14:37:29 +00:00
"in" : "query" ,
"required" : false ,
"type" : "string"
} ,
{
"name" : "limit" ,
2018-04-05 21:02:13 +00:00
"description" : "The requested maximum number of results per page." ,
2017-06-05 14:37:29 +00:00
"in" : "query" ,
"required" : false ,
"type" : "integer" ,
"format" : "int32"
}
] ,
"tags" : [
"NotificationService"
]
} ,
"delete" : {
2018-04-05 21:02:13 +00:00
"summary" : "The RPC used to mark a Notification as read after it has been processed." ,
2017-07-12 21:04:05 +00:00
"operationId" : "MarkNotificationAsRead" ,
2017-06-05 14:37:29 +00:00
"responses" : {
"200" : {
"description" : "" ,
"schema" : {
2018-04-23 19:36:52 +00:00
"$ref" : "#/definitions/clairMarkNotificationAsReadResponse"
2017-06-05 14:37:29 +00:00
}
}
} ,
"parameters" : [
{
"name" : "name" ,
"in" : "path" ,
"required" : true ,
"type" : "string"
}
] ,
"tags" : [
"NotificationService"
]
}
2018-08-30 19:09:24 +00:00
} ,
"/status" : {
"get" : {
"summary" : "The RPC used to show the internal state of current Clair instance." ,
"operationId" : "GetStatus" ,
"responses" : {
"200" : {
"description" : "" ,
"schema" : {
"$ref" : "#/definitions/clairGetStatusResponse"
}
}
} ,
"parameters" : [
{
"name" : "test" ,
"in" : "query" ,
"required" : false ,
"type" : "string"
}
] ,
"tags" : [
"StatusService"
]
}
2017-06-05 14:37:29 +00:00
}
} ,
"definitions" : {
2018-04-05 21:02:13 +00:00
"GetAncestryResponseAncestry" : {
2017-06-05 14:37:29 +00:00
"type" : "object" ,
"properties" : {
"name" : {
2018-04-05 21:02:13 +00:00
"type" : "string" ,
"description" : "The name of the desired ancestry."
2017-06-05 14:37:29 +00:00
} ,
2017-07-12 21:04:05 +00:00
"features" : {
"type" : "array" ,
"items" : {
2018-04-22 19:11:41 +00:00
"$ref" : "#/definitions/clairFeature"
2018-04-05 21:02:13 +00:00
} ,
"description" : "The list of features present in the ancestry.\nThis will only be provided if requested."
2017-06-05 14:37:29 +00:00
} ,
"layers" : {
"type" : "array" ,
"items" : {
2018-04-22 19:11:41 +00:00
"$ref" : "#/definitions/clairLayer"
2018-04-05 21:02:13 +00:00
} ,
"description" : "The layers present in the ancestry."
2017-07-12 21:04:05 +00:00
} ,
"scanned_listers" : {
"type" : "array" ,
"items" : {
"type" : "string"
} ,
2018-04-05 21:02:13 +00:00
"description" : "The configured list of feature listers used to scan this ancestry."
2017-07-12 21:04:05 +00:00
} ,
"scanned_detectors" : {
"type" : "array" ,
"items" : {
"type" : "string"
2018-04-05 21:02:13 +00:00
} ,
"description" : "The configured list of namespace detectors used to scan an ancestry."
}
}
} ,
"GetNotificationResponseNotification" : {
"type" : "object" ,
"properties" : {
"name" : {
"type" : "string" ,
"description" : "The name of the requested notification."
} ,
"created" : {
"type" : "string" ,
"description" : "The time at which the notification was created."
} ,
"notified" : {
"type" : "string" ,
"description" : "The time at which the notification was last sent out."
} ,
"deleted" : {
"type" : "string" ,
"description" : "The time at which a notification has been deleted."
} ,
"old" : {
2018-04-22 19:11:41 +00:00
"$ref" : "#/definitions/clairPagedVulnerableAncestries" ,
2018-04-05 21:02:13 +00:00
"description" : "The previous vulnerability and a paginated view of the ancestries it affects."
} ,
"new" : {
2018-04-22 19:11:41 +00:00
"$ref" : "#/definitions/clairPagedVulnerableAncestries" ,
2018-04-05 21:02:13 +00:00
"description" : "The newly updated vulnerability and a paginated view of the ancestries it affects."
}
}
} ,
"PagedVulnerableAncestriesIndexedAncestryName" : {
"type" : "object" ,
"properties" : {
"index" : {
"type" : "integer" ,
"format" : "int32" ,
"description" : "The index is an ever increasing number associated with the particular ancestry.\nThis is useful if you're processing notifications, and need to keep track of the progress of paginating the results."
} ,
"name" : {
"type" : "string" ,
"description" : "The name of the ancestry."
}
}
} ,
"PostAncestryRequestPostLayer" : {
"type" : "object" ,
"properties" : {
"hash" : {
"type" : "string" ,
"description" : "The hash of the layer."
} ,
"path" : {
"type" : "string" ,
"description" : "The location of the layer (URL or filepath)."
} ,
"headers" : {
"type" : "object" ,
"additionalProperties" : {
"type" : "string"
} ,
"description" : "Any HTTP Headers that need to be used if requesting a layer over HTTP(S)."
2017-07-12 21:04:05 +00:00
}
}
} ,
2018-04-22 19:11:41 +00:00
"clairClairStatus" : {
2017-07-12 21:04:05 +00:00
"type" : "object" ,
"properties" : {
"listers" : {
"type" : "array" ,
"items" : {
"type" : "string"
} ,
2018-04-05 21:02:13 +00:00
"description" : "The configured list of feature listers used to scan an ancestry."
2017-07-12 21:04:05 +00:00
} ,
"detectors" : {
"type" : "array" ,
"items" : {
"type" : "string"
2018-04-05 21:02:13 +00:00
} ,
"description" : "The configured list of namespace detectors used to scan an ancestry."
2017-07-12 21:04:05 +00:00
} ,
"last_update_time" : {
"type" : "string" ,
2018-04-05 21:02:13 +00:00
"format" : "date-time" ,
"description" : "The time at which the updater last ran."
2017-06-05 14:37:29 +00:00
}
}
} ,
2018-04-22 19:11:41 +00:00
"clairFeature" : {
2017-06-05 14:37:29 +00:00
"type" : "object" ,
"properties" : {
"name" : {
2018-04-05 21:02:13 +00:00
"type" : "string" ,
"description" : "The name of the feature."
2017-06-05 14:37:29 +00:00
} ,
"namespace_name" : {
2018-04-05 21:02:13 +00:00
"type" : "string" ,
"description" : "The name of the namespace in which the feature is detected."
2017-06-05 14:37:29 +00:00
} ,
"version" : {
2018-04-05 21:02:13 +00:00
"type" : "string" ,
"description" : "The specific version of this feature."
2017-06-05 14:37:29 +00:00
} ,
"version_format" : {
2018-02-02 05:53:40 +00:00
"type" : "string" ,
2018-04-05 21:02:13 +00:00
"description" : "The format used to parse version numbers for the feature."
2017-06-05 14:37:29 +00:00
} ,
"vulnerabilities" : {
"type" : "array" ,
"items" : {
2018-04-22 19:11:41 +00:00
"$ref" : "#/definitions/clairVulnerability"
2018-04-05 21:02:13 +00:00
} ,
"description" : "The list of vulnerabilities that affect the feature."
2017-06-05 14:37:29 +00:00
}
}
} ,
2018-04-22 19:11:41 +00:00
"clairGetAncestryResponse" : {
2017-06-05 14:37:29 +00:00
"type" : "object" ,
"properties" : {
"ancestry" : {
2018-04-05 21:02:13 +00:00
"$ref" : "#/definitions/GetAncestryResponseAncestry" ,
"description" : "The ancestry requested."
2017-06-05 14:37:29 +00:00
} ,
2017-07-12 21:04:05 +00:00
"status" : {
2018-04-22 19:11:41 +00:00
"$ref" : "#/definitions/clairClairStatus" ,
2018-04-05 21:02:13 +00:00
"description" : "The status of Clair at the time of the request."
2017-06-05 14:37:29 +00:00
}
}
} ,
2018-04-22 19:11:41 +00:00
"clairGetNotificationResponse" : {
2017-06-05 14:37:29 +00:00
"type" : "object" ,
"properties" : {
"notification" : {
2018-04-05 21:02:13 +00:00
"$ref" : "#/definitions/GetNotificationResponseNotification" ,
"description" : "The notification as requested."
2017-06-05 14:37:29 +00:00
}
}
} ,
2018-08-30 19:09:24 +00:00
"clairGetStatusResponse" : {
"type" : "object" ,
"properties" : {
"status" : {
"$ref" : "#/definitions/clairClairStatus" ,
"description" : "The status of the current Clair instance."
}
}
} ,
2018-04-22 19:11:41 +00:00
"clairLayer" : {
2017-06-05 14:37:29 +00:00
"type" : "object" ,
"properties" : {
2017-07-12 21:04:05 +00:00
"hash" : {
2018-04-05 21:02:13 +00:00
"type" : "string" ,
"description" : "The sha256 tarsum for the layer."
2017-06-05 14:37:29 +00:00
}
}
} ,
2018-04-23 19:36:52 +00:00
"clairMarkNotificationAsReadResponse" : {
"type" : "object"
} ,
2018-04-22 19:11:41 +00:00
"clairPagedVulnerableAncestries" : {
2017-06-05 14:37:29 +00:00
"type" : "object" ,
"properties" : {
2017-07-12 21:04:05 +00:00
"current_page" : {
2018-04-05 21:02:13 +00:00
"type" : "string" ,
"description" : "The identifier for the current page."
2017-06-05 14:37:29 +00:00
} ,
2017-07-12 21:04:05 +00:00
"next_page" : {
"type" : "string" ,
2018-04-05 21:02:13 +00:00
"description" : "The token used to request the next page.\nThis will be empty when there are no more pages."
2017-06-05 14:37:29 +00:00
} ,
2017-07-12 21:04:05 +00:00
"limit" : {
"type" : "integer" ,
2018-04-05 21:02:13 +00:00
"format" : "int32" ,
"description" : "The requested maximum number of results per page."
2017-06-05 14:37:29 +00:00
} ,
2017-07-12 21:04:05 +00:00
"vulnerability" : {
2018-04-22 19:11:41 +00:00
"$ref" : "#/definitions/clairVulnerability" ,
2018-04-05 21:02:13 +00:00
"description" : "The vulnerability that affects a given set of ancestries."
2017-07-12 21:04:05 +00:00
} ,
"ancestries" : {
"type" : "array" ,
"items" : {
2018-04-05 21:02:13 +00:00
"$ref" : "#/definitions/PagedVulnerableAncestriesIndexedAncestryName"
} ,
"description" : "The ancestries affected by a vulnerability."
2017-06-05 14:37:29 +00:00
}
}
} ,
2018-04-22 19:11:41 +00:00
"clairPostAncestryRequest" : {
2017-06-05 14:37:29 +00:00
"type" : "object" ,
"properties" : {
"ancestry_name" : {
2018-04-05 21:02:13 +00:00
"type" : "string" ,
"description" : "The name of the ancestry being scanned.\nIf scanning OCI images, this should be the hash of the manifest."
2017-06-05 14:37:29 +00:00
} ,
"format" : {
2018-04-05 21:02:13 +00:00
"type" : "string" ,
"description" : "The format of the image being uploaded."
2017-06-05 14:37:29 +00:00
} ,
"layers" : {
"type" : "array" ,
"items" : {
"$ref" : "#/definitions/PostAncestryRequestPostLayer"
2018-04-05 21:02:13 +00:00
} ,
"description" : "The layers to be scanned for this particular ancestry."
2017-06-05 14:37:29 +00:00
}
}
} ,
2018-04-22 19:11:41 +00:00
"clairPostAncestryResponse" : {
2017-06-05 14:37:29 +00:00
"type" : "object" ,
"properties" : {
2017-07-12 21:04:05 +00:00
"status" : {
2018-04-22 19:11:41 +00:00
"$ref" : "#/definitions/clairClairStatus" ,
2018-04-05 21:02:13 +00:00
"description" : "The status of Clair at the time of the request."
2017-06-05 14:37:29 +00:00
}
}
} ,
2018-04-22 19:11:41 +00:00
"clairVulnerability" : {
2017-06-05 14:37:29 +00:00
"type" : "object" ,
"properties" : {
"name" : {
2018-04-05 21:02:13 +00:00
"type" : "string" ,
"description" : "The name of the vulnerability."
2017-06-05 14:37:29 +00:00
} ,
"namespace_name" : {
2018-04-05 21:02:13 +00:00
"type" : "string" ,
"description" : "The name of the namespace in which the vulnerability was detected."
2017-06-05 14:37:29 +00:00
} ,
"description" : {
2018-04-05 21:02:13 +00:00
"type" : "string" ,
"description" : "A description of the vulnerability according to the source for the namespace."
2017-06-05 14:37:29 +00:00
} ,
"link" : {
2018-04-05 21:02:13 +00:00
"type" : "string" ,
"description" : "A link to the vulnerability according to the source for the namespace."
2017-06-05 14:37:29 +00:00
} ,
"severity" : {
2018-04-05 21:02:13 +00:00
"type" : "string" ,
"description" : "How dangerous the vulnerability is."
2017-06-05 14:37:29 +00:00
} ,
"metadata" : {
2018-04-05 21:02:13 +00:00
"type" : "string" ,
"description" : "Namespace agnostic metadata about the vulnerability."
2017-06-05 14:37:29 +00:00
} ,
"fixed_by" : {
2017-07-12 21:04:05 +00:00
"type" : "string" ,
2018-04-05 21:02:13 +00:00
"description" : "The feature that fixes this vulnerability.\nThis field only exists when a vulnerability is a part of a Feature."
2017-06-05 14:37:29 +00:00
} ,
2017-07-12 21:04:05 +00:00
"affected_versions" : {
2017-06-05 14:37:29 +00:00
"type" : "array" ,
"items" : {
2018-04-22 19:11:41 +00:00
"$ref" : "#/definitions/clairFeature"
2017-07-12 21:04:05 +00:00
} ,
2018-04-05 21:02:13 +00:00
"description" : "The Features that are affected by the vulnerability.\nThis field only exists when a vulnerability is a part of a Notification."
2017-06-05 14:37:29 +00:00
}
}
}
}
}