dependency-tracker-client 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/Gemfile +9 -0
- data/LICENSE +201 -0
- data/README.md +276 -0
- data/Rakefile +10 -0
- data/dependency-tracker-client.gemspec +39 -0
- data/docs/About.md +25 -0
- data/docs/Analysis.md +21 -0
- data/docs/AnalysisApi.md +177 -0
- data/docs/AnalysisComment.md +21 -0
- data/docs/AnalysisRequest.md +27 -0
- data/docs/ApiKey.md +17 -0
- data/docs/BadgeApi.md +102 -0
- data/docs/BodyPart.md +31 -0
- data/docs/BomApi.md +335 -0
- data/docs/BomSubmitRequest.md +25 -0
- data/docs/CalculatorApi.md +61 -0
- data/docs/CloneProjectRequest.md +19 -0
- data/docs/Component.md +69 -0
- data/docs/ComponentApi.md +373 -0
- data/docs/ComponentMetrics.md +43 -0
- data/docs/ConfigProperty.md +25 -0
- data/docs/ConfigPropertyApi.md +167 -0
- data/docs/ContentDisposition.md +29 -0
- data/docs/Cwe.md +19 -0
- data/docs/CweApi.md +110 -0
- data/docs/DefaultApi.md +434 -0
- data/docs/Dependency.md +27 -0
- data/docs/DependencyApi.md +222 -0
- data/docs/DependencyMetrics.md +45 -0
- data/docs/DependencyRequest.md +21 -0
- data/docs/Finding.md +23 -0
- data/docs/FindingApi.md +113 -0
- data/docs/FormDataBodyPart.md +39 -0
- data/docs/FormDataContentDisposition.md +31 -0
- data/docs/FormDataMultiPart.md +35 -0
- data/docs/Framework.md +23 -0
- data/docs/IdentifiableObject.md +17 -0
- data/docs/LdapApi.md +220 -0
- data/docs/LdapUser.md +25 -0
- data/docs/License.md +37 -0
- data/docs/LicenseApi.md +159 -0
- data/docs/ManagedUser.md +37 -0
- data/docs/MappedLdapGroup.md +19 -0
- data/docs/MappedLdapGroupRequest.md +19 -0
- data/docs/MediaType.md +25 -0
- data/docs/MetricsApi.md +922 -0
- data/docs/MultiPart.md +33 -0
- data/docs/NotificationPublisher.md +29 -0
- data/docs/NotificationRule.md +35 -0
- data/docs/PackageURL.md +29 -0
- data/docs/ParameterizedHeader.md +19 -0
- data/docs/Permission.md +19 -0
- data/docs/PermissionApi.md +279 -0
- data/docs/PortfolioMetrics.md +53 -0
- data/docs/Project.md +43 -0
- data/docs/ProjectApi.md +445 -0
- data/docs/ProjectMetrics.md +47 -0
- data/docs/ProjectProperty.md +27 -0
- data/docs/ProjectPropertyApi.md +232 -0
- data/docs/Repository.md +29 -0
- data/docs/RepositoryApi.md +325 -0
- data/docs/RepositoryMetaComponent.md +27 -0
- data/docs/Score.md +23 -0
- data/docs/SearchApi.md +120 -0
- data/docs/SearchResult.md +17 -0
- data/docs/Tag.md +19 -0
- data/docs/Team.md +29 -0
- data/docs/TeamApi.md +432 -0
- data/docs/UserApi.md +715 -0
- data/docs/UserPrincipal.md +27 -0
- data/docs/VersionApi.md +52 -0
- data/docs/Vulnerability.md +69 -0
- data/docs/VulnerabilityApi.md +666 -0
- data/docs/VulnerabilityMetrics.md +23 -0
- data/docs/VulnerableSoftware.md +69 -0
- data/lib/dependency-tracker-client/api/analysis_api.rb +209 -0
- data/lib/dependency-tracker-client/api/badge_api.rb +148 -0
- data/lib/dependency-tracker-client/api/bom_api.rb +382 -0
- data/lib/dependency-tracker-client/api/calculator_api.rb +83 -0
- data/lib/dependency-tracker-client/api/component_api.rb +422 -0
- data/lib/dependency-tracker-client/api/config_property_api.rb +192 -0
- data/lib/dependency-tracker-client/api/cwe_api.rb +136 -0
- data/lib/dependency-tracker-client/api/default_api.rb +491 -0
- data/lib/dependency-tracker-client/api/dependency_api.rb +254 -0
- data/lib/dependency-tracker-client/api/finding_api.rb +140 -0
- data/lib/dependency-tracker-client/api/ldap_api.rb +254 -0
- data/lib/dependency-tracker-client/api/license_api.rb +190 -0
- data/lib/dependency-tracker-client/api/metrics_api.rb +1086 -0
- data/lib/dependency-tracker-client/api/permission_api.rb +342 -0
- data/lib/dependency-tracker-client/api/project_api.rb +504 -0
- data/lib/dependency-tracker-client/api/project_property_api.rb +274 -0
- data/lib/dependency-tracker-client/api/repository_api.rb +376 -0
- data/lib/dependency-tracker-client/api/search_api.rb +143 -0
- data/lib/dependency-tracker-client/api/team_api.rb +486 -0
- data/lib/dependency-tracker-client/api/user_api.rb +796 -0
- data/lib/dependency-tracker-client/api/version_api.rb +78 -0
- data/lib/dependency-tracker-client/api/vulnerability_api.rb +780 -0
- data/lib/dependency-tracker-client/api_client.rb +388 -0
- data/lib/dependency-tracker-client/api_error.rb +57 -0
- data/lib/dependency-tracker-client/configuration.rb +261 -0
- data/lib/dependency-tracker-client/models/about.rb +242 -0
- data/lib/dependency-tracker-client/models/analysis.rb +265 -0
- data/lib/dependency-tracker-client/models/analysis_comment.rb +234 -0
- data/lib/dependency-tracker-client/models/analysis_request.rb +371 -0
- data/lib/dependency-tracker-client/models/api_key.rb +250 -0
- data/lib/dependency-tracker-client/models/body_part.rb +273 -0
- data/lib/dependency-tracker-client/models/bom_submit_request.rb +328 -0
- data/lib/dependency-tracker-client/models/clone_project_request.rb +267 -0
- data/lib/dependency-tracker-client/models/component.rb +900 -0
- data/lib/dependency-tracker-client/models/component_metrics.rb +338 -0
- data/lib/dependency-tracker-client/models/config_property.rb +421 -0
- data/lib/dependency-tracker-client/models/content_disposition.rb +262 -0
- data/lib/dependency-tracker-client/models/cwe.rb +259 -0
- data/lib/dependency-tracker-client/models/dependency.rb +266 -0
- data/lib/dependency-tracker-client/models/dependency_metrics.rb +352 -0
- data/lib/dependency-tracker-client/models/dependency_request.rb +257 -0
- data/lib/dependency-tracker-client/models/finding.rb +239 -0
- data/lib/dependency-tracker-client/models/form_data_body_part.rb +309 -0
- data/lib/dependency-tracker-client/models/form_data_content_disposition.rb +271 -0
- data/lib/dependency-tracker-client/models/form_data_multi_part.rb +295 -0
- data/lib/dependency-tracker-client/models/framework.rb +233 -0
- data/lib/dependency-tracker-client/models/identifiable_object.rb +206 -0
- data/lib/dependency-tracker-client/models/ldap_user.rb +351 -0
- data/lib/dependency-tracker-client/models/license.rb +373 -0
- data/lib/dependency-tracker-client/models/managed_user.rb +480 -0
- data/lib/dependency-tracker-client/models/mapped_ldap_group.rb +255 -0
- data/lib/dependency-tracker-client/models/mapped_ldap_group_request.rb +267 -0
- data/lib/dependency-tracker-client/models/media_type.rb +244 -0
- data/lib/dependency-tracker-client/models/multi_part.rb +284 -0
- data/lib/dependency-tracker-client/models/notification_publisher.rb +388 -0
- data/lib/dependency-tracker-client/models/notification_rule.rb +426 -0
- data/lib/dependency-tracker-client/models/package_url.rb +262 -0
- data/lib/dependency-tracker-client/models/parameterized_header.rb +217 -0
- data/lib/dependency-tracker-client/models/permission.rb +250 -0
- data/lib/dependency-tracker-client/models/portfolio_metrics.rb +378 -0
- data/lib/dependency-tracker-client/models/project.rb +420 -0
- data/lib/dependency-tracker-client/models/project_metrics.rb +356 -0
- data/lib/dependency-tracker-client/models/project_property.rb +430 -0
- data/lib/dependency-tracker-client/models/repository.rb +319 -0
- data/lib/dependency-tracker-client/models/repository_meta_component.rb +305 -0
- data/lib/dependency-tracker-client/models/score.rb +233 -0
- data/lib/dependency-tracker-client/models/search_result.rb +208 -0
- data/lib/dependency-tracker-client/models/tag.rb +252 -0
- data/lib/dependency-tracker-client/models/team.rb +310 -0
- data/lib/dependency-tracker-client/models/user_principal.rb +255 -0
- data/lib/dependency-tracker-client/models/vulnerability.rb +729 -0
- data/lib/dependency-tracker-client/models/vulnerability_metrics.rb +238 -0
- data/lib/dependency-tracker-client/models/vulnerable_software.rb +442 -0
- data/lib/dependency-tracker-client/version.rb +15 -0
- data/lib/dependency-tracker-client.rb +109 -0
- data/pkg/dependency-tracker-client-1.0.0.gem +0 -0
- data/spec/api/analysis_api_spec.rb +70 -0
- data/spec/api/badge_api_spec.rb +58 -0
- data/spec/api/bom_api_spec.rb +106 -0
- data/spec/api/calculator_api_spec.rb +46 -0
- data/spec/api/component_api_spec.rb +110 -0
- data/spec/api/config_property_api_spec.rb +67 -0
- data/spec/api/cwe_api_spec.rb +56 -0
- data/spec/api/default_api_spec.rb +123 -0
- data/spec/api/dependency_api_spec.rb +79 -0
- data/spec/api/finding_api_spec.rb +57 -0
- data/spec/api/ldap_api_spec.rb +79 -0
- data/spec/api/license_api_spec.rb +66 -0
- data/spec/api/metrics_api_spec.rb +233 -0
- data/spec/api/permission_api_spec.rb +94 -0
- data/spec/api/project_api_spec.rb +126 -0
- data/spec/api/project_property_api_spec.rb +82 -0
- data/spec/api/repository_api_spec.rb +100 -0
- data/spec/api/search_api_spec.rb +59 -0
- data/spec/api/team_api_spec.rb +122 -0
- data/spec/api/user_api_spec.rb +183 -0
- data/spec/api/version_api_spec.rb +46 -0
- data/spec/api/vulnerability_api_spec.rb +177 -0
- data/spec/api_client_spec.rb +226 -0
- data/spec/configuration_spec.rb +42 -0
- data/spec/models/about_spec.rb +65 -0
- data/spec/models/analysis_comment_spec.rb +53 -0
- data/spec/models/analysis_request_spec.rb +75 -0
- data/spec/models/analysis_spec.rb +57 -0
- data/spec/models/api_key_spec.rb +41 -0
- data/spec/models/body_part_spec.rb +83 -0
- data/spec/models/bom_submit_request_spec.rb +65 -0
- data/spec/models/clone_project_request_spec.rb +47 -0
- data/spec/models/component_metrics_spec.rb +119 -0
- data/spec/models/component_spec.rb +201 -0
- data/spec/models/config_property_spec.rb +69 -0
- data/spec/models/content_disposition_spec.rb +77 -0
- data/spec/models/cwe_spec.rb +47 -0
- data/spec/models/dependency_metrics_spec.rb +125 -0
- data/spec/models/dependency_request_spec.rb +53 -0
- data/spec/models/dependency_spec.rb +71 -0
- data/spec/models/finding_spec.rb +59 -0
- data/spec/models/form_data_body_part_spec.rb +107 -0
- data/spec/models/form_data_content_disposition_spec.rb +83 -0
- data/spec/models/form_data_multi_part_spec.rb +95 -0
- data/spec/models/framework_spec.rb +59 -0
- data/spec/models/identifiable_object_spec.rb +41 -0
- data/spec/models/ldap_user_spec.rb +65 -0
- data/spec/models/license_spec.rb +101 -0
- data/spec/models/managed_user_spec.rb +101 -0
- data/spec/models/mapped_ldap_group_request_spec.rb +47 -0
- data/spec/models/mapped_ldap_group_spec.rb +47 -0
- data/spec/models/media_type_spec.rb +65 -0
- data/spec/models/multi_part_spec.rb +89 -0
- data/spec/models/notification_publisher_spec.rb +77 -0
- data/spec/models/notification_rule_spec.rb +107 -0
- data/spec/models/package_url_spec.rb +77 -0
- data/spec/models/parameterized_header_spec.rb +47 -0
- data/spec/models/permission_spec.rb +47 -0
- data/spec/models/portfolio_metrics_spec.rb +149 -0
- data/spec/models/project_metrics_spec.rb +131 -0
- data/spec/models/project_property_spec.rb +75 -0
- data/spec/models/project_spec.rb +119 -0
- data/spec/models/repository_meta_component_spec.rb +75 -0
- data/spec/models/repository_spec.rb +81 -0
- data/spec/models/score_spec.rb +59 -0
- data/spec/models/search_result_spec.rb +41 -0
- data/spec/models/tag_spec.rb +47 -0
- data/spec/models/team_spec.rb +77 -0
- data/spec/models/user_principal_spec.rb +71 -0
- data/spec/models/vulnerability_metrics_spec.rb +59 -0
- data/spec/models/vulnerability_spec.rb +201 -0
- data/spec/models/vulnerable_software_spec.rb +197 -0
- data/spec/spec_helper.rb +111 -0
- data/tmp/tmp.rb +11 -0
- metadata +402 -0
data/docs/AnalysisApi.md
ADDED
@@ -0,0 +1,177 @@
|
|
1
|
+
# DependencyTracker::AnalysisApi
|
2
|
+
|
3
|
+
All URIs are relative to *http://localhost/api*
|
4
|
+
|
5
|
+
Method | HTTP request | Description
|
6
|
+
------------- | ------------- | -------------
|
7
|
+
[**retrieve_analysis**](AnalysisApi.md#retrieve_analysis) | **GET** /v1/analysis | Retrieves an analysis trail
|
8
|
+
[**update_analysis**](AnalysisApi.md#update_analysis) | **PUT** /v1/analysis | Records an analysis decision
|
9
|
+
[**update_global_analysis**](AnalysisApi.md#update_global_analysis) | **PUT** /v1/analysis/global | Records an analysis decision
|
10
|
+
|
11
|
+
|
12
|
+
|
13
|
+
## retrieve_analysis
|
14
|
+
|
15
|
+
> Analysis retrieve_analysis(component, vulnerability, opts)
|
16
|
+
|
17
|
+
Retrieves an analysis trail
|
18
|
+
|
19
|
+
### Example
|
20
|
+
|
21
|
+
```ruby
|
22
|
+
# load the gem
|
23
|
+
require 'dependency-tracker-client'
|
24
|
+
# setup authorization
|
25
|
+
DependencyTracker.configure do |config|
|
26
|
+
# Configure API key authorization: X-Api-Key
|
27
|
+
config.api_key['X-Api-Key'] = 'YOUR API KEY'
|
28
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
29
|
+
#config.api_key_prefix['X-Api-Key'] = 'Bearer'
|
30
|
+
end
|
31
|
+
|
32
|
+
api_instance = DependencyTracker::AnalysisApi.new
|
33
|
+
component = 'component_example' # String | The UUID of the component
|
34
|
+
vulnerability = 'vulnerability_example' # String | The UUID of the vulnerability
|
35
|
+
opts = {
|
36
|
+
project: 'project_example' # String | The UUID of the project
|
37
|
+
}
|
38
|
+
|
39
|
+
begin
|
40
|
+
#Retrieves an analysis trail
|
41
|
+
result = api_instance.retrieve_analysis(component, vulnerability, opts)
|
42
|
+
p result
|
43
|
+
rescue DependencyTracker::ApiError => e
|
44
|
+
puts "Exception when calling AnalysisApi->retrieve_analysis: #{e}"
|
45
|
+
end
|
46
|
+
```
|
47
|
+
|
48
|
+
### Parameters
|
49
|
+
|
50
|
+
|
51
|
+
Name | Type | Description | Notes
|
52
|
+
------------- | ------------- | ------------- | -------------
|
53
|
+
**component** | **String**| The UUID of the component |
|
54
|
+
**vulnerability** | **String**| The UUID of the vulnerability |
|
55
|
+
**project** | **String**| The UUID of the project | [optional]
|
56
|
+
|
57
|
+
### Return type
|
58
|
+
|
59
|
+
[**Analysis**](Analysis.md)
|
60
|
+
|
61
|
+
### Authorization
|
62
|
+
|
63
|
+
[X-Api-Key](../README.md#X-Api-Key)
|
64
|
+
|
65
|
+
### HTTP request headers
|
66
|
+
|
67
|
+
- **Content-Type**: Not defined
|
68
|
+
- **Accept**: application/json
|
69
|
+
|
70
|
+
|
71
|
+
## update_analysis
|
72
|
+
|
73
|
+
> Analysis update_analysis(opts)
|
74
|
+
|
75
|
+
Records an analysis decision
|
76
|
+
|
77
|
+
### Example
|
78
|
+
|
79
|
+
```ruby
|
80
|
+
# load the gem
|
81
|
+
require 'dependency-tracker-client'
|
82
|
+
# setup authorization
|
83
|
+
DependencyTracker.configure do |config|
|
84
|
+
# Configure API key authorization: X-Api-Key
|
85
|
+
config.api_key['X-Api-Key'] = 'YOUR API KEY'
|
86
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
87
|
+
#config.api_key_prefix['X-Api-Key'] = 'Bearer'
|
88
|
+
end
|
89
|
+
|
90
|
+
api_instance = DependencyTracker::AnalysisApi.new
|
91
|
+
opts = {
|
92
|
+
body: DependencyTracker::AnalysisRequest.new # AnalysisRequest |
|
93
|
+
}
|
94
|
+
|
95
|
+
begin
|
96
|
+
#Records an analysis decision
|
97
|
+
result = api_instance.update_analysis(opts)
|
98
|
+
p result
|
99
|
+
rescue DependencyTracker::ApiError => e
|
100
|
+
puts "Exception when calling AnalysisApi->update_analysis: #{e}"
|
101
|
+
end
|
102
|
+
```
|
103
|
+
|
104
|
+
### Parameters
|
105
|
+
|
106
|
+
|
107
|
+
Name | Type | Description | Notes
|
108
|
+
------------- | ------------- | ------------- | -------------
|
109
|
+
**body** | [**AnalysisRequest**](AnalysisRequest.md)| | [optional]
|
110
|
+
|
111
|
+
### Return type
|
112
|
+
|
113
|
+
[**Analysis**](Analysis.md)
|
114
|
+
|
115
|
+
### Authorization
|
116
|
+
|
117
|
+
[X-Api-Key](../README.md#X-Api-Key)
|
118
|
+
|
119
|
+
### HTTP request headers
|
120
|
+
|
121
|
+
- **Content-Type**: application/json
|
122
|
+
- **Accept**: application/json
|
123
|
+
|
124
|
+
|
125
|
+
## update_global_analysis
|
126
|
+
|
127
|
+
> Analysis update_global_analysis(opts)
|
128
|
+
|
129
|
+
Records an analysis decision
|
130
|
+
|
131
|
+
### Example
|
132
|
+
|
133
|
+
```ruby
|
134
|
+
# load the gem
|
135
|
+
require 'dependency-tracker-client'
|
136
|
+
# setup authorization
|
137
|
+
DependencyTracker.configure do |config|
|
138
|
+
# Configure API key authorization: X-Api-Key
|
139
|
+
config.api_key['X-Api-Key'] = 'YOUR API KEY'
|
140
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
141
|
+
#config.api_key_prefix['X-Api-Key'] = 'Bearer'
|
142
|
+
end
|
143
|
+
|
144
|
+
api_instance = DependencyTracker::AnalysisApi.new
|
145
|
+
opts = {
|
146
|
+
body: DependencyTracker::AnalysisRequest.new # AnalysisRequest |
|
147
|
+
}
|
148
|
+
|
149
|
+
begin
|
150
|
+
#Records an analysis decision
|
151
|
+
result = api_instance.update_global_analysis(opts)
|
152
|
+
p result
|
153
|
+
rescue DependencyTracker::ApiError => e
|
154
|
+
puts "Exception when calling AnalysisApi->update_global_analysis: #{e}"
|
155
|
+
end
|
156
|
+
```
|
157
|
+
|
158
|
+
### Parameters
|
159
|
+
|
160
|
+
|
161
|
+
Name | Type | Description | Notes
|
162
|
+
------------- | ------------- | ------------- | -------------
|
163
|
+
**body** | [**AnalysisRequest**](AnalysisRequest.md)| | [optional]
|
164
|
+
|
165
|
+
### Return type
|
166
|
+
|
167
|
+
[**Analysis**](Analysis.md)
|
168
|
+
|
169
|
+
### Authorization
|
170
|
+
|
171
|
+
[X-Api-Key](../README.md#X-Api-Key)
|
172
|
+
|
173
|
+
### HTTP request headers
|
174
|
+
|
175
|
+
- **Content-Type**: application/json
|
176
|
+
- **Accept**: application/json
|
177
|
+
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# DependencyTracker::AnalysisComment
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**timestamp** | **Integer** | |
|
8
|
+
**comment** | **String** | |
|
9
|
+
**commenter** | **String** | | [optional]
|
10
|
+
|
11
|
+
## Code Sample
|
12
|
+
|
13
|
+
```ruby
|
14
|
+
require 'DependencyTracker'
|
15
|
+
|
16
|
+
instance = DependencyTracker::AnalysisComment.new(timestamp: null,
|
17
|
+
comment: null,
|
18
|
+
commenter: null)
|
19
|
+
```
|
20
|
+
|
21
|
+
|
@@ -0,0 +1,27 @@
|
|
1
|
+
# DependencyTracker::AnalysisRequest
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**project** | **String** | | [optional] [readonly]
|
8
|
+
**component** | **String** | | [readonly]
|
9
|
+
**vulnerability** | **String** | | [readonly]
|
10
|
+
**analysis_state** | **String** | | [optional] [readonly]
|
11
|
+
**comment** | **String** | | [optional] [readonly]
|
12
|
+
**suppressed** | **Boolean** | | [optional]
|
13
|
+
|
14
|
+
## Code Sample
|
15
|
+
|
16
|
+
```ruby
|
17
|
+
require 'DependencyTracker'
|
18
|
+
|
19
|
+
instance = DependencyTracker::AnalysisRequest.new(project: null,
|
20
|
+
component: null,
|
21
|
+
vulnerability: null,
|
22
|
+
analysis_state: null,
|
23
|
+
comment: null,
|
24
|
+
suppressed: null)
|
25
|
+
```
|
26
|
+
|
27
|
+
|
data/docs/ApiKey.md
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
# DependencyTracker::ApiKey
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**key** | **String** | |
|
8
|
+
|
9
|
+
## Code Sample
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
require 'DependencyTracker'
|
13
|
+
|
14
|
+
instance = DependencyTracker::ApiKey.new(key: null)
|
15
|
+
```
|
16
|
+
|
17
|
+
|
data/docs/BadgeApi.md
ADDED
@@ -0,0 +1,102 @@
|
|
1
|
+
# DependencyTracker::BadgeApi
|
2
|
+
|
3
|
+
All URIs are relative to *http://localhost/api*
|
4
|
+
|
5
|
+
Method | HTTP request | Description
|
6
|
+
------------- | ------------- | -------------
|
7
|
+
[**get_project_vulnerabilities_badge**](BadgeApi.md#get_project_vulnerabilities_badge) | **GET** /v1/badge/vulns/project/{name}/{version} | Returns current metrics for a specific project
|
8
|
+
[**get_project_vulnerabilities_badge1**](BadgeApi.md#get_project_vulnerabilities_badge1) | **GET** /v1/badge/vulns/project/{uuid} | Returns current metrics for a specific project
|
9
|
+
|
10
|
+
|
11
|
+
|
12
|
+
## get_project_vulnerabilities_badge
|
13
|
+
|
14
|
+
> ProjectMetrics get_project_vulnerabilities_badge(name, version)
|
15
|
+
|
16
|
+
Returns current metrics for a specific project
|
17
|
+
|
18
|
+
### Example
|
19
|
+
|
20
|
+
```ruby
|
21
|
+
# load the gem
|
22
|
+
require 'dependency-tracker-client'
|
23
|
+
|
24
|
+
api_instance = DependencyTracker::BadgeApi.new
|
25
|
+
name = 'name_example' # String | The name of the project to query on
|
26
|
+
version = 'version_example' # String | The version of the project to query on
|
27
|
+
|
28
|
+
begin
|
29
|
+
#Returns current metrics for a specific project
|
30
|
+
result = api_instance.get_project_vulnerabilities_badge(name, version)
|
31
|
+
p result
|
32
|
+
rescue DependencyTracker::ApiError => e
|
33
|
+
puts "Exception when calling BadgeApi->get_project_vulnerabilities_badge: #{e}"
|
34
|
+
end
|
35
|
+
```
|
36
|
+
|
37
|
+
### Parameters
|
38
|
+
|
39
|
+
|
40
|
+
Name | Type | Description | Notes
|
41
|
+
------------- | ------------- | ------------- | -------------
|
42
|
+
**name** | **String**| The name of the project to query on |
|
43
|
+
**version** | **String**| The version of the project to query on |
|
44
|
+
|
45
|
+
### Return type
|
46
|
+
|
47
|
+
[**ProjectMetrics**](ProjectMetrics.md)
|
48
|
+
|
49
|
+
### Authorization
|
50
|
+
|
51
|
+
No authorization required
|
52
|
+
|
53
|
+
### HTTP request headers
|
54
|
+
|
55
|
+
- **Content-Type**: Not defined
|
56
|
+
- **Accept**: image/svg+xml
|
57
|
+
|
58
|
+
|
59
|
+
## get_project_vulnerabilities_badge1
|
60
|
+
|
61
|
+
> ProjectMetrics get_project_vulnerabilities_badge1(uuid)
|
62
|
+
|
63
|
+
Returns current metrics for a specific project
|
64
|
+
|
65
|
+
### Example
|
66
|
+
|
67
|
+
```ruby
|
68
|
+
# load the gem
|
69
|
+
require 'dependency-tracker-client'
|
70
|
+
|
71
|
+
api_instance = DependencyTracker::BadgeApi.new
|
72
|
+
uuid = 'uuid_example' # String | The UUID of the project to retrieve metrics for
|
73
|
+
|
74
|
+
begin
|
75
|
+
#Returns current metrics for a specific project
|
76
|
+
result = api_instance.get_project_vulnerabilities_badge1(uuid)
|
77
|
+
p result
|
78
|
+
rescue DependencyTracker::ApiError => e
|
79
|
+
puts "Exception when calling BadgeApi->get_project_vulnerabilities_badge1: #{e}"
|
80
|
+
end
|
81
|
+
```
|
82
|
+
|
83
|
+
### Parameters
|
84
|
+
|
85
|
+
|
86
|
+
Name | Type | Description | Notes
|
87
|
+
------------- | ------------- | ------------- | -------------
|
88
|
+
**uuid** | **String**| The UUID of the project to retrieve metrics for |
|
89
|
+
|
90
|
+
### Return type
|
91
|
+
|
92
|
+
[**ProjectMetrics**](ProjectMetrics.md)
|
93
|
+
|
94
|
+
### Authorization
|
95
|
+
|
96
|
+
No authorization required
|
97
|
+
|
98
|
+
### HTTP request headers
|
99
|
+
|
100
|
+
- **Content-Type**: Not defined
|
101
|
+
- **Accept**: image/svg+xml
|
102
|
+
|
data/docs/BodyPart.md
ADDED
@@ -0,0 +1,31 @@
|
|
1
|
+
# DependencyTracker::BodyPart
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**content_disposition** | [**ContentDisposition**](ContentDisposition.md) | | [optional]
|
8
|
+
**entity** | [**Object**](.md) | | [optional]
|
9
|
+
**headers** | **Hash<String, Array<String>>** | | [optional]
|
10
|
+
**media_type** | [**MediaType**](MediaType.md) | | [optional]
|
11
|
+
**message_body_workers** | [**Object**](.md) | | [optional]
|
12
|
+
**parent** | [**MultiPart**](MultiPart.md) | | [optional]
|
13
|
+
**providers** | [**Object**](.md) | | [optional]
|
14
|
+
**parameterized_headers** | **Hash<String, Array<ParameterizedHeader>>** | | [optional]
|
15
|
+
|
16
|
+
## Code Sample
|
17
|
+
|
18
|
+
```ruby
|
19
|
+
require 'DependencyTracker'
|
20
|
+
|
21
|
+
instance = DependencyTracker::BodyPart.new(content_disposition: null,
|
22
|
+
entity: null,
|
23
|
+
headers: null,
|
24
|
+
media_type: null,
|
25
|
+
message_body_workers: null,
|
26
|
+
parent: null,
|
27
|
+
providers: null,
|
28
|
+
parameterized_headers: null)
|
29
|
+
```
|
30
|
+
|
31
|
+
|
data/docs/BomApi.md
ADDED
@@ -0,0 +1,335 @@
|
|
1
|
+
# DependencyTracker::BomApi
|
2
|
+
|
3
|
+
All URIs are relative to *http://localhost/api*
|
4
|
+
|
5
|
+
Method | HTTP request | Description
|
6
|
+
------------- | ------------- | -------------
|
7
|
+
[**export_component_as_cyclone_dx**](BomApi.md#export_component_as_cyclone_dx) | **GET** /v1/bom/cyclonedx/component/{uuid} | Returns dependency metadata for a specific component in CycloneDX format
|
8
|
+
[**export_components_as_cyclone_dx**](BomApi.md#export_components_as_cyclone_dx) | **GET** /v1/bom/cyclonedx/components | Returns dependency metadata for all components in CycloneDX format
|
9
|
+
[**export_project_as_cyclone_dx**](BomApi.md#export_project_as_cyclone_dx) | **GET** /v1/bom/cyclonedx/project/{uuid} | Returns dependency metadata for a project in CycloneDX format
|
10
|
+
[**is_token_being_processed**](BomApi.md#is_token_being_processed) | **GET** /v1/bom/token/{uuid} | Determines if there are any tasks associated with the token that are being processed, or in the queue to be processed.
|
11
|
+
[**upload_bom**](BomApi.md#upload_bom) | **POST** /v1/bom | Upload a supported bill of material format document
|
12
|
+
[**upload_bom1**](BomApi.md#upload_bom1) | **PUT** /v1/bom | Upload a supported bill of material format document
|
13
|
+
|
14
|
+
|
15
|
+
|
16
|
+
## export_component_as_cyclone_dx
|
17
|
+
|
18
|
+
> String export_component_as_cyclone_dx(uuid)
|
19
|
+
|
20
|
+
Returns dependency metadata for a specific component in CycloneDX format
|
21
|
+
|
22
|
+
### Example
|
23
|
+
|
24
|
+
```ruby
|
25
|
+
# load the gem
|
26
|
+
require 'dependency-tracker-client'
|
27
|
+
# setup authorization
|
28
|
+
DependencyTracker.configure do |config|
|
29
|
+
# Configure API key authorization: X-Api-Key
|
30
|
+
config.api_key['X-Api-Key'] = 'YOUR API KEY'
|
31
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
32
|
+
#config.api_key_prefix['X-Api-Key'] = 'Bearer'
|
33
|
+
end
|
34
|
+
|
35
|
+
api_instance = DependencyTracker::BomApi.new
|
36
|
+
uuid = 'uuid_example' # String | The UUID of the project to export
|
37
|
+
|
38
|
+
begin
|
39
|
+
#Returns dependency metadata for a specific component in CycloneDX format
|
40
|
+
result = api_instance.export_component_as_cyclone_dx(uuid)
|
41
|
+
p result
|
42
|
+
rescue DependencyTracker::ApiError => e
|
43
|
+
puts "Exception when calling BomApi->export_component_as_cyclone_dx: #{e}"
|
44
|
+
end
|
45
|
+
```
|
46
|
+
|
47
|
+
### Parameters
|
48
|
+
|
49
|
+
|
50
|
+
Name | Type | Description | Notes
|
51
|
+
------------- | ------------- | ------------- | -------------
|
52
|
+
**uuid** | **String**| The UUID of the project to export |
|
53
|
+
|
54
|
+
### Return type
|
55
|
+
|
56
|
+
**String**
|
57
|
+
|
58
|
+
### Authorization
|
59
|
+
|
60
|
+
[X-Api-Key](../README.md#X-Api-Key)
|
61
|
+
|
62
|
+
### HTTP request headers
|
63
|
+
|
64
|
+
- **Content-Type**: Not defined
|
65
|
+
- **Accept**: application/xml
|
66
|
+
|
67
|
+
|
68
|
+
## export_components_as_cyclone_dx
|
69
|
+
|
70
|
+
> String export_components_as_cyclone_dx
|
71
|
+
|
72
|
+
Returns dependency metadata for all components in CycloneDX format
|
73
|
+
|
74
|
+
### Example
|
75
|
+
|
76
|
+
```ruby
|
77
|
+
# load the gem
|
78
|
+
require 'dependency-tracker-client'
|
79
|
+
# setup authorization
|
80
|
+
DependencyTracker.configure do |config|
|
81
|
+
# Configure API key authorization: X-Api-Key
|
82
|
+
config.api_key['X-Api-Key'] = 'YOUR API KEY'
|
83
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
84
|
+
#config.api_key_prefix['X-Api-Key'] = 'Bearer'
|
85
|
+
end
|
86
|
+
|
87
|
+
api_instance = DependencyTracker::BomApi.new
|
88
|
+
|
89
|
+
begin
|
90
|
+
#Returns dependency metadata for all components in CycloneDX format
|
91
|
+
result = api_instance.export_components_as_cyclone_dx
|
92
|
+
p result
|
93
|
+
rescue DependencyTracker::ApiError => e
|
94
|
+
puts "Exception when calling BomApi->export_components_as_cyclone_dx: #{e}"
|
95
|
+
end
|
96
|
+
```
|
97
|
+
|
98
|
+
### Parameters
|
99
|
+
|
100
|
+
This endpoint does not need any parameter.
|
101
|
+
|
102
|
+
### Return type
|
103
|
+
|
104
|
+
**String**
|
105
|
+
|
106
|
+
### Authorization
|
107
|
+
|
108
|
+
[X-Api-Key](../README.md#X-Api-Key)
|
109
|
+
|
110
|
+
### HTTP request headers
|
111
|
+
|
112
|
+
- **Content-Type**: Not defined
|
113
|
+
- **Accept**: application/xml
|
114
|
+
|
115
|
+
|
116
|
+
## export_project_as_cyclone_dx
|
117
|
+
|
118
|
+
> String export_project_as_cyclone_dx(uuid)
|
119
|
+
|
120
|
+
Returns dependency metadata for a project in CycloneDX format
|
121
|
+
|
122
|
+
### Example
|
123
|
+
|
124
|
+
```ruby
|
125
|
+
# load the gem
|
126
|
+
require 'dependency-tracker-client'
|
127
|
+
# setup authorization
|
128
|
+
DependencyTracker.configure do |config|
|
129
|
+
# Configure API key authorization: X-Api-Key
|
130
|
+
config.api_key['X-Api-Key'] = 'YOUR API KEY'
|
131
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
132
|
+
#config.api_key_prefix['X-Api-Key'] = 'Bearer'
|
133
|
+
end
|
134
|
+
|
135
|
+
api_instance = DependencyTracker::BomApi.new
|
136
|
+
uuid = 'uuid_example' # String | The UUID of the project to export
|
137
|
+
|
138
|
+
begin
|
139
|
+
#Returns dependency metadata for a project in CycloneDX format
|
140
|
+
result = api_instance.export_project_as_cyclone_dx(uuid)
|
141
|
+
p result
|
142
|
+
rescue DependencyTracker::ApiError => e
|
143
|
+
puts "Exception when calling BomApi->export_project_as_cyclone_dx: #{e}"
|
144
|
+
end
|
145
|
+
```
|
146
|
+
|
147
|
+
### Parameters
|
148
|
+
|
149
|
+
|
150
|
+
Name | Type | Description | Notes
|
151
|
+
------------- | ------------- | ------------- | -------------
|
152
|
+
**uuid** | **String**| The UUID of the project to export |
|
153
|
+
|
154
|
+
### Return type
|
155
|
+
|
156
|
+
**String**
|
157
|
+
|
158
|
+
### Authorization
|
159
|
+
|
160
|
+
[X-Api-Key](../README.md#X-Api-Key)
|
161
|
+
|
162
|
+
### HTTP request headers
|
163
|
+
|
164
|
+
- **Content-Type**: Not defined
|
165
|
+
- **Accept**: application/xml
|
166
|
+
|
167
|
+
|
168
|
+
## is_token_being_processed
|
169
|
+
|
170
|
+
> is_token_being_processed(uuid)
|
171
|
+
|
172
|
+
Determines if there are any tasks associated with the token that are being processed, or in the queue to be processed.
|
173
|
+
|
174
|
+
This endpoint is intended to be used in conjunction with uploading a supported BOM document. Upon upload, a token will be returned. The token can then be queried using this endpoint to determine if any tasks (such as vulnerability analysis) is being performed on the BOM. A value of true indicates processing is occurring. A value of false indicates that no processing is occurring for the specified token. However, a value of false also does not confirm the token is valid, only that no processing is associated with the specified token.
|
175
|
+
|
176
|
+
### Example
|
177
|
+
|
178
|
+
```ruby
|
179
|
+
# load the gem
|
180
|
+
require 'dependency-tracker-client'
|
181
|
+
# setup authorization
|
182
|
+
DependencyTracker.configure do |config|
|
183
|
+
# Configure API key authorization: X-Api-Key
|
184
|
+
config.api_key['X-Api-Key'] = 'YOUR API KEY'
|
185
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
186
|
+
#config.api_key_prefix['X-Api-Key'] = 'Bearer'
|
187
|
+
end
|
188
|
+
|
189
|
+
api_instance = DependencyTracker::BomApi.new
|
190
|
+
uuid = 'uuid_example' # String | The UUID of the token to query
|
191
|
+
|
192
|
+
begin
|
193
|
+
#Determines if there are any tasks associated with the token that are being processed, or in the queue to be processed.
|
194
|
+
api_instance.is_token_being_processed(uuid)
|
195
|
+
rescue DependencyTracker::ApiError => e
|
196
|
+
puts "Exception when calling BomApi->is_token_being_processed: #{e}"
|
197
|
+
end
|
198
|
+
```
|
199
|
+
|
200
|
+
### Parameters
|
201
|
+
|
202
|
+
|
203
|
+
Name | Type | Description | Notes
|
204
|
+
------------- | ------------- | ------------- | -------------
|
205
|
+
**uuid** | **String**| The UUID of the token to query |
|
206
|
+
|
207
|
+
### Return type
|
208
|
+
|
209
|
+
nil (empty response body)
|
210
|
+
|
211
|
+
### Authorization
|
212
|
+
|
213
|
+
[X-Api-Key](../README.md#X-Api-Key)
|
214
|
+
|
215
|
+
### HTTP request headers
|
216
|
+
|
217
|
+
- **Content-Type**: Not defined
|
218
|
+
- **Accept**: Not defined
|
219
|
+
|
220
|
+
|
221
|
+
## upload_bom
|
222
|
+
|
223
|
+
> upload_bom(opts)
|
224
|
+
|
225
|
+
Upload a supported bill of material format document
|
226
|
+
|
227
|
+
Expects CycloneDX or SPDX (text or RDF) along and a valid project UUID. If a UUID is not specified, than the projectName and projectVersion must be specified. Optionally, if autoCreate is specified and 'true' and the project does not exist, the project will be created. In this scenario, the principal making the request will additionally need the PORTFOLIO_MANAGEMENT or PROJECT_CREATION_UPLOAD permission.
|
228
|
+
|
229
|
+
### Example
|
230
|
+
|
231
|
+
```ruby
|
232
|
+
# load the gem
|
233
|
+
require 'dependency-tracker-client'
|
234
|
+
# setup authorization
|
235
|
+
DependencyTracker.configure do |config|
|
236
|
+
# Configure API key authorization: X-Api-Key
|
237
|
+
config.api_key['X-Api-Key'] = 'YOUR API KEY'
|
238
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
239
|
+
#config.api_key_prefix['X-Api-Key'] = 'Bearer'
|
240
|
+
end
|
241
|
+
|
242
|
+
api_instance = DependencyTracker::BomApi.new
|
243
|
+
opts = {
|
244
|
+
project: 'project_example', # String |
|
245
|
+
auto_create: false, # Boolean |
|
246
|
+
project_name: 'project_name_example', # String |
|
247
|
+
project_version: 'project_version_example' # String |
|
248
|
+
}
|
249
|
+
|
250
|
+
begin
|
251
|
+
#Upload a supported bill of material format document
|
252
|
+
api_instance.upload_bom(opts)
|
253
|
+
rescue DependencyTracker::ApiError => e
|
254
|
+
puts "Exception when calling BomApi->upload_bom: #{e}"
|
255
|
+
end
|
256
|
+
```
|
257
|
+
|
258
|
+
### Parameters
|
259
|
+
|
260
|
+
|
261
|
+
Name | Type | Description | Notes
|
262
|
+
------------- | ------------- | ------------- | -------------
|
263
|
+
**project** | **String**| | [optional]
|
264
|
+
**auto_create** | **Boolean**| | [optional] [default to false]
|
265
|
+
**project_name** | **String**| | [optional]
|
266
|
+
**project_version** | **String**| | [optional]
|
267
|
+
|
268
|
+
### Return type
|
269
|
+
|
270
|
+
nil (empty response body)
|
271
|
+
|
272
|
+
### Authorization
|
273
|
+
|
274
|
+
[X-Api-Key](../README.md#X-Api-Key)
|
275
|
+
|
276
|
+
### HTTP request headers
|
277
|
+
|
278
|
+
- **Content-Type**: multipart/form-data
|
279
|
+
- **Accept**: Not defined
|
280
|
+
|
281
|
+
|
282
|
+
## upload_bom1
|
283
|
+
|
284
|
+
> upload_bom1(opts)
|
285
|
+
|
286
|
+
Upload a supported bill of material format document
|
287
|
+
|
288
|
+
Expects CycloneDX or SPDX (text or RDF) along and a valid project UUID. If a UUID is not specified, than the projectName and projectVersion must be specified. Optionally, if autoCreate is specified and 'true' and the project does not exist, the project will be created. In this scenario, the principal making the request will additionally need the PORTFOLIO_MANAGEMENT or PROJECT_CREATION_UPLOAD permission.
|
289
|
+
|
290
|
+
### Example
|
291
|
+
|
292
|
+
```ruby
|
293
|
+
# load the gem
|
294
|
+
require 'dependency-tracker-client'
|
295
|
+
# setup authorization
|
296
|
+
DependencyTracker.configure do |config|
|
297
|
+
# Configure API key authorization: X-Api-Key
|
298
|
+
config.api_key['X-Api-Key'] = 'YOUR API KEY'
|
299
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
300
|
+
#config.api_key_prefix['X-Api-Key'] = 'Bearer'
|
301
|
+
end
|
302
|
+
|
303
|
+
api_instance = DependencyTracker::BomApi.new
|
304
|
+
opts = {
|
305
|
+
body: DependencyTracker::BomSubmitRequest.new # BomSubmitRequest |
|
306
|
+
}
|
307
|
+
|
308
|
+
begin
|
309
|
+
#Upload a supported bill of material format document
|
310
|
+
api_instance.upload_bom1(opts)
|
311
|
+
rescue DependencyTracker::ApiError => e
|
312
|
+
puts "Exception when calling BomApi->upload_bom1: #{e}"
|
313
|
+
end
|
314
|
+
```
|
315
|
+
|
316
|
+
### Parameters
|
317
|
+
|
318
|
+
|
319
|
+
Name | Type | Description | Notes
|
320
|
+
------------- | ------------- | ------------- | -------------
|
321
|
+
**body** | [**BomSubmitRequest**](BomSubmitRequest.md)| | [optional]
|
322
|
+
|
323
|
+
### Return type
|
324
|
+
|
325
|
+
nil (empty response body)
|
326
|
+
|
327
|
+
### Authorization
|
328
|
+
|
329
|
+
[X-Api-Key](../README.md#X-Api-Key)
|
330
|
+
|
331
|
+
### HTTP request headers
|
332
|
+
|
333
|
+
- **Content-Type**: application/json
|
334
|
+
- **Accept**: Not defined
|
335
|
+
|