insights-approval-api-client 1.2.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/README.md +142 -0
- data/Rakefile +10 -0
- data/client-meta.json +9 -0
- data/docs/Action.md +27 -0
- data/docs/ActionApi.md +172 -0
- data/docs/ActionCollection.md +21 -0
- data/docs/CollectionLinks.md +23 -0
- data/docs/CollectionMetadata.md +21 -0
- data/docs/GraphqlApi.md +62 -0
- data/docs/GraphqlIn.md +21 -0
- data/docs/GraphqlOut.md +19 -0
- data/docs/GroupRef.md +19 -0
- data/docs/HttpApiError.md +19 -0
- data/docs/HttpApiErrorCollection.md +17 -0
- data/docs/Request.md +49 -0
- data/docs/RequestApi.md +292 -0
- data/docs/RequestCollection.md +21 -0
- data/docs/RequestIn.md +23 -0
- data/docs/ResourceObject.md +21 -0
- data/docs/Tag.md +17 -0
- data/docs/TagResource.md +21 -0
- data/docs/Template.md +23 -0
- data/docs/TemplateApi.md +124 -0
- data/docs/TemplateCollection.md +21 -0
- data/docs/Workflow.md +29 -0
- data/docs/WorkflowApi.md +469 -0
- data/docs/WorkflowCollection.md +21 -0
- data/generate.sh +9 -0
- data/git_push.sh +58 -0
- data/insights-approval-api-client.gemspec +39 -0
- data/lib/insights-approval-api-client.rb +63 -0
- data/lib/insights-approval-api-client/api/action_api.rb +231 -0
- data/lib/insights-approval-api-client/api/graphql_api.rb +86 -0
- data/lib/insights-approval-api-client/api/request_api.rb +381 -0
- data/lib/insights-approval-api-client/api/template_api.rb +169 -0
- data/lib/insights-approval-api-client/api/workflow_api.rb +630 -0
- data/lib/insights-approval-api-client/api_client.rb +386 -0
- data/lib/insights-approval-api-client/api_error.rb +57 -0
- data/lib/insights-approval-api-client/configuration.rb +268 -0
- data/lib/insights-approval-api-client/models/action.rb +293 -0
- data/lib/insights-approval-api-client/models/action_collection.rb +226 -0
- data/lib/insights-approval-api-client/models/collection_links.rb +237 -0
- data/lib/insights-approval-api-client/models/collection_metadata.rb +227 -0
- data/lib/insights-approval-api-client/models/graphql_in.rb +237 -0
- data/lib/insights-approval-api-client/models/graphql_out.rb +219 -0
- data/lib/insights-approval-api-client/models/group_ref.rb +223 -0
- data/lib/insights-approval-api-client/models/http_api_error.rb +218 -0
- data/lib/insights-approval-api-client/models/http_api_error_collection.rb +210 -0
- data/lib/insights-approval-api-client/models/request.rb +417 -0
- data/lib/insights-approval-api-client/models/request_collection.rb +226 -0
- data/lib/insights-approval-api-client/models/request_in.rb +255 -0
- data/lib/insights-approval-api-client/models/resource_object.rb +243 -0
- data/lib/insights-approval-api-client/models/tag.rb +207 -0
- data/lib/insights-approval-api-client/models/tag_resource.rb +242 -0
- data/lib/insights-approval-api-client/models/template.rb +235 -0
- data/lib/insights-approval-api-client/models/template_collection.rb +226 -0
- data/lib/insights-approval-api-client/models/workflow.rb +283 -0
- data/lib/insights-approval-api-client/models/workflow_collection.rb +226 -0
- data/lib/insights-approval-api-client/version.rb +15 -0
- data/openapi.json +1540 -0
- data/spec/api/action_api_spec.rb +72 -0
- data/spec/api/graphql_api_spec.rb +47 -0
- data/spec/api/request_api_spec.rb +100 -0
- data/spec/api/template_api_spec.rb +62 -0
- data/spec/api/workflow_api_spec.rb +145 -0
- data/spec/api_client_spec.rb +226 -0
- data/spec/configuration_spec.rb +42 -0
- data/spec/models/action_collection_spec.rb +53 -0
- data/spec/models/action_spec.rb +75 -0
- data/spec/models/collection_links_spec.rb +59 -0
- data/spec/models/collection_metadata_spec.rb +53 -0
- data/spec/models/graphql_in_spec.rb +53 -0
- data/spec/models/graphql_out_spec.rb +47 -0
- data/spec/models/group_ref_spec.rb +47 -0
- data/spec/models/http_api_error_collection_spec.rb +41 -0
- data/spec/models/http_api_error_spec.rb +47 -0
- data/spec/models/request_collection_spec.rb +53 -0
- data/spec/models/request_in_spec.rb +59 -0
- data/spec/models/request_spec.rb +145 -0
- data/spec/models/resource_object_spec.rb +53 -0
- data/spec/models/tag_resource_spec.rb +53 -0
- data/spec/models/tag_spec.rb +41 -0
- data/spec/models/template_collection_spec.rb +53 -0
- data/spec/models/template_spec.rb +59 -0
- data/spec/models/workflow_collection_spec.rb +53 -0
- data/spec/models/workflow_spec.rb +77 -0
- data/spec/spec_helper.rb +111 -0
- metadata +218 -0
data/docs/GraphqlApi.md
ADDED
@@ -0,0 +1,62 @@
|
|
1
|
+
# ApprovalApiClient::GraphqlApi
|
2
|
+
|
3
|
+
All URIs are relative to *https://cloud.redhat.com//api/approval/v1.2*
|
4
|
+
|
5
|
+
Method | HTTP request | Description
|
6
|
+
------------- | ------------- | -------------
|
7
|
+
[**post_graphql**](GraphqlApi.md#post_graphql) | **POST** /graphql | Perform a GraphQL Query
|
8
|
+
|
9
|
+
|
10
|
+
|
11
|
+
## post_graphql
|
12
|
+
|
13
|
+
> GraphqlOut post_graphql(graphql_in)
|
14
|
+
|
15
|
+
Perform a GraphQL Query
|
16
|
+
|
17
|
+
Performs a GraphQL Query
|
18
|
+
|
19
|
+
### Example
|
20
|
+
|
21
|
+
```ruby
|
22
|
+
# load the gem
|
23
|
+
require 'insights-approval-api-client'
|
24
|
+
# setup authorization
|
25
|
+
ApprovalApiClient.configure do |config|
|
26
|
+
# Configure HTTP basic authorization: Basic_auth
|
27
|
+
config.username = 'YOUR USERNAME'
|
28
|
+
config.password = 'YOUR PASSWORD'
|
29
|
+
end
|
30
|
+
|
31
|
+
api_instance = ApprovalApiClient::GraphqlApi.new
|
32
|
+
graphql_in = ApprovalApiClient::GraphqlIn.new # GraphqlIn | GraphQL Query Request
|
33
|
+
|
34
|
+
begin
|
35
|
+
#Perform a GraphQL Query
|
36
|
+
result = api_instance.post_graphql(graphql_in)
|
37
|
+
p result
|
38
|
+
rescue ApprovalApiClient::ApiError => e
|
39
|
+
puts "Exception when calling GraphqlApi->post_graphql: #{e}"
|
40
|
+
end
|
41
|
+
```
|
42
|
+
|
43
|
+
### Parameters
|
44
|
+
|
45
|
+
|
46
|
+
Name | Type | Description | Notes
|
47
|
+
------------- | ------------- | ------------- | -------------
|
48
|
+
**graphql_in** | [**GraphqlIn**](GraphqlIn.md)| GraphQL Query Request |
|
49
|
+
|
50
|
+
### Return type
|
51
|
+
|
52
|
+
[**GraphqlOut**](GraphqlOut.md)
|
53
|
+
|
54
|
+
### Authorization
|
55
|
+
|
56
|
+
[Basic_auth](../README.md#Basic_auth)
|
57
|
+
|
58
|
+
### HTTP request headers
|
59
|
+
|
60
|
+
- **Content-Type**: application/json
|
61
|
+
- **Accept**: application/json
|
62
|
+
|
data/docs/GraphqlIn.md
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
# ApprovalApiClient::GraphqlIn
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**query** | **String** | The GraphQL query | [default to '{}']
|
8
|
+
**operation_name** | **String** | If the Query contains several named operations, the operationName controls which one should be executed | [optional] [default to '']
|
9
|
+
**variables** | [**Object**](.md) | Optional Query variables | [optional]
|
10
|
+
|
11
|
+
## Code Sample
|
12
|
+
|
13
|
+
```ruby
|
14
|
+
require 'ApprovalApiClient'
|
15
|
+
|
16
|
+
instance = ApprovalApiClient::GraphqlIn.new(query: null,
|
17
|
+
operation_name: null,
|
18
|
+
variables: null)
|
19
|
+
```
|
20
|
+
|
21
|
+
|
data/docs/GraphqlOut.md
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
# ApprovalApiClient::GraphqlOut
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**data** | [**Object**](.md) | Results from the GraphQL query | [optional]
|
8
|
+
**errors** | **Array<Object>** | Errors resulting from the GraphQL query | [optional]
|
9
|
+
|
10
|
+
## Code Sample
|
11
|
+
|
12
|
+
```ruby
|
13
|
+
require 'ApprovalApiClient'
|
14
|
+
|
15
|
+
instance = ApprovalApiClient::GraphqlOut.new(data: null,
|
16
|
+
errors: null)
|
17
|
+
```
|
18
|
+
|
19
|
+
|
data/docs/GroupRef.md
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
# ApprovalApiClient::GroupRef
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**name** | **String** | Group name | [optional]
|
8
|
+
**uuid** | **String** | Group UUID |
|
9
|
+
|
10
|
+
## Code Sample
|
11
|
+
|
12
|
+
```ruby
|
13
|
+
require 'ApprovalApiClient'
|
14
|
+
|
15
|
+
instance = ApprovalApiClient::GroupRef.new(name: null,
|
16
|
+
uuid: null)
|
17
|
+
```
|
18
|
+
|
19
|
+
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# ApprovalApiClient::HttpApiError
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**status** | **String** | HTTP status code | [optional]
|
8
|
+
**details** | **String** | Error details | [optional]
|
9
|
+
|
10
|
+
## Code Sample
|
11
|
+
|
12
|
+
```ruby
|
13
|
+
require 'ApprovalApiClient'
|
14
|
+
|
15
|
+
instance = ApprovalApiClient::HttpApiError.new(status: 400,
|
16
|
+
details: Bad Request)
|
17
|
+
```
|
18
|
+
|
19
|
+
|
@@ -0,0 +1,17 @@
|
|
1
|
+
# ApprovalApiClient::HttpApiErrorCollection
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**errors** | [**Array<HttpApiError>**](HttpApiError.md) | Error list from the API query | [optional]
|
8
|
+
|
9
|
+
## Code Sample
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
require 'ApprovalApiClient'
|
13
|
+
|
14
|
+
instance = ApprovalApiClient::HttpApiErrorCollection.new(errors: null)
|
15
|
+
```
|
16
|
+
|
17
|
+
|
data/docs/Request.md
ADDED
@@ -0,0 +1,49 @@
|
|
1
|
+
# ApprovalApiClient::Request
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**id** | **String** | | [optional] [readonly]
|
8
|
+
**state** | **String** | The state of the request. Possible value: canceled, completed, failed, notified, skipped, or started | [optional] [readonly]
|
9
|
+
**decision** | **String** | Approval decision. Possible value: undecided, approved, canceled, denied, or error | [optional] [readonly]
|
10
|
+
**reason** | **String** | Reason for the decision. Optional. Present normally when the decision is denied | [optional] [readonly]
|
11
|
+
**workflow_id** | **String** | Associate workflow id. Available only if the request is a leaf node | [optional] [readonly]
|
12
|
+
**created_at** | **DateTime** | Timestamp of creation | [optional] [readonly]
|
13
|
+
**notified_at** | **DateTime** | Timestamp of notification sent to approvers | [optional] [readonly]
|
14
|
+
**finished_at** | **DateTime** | Timestamp of finishing (skipped, canceled, or completed) | [optional] [readonly]
|
15
|
+
**number_of_children** | **Integer** | Number of child requests | [optional] [readonly]
|
16
|
+
**number_of_finished_children** | **Integer** | Number of finished child requests | [optional] [readonly]
|
17
|
+
**owner** | **String** | Requester's id | [optional] [readonly]
|
18
|
+
**requester_name** | **String** | Requester's full name | [optional] [readonly]
|
19
|
+
**name** | **String** | Request name | [optional] [readonly]
|
20
|
+
**description** | **String** | Request description | [optional] [readonly]
|
21
|
+
**group_name** | **String** | Name of approver group(s) assigned to approve this request | [optional] [readonly]
|
22
|
+
**parent_id** | **String** | Parent request id | [optional] [readonly]
|
23
|
+
**metadata** | [**Object**](.md) | JSON Metadata about the request | [optional] [readonly]
|
24
|
+
|
25
|
+
## Code Sample
|
26
|
+
|
27
|
+
```ruby
|
28
|
+
require 'ApprovalApiClient'
|
29
|
+
|
30
|
+
instance = ApprovalApiClient::Request.new(id: null,
|
31
|
+
state: null,
|
32
|
+
decision: null,
|
33
|
+
reason: null,
|
34
|
+
workflow_id: null,
|
35
|
+
created_at: null,
|
36
|
+
notified_at: null,
|
37
|
+
finished_at: null,
|
38
|
+
number_of_children: null,
|
39
|
+
number_of_finished_children: null,
|
40
|
+
owner: null,
|
41
|
+
requester_name: null,
|
42
|
+
name: null,
|
43
|
+
description: null,
|
44
|
+
group_name: null,
|
45
|
+
parent_id: null,
|
46
|
+
metadata: null)
|
47
|
+
```
|
48
|
+
|
49
|
+
|
data/docs/RequestApi.md
ADDED
@@ -0,0 +1,292 @@
|
|
1
|
+
# ApprovalApiClient::RequestApi
|
2
|
+
|
3
|
+
All URIs are relative to *https://cloud.redhat.com//api/approval/v1.2*
|
4
|
+
|
5
|
+
Method | HTTP request | Description
|
6
|
+
------------- | ------------- | -------------
|
7
|
+
[**create_request**](RequestApi.md#create_request) | **POST** /requests | Add an approval request by given parameters
|
8
|
+
[**list_requests**](RequestApi.md#list_requests) | **GET** /requests | Return an array of requester made approval requests, available to anyone
|
9
|
+
[**list_requests_by_request**](RequestApi.md#list_requests_by_request) | **GET** /requests/{request_id}/requests | Return an array of child requests of a given request id
|
10
|
+
[**show_request**](RequestApi.md#show_request) | **GET** /requests/{id} | Return an approval request by given id
|
11
|
+
[**show_request_content**](RequestApi.md#show_request_content) | **GET** /requests/{request_id}/content | Return request content of a given request id
|
12
|
+
|
13
|
+
|
14
|
+
|
15
|
+
## create_request
|
16
|
+
|
17
|
+
> Request create_request(request_in)
|
18
|
+
|
19
|
+
Add an approval request by given parameters
|
20
|
+
|
21
|
+
Add an approval request by given parameters, available to anyone
|
22
|
+
|
23
|
+
### Example
|
24
|
+
|
25
|
+
```ruby
|
26
|
+
# load the gem
|
27
|
+
require 'insights-approval-api-client'
|
28
|
+
# setup authorization
|
29
|
+
ApprovalApiClient.configure do |config|
|
30
|
+
# Configure HTTP basic authorization: Basic_auth
|
31
|
+
config.username = 'YOUR USERNAME'
|
32
|
+
config.password = 'YOUR PASSWORD'
|
33
|
+
end
|
34
|
+
|
35
|
+
api_instance = ApprovalApiClient::RequestApi.new
|
36
|
+
request_in = ApprovalApiClient::RequestIn.new # RequestIn | Parameters need to create a request
|
37
|
+
|
38
|
+
begin
|
39
|
+
#Add an approval request by given parameters
|
40
|
+
result = api_instance.create_request(request_in)
|
41
|
+
p result
|
42
|
+
rescue ApprovalApiClient::ApiError => e
|
43
|
+
puts "Exception when calling RequestApi->create_request: #{e}"
|
44
|
+
end
|
45
|
+
```
|
46
|
+
|
47
|
+
### Parameters
|
48
|
+
|
49
|
+
|
50
|
+
Name | Type | Description | Notes
|
51
|
+
------------- | ------------- | ------------- | -------------
|
52
|
+
**request_in** | [**RequestIn**](RequestIn.md)| Parameters need to create a request |
|
53
|
+
|
54
|
+
### Return type
|
55
|
+
|
56
|
+
[**Request**](Request.md)
|
57
|
+
|
58
|
+
### Authorization
|
59
|
+
|
60
|
+
[Basic_auth](../README.md#Basic_auth)
|
61
|
+
|
62
|
+
### HTTP request headers
|
63
|
+
|
64
|
+
- **Content-Type**: application/json
|
65
|
+
- **Accept**: application/json
|
66
|
+
|
67
|
+
|
68
|
+
## list_requests
|
69
|
+
|
70
|
+
> RequestCollection list_requests(opts)
|
71
|
+
|
72
|
+
Return an array of requester made approval requests, available to anyone
|
73
|
+
|
74
|
+
The result depends on the x-rh-persona header (approval/admin, approval/requseter, or approval/approver). Program generated child requests are not included.
|
75
|
+
|
76
|
+
### Example
|
77
|
+
|
78
|
+
```ruby
|
79
|
+
# load the gem
|
80
|
+
require 'insights-approval-api-client'
|
81
|
+
# setup authorization
|
82
|
+
ApprovalApiClient.configure do |config|
|
83
|
+
# Configure HTTP basic authorization: Basic_auth
|
84
|
+
config.username = 'YOUR USERNAME'
|
85
|
+
config.password = 'YOUR PASSWORD'
|
86
|
+
end
|
87
|
+
|
88
|
+
api_instance = ApprovalApiClient::RequestApi.new
|
89
|
+
opts = {
|
90
|
+
x_rh_persona: 'x_rh_persona_example', # String | Current login user's persona
|
91
|
+
limit: 100, # Integer | How many items to return at one time (max 1000)
|
92
|
+
offset: 0, # Integer | Starting Offset
|
93
|
+
filter: nil, # Object | Filter for querying collections.
|
94
|
+
sort_by: 'sort_by_example' # String | Parameter to sort collection
|
95
|
+
}
|
96
|
+
|
97
|
+
begin
|
98
|
+
#Return an array of requester made approval requests, available to anyone
|
99
|
+
result = api_instance.list_requests(opts)
|
100
|
+
p result
|
101
|
+
rescue ApprovalApiClient::ApiError => e
|
102
|
+
puts "Exception when calling RequestApi->list_requests: #{e}"
|
103
|
+
end
|
104
|
+
```
|
105
|
+
|
106
|
+
### Parameters
|
107
|
+
|
108
|
+
|
109
|
+
Name | Type | Description | Notes
|
110
|
+
------------- | ------------- | ------------- | -------------
|
111
|
+
**x_rh_persona** | **String**| Current login user's persona | [optional]
|
112
|
+
**limit** | **Integer**| How many items to return at one time (max 1000) | [optional] [default to 100]
|
113
|
+
**offset** | **Integer**| Starting Offset | [optional] [default to 0]
|
114
|
+
**filter** | [**Object**](.md)| Filter for querying collections. | [optional]
|
115
|
+
**sort_by** | **String**| Parameter to sort collection | [optional]
|
116
|
+
|
117
|
+
### Return type
|
118
|
+
|
119
|
+
[**RequestCollection**](RequestCollection.md)
|
120
|
+
|
121
|
+
### Authorization
|
122
|
+
|
123
|
+
[Basic_auth](../README.md#Basic_auth)
|
124
|
+
|
125
|
+
### HTTP request headers
|
126
|
+
|
127
|
+
- **Content-Type**: Not defined
|
128
|
+
- **Accept**: application/json
|
129
|
+
|
130
|
+
|
131
|
+
## list_requests_by_request
|
132
|
+
|
133
|
+
> RequestCollection list_requests_by_request(request_id, opts)
|
134
|
+
|
135
|
+
Return an array of child requests of a given request id
|
136
|
+
|
137
|
+
Return an array of child requests of a given request id. The result depends on the x-rh-persona header (approval/admin, approval/requseter, or approval/approver).
|
138
|
+
|
139
|
+
### Example
|
140
|
+
|
141
|
+
```ruby
|
142
|
+
# load the gem
|
143
|
+
require 'insights-approval-api-client'
|
144
|
+
# setup authorization
|
145
|
+
ApprovalApiClient.configure do |config|
|
146
|
+
# Configure HTTP basic authorization: Basic_auth
|
147
|
+
config.username = 'YOUR USERNAME'
|
148
|
+
config.password = 'YOUR PASSWORD'
|
149
|
+
end
|
150
|
+
|
151
|
+
api_instance = ApprovalApiClient::RequestApi.new
|
152
|
+
request_id = 'request_id_example' # String | Id of request
|
153
|
+
opts = {
|
154
|
+
x_rh_persona: 'x_rh_persona_example' # String | Current login user's persona
|
155
|
+
}
|
156
|
+
|
157
|
+
begin
|
158
|
+
#Return an array of child requests of a given request id
|
159
|
+
result = api_instance.list_requests_by_request(request_id, opts)
|
160
|
+
p result
|
161
|
+
rescue ApprovalApiClient::ApiError => e
|
162
|
+
puts "Exception when calling RequestApi->list_requests_by_request: #{e}"
|
163
|
+
end
|
164
|
+
```
|
165
|
+
|
166
|
+
### Parameters
|
167
|
+
|
168
|
+
|
169
|
+
Name | Type | Description | Notes
|
170
|
+
------------- | ------------- | ------------- | -------------
|
171
|
+
**request_id** | **String**| Id of request |
|
172
|
+
**x_rh_persona** | **String**| Current login user's persona | [optional]
|
173
|
+
|
174
|
+
### Return type
|
175
|
+
|
176
|
+
[**RequestCollection**](RequestCollection.md)
|
177
|
+
|
178
|
+
### Authorization
|
179
|
+
|
180
|
+
[Basic_auth](../README.md#Basic_auth)
|
181
|
+
|
182
|
+
### HTTP request headers
|
183
|
+
|
184
|
+
- **Content-Type**: Not defined
|
185
|
+
- **Accept**: application/json
|
186
|
+
|
187
|
+
|
188
|
+
## show_request
|
189
|
+
|
190
|
+
> Request show_request(id)
|
191
|
+
|
192
|
+
Return an approval request by given id
|
193
|
+
|
194
|
+
Return an approval request by given id, available to anyone who can access the request
|
195
|
+
|
196
|
+
### Example
|
197
|
+
|
198
|
+
```ruby
|
199
|
+
# load the gem
|
200
|
+
require 'insights-approval-api-client'
|
201
|
+
# setup authorization
|
202
|
+
ApprovalApiClient.configure do |config|
|
203
|
+
# Configure HTTP basic authorization: Basic_auth
|
204
|
+
config.username = 'YOUR USERNAME'
|
205
|
+
config.password = 'YOUR PASSWORD'
|
206
|
+
end
|
207
|
+
|
208
|
+
api_instance = ApprovalApiClient::RequestApi.new
|
209
|
+
id = 'id_example' # String | Query by id
|
210
|
+
|
211
|
+
begin
|
212
|
+
#Return an approval request by given id
|
213
|
+
result = api_instance.show_request(id)
|
214
|
+
p result
|
215
|
+
rescue ApprovalApiClient::ApiError => e
|
216
|
+
puts "Exception when calling RequestApi->show_request: #{e}"
|
217
|
+
end
|
218
|
+
```
|
219
|
+
|
220
|
+
### Parameters
|
221
|
+
|
222
|
+
|
223
|
+
Name | Type | Description | Notes
|
224
|
+
------------- | ------------- | ------------- | -------------
|
225
|
+
**id** | **String**| Query by id |
|
226
|
+
|
227
|
+
### Return type
|
228
|
+
|
229
|
+
[**Request**](Request.md)
|
230
|
+
|
231
|
+
### Authorization
|
232
|
+
|
233
|
+
[Basic_auth](../README.md#Basic_auth)
|
234
|
+
|
235
|
+
### HTTP request headers
|
236
|
+
|
237
|
+
- **Content-Type**: Not defined
|
238
|
+
- **Accept**: */*
|
239
|
+
|
240
|
+
|
241
|
+
## show_request_content
|
242
|
+
|
243
|
+
> Object show_request_content(request_id)
|
244
|
+
|
245
|
+
Return request content of a given request id
|
246
|
+
|
247
|
+
Return request content of a given request id, available to all
|
248
|
+
|
249
|
+
### Example
|
250
|
+
|
251
|
+
```ruby
|
252
|
+
# load the gem
|
253
|
+
require 'insights-approval-api-client'
|
254
|
+
# setup authorization
|
255
|
+
ApprovalApiClient.configure do |config|
|
256
|
+
# Configure HTTP basic authorization: Basic_auth
|
257
|
+
config.username = 'YOUR USERNAME'
|
258
|
+
config.password = 'YOUR PASSWORD'
|
259
|
+
end
|
260
|
+
|
261
|
+
api_instance = ApprovalApiClient::RequestApi.new
|
262
|
+
request_id = 'request_id_example' # String | Id of request
|
263
|
+
|
264
|
+
begin
|
265
|
+
#Return request content of a given request id
|
266
|
+
result = api_instance.show_request_content(request_id)
|
267
|
+
p result
|
268
|
+
rescue ApprovalApiClient::ApiError => e
|
269
|
+
puts "Exception when calling RequestApi->show_request_content: #{e}"
|
270
|
+
end
|
271
|
+
```
|
272
|
+
|
273
|
+
### Parameters
|
274
|
+
|
275
|
+
|
276
|
+
Name | Type | Description | Notes
|
277
|
+
------------- | ------------- | ------------- | -------------
|
278
|
+
**request_id** | **String**| Id of request |
|
279
|
+
|
280
|
+
### Return type
|
281
|
+
|
282
|
+
**Object**
|
283
|
+
|
284
|
+
### Authorization
|
285
|
+
|
286
|
+
[Basic_auth](../README.md#Basic_auth)
|
287
|
+
|
288
|
+
### HTTP request headers
|
289
|
+
|
290
|
+
- **Content-Type**: Not defined
|
291
|
+
- **Accept**: application/json
|
292
|
+
|