2017-06-05 14:37:29 +00:00
{
"swagger" : "2.0" ,
"info" : {
"title" : "clair.proto" ,
"version" : "version not set"
} ,
"schemes" : [
"http" ,
"https"
] ,
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"paths" : {
"/ancestry" : {
"post" : {
"operationId" : "PostAncestry" ,
"responses" : {
"200" : {
"description" : "" ,
"schema" : {
"$ref" : "#/definitions/clairpbPostAncestryResponse"
}
}
} ,
"parameters" : [
{
"name" : "body" ,
"in" : "body" ,
"required" : true ,
"schema" : {
"$ref" : "#/definitions/clairpbPostAncestryRequest"
}
}
] ,
"tags" : [
"AncestryService"
]
}
} ,
"/ancestry/{ancestry_name}" : {
"get" : {
"operationId" : "GetAncestry" ,
"responses" : {
"200" : {
"description" : "" ,
"schema" : {
"$ref" : "#/definitions/clairpbGetAncestryResponse"
}
}
} ,
"parameters" : [
{
"name" : "ancestry_name" ,
"in" : "path" ,
"required" : true ,
"type" : "string"
} ,
{
"name" : "with_vulnerabilities" ,
"in" : "query" ,
"required" : false ,
"type" : "boolean" ,
"format" : "boolean"
} ,
{
"name" : "with_features" ,
"in" : "query" ,
"required" : false ,
"type" : "boolean" ,
"format" : "boolean"
}
] ,
"tags" : [
"AncestryService"
]
}
} ,
"/notifications/{name}" : {
"get" : {
"operationId" : "GetNotification" ,
"responses" : {
"200" : {
"description" : "" ,
"schema" : {
"$ref" : "#/definitions/clairpbGetNotificationResponse"
}
}
} ,
"parameters" : [
{
"name" : "name" ,
"in" : "path" ,
"required" : true ,
"type" : "string"
} ,
{
2017-07-12 21:04:05 +00:00
"name" : "old_vulnerability_page" ,
"description" : "if the vulnerability_page is empty, it implies the first page." ,
"in" : "query" ,
"required" : false ,
"type" : "string"
} ,
{
"name" : "new_vulnerability_page" ,
2017-06-05 14:37:29 +00:00
"in" : "query" ,
"required" : false ,
"type" : "string"
} ,
{
"name" : "limit" ,
"in" : "query" ,
"required" : false ,
"type" : "integer" ,
"format" : "int32"
}
] ,
"tags" : [
"NotificationService"
]
} ,
"delete" : {
2017-07-12 21:04:05 +00:00
"operationId" : "MarkNotificationAsRead" ,
2017-06-05 14:37:29 +00:00
"responses" : {
"200" : {
"description" : "" ,
"schema" : {
"$ref" : "#/definitions/protobufEmpty"
}
}
} ,
"parameters" : [
{
"name" : "name" ,
"in" : "path" ,
"required" : true ,
"type" : "string"
}
] ,
"tags" : [
"NotificationService"
]
}
}
} ,
"definitions" : {
"PostAncestryRequestPostLayer" : {
"type" : "object" ,
"properties" : {
2017-07-12 21:04:05 +00:00
"hash" : {
2017-06-05 14:37:29 +00:00
"type" : "string"
} ,
"path" : {
"type" : "string"
} ,
"headers" : {
"type" : "object" ,
"additionalProperties" : {
"type" : "string"
}
}
}
} ,
"clairpbAncestry" : {
"type" : "object" ,
"properties" : {
"name" : {
"type" : "string"
} ,
2017-07-12 21:04:05 +00:00
"features" : {
"type" : "array" ,
"items" : {
"$ref" : "#/definitions/clairpbFeature"
}
2017-06-05 14:37:29 +00:00
} ,
"layers" : {
"type" : "array" ,
"items" : {
"$ref" : "#/definitions/clairpbLayer"
}
2017-07-12 21:04:05 +00:00
} ,
"scanned_listers" : {
"type" : "array" ,
"items" : {
"type" : "string"
} ,
"description" : "scanned_listers and scanned_detectors are used to scan this ancestry, it\nmay be different from listers and detectors in ClairStatus since the\nancestry could be scanned by previous version of Clair."
} ,
"scanned_detectors" : {
"type" : "array" ,
"items" : {
"type" : "string"
}
}
}
} ,
"clairpbClairStatus" : {
"type" : "object" ,
"properties" : {
"listers" : {
"type" : "array" ,
"items" : {
"type" : "string"
} ,
"title" : "listers and detectors are processors implemented in this Clair and used to\nscan ancestries"
} ,
"detectors" : {
"type" : "array" ,
"items" : {
"type" : "string"
}
} ,
"last_update_time" : {
"type" : "string" ,
"format" : "date-time"
2017-06-05 14:37:29 +00:00
}
}
} ,
"clairpbFeature" : {
"type" : "object" ,
"properties" : {
"name" : {
"type" : "string"
} ,
"namespace_name" : {
"type" : "string"
} ,
"version" : {
"type" : "string"
} ,
"version_format" : {
"type" : "string"
} ,
"vulnerabilities" : {
"type" : "array" ,
"items" : {
"$ref" : "#/definitions/clairpbVulnerability"
}
}
}
} ,
"clairpbGetAncestryResponse" : {
"type" : "object" ,
"properties" : {
"ancestry" : {
"$ref" : "#/definitions/clairpbAncestry"
} ,
2017-07-12 21:04:05 +00:00
"status" : {
"$ref" : "#/definitions/clairpbClairStatus"
2017-06-05 14:37:29 +00:00
}
}
} ,
"clairpbGetNotificationResponse" : {
"type" : "object" ,
"properties" : {
"notification" : {
"$ref" : "#/definitions/clairpbNotification"
}
}
} ,
2017-07-12 21:04:05 +00:00
"clairpbIndexedAncestryName" : {
2017-06-05 14:37:29 +00:00
"type" : "object" ,
"properties" : {
2017-07-12 21:04:05 +00:00
"index" : {
"type" : "integer" ,
"format" : "int32" ,
"description" : "index is unique to name in all streams simultaneously streamed, increasing\nand larger than all indexes in previous page in same stream."
} ,
2017-06-05 14:37:29 +00:00
"name" : {
"type" : "string"
}
}
} ,
2017-07-12 21:04:05 +00:00
"clairpbLayer" : {
2017-06-05 14:37:29 +00:00
"type" : "object" ,
"properties" : {
2017-07-12 21:04:05 +00:00
"hash" : {
"type" : "string"
2017-06-05 14:37:29 +00:00
}
}
} ,
"clairpbNotification" : {
"type" : "object" ,
"properties" : {
"name" : {
"type" : "string"
} ,
"created" : {
"type" : "string"
} ,
"notified" : {
"type" : "string"
} ,
"deleted" : {
"type" : "string"
} ,
2017-07-12 21:04:05 +00:00
"old" : {
"$ref" : "#/definitions/clairpbPagedVulnerableAncestries"
2017-06-05 14:37:29 +00:00
} ,
2017-07-12 21:04:05 +00:00
"new" : {
"$ref" : "#/definitions/clairpbPagedVulnerableAncestries"
2017-06-05 14:37:29 +00:00
}
}
} ,
2017-07-12 21:04:05 +00:00
"clairpbPagedVulnerableAncestries" : {
2017-06-05 14:37:29 +00:00
"type" : "object" ,
"properties" : {
2017-07-12 21:04:05 +00:00
"current_page" : {
2017-06-05 14:37:29 +00:00
"type" : "string"
} ,
2017-07-12 21:04:05 +00:00
"next_page" : {
"type" : "string" ,
"description" : "if next_page is empty, it signals the end of all pages."
2017-06-05 14:37:29 +00:00
} ,
2017-07-12 21:04:05 +00:00
"limit" : {
"type" : "integer" ,
"format" : "int32"
2017-06-05 14:37:29 +00:00
} ,
2017-07-12 21:04:05 +00:00
"vulnerability" : {
"$ref" : "#/definitions/clairpbVulnerability"
} ,
"ancestries" : {
"type" : "array" ,
"items" : {
"$ref" : "#/definitions/clairpbIndexedAncestryName"
}
2017-06-05 14:37:29 +00:00
}
}
} ,
"clairpbPostAncestryRequest" : {
"type" : "object" ,
"properties" : {
"ancestry_name" : {
"type" : "string"
} ,
"format" : {
"type" : "string"
} ,
"layers" : {
"type" : "array" ,
"items" : {
"$ref" : "#/definitions/PostAncestryRequestPostLayer"
}
}
}
} ,
"clairpbPostAncestryResponse" : {
"type" : "object" ,
"properties" : {
2017-07-12 21:04:05 +00:00
"status" : {
"$ref" : "#/definitions/clairpbClairStatus"
2017-06-05 14:37:29 +00:00
}
}
} ,
"clairpbVulnerability" : {
"type" : "object" ,
"properties" : {
"name" : {
"type" : "string"
} ,
"namespace_name" : {
"type" : "string"
} ,
"description" : {
"type" : "string"
} ,
"link" : {
"type" : "string"
} ,
"severity" : {
"type" : "string"
} ,
"metadata" : {
"type" : "string"
} ,
"fixed_by" : {
2017-07-12 21:04:05 +00:00
"type" : "string" ,
"description" : "fixed_by exists when vulnerability is under 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" : {
"$ref" : "#/definitions/clairpbFeature"
2017-07-12 21:04:05 +00:00
} ,
"description" : "affected_versions exists when vulnerability is under notification."
2017-06-05 14:37:29 +00:00
}
}
} ,
"protobufEmpty" : {
"type" : "object" ,
"description" : "service Foo {\n rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);\n }\n\nThe JSON representation for `Empty` is empty JSON object `{}`." ,
"title" : "A generic empty message that you can re-use to avoid defining duplicated\nempty messages in your APIs. A typical example is to use it as the request\nor the response type of an API method. For instance:"
}
}
}