Skip to content

Instantly share code, notes, and snippets.

@mstg
Last active Nov 11, 2022
Embed
What would you like to do?
Apollo (Errata) OpenAPI
{
"swagger": "2.0",
"info": {
"title": "apollo/proto/v1/advisory.proto",
"version": "version not set"
},
"tags": [
{
"name": "ApolloService"
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"paths": {
"/v2/advisories": {
"get": {
"summary": "ListAdvisories",
"description": "Return a list of advisories by given filters.\nNo filters returns all advisories\nThis method is paginated",
"operationId": "ListAdvisories",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/v1ListAdvisoriesResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"parameters": [
{
"name": "filters.product",
"description": "Product. The product to fetch advisories for\nFor example: Rocky Linux 8",
"in": "query",
"required": false,
"type": "string"
},
{
"name": "filters.before",
"description": "Before. Advisories published before timestamp",
"in": "query",
"required": false,
"type": "string",
"format": "date-time"
},
{
"name": "filters.after",
"description": "After. Advisories published after timestamp",
"in": "query",
"required": false,
"type": "string",
"format": "date-time"
},
{
"name": "filters.includeUnpublished",
"description": "Include unpublished. Whether to include unpublished advisories\napollo/impl never respects this, but internal services\nmay rely on this",
"in": "query",
"required": false,
"type": "boolean"
},
{
"name": "filters.cve",
"description": "CVE. Only return advisories with given CVE",
"in": "query",
"required": false,
"type": "string"
},
{
"name": "filters.synopsis",
"description": "Synopsis. Only return advisories if synopsis contains given text",
"in": "query",
"required": false,
"type": "string"
},
{
"name": "filters.includeRpms",
"description": "Include RPMs. Includes RPMs in list response (slow)",
"in": "query",
"required": false,
"type": "boolean"
},
{
"name": "filters.keyword",
"description": "Keyword. Searches all fields for given keyword",
"in": "query",
"required": false,
"type": "string"
},
{
"name": "filters.severity",
"description": "Severity. Only return advisories with given severity",
"in": "query",
"required": false,
"type": "string",
"enum": [
"SEVERITY_UNKNOWN",
"SEVERITY_LOW",
"SEVERITY_MODERATE",
"SEVERITY_IMPORTANT",
"SEVERITY_CRITICAL"
],
"default": "SEVERITY_UNKNOWN"
},
{
"name": "filters.type",
"description": "Type. Only return advisories with given type",
"in": "query",
"required": false,
"type": "string",
"enum": [
"TYPE_UNKNOWN",
"TYPE_SECURITY",
"TYPE_BUGFIX",
"TYPE_ENHANCEMENT"
],
"default": "TYPE_UNKNOWN"
},
{
"name": "page",
"in": "query",
"required": false,
"type": "integer",
"format": "int32"
},
{
"name": "limit",
"in": "query",
"required": false,
"type": "integer",
"format": "int32"
}
],
"tags": [
"ApolloService"
]
}
},
"/v2/advisories/{id}": {
"get": {
"summary": "GetAdvisory",
"description": "Returns an advisory with given ID if found, else returns NotFound",
"operationId": "GetAdvisory",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/v1GetAdvisoryResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"parameters": [
{
"name": "id",
"description": "ID\n\nErrata ID\nExample: RLSA:2021-1515",
"in": "path",
"required": true,
"type": "string",
"pattern": "[^/]+"
}
],
"tags": [
"ApolloService"
]
}
},
"/v2/advisories:rss": {
"get": {
"summary": "ListAdvisoriesRSS",
"description": "Same as ListAdvisories but returns an RSS feed\nOnly returns 25 latest advisories\nSupports filters",
"operationId": "ListAdvisoriesRSS",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/apiHttpBody"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"parameters": [
{
"name": "filters.product",
"description": "Product. The product to fetch advisories for\nFor example: Rocky Linux 8",
"in": "query",
"required": false,
"type": "string"
},
{
"name": "filters.before",
"description": "Before. Advisories published before timestamp",
"in": "query",
"required": false,
"type": "string",
"format": "date-time"
},
{
"name": "filters.after",
"description": "After. Advisories published after timestamp",
"in": "query",
"required": false,
"type": "string",
"format": "date-time"
},
{
"name": "filters.includeUnpublished",
"description": "Include unpublished. Whether to include unpublished advisories\napollo/impl never respects this, but internal services\nmay rely on this",
"in": "query",
"required": false,
"type": "boolean"
},
{
"name": "filters.cve",
"description": "CVE. Only return advisories with given CVE",
"in": "query",
"required": false,
"type": "string"
},
{
"name": "filters.synopsis",
"description": "Synopsis. Only return advisories if synopsis contains given text",
"in": "query",
"required": false,
"type": "string"
},
{
"name": "filters.includeRpms",
"description": "Include RPMs. Includes RPMs in list response (slow)",
"in": "query",
"required": false,
"type": "boolean"
},
{
"name": "filters.keyword",
"description": "Keyword. Searches all fields for given keyword",
"in": "query",
"required": false,
"type": "string"
},
{
"name": "filters.severity",
"description": "Severity. Only return advisories with given severity",
"in": "query",
"required": false,
"type": "string",
"enum": [
"SEVERITY_UNKNOWN",
"SEVERITY_LOW",
"SEVERITY_MODERATE",
"SEVERITY_IMPORTANT",
"SEVERITY_CRITICAL"
],
"default": "SEVERITY_UNKNOWN"
},
{
"name": "filters.type",
"description": "Type. Only return advisories with given type",
"in": "query",
"required": false,
"type": "string",
"enum": [
"TYPE_UNKNOWN",
"TYPE_SECURITY",
"TYPE_BUGFIX",
"TYPE_ENHANCEMENT"
],
"default": "TYPE_UNKNOWN"
}
],
"tags": [
"ApolloService"
]
}
}
},
"definitions": {
"AdvisorySeverity": {
"type": "string",
"enum": [
"SEVERITY_UNKNOWN",
"SEVERITY_LOW",
"SEVERITY_MODERATE",
"SEVERITY_IMPORTANT",
"SEVERITY_CRITICAL"
],
"default": "SEVERITY_UNKNOWN"
},
"apiHttpBody": {
"type": "object",
"properties": {
"contentType": {
"type": "string",
"description": "The HTTP Content-Type header value specifying the content type of the body."
},
"data": {
"type": "string",
"format": "byte",
"description": "The HTTP request/response body as raw binary."
},
"extensions": {
"type": "array",
"items": {
"$ref": "#/definitions/protobufAny"
},
"description": "Application specific response metadata. Must be set in the first response\nfor streaming APIs."
}
},
"description": "Message that represents an arbitrary HTTP body. It should only be used for\npayload formats that can't be represented as JSON, such as raw binary or\nan HTML page.\n\n\nThis message can be used both in streaming and non-streaming API methods in\nthe request as well as the response.\n\nIt can be used as a top-level request field, which is convenient if one\nwants to extract parameters from either the URL or HTTP template into the\nrequest fields and also want access to the raw HTTP body.\n\nExample:\n\n message GetResourceRequest {\n // A unique request id.\n string request_id = 1;\n\n // The raw HTTP body is bound to this field.\n google.api.HttpBody http_body = 2;\n\n }\n\n service ResourceService {\n rpc GetResource(GetResourceRequest)\n returns (google.api.HttpBody);\n rpc UpdateResource(google.api.HttpBody)\n returns (google.protobuf.Empty);\n\n }\n\nExample with streaming methods:\n\n service CaldavService {\n rpc GetCalendar(stream google.api.HttpBody)\n returns (stream google.api.HttpBody);\n rpc UpdateCalendar(stream google.api.HttpBody)\n returns (stream google.api.HttpBody);\n\n }\n\nUse of this type only changes how the request and response bodies are\nhandled, all other features will continue to work unchanged."
},
"protobufAny": {
"type": "object",
"properties": {
"@type": {
"type": "string",
"description": "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n URL, or have them precompiled into a binary to avoid any\n lookup. Therefore, binary compatibility needs to be preserved\n on changes to types. (Use versioned type names to manage\n breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics."
}
},
"additionalProperties": {},
"description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(\u0026foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := \u0026pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := \u0026pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": \u003cstring\u003e,\n \"lastName\": \u003cstring\u003e\n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }"
},
"rpcStatus": {
"type": "object",
"properties": {
"code": {
"type": "integer",
"format": "int32"
},
"message": {
"type": "string"
},
"details": {
"type": "array",
"items": {
"$ref": "#/definitions/protobufAny"
}
}
}
},
"v1Advisory": {
"type": "object",
"properties": {
"type": {
"$ref": "#/definitions/v1AdvisoryType",
"description": "Type of advisory",
"title": "Type"
},
"shortCode": {
"type": "string",
"description": "Errata prefix or short code\nExample: RLBA, RLEA, RLSA",
"title": "Short code"
},
"name": {
"type": "string",
"description": "Full errata name\nExample: RLBA-2021:0001, RLSA-2021:0002",
"title": "Name"
},
"synopsis": {
"type": "string",
"description": "Short description of advisory",
"title": "Synopsis"
},
"severity": {
"$ref": "#/definitions/AdvisorySeverity",
"description": "Severity of advisory. Used only for security advisories",
"title": "Severity"
},
"topic": {
"type": "string",
"description": "Topic of advisory\nExample: An update for the go-toolset:rhel8 module is now available for Rocky Linux 8.",
"title": "Topic"
},
"description": {
"type": "string",
"description": "Description of advisory. Contains information about changes and package.",
"title": "Description"
},
"solution": {
"type": "string",
"description": "How to solve the advisory. Contains information about how to apply the advisory changes",
"title": "Solution"
},
"affectedProducts": {
"type": "array",
"items": {
"type": "string"
},
"description": "A list of affected products",
"title": "Affected products"
},
"fixes": {
"type": "array",
"items": {
"$ref": "#/definitions/v1Fix"
},
"description": "A list of tickets from upstream bug trackers",
"title": "Fixes"
},
"cves": {
"type": "array",
"items": {
"$ref": "#/definitions/v1CVE"
},
"description": "A list of CVEs assigned to this advisory",
"title": "CVEs"
},
"references": {
"type": "array",
"items": {
"type": "string"
},
"description": "General references used in this advisory",
"title": "References"
},
"publishedAt": {
"type": "string",
"format": "date-time",
"description": "Timestamp the advisory is published at",
"title": "Published at"
},
"rpms": {
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/v1RPMs"
},
"description": "Affected RPMs",
"title": "RPMs"
},
"rebootSuggested": {
"type": "boolean",
"description": "Whether a system reboot should be suggested after applying this advisory",
"title": "Reboot suggested"
}
},
"description": "Product advisory",
"title": "Advisory"
},
"v1AdvisoryFilters": {
"type": "object",
"properties": {
"product": {
"type": "string",
"description": "The product to fetch advisories for\nFor example: Rocky Linux 8",
"title": "Product"
},
"before": {
"type": "string",
"format": "date-time",
"description": "Advisories published before timestamp",
"title": "Before"
},
"after": {
"type": "string",
"format": "date-time",
"description": "Advisories published after timestamp",
"title": "After"
},
"includeUnpublished": {
"type": "boolean",
"description": "Whether to include unpublished advisories\napollo/impl never respects this, but internal services\nmay rely on this",
"title": "Include unpublished"
},
"cve": {
"type": "string",
"description": "Only return advisories with given CVE",
"title": "CVE"
},
"synopsis": {
"type": "string",
"description": "Only return advisories if synopsis contains given text",
"title": "Synopsis"
},
"includeRpms": {
"type": "boolean",
"description": "Includes RPMs in list response (slow)",
"title": "Include RPMs"
},
"keyword": {
"type": "string",
"description": "Searches all fields for given keyword",
"title": "Keyword"
},
"severity": {
"$ref": "#/definitions/AdvisorySeverity",
"description": "Only return advisories with given severity",
"title": "Severity"
},
"type": {
"$ref": "#/definitions/v1AdvisoryType",
"description": "Only return advisories with given type",
"title": "Type"
}
}
},
"v1AdvisoryType": {
"type": "string",
"enum": [
"TYPE_UNKNOWN",
"TYPE_SECURITY",
"TYPE_BUGFIX",
"TYPE_ENHANCEMENT"
],
"default": "TYPE_UNKNOWN"
},
"v1CVE": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"sourceBy": {
"type": "string"
},
"sourceLink": {
"type": "string"
},
"cvss3ScoringVector": {
"type": "string"
},
"cvss3BaseScore": {
"type": "string"
},
"cwe": {
"type": "string"
}
}
},
"v1Fix": {
"type": "object",
"properties": {
"ticket": {
"type": "string"
},
"sourceBy": {
"type": "string"
},
"sourceLink": {
"type": "string"
},
"description": {
"type": "string"
}
}
},
"v1GetAdvisoryResponse": {
"type": "object",
"properties": {
"advisory": {
"$ref": "#/definitions/v1Advisory"
}
},
"description": "Response body for `GetAdvisory`",
"title": "GetAdvisoryResponse"
},
"v1ListAdvisoriesResponse": {
"type": "object",
"properties": {
"advisories": {
"type": "array",
"items": {
"$ref": "#/definitions/v1Advisory"
}
},
"total": {
"type": "string",
"format": "int64",
"title": "Total packages from server"
},
"size": {
"type": "integer",
"format": "int32",
"title": "Limit from request"
},
"page": {
"type": "integer",
"format": "int32",
"title": "Current page"
},
"lastUpdated": {
"type": "string",
"format": "date-time",
"title": "Last updated"
}
},
"description": "Response body for `ListAdvisories`",
"title": "ListAdvisoriesResponse"
},
"v1RPMs": {
"type": "object",
"properties": {
"nvras": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment