losant_rest 1.22.3 → 1.23.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 +4 -4
- data/docs/_schemas.md +1313 -145
- data/docs/file.md +3 -3
- data/docs/files.md +2 -2
- data/docs/me.md +11 -1
- data/docs/privateFile.md +222 -0
- data/docs/privateFiles.md +97 -0
- data/lib/platform_rest/client.rb +10 -2
- data/lib/platform_rest/file.rb +3 -3
- data/lib/platform_rest/files.rb +1 -1
- data/lib/platform_rest/me.rb +21 -1
- data/lib/platform_rest/private_file.rb +230 -0
- data/lib/platform_rest/private_files.rb +146 -0
- data/lib/platform_rest/version.rb +1 -1
- data/lib/platform_rest.rb +2 -0
- data/schemas/apiTokenPost.json +12 -2
- data/schemas/application.json +7 -0
- data/schemas/applicationClonePost.json +4 -0
- data/schemas/applicationCreationByTemplateResult.json +7 -0
- data/schemas/applicationDashboardPost.json +3 -1
- data/schemas/applicationExportPost.json +4 -0
- data/schemas/applicationImportExecutions.json +2 -0
- data/schemas/applicationPatch.json +4 -0
- data/schemas/applicationPost.json +4 -0
- data/schemas/applicationTemplate.json +3 -0
- data/schemas/applicationTemplates.json +3 -0
- data/schemas/applications.json +7 -0
- data/schemas/auditLog.json +1 -0
- data/schemas/auditLogFilter.json +1 -0
- data/schemas/auditLogs.json +1 -0
- data/schemas/credentialLinkedResources.json +18 -0
- data/schemas/dashboard.json +3 -1
- data/schemas/dashboardBlockSuggestCodePost.json +620 -0
- data/schemas/dashboardBlockSuggestCodeResponse.json +49 -0
- data/schemas/dashboardPatch.json +3 -1
- data/schemas/dashboardPost.json +3 -1
- data/schemas/dashboards.json +3 -1
- data/schemas/experienceLinkedResources.json +18 -0
- data/schemas/fileUploadPostResponse.json +103 -82
- data/schemas/files.json +1 -1
- data/schemas/flow.json +6 -0
- data/schemas/flowPatch.json +6 -0
- data/schemas/flowPost.json +6 -0
- data/schemas/flowVersion.json +12 -0
- data/schemas/flowVersionPost.json +6 -0
- data/schemas/flowVersions.json +12 -0
- data/schemas/flows.json +6 -0
- data/schemas/flowsImportPost.json +12 -0
- data/schemas/flowsImportResult.json +18 -0
- data/schemas/githubLogin.json +12 -2
- data/schemas/historicalSummaries.json +10 -0
- data/schemas/historicalSummary.json +10 -0
- data/schemas/importIntoApplicationOptions.json +1 -0
- data/schemas/importNewApplicationOptions.json +1 -0
- data/schemas/instance.json +7 -0
- data/schemas/instanceOrg.json +7 -0
- data/schemas/instanceOrgPatch.json +4 -0
- data/schemas/instanceOrgPost.json +4 -0
- data/schemas/instanceOrgs.json +7 -0
- data/schemas/instancePatch.json +4 -0
- data/schemas/instanceSandbox.json +6 -0
- data/schemas/instanceSandboxes.json +6 -0
- data/schemas/instances.json +7 -0
- data/schemas/me.json +11 -0
- data/schemas/notebook.json +9 -0
- data/schemas/notebookPatch.json +9 -0
- data/schemas/notebookPost.json +9 -0
- data/schemas/notebooks.json +9 -0
- data/schemas/org.json +7 -0
- data/schemas/orgs.json +7 -0
- data/schemas/samlResponse.json +12 -2
- data/schemas/suggestFunctionPost.json +2 -1
- data/schemas/suggestFunctionResponse.json +13 -1
- data/schemas/userCredentials.json +12 -2
- data/schemas/userPost.json +12 -2
- data/schemas/webhook.json +3 -0
- data/schemas/webhookPatch.json +3 -0
- data/schemas/webhookPost.json +3 -0
- data/schemas/webhooks.json +3 -0
- metadata +8 -2
data/docs/file.md
CHANGED
|
@@ -83,7 +83,7 @@ all.Application, all.Application.cli, all.Application.read, all.Organization, al
|
|
|
83
83
|
|
|
84
84
|
| Code | Type | Description |
|
|
85
85
|
| ---- | ---- | ----------- |
|
|
86
|
-
| 200 | [File Schema](_schemas.md#file-schema) |
|
|
86
|
+
| 200 | [File Schema](_schemas.md#file-schema) | File information |
|
|
87
87
|
|
|
88
88
|
#### Error Responses
|
|
89
89
|
|
|
@@ -160,14 +160,14 @@ all.Application, all.Application.cli, all.Organization, all.User, all.User.cli,
|
|
|
160
160
|
| ---- | ---- | -------- | ----------- | ------- | ------- |
|
|
161
161
|
| applicationId | string | Y | ID associated with the application | | 575ec8687ae143cd83dc4a97 |
|
|
162
162
|
| fileId | string | Y | ID associated with the file | | 575ec76c7ae143cd83dc4a96 |
|
|
163
|
-
| updates | [File Patch](_schemas.md#file-patch) | Y |
|
|
163
|
+
| updates | [File Patch](_schemas.md#file-patch) | Y | Updated information about the file | | [File Patch Example](_schemas.md#file-patch-example) |
|
|
164
164
|
| losantdomain | string | N | Domain scope of request (rarely needed) | | example.com |
|
|
165
165
|
|
|
166
166
|
#### Successful Responses
|
|
167
167
|
|
|
168
168
|
| Code | Type | Description |
|
|
169
169
|
| ---- | ---- | ----------- |
|
|
170
|
-
| 201 | [File Upload Post Response](_schemas.md#file-upload-post-response) | Successfully updated file and
|
|
170
|
+
| 201 | [File Upload Post Response](_schemas.md#file-upload-post-response) | Successfully updated file and the information needed to upload the file content |
|
|
171
171
|
|
|
172
172
|
#### Error Responses
|
|
173
173
|
|
data/docs/files.md
CHANGED
|
@@ -31,7 +31,7 @@ all.Application, all.Application.cli, all.Application.read, all.Organization, al
|
|
|
31
31
|
| Name | Type | Required | Description | Default | Example |
|
|
32
32
|
| ---- | ---- | -------- | ----------- | ------- | ------- |
|
|
33
33
|
| applicationId | string | Y | ID associated with the application | | 575ec8687ae143cd83dc4a97 |
|
|
34
|
-
| sortField | string | N | Field to sort the results by. Accepted values are: lastUpdated, type, name, creationDate | lastUpdated |
|
|
34
|
+
| sortField | string | N | Field to sort the results by. Accepted values are: lastUpdated, type, name, creationDate | lastUpdated | name |
|
|
35
35
|
| sortDirection | string | N | Direction to sort the results by. Accepted values are: asc, desc | asc | asc |
|
|
36
36
|
| page | string | N | Which page of results to return | 0 | 0 |
|
|
37
37
|
| perPage | string | N | How many items to return per page | 100 | 10 |
|
|
@@ -86,7 +86,7 @@ all.Application, all.Application.cli, all.Organization, all.User, all.User.cli,
|
|
|
86
86
|
|
|
87
87
|
| Code | Type | Description |
|
|
88
88
|
| ---- | ---- | ----------- |
|
|
89
|
-
| 201 | [File Upload Post Response](_schemas.md#file-upload-post-response) | Successfully created file and
|
|
89
|
+
| 201 | [File Upload Post Response](_schemas.md#file-upload-post-response) | Successfully created file and the information needed to upload the file content |
|
|
90
90
|
|
|
91
91
|
#### Error Responses
|
|
92
92
|
|
data/docs/me.md
CHANGED
|
@@ -194,6 +194,9 @@ all.User, me.*, or me.disableTwoFactorAuth.
|
|
|
194
194
|
| Name | Type | Required | Description | Default | Example |
|
|
195
195
|
| ---- | ---- | -------- | ----------- | ------- | ------- |
|
|
196
196
|
| data | [Disable Multi-Factor Authentication](_schemas.md#disable-multi-factor-authentication) | Y | Object containing multi-factor authentication properties | | [Disable Multi-Factor Authentication Example](_schemas.md#disable-multi-factor-authentication-example) |
|
|
197
|
+
| includeRecent | string | N | Should the user include recent app/dashboard info | | true |
|
|
198
|
+
| summaryExclude | string | N | Comma-separated list of summary fields to exclude from user summary | | payloadCount |
|
|
199
|
+
| summaryInclude | string | N | Comma-separated list of summary fields to include in user summary | | payloadCount |
|
|
197
200
|
| losantdomain | string | N | Domain scope of request (rarely needed) | | example.com |
|
|
198
201
|
|
|
199
202
|
#### Successful Responses
|
|
@@ -229,6 +232,9 @@ all.User, me.*, or me.disconnectGithub.
|
|
|
229
232
|
|
|
230
233
|
| Name | Type | Required | Description | Default | Example |
|
|
231
234
|
| ---- | ---- | -------- | ----------- | ------- | ------- |
|
|
235
|
+
| includeRecent | string | N | Should the user include recent app/dashboard info | | true |
|
|
236
|
+
| summaryExclude | string | N | Comma-separated list of summary fields to exclude from user summary | | payloadCount |
|
|
237
|
+
| summaryInclude | string | N | Comma-separated list of summary fields to include in user summary | | payloadCount |
|
|
232
238
|
| losantdomain | string | N | Domain scope of request (rarely needed) | | example.com |
|
|
233
239
|
|
|
234
240
|
#### Successful Responses
|
|
@@ -265,6 +271,9 @@ all.User, me.*, or me.enableTwoFactorAuth.
|
|
|
265
271
|
| Name | Type | Required | Description | Default | Example |
|
|
266
272
|
| ---- | ---- | -------- | ----------- | ------- | ------- |
|
|
267
273
|
| data | [Enable Multi-Factor Authentication](_schemas.md#enable-multi-factor-authentication) | Y | Object containing multi-factor authentication properties | | [Enable Multi-Factor Authentication Example](_schemas.md#enable-multi-factor-authentication-example) |
|
|
274
|
+
| includeRecent | string | N | Should the user include recent app/dashboard info | | true |
|
|
275
|
+
| summaryExclude | string | N | Comma-separated list of summary fields to exclude from user summary | | payloadCount |
|
|
276
|
+
| summaryInclude | string | N | Comma-separated list of summary fields to include in user summary | | payloadCount |
|
|
268
277
|
| losantdomain | string | N | Domain scope of request (rarely needed) | | example.com |
|
|
269
278
|
|
|
270
279
|
#### Successful Responses
|
|
@@ -372,7 +381,7 @@ all.User, all.User.read, me.*, or me.get.
|
|
|
372
381
|
|
|
373
382
|
| Name | Type | Required | Description | Default | Example |
|
|
374
383
|
| ---- | ---- | -------- | ----------- | ------- | ------- |
|
|
375
|
-
| includeRecent |
|
|
384
|
+
| includeRecent | string | N | Should the user include recent app/dashboard info | | true |
|
|
376
385
|
| summaryExclude | string | N | Comma-separated list of summary fields to exclude from user summary | | payloadCount |
|
|
377
386
|
| summaryInclude | string | N | Comma-separated list of summary fields to include in user summary | | payloadCount |
|
|
378
387
|
| losantdomain | string | N | Domain scope of request (rarely needed) | | example.com |
|
|
@@ -519,6 +528,7 @@ all.User, me.*, or me.patch.
|
|
|
519
528
|
| Name | Type | Required | Description | Default | Example |
|
|
520
529
|
| ---- | ---- | -------- | ----------- | ------- | ------- |
|
|
521
530
|
| user | [Me Patch](_schemas.md#me-patch) | Y | Object containing new user properties | | [Me Patch Example](_schemas.md#me-patch-example) |
|
|
531
|
+
| includeRecent | string | N | Should the user include recent app/dashboard info | | true |
|
|
522
532
|
| summaryExclude | string | N | Comma-separated list of summary fields to exclude from user summary | | payloadCount |
|
|
523
533
|
| summaryInclude | string | N | Comma-separated list of summary fields to include in user summary | | payloadCount |
|
|
524
534
|
| losantdomain | string | N | Domain scope of request (rarely needed) | | example.com |
|
data/docs/privateFile.md
ADDED
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
# Private File Actions
|
|
2
|
+
|
|
3
|
+
Details on the various actions that can be performed on the
|
|
4
|
+
Private File resource, including the expected
|
|
5
|
+
parameters and the potential responses.
|
|
6
|
+
|
|
7
|
+
##### Contents
|
|
8
|
+
|
|
9
|
+
* [Delete](#delete)
|
|
10
|
+
* [Get](#get)
|
|
11
|
+
* [Move](#move)
|
|
12
|
+
* [Patch](#patch)
|
|
13
|
+
* [Upload](#upload)
|
|
14
|
+
|
|
15
|
+
<br/>
|
|
16
|
+
|
|
17
|
+
## Delete
|
|
18
|
+
|
|
19
|
+
Deletes a private file or directory, if a directory all the contents that directory will also be removed.
|
|
20
|
+
|
|
21
|
+
```ruby
|
|
22
|
+
result = client.private_file.delete(
|
|
23
|
+
applicationId: my_application_id,
|
|
24
|
+
privateFileId: my_private_file_id)
|
|
25
|
+
|
|
26
|
+
puts result
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
#### Authentication
|
|
30
|
+
The client must be configured with a valid api access token to call this
|
|
31
|
+
action. The token must include at least one of the following scopes:
|
|
32
|
+
all.Application, all.Application.cli, all.Organization, all.User, all.User.cli, privateFile.*, or privateFile.delete.
|
|
33
|
+
|
|
34
|
+
#### Available Parameters
|
|
35
|
+
|
|
36
|
+
| Name | Type | Required | Description | Default | Example |
|
|
37
|
+
| ---- | ---- | -------- | ----------- | ------- | ------- |
|
|
38
|
+
| applicationId | string | Y | ID associated with the application | | 575ec8687ae143cd83dc4a97 |
|
|
39
|
+
| privateFileId | string | Y | ID associated with the private file | | 575ec76c7ae143cd83dc4a96 |
|
|
40
|
+
| losantdomain | string | N | Domain scope of request (rarely needed) | | example.com |
|
|
41
|
+
|
|
42
|
+
#### Successful Responses
|
|
43
|
+
|
|
44
|
+
| Code | Type | Description |
|
|
45
|
+
| ---- | ---- | ----------- |
|
|
46
|
+
| 200 | [Success](_schemas.md#success) | If private file was successfully deleted |
|
|
47
|
+
|
|
48
|
+
#### Error Responses
|
|
49
|
+
|
|
50
|
+
| Code | Type | Description |
|
|
51
|
+
| ---- | ---- | ----------- |
|
|
52
|
+
| 400 | [Error](_schemas.md#error) | Error if malformed request |
|
|
53
|
+
| 404 | [Error](_schemas.md#error) | Error if private file was not found |
|
|
54
|
+
|
|
55
|
+
<br/>
|
|
56
|
+
|
|
57
|
+
## Get
|
|
58
|
+
|
|
59
|
+
Retrieves information on a private file
|
|
60
|
+
|
|
61
|
+
```ruby
|
|
62
|
+
result = client.private_file.get(
|
|
63
|
+
applicationId: my_application_id,
|
|
64
|
+
privateFileId: my_private_file_id)
|
|
65
|
+
|
|
66
|
+
puts result
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
#### Authentication
|
|
70
|
+
The client must be configured with a valid api access token to call this
|
|
71
|
+
action. The token must include at least one of the following scopes:
|
|
72
|
+
all.Application, all.Application.cli, all.Application.read, all.Organization, all.Organization.read, all.User, all.User.cli, all.User.read, privateFile.*, or privateFile.get.
|
|
73
|
+
|
|
74
|
+
#### Available Parameters
|
|
75
|
+
|
|
76
|
+
| Name | Type | Required | Description | Default | Example |
|
|
77
|
+
| ---- | ---- | -------- | ----------- | ------- | ------- |
|
|
78
|
+
| applicationId | string | Y | ID associated with the application | | 575ec8687ae143cd83dc4a97 |
|
|
79
|
+
| privateFileId | string | Y | ID associated with the private file | | 575ec76c7ae143cd83dc4a96 |
|
|
80
|
+
| urlTTL | string | N | Time in seconds that the private file url will be valid for. Only applies to private files of type 'file'. If 0, no url will be returned. | 900 | 900 |
|
|
81
|
+
| losantdomain | string | N | Domain scope of request (rarely needed) | | example.com |
|
|
82
|
+
|
|
83
|
+
#### Successful Responses
|
|
84
|
+
|
|
85
|
+
| Code | Type | Description |
|
|
86
|
+
| ---- | ---- | ----------- |
|
|
87
|
+
| 200 | [File Schema](_schemas.md#file-schema) | Private file information |
|
|
88
|
+
|
|
89
|
+
#### Error Responses
|
|
90
|
+
|
|
91
|
+
| Code | Type | Description |
|
|
92
|
+
| ---- | ---- | ----------- |
|
|
93
|
+
| 400 | [Error](_schemas.md#error) | Error if malformed request |
|
|
94
|
+
| 404 | [Error](_schemas.md#error) | Error if private file was not found |
|
|
95
|
+
|
|
96
|
+
<br/>
|
|
97
|
+
|
|
98
|
+
## Move
|
|
99
|
+
|
|
100
|
+
Move a private file or the entire contents of a directory
|
|
101
|
+
|
|
102
|
+
```ruby
|
|
103
|
+
result = client.private_file.move(
|
|
104
|
+
applicationId: my_application_id,
|
|
105
|
+
privateFileId: my_private_file_id)
|
|
106
|
+
|
|
107
|
+
puts result
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
#### Authentication
|
|
111
|
+
The client must be configured with a valid api access token to call this
|
|
112
|
+
action. The token must include at least one of the following scopes:
|
|
113
|
+
all.Application, all.Application.cli, all.Organization, all.User, all.User.cli, privateFile.*, or privateFile.move.
|
|
114
|
+
|
|
115
|
+
#### Available Parameters
|
|
116
|
+
|
|
117
|
+
| Name | Type | Required | Description | Default | Example |
|
|
118
|
+
| ---- | ---- | -------- | ----------- | ------- | ------- |
|
|
119
|
+
| applicationId | string | Y | ID associated with the application | | 575ec8687ae143cd83dc4a97 |
|
|
120
|
+
| privateFileId | string | Y | ID associated with the private file | | 575ec76c7ae143cd83dc4a96 |
|
|
121
|
+
| name | undefined | N | The new name of the private file or directory | | fileA |
|
|
122
|
+
| parentDirectory | undefined | N | The new parent directory for the private file or directory to move into. | | /new/location/here |
|
|
123
|
+
| urlTTL | string | N | Time in seconds that the private file url will be valid for. Only applies to private files of type 'file'. If 0, no url will be returned. | 900 | 900 |
|
|
124
|
+
| losantdomain | string | N | Domain scope of request (rarely needed) | | example.com |
|
|
125
|
+
|
|
126
|
+
#### Successful Responses
|
|
127
|
+
|
|
128
|
+
| Code | Type | Description |
|
|
129
|
+
| ---- | ---- | ----------- |
|
|
130
|
+
| 201 | [File Schema](_schemas.md#file-schema) | Returns a new private file or directory that was created by the move, if a directory a job will kick off to move all the directories children. |
|
|
131
|
+
|
|
132
|
+
#### Error Responses
|
|
133
|
+
|
|
134
|
+
| Code | Type | Description |
|
|
135
|
+
| ---- | ---- | ----------- |
|
|
136
|
+
| 400 | [Error](_schemas.md#error) | Error if malformed request |
|
|
137
|
+
| 404 | [Error](_schemas.md#error) | Error if private file was not found |
|
|
138
|
+
|
|
139
|
+
<br/>
|
|
140
|
+
|
|
141
|
+
## Patch
|
|
142
|
+
|
|
143
|
+
Reupload a private file
|
|
144
|
+
|
|
145
|
+
```ruby
|
|
146
|
+
result = client.private_file.patch(
|
|
147
|
+
applicationId: my_application_id,
|
|
148
|
+
privateFileId: my_private_file_id,
|
|
149
|
+
updates: my_updates)
|
|
150
|
+
|
|
151
|
+
puts result
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
#### Authentication
|
|
155
|
+
The client must be configured with a valid api access token to call this
|
|
156
|
+
action. The token must include at least one of the following scopes:
|
|
157
|
+
all.Application, all.Application.cli, all.Organization, all.User, all.User.cli, privateFile.*, or privateFile.patch.
|
|
158
|
+
|
|
159
|
+
#### Available Parameters
|
|
160
|
+
|
|
161
|
+
| Name | Type | Required | Description | Default | Example |
|
|
162
|
+
| ---- | ---- | -------- | ----------- | ------- | ------- |
|
|
163
|
+
| applicationId | string | Y | ID associated with the application | | 575ec8687ae143cd83dc4a97 |
|
|
164
|
+
| privateFileId | string | Y | ID associated with the private file | | 575ec76c7ae143cd83dc4a96 |
|
|
165
|
+
| updates | [File Patch](_schemas.md#file-patch) | Y | Updated information about the private file | | [File Patch Example](_schemas.md#file-patch-example) |
|
|
166
|
+
| losantdomain | string | N | Domain scope of request (rarely needed) | | example.com |
|
|
167
|
+
|
|
168
|
+
#### Successful Responses
|
|
169
|
+
|
|
170
|
+
| Code | Type | Description |
|
|
171
|
+
| ---- | ---- | ----------- |
|
|
172
|
+
| 201 | [File Upload Post Response](_schemas.md#file-upload-post-response) | Successfully updated private file and the information needed to upload the file content |
|
|
173
|
+
|
|
174
|
+
#### Error Responses
|
|
175
|
+
|
|
176
|
+
| Code | Type | Description |
|
|
177
|
+
| ---- | ---- | ----------- |
|
|
178
|
+
| 400 | [Error](_schemas.md#error) | Error if malformed request |
|
|
179
|
+
| 404 | [Error](_schemas.md#error) | Error if private file was not found |
|
|
180
|
+
|
|
181
|
+
<br/>
|
|
182
|
+
|
|
183
|
+
## Upload
|
|
184
|
+
|
|
185
|
+
Uploads the private file
|
|
186
|
+
|
|
187
|
+
```ruby
|
|
188
|
+
result = client.private_file.upload(
|
|
189
|
+
applicationId: my_application_id,
|
|
190
|
+
privateFileId: my_private_file_id,
|
|
191
|
+
privateFile: my_private_file)
|
|
192
|
+
|
|
193
|
+
puts result
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
#### Authentication
|
|
197
|
+
The client must be configured with a valid api access token to call this
|
|
198
|
+
action. The token must include at least one of the following scopes:
|
|
199
|
+
all.Application, all.Application.cli, all.Organization, all.User, all.User.cli, privateFile.*, or privateFile.upload.
|
|
200
|
+
|
|
201
|
+
#### Available Parameters
|
|
202
|
+
|
|
203
|
+
| Name | Type | Required | Description | Default | Example |
|
|
204
|
+
| ---- | ---- | -------- | ----------- | ------- | ------- |
|
|
205
|
+
| applicationId | string | Y | ID associated with the application | | 575ec8687ae143cd83dc4a97 |
|
|
206
|
+
| privateFileId | string | Y | ID associated with the private file | | 575ec76c7ae143cd83dc4a96 |
|
|
207
|
+
| privateFile | file | Y | The content of the private file to upload | | undefined |
|
|
208
|
+
| urlTTL | string | N | Time in seconds that the private file url will be valid for. Only applies to private files of type 'file'. If 0, no url will be returned. | 900 | 900 |
|
|
209
|
+
| losantdomain | string | N | Domain scope of request (rarely needed) | | example.com |
|
|
210
|
+
|
|
211
|
+
#### Successful Responses
|
|
212
|
+
|
|
213
|
+
| Code | Type | Description |
|
|
214
|
+
| ---- | ---- | ----------- |
|
|
215
|
+
| 200 | [File Schema](_schemas.md#file-schema) | Updated private file content |
|
|
216
|
+
|
|
217
|
+
#### Error Responses
|
|
218
|
+
|
|
219
|
+
| Code | Type | Description |
|
|
220
|
+
| ---- | ---- | ----------- |
|
|
221
|
+
| 400 | [Error](_schemas.md#error) | Error if malformed request |
|
|
222
|
+
| 404 | [Error](_schemas.md#error) | Error if file was not found |
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
# Private Files Actions
|
|
2
|
+
|
|
3
|
+
Details on the various actions that can be performed on the
|
|
4
|
+
Private Files resource, including the expected
|
|
5
|
+
parameters and the potential responses.
|
|
6
|
+
|
|
7
|
+
##### Contents
|
|
8
|
+
|
|
9
|
+
* [Get](#get)
|
|
10
|
+
* [Post](#post)
|
|
11
|
+
|
|
12
|
+
<br/>
|
|
13
|
+
|
|
14
|
+
## Get
|
|
15
|
+
|
|
16
|
+
Returns the private files for an application
|
|
17
|
+
|
|
18
|
+
```ruby
|
|
19
|
+
result = client.private_files.get(applicationId: my_application_id)
|
|
20
|
+
|
|
21
|
+
puts result
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
#### Authentication
|
|
25
|
+
The client must be configured with a valid api access token to call this
|
|
26
|
+
action. The token must include at least one of the following scopes:
|
|
27
|
+
all.Application, all.Application.cli, all.Application.read, all.Organization, all.Organization.read, all.User, all.User.cli, all.User.read, privateFiles.*, or privateFiles.get.
|
|
28
|
+
|
|
29
|
+
#### Available Parameters
|
|
30
|
+
|
|
31
|
+
| Name | Type | Required | Description | Default | Example |
|
|
32
|
+
| ---- | ---- | -------- | ----------- | ------- | ------- |
|
|
33
|
+
| applicationId | string | Y | ID associated with the application | | 575ec8687ae143cd83dc4a97 |
|
|
34
|
+
| sortField | string | N | Field to sort the results by. Accepted values are: lastUpdated, type, name, creationDate | lastUpdated | name |
|
|
35
|
+
| sortDirection | string | N | Direction to sort the results by. Accepted values are: asc, desc | asc | asc |
|
|
36
|
+
| page | string | N | Which page of results to return | 0 | 0 |
|
|
37
|
+
| perPage | string | N | How many items to return per page | 100 | 10 |
|
|
38
|
+
| filterField | string | N | Field to filter the results by. Blank or not provided means no filtering. Accepted values are: name | | name |
|
|
39
|
+
| filter | string | N | Filter to apply against the filtered field. Supports globbing. Blank or not provided means no filtering. | | myFile |
|
|
40
|
+
| type | string | N | Limit by the type (file or directory) of the file | | file |
|
|
41
|
+
| status | string | N | Limit the result to only files of this status. Accepted values are: completed, pending | | completed |
|
|
42
|
+
| directory | string | N | Get private files that are inside of this directory | | /a/path/ |
|
|
43
|
+
| urlTTL | string | N | Time in seconds that the private file url will be valid for. Only applies to private files of type 'file'. If 0, no url will be returned. | 900 | 900 |
|
|
44
|
+
| losantdomain | string | N | Domain scope of request (rarely needed) | | example.com |
|
|
45
|
+
|
|
46
|
+
#### Successful Responses
|
|
47
|
+
|
|
48
|
+
| Code | Type | Description |
|
|
49
|
+
| ---- | ---- | ----------- |
|
|
50
|
+
| 200 | [Files Schema](_schemas.md#files-schema) | Collection of private files |
|
|
51
|
+
|
|
52
|
+
#### Error Responses
|
|
53
|
+
|
|
54
|
+
| Code | Type | Description |
|
|
55
|
+
| ---- | ---- | ----------- |
|
|
56
|
+
| 400 | [Error](_schemas.md#error) | Error if malformed request |
|
|
57
|
+
| 404 | [Error](_schemas.md#error) | Error if application was not found |
|
|
58
|
+
|
|
59
|
+
<br/>
|
|
60
|
+
|
|
61
|
+
## Post
|
|
62
|
+
|
|
63
|
+
Create a new private file for an application
|
|
64
|
+
|
|
65
|
+
```ruby
|
|
66
|
+
result = client.private_files.post(
|
|
67
|
+
applicationId: my_application_id,
|
|
68
|
+
privateFile: my_private_file)
|
|
69
|
+
|
|
70
|
+
puts result
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
#### Authentication
|
|
74
|
+
The client must be configured with a valid api access token to call this
|
|
75
|
+
action. The token must include at least one of the following scopes:
|
|
76
|
+
all.Application, all.Application.cli, all.Organization, all.User, all.User.cli, privateFiles.*, or privateFiles.post.
|
|
77
|
+
|
|
78
|
+
#### Available Parameters
|
|
79
|
+
|
|
80
|
+
| Name | Type | Required | Description | Default | Example |
|
|
81
|
+
| ---- | ---- | -------- | ----------- | ------- | ------- |
|
|
82
|
+
| applicationId | string | Y | ID associated with the application | | 575ec8687ae143cd83dc4a97 |
|
|
83
|
+
| privateFile | [File Post](_schemas.md#file-post) | Y | New private file information | | [File Post Example](_schemas.md#file-post-example) |
|
|
84
|
+
| losantdomain | string | N | Domain scope of request (rarely needed) | | example.com |
|
|
85
|
+
|
|
86
|
+
#### Successful Responses
|
|
87
|
+
|
|
88
|
+
| Code | Type | Description |
|
|
89
|
+
| ---- | ---- | ----------- |
|
|
90
|
+
| 201 | [File Upload Post Response](_schemas.md#file-upload-post-response) | Successfully created private file and the information needed to upload the file content |
|
|
91
|
+
|
|
92
|
+
#### Error Responses
|
|
93
|
+
|
|
94
|
+
| Code | Type | Description |
|
|
95
|
+
| ---- | ---- | ----------- |
|
|
96
|
+
| 400 | [Error](_schemas.md#error) | Error if malformed request |
|
|
97
|
+
| 404 | [Error](_schemas.md#error) | Error if application was not found |
|
data/lib/platform_rest/client.rb
CHANGED
|
@@ -27,7 +27,7 @@ module PlatformRest
|
|
|
27
27
|
#
|
|
28
28
|
# User API for accessing platform data
|
|
29
29
|
#
|
|
30
|
-
# Built For Version 1.
|
|
30
|
+
# Built For Version 1.29.0
|
|
31
31
|
class Client
|
|
32
32
|
attr_accessor :auth_token, :url
|
|
33
33
|
|
|
@@ -392,6 +392,14 @@ module PlatformRest
|
|
|
392
392
|
@orgs ||= Orgs.new(self)
|
|
393
393
|
end
|
|
394
394
|
|
|
395
|
+
def private_file
|
|
396
|
+
@private_file ||= PrivateFile.new(self)
|
|
397
|
+
end
|
|
398
|
+
|
|
399
|
+
def private_files
|
|
400
|
+
@private_files ||= PrivateFiles.new(self)
|
|
401
|
+
end
|
|
402
|
+
|
|
395
403
|
def resource_job
|
|
396
404
|
@resource_job ||= ResourceJob.new(self)
|
|
397
405
|
end
|
|
@@ -422,7 +430,7 @@ module PlatformRest
|
|
|
422
430
|
|
|
423
431
|
headers["Accept"] = "application/json"
|
|
424
432
|
headers["Content-Type"] = "application/json"
|
|
425
|
-
headers["Accept-Version"] = "^1.
|
|
433
|
+
headers["Accept-Version"] = "^1.29.0"
|
|
426
434
|
headers["Authorization"] = "Bearer #{self.auth_token}" if self.auth_token
|
|
427
435
|
path = self.url + options.fetch(:path, "")
|
|
428
436
|
|
data/lib/platform_rest/file.rb
CHANGED
|
@@ -94,7 +94,7 @@ module PlatformRest
|
|
|
94
94
|
# * {boolean} _embedded - Return embedded resources in response
|
|
95
95
|
#
|
|
96
96
|
# Responses:
|
|
97
|
-
# * 200 -
|
|
97
|
+
# * 200 - File information (https://api.losant.com/#/definitions/file)
|
|
98
98
|
#
|
|
99
99
|
# Errors:
|
|
100
100
|
# * 400 - Error if malformed request (https://api.losant.com/#/definitions/error)
|
|
@@ -184,14 +184,14 @@ module PlatformRest
|
|
|
184
184
|
# Parameters:
|
|
185
185
|
# * {string} applicationId - ID associated with the application
|
|
186
186
|
# * {string} fileId - ID associated with the file
|
|
187
|
-
# * {hash} updates -
|
|
187
|
+
# * {hash} updates - Updated information about the file (https://api.losant.com/#/definitions/filePatch)
|
|
188
188
|
# * {string} losantdomain - Domain scope of request (rarely needed)
|
|
189
189
|
# * {boolean} _actions - Return resource actions in response
|
|
190
190
|
# * {boolean} _links - Return resource link in response
|
|
191
191
|
# * {boolean} _embedded - Return embedded resources in response
|
|
192
192
|
#
|
|
193
193
|
# Responses:
|
|
194
|
-
# * 201 - Successfully updated file and
|
|
194
|
+
# * 201 - Successfully updated file and the information needed to upload the file content (https://api.losant.com/#/definitions/fileUploadPostResponse)
|
|
195
195
|
#
|
|
196
196
|
# Errors:
|
|
197
197
|
# * 400 - Error if malformed request (https://api.losant.com/#/definitions/error)
|
data/lib/platform_rest/files.rb
CHANGED
|
@@ -110,7 +110,7 @@ module PlatformRest
|
|
|
110
110
|
# * {boolean} _embedded - Return embedded resources in response
|
|
111
111
|
#
|
|
112
112
|
# Responses:
|
|
113
|
-
# * 201 - Successfully created file and
|
|
113
|
+
# * 201 - Successfully created file and the information needed to upload the file content (https://api.losant.com/#/definitions/fileUploadPostResponse)
|
|
114
114
|
#
|
|
115
115
|
# Errors:
|
|
116
116
|
# * 400 - Error if malformed request (https://api.losant.com/#/definitions/error)
|
data/lib/platform_rest/me.rb
CHANGED
|
@@ -218,6 +218,9 @@ module PlatformRest
|
|
|
218
218
|
#
|
|
219
219
|
# Parameters:
|
|
220
220
|
# * {hash} data - Object containing multi-factor authentication properties (https://api.losant.com/#/definitions/multiFactorAuthDisable)
|
|
221
|
+
# * {string} includeRecent - Should the user include recent app/dashboard info
|
|
222
|
+
# * {string} summaryExclude - Comma-separated list of summary fields to exclude from user summary
|
|
223
|
+
# * {string} summaryInclude - Comma-separated list of summary fields to include in user summary
|
|
221
224
|
# * {string} losantdomain - Domain scope of request (rarely needed)
|
|
222
225
|
# * {boolean} _actions - Return resource actions in response
|
|
223
226
|
# * {boolean} _links - Return resource link in response
|
|
@@ -237,6 +240,9 @@ module PlatformRest
|
|
|
237
240
|
raise ArgumentError.new("data is required") unless params.has_key?(:data)
|
|
238
241
|
|
|
239
242
|
body = params[:data] if params.has_key?(:data)
|
|
243
|
+
query_params[:includeRecent] = params[:includeRecent] if params.has_key?(:includeRecent)
|
|
244
|
+
query_params[:summaryExclude] = params[:summaryExclude] if params.has_key?(:summaryExclude)
|
|
245
|
+
query_params[:summaryInclude] = params[:summaryInclude] if params.has_key?(:summaryInclude)
|
|
240
246
|
headers[:losantdomain] = params[:losantdomain] if params.has_key?(:losantdomain)
|
|
241
247
|
query_params[:_actions] = params[:_actions] if params.has_key?(:_actions)
|
|
242
248
|
query_params[:_links] = params[:_links] if params.has_key?(:_links)
|
|
@@ -261,6 +267,9 @@ module PlatformRest
|
|
|
261
267
|
# all.User, me.*, or me.disconnectGithub.
|
|
262
268
|
#
|
|
263
269
|
# Parameters:
|
|
270
|
+
# * {string} includeRecent - Should the user include recent app/dashboard info
|
|
271
|
+
# * {string} summaryExclude - Comma-separated list of summary fields to exclude from user summary
|
|
272
|
+
# * {string} summaryInclude - Comma-separated list of summary fields to include in user summary
|
|
264
273
|
# * {string} losantdomain - Domain scope of request (rarely needed)
|
|
265
274
|
# * {boolean} _actions - Return resource actions in response
|
|
266
275
|
# * {boolean} _links - Return resource link in response
|
|
@@ -278,6 +287,9 @@ module PlatformRest
|
|
|
278
287
|
body = nil
|
|
279
288
|
|
|
280
289
|
|
|
290
|
+
query_params[:includeRecent] = params[:includeRecent] if params.has_key?(:includeRecent)
|
|
291
|
+
query_params[:summaryExclude] = params[:summaryExclude] if params.has_key?(:summaryExclude)
|
|
292
|
+
query_params[:summaryInclude] = params[:summaryInclude] if params.has_key?(:summaryInclude)
|
|
281
293
|
headers[:losantdomain] = params[:losantdomain] if params.has_key?(:losantdomain)
|
|
282
294
|
query_params[:_actions] = params[:_actions] if params.has_key?(:_actions)
|
|
283
295
|
query_params[:_links] = params[:_links] if params.has_key?(:_links)
|
|
@@ -303,6 +315,9 @@ module PlatformRest
|
|
|
303
315
|
#
|
|
304
316
|
# Parameters:
|
|
305
317
|
# * {hash} data - Object containing multi-factor authentication properties (https://api.losant.com/#/definitions/multiFactorAuthEnable)
|
|
318
|
+
# * {string} includeRecent - Should the user include recent app/dashboard info
|
|
319
|
+
# * {string} summaryExclude - Comma-separated list of summary fields to exclude from user summary
|
|
320
|
+
# * {string} summaryInclude - Comma-separated list of summary fields to include in user summary
|
|
306
321
|
# * {string} losantdomain - Domain scope of request (rarely needed)
|
|
307
322
|
# * {boolean} _actions - Return resource actions in response
|
|
308
323
|
# * {boolean} _links - Return resource link in response
|
|
@@ -322,6 +337,9 @@ module PlatformRest
|
|
|
322
337
|
raise ArgumentError.new("data is required") unless params.has_key?(:data)
|
|
323
338
|
|
|
324
339
|
body = params[:data] if params.has_key?(:data)
|
|
340
|
+
query_params[:includeRecent] = params[:includeRecent] if params.has_key?(:includeRecent)
|
|
341
|
+
query_params[:summaryExclude] = params[:summaryExclude] if params.has_key?(:summaryExclude)
|
|
342
|
+
query_params[:summaryInclude] = params[:summaryInclude] if params.has_key?(:summaryInclude)
|
|
325
343
|
headers[:losantdomain] = params[:losantdomain] if params.has_key?(:losantdomain)
|
|
326
344
|
query_params[:_actions] = params[:_actions] if params.has_key?(:_actions)
|
|
327
345
|
query_params[:_links] = params[:_links] if params.has_key?(:_links)
|
|
@@ -433,7 +451,7 @@ module PlatformRest
|
|
|
433
451
|
# all.User, all.User.read, me.*, or me.get.
|
|
434
452
|
#
|
|
435
453
|
# Parameters:
|
|
436
|
-
# * {
|
|
454
|
+
# * {string} includeRecent - Should the user include recent app/dashboard info
|
|
437
455
|
# * {string} summaryExclude - Comma-separated list of summary fields to exclude from user summary
|
|
438
456
|
# * {string} summaryInclude - Comma-separated list of summary fields to include in user summary
|
|
439
457
|
# * {string} losantdomain - Domain scope of request (rarely needed)
|
|
@@ -610,6 +628,7 @@ module PlatformRest
|
|
|
610
628
|
#
|
|
611
629
|
# Parameters:
|
|
612
630
|
# * {hash} user - Object containing new user properties (https://api.losant.com/#/definitions/mePatch)
|
|
631
|
+
# * {string} includeRecent - Should the user include recent app/dashboard info
|
|
613
632
|
# * {string} summaryExclude - Comma-separated list of summary fields to exclude from user summary
|
|
614
633
|
# * {string} summaryInclude - Comma-separated list of summary fields to include in user summary
|
|
615
634
|
# * {string} losantdomain - Domain scope of request (rarely needed)
|
|
@@ -631,6 +650,7 @@ module PlatformRest
|
|
|
631
650
|
raise ArgumentError.new("user is required") unless params.has_key?(:user)
|
|
632
651
|
|
|
633
652
|
body = params[:user] if params.has_key?(:user)
|
|
653
|
+
query_params[:includeRecent] = params[:includeRecent] if params.has_key?(:includeRecent)
|
|
634
654
|
query_params[:summaryExclude] = params[:summaryExclude] if params.has_key?(:summaryExclude)
|
|
635
655
|
query_params[:summaryInclude] = params[:summaryInclude] if params.has_key?(:summaryInclude)
|
|
636
656
|
headers[:losantdomain] = params[:losantdomain] if params.has_key?(:losantdomain)
|