5.2 KiB
OpenapiClient::DefaultApi
All URIs are relative to https://api.msrc.microsoft.com
Method | HTTP request | Description |
---|---|---|
cvrf_id_get | GET /cvrf/{id} | |
updates_get | GET /Updates | |
updates_id_get | GET /Updates('{id}') |
cvrf_id_get
cvrf_id_get(api_version, api_key, id)
Gets a CVRF document by ID (ie: 2016-Aug) Note: to view the correct XML response, please change $ref: '#/definitions/cvrfReturnTypes200' to $ref: '#/definitions/cvrfReturnTypes200_xml' in the swagger.json or swagger.yaml file
Examples
require 'time'
require 'openapi_client'
api_instance = OpenapiClient::DefaultApi.new
api_version = 'api_version_example' # String |
api_key = 'api_key_example' # String |
id = 'id_example' # String |
begin
result = api_instance.cvrf_id_get(api_version, api_key, id)
p result
rescue OpenapiClient::ApiError => e
puts "Error when calling DefaultApi->cvrf_id_get: #{e}"
end
Using the cvrf_id_get_with_http_info variant
This returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> cvrf_id_get_with_http_info(api_version, api_key, id)
begin
data, status_code, headers = api_instance.cvrf_id_get_with_http_info(api_version, api_key, id)
p status_code # => 2xx
p headers # => { ... }
p data # => <CvrfReturnTypes200>
rescue OpenapiClient::ApiError => e
puts "Error when calling DefaultApi->cvrf_id_get_with_http_info: #{e}"
end
Parameters
Name | Type | Description | Notes |
---|---|---|---|
api_version | String | [default to '2016-08-01'] | |
api_key | String | ||
id | String |
Return type
Authorization
No authorization required
HTTP request headers
- Content-Type: Not defined
- Accept: application/xml, application/json
updates_get
updates_get(api_version, api_key)
Get all updates with a link to the CVRF document
Examples
require 'time'
require 'openapi_client'
api_instance = OpenapiClient::DefaultApi.new
api_version = 'api_version_example' # String |
api_key = 'api_key_example' # String |
begin
result = api_instance.updates_get(api_version, api_key)
p result
rescue OpenapiClient::ApiError => e
puts "Error when calling DefaultApi->updates_get: #{e}"
end
Using the updates_get_with_http_info variant
This returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> updates_get_with_http_info(api_version, api_key)
begin
data, status_code, headers = api_instance.updates_get_with_http_info(api_version, api_key)
p status_code # => 2xx
p headers # => { ... }
p data # => <UpdatesReturnTypes200>
rescue OpenapiClient::ApiError => e
puts "Error when calling DefaultApi->updates_get_with_http_info: #{e}"
end
Parameters
Name | Type | Description | Notes |
---|---|---|---|
api_version | String | [default to '2016-08-01'] | |
api_key | String |
Return type
Authorization
No authorization required
HTTP request headers
- Content-Type: Not defined
- Accept: application/json, application/xml
updates_id_get
updates_id_get(api_version, api_key, id)
Get updates with a link to the CVRF document for a particular ID. ID can be: * Update ID (ie: 2016-Aug) * Vulnerability ID (ie: CVE-2016-0128) * Year (ie: 2016)
Examples
require 'time'
require 'openapi_client'
api_instance = OpenapiClient::DefaultApi.new
api_version = 'api_version_example' # String |
api_key = 'api_key_example' # String |
id = 'id_example' # String |
begin
result = api_instance.updates_id_get(api_version, api_key, id)
p result
rescue OpenapiClient::ApiError => e
puts "Error when calling DefaultApi->updates_id_get: #{e}"
end
Using the updates_id_get_with_http_info variant
This returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> updates_id_get_with_http_info(api_version, api_key, id)
begin
data, status_code, headers = api_instance.updates_id_get_with_http_info(api_version, api_key, id)
p status_code # => 2xx
p headers # => { ... }
p data # => <UpdatesReturnTypes200>
rescue OpenapiClient::ApiError => e
puts "Error when calling DefaultApi->updates_id_get_with_http_info: #{e}"
end
Parameters
Name | Type | Description | Notes |
---|---|---|---|
api_version | String | [default to '2016-08-01'] | |
api_key | String | ||
id | String |
Return type
Authorization
No authorization required
HTTP request headers
- Content-Type: Not defined
- Accept: application/json, application/xml