losant_rest 1.10.4 → 1.13.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/LICENSE +1 -1
- data/README.md +2 -2
- data/docs/_schemas.md +35272 -19039
- data/docs/application.md +45 -4
- data/docs/applicationApiTokens.md +2 -2
- data/docs/applicationCertificateAuthorities.md +1 -1
- data/docs/applicationCertificates.md +1 -1
- data/docs/applicationDashboard.md +133 -0
- data/docs/applicationDashboards.md +93 -0
- data/docs/applicationKeys.md +4 -3
- data/docs/applicationTemplates.md +1 -1
- data/docs/applications.md +2 -2
- data/docs/auditLogs.md +1 -1
- data/docs/dashboards.md +1 -1
- data/docs/dataTable.md +1 -1
- data/docs/dataTableRows.md +1 -1
- data/docs/dataTables.md +2 -2
- data/docs/deviceRecipes.md +1 -1
- data/docs/devices.md +127 -3
- data/docs/edgeDeployments.md +1 -1
- data/docs/events.md +4 -4
- data/docs/experience.md +1 -1
- data/docs/experienceDomains.md +1 -1
- data/docs/experienceEndpoint.md +1 -0
- data/docs/experienceGroup.md +2 -0
- data/docs/experienceGroups.md +1 -1
- data/docs/experienceSlugs.md +1 -1
- data/docs/experienceUsers.md +1 -1
- data/docs/experienceVersion.md +3 -3
- data/docs/experienceVersions.md +3 -3
- data/docs/experienceView.md +4 -4
- data/docs/experienceViews.md +3 -3
- data/docs/file.md +5 -5
- data/docs/files.md +3 -3
- data/docs/flow.md +41 -0
- data/docs/flowVersions.md +46 -1
- data/docs/flows.md +5 -2
- data/docs/instance.md +166 -0
- data/docs/instanceApiToken.md +133 -0
- data/docs/instanceApiTokens.md +91 -0
- data/docs/instanceMember.md +133 -0
- data/docs/instanceMembers.md +91 -0
- data/docs/instanceOrg.md +133 -0
- data/docs/instanceOrgMember.md +139 -0
- data/docs/instanceOrgMembers.md +96 -0
- data/docs/instanceOrgs.md +91 -0
- data/docs/instances.md +50 -0
- data/docs/integration.md +1 -0
- data/docs/integrations.md +1 -1
- data/docs/notebooks.md +1 -1
- data/docs/orgs.md +1 -1
- data/docs/userApiToken.md +125 -0
- data/docs/userApiTokens.md +87 -0
- data/docs/webhook.md +1 -0
- data/docs/webhooks.md +1 -1
- data/lib/losant_rest.rb +15 -1
- data/lib/losant_rest/application.rb +53 -6
- data/lib/losant_rest/application_api_token.rb +1 -1
- data/lib/losant_rest/application_api_tokens.rb +2 -2
- data/lib/losant_rest/application_certificate.rb +1 -1
- data/lib/losant_rest/application_certificate_authorities.rb +1 -1
- data/lib/losant_rest/application_certificate_authority.rb +1 -1
- data/lib/losant_rest/application_certificates.rb +1 -1
- data/lib/losant_rest/application_dashboard.rb +176 -0
- data/lib/losant_rest/application_dashboards.rb +138 -0
- data/lib/losant_rest/application_key.rb +1 -1
- data/lib/losant_rest/application_keys.rb +4 -1
- data/lib/losant_rest/application_template.rb +1 -1
- data/lib/losant_rest/application_templates.rb +1 -1
- data/lib/losant_rest/applications.rb +2 -2
- data/lib/losant_rest/audit_log.rb +1 -1
- data/lib/losant_rest/audit_logs.rb +1 -1
- data/lib/losant_rest/auth.rb +1 -1
- data/lib/losant_rest/client.rb +59 -3
- data/lib/losant_rest/dashboard.rb +1 -1
- data/lib/losant_rest/dashboards.rb +1 -1
- data/lib/losant_rest/data.rb +1 -1
- data/lib/losant_rest/data_table.rb +2 -2
- data/lib/losant_rest/data_table_row.rb +1 -1
- data/lib/losant_rest/data_table_rows.rb +2 -2
- data/lib/losant_rest/data_tables.rb +2 -2
- data/lib/losant_rest/device.rb +1 -1
- data/lib/losant_rest/device_recipe.rb +1 -1
- data/lib/losant_rest/device_recipes.rb +1 -1
- data/lib/losant_rest/devices.rb +155 -3
- data/lib/losant_rest/edge_deployments.rb +1 -1
- data/lib/losant_rest/error.rb +1 -1
- data/lib/losant_rest/event.rb +1 -1
- data/lib/losant_rest/events.rb +4 -4
- data/lib/losant_rest/experience.rb +2 -2
- data/lib/losant_rest/experience_domain.rb +1 -1
- data/lib/losant_rest/experience_domains.rb +2 -2
- data/lib/losant_rest/experience_endpoint.rb +3 -1
- data/lib/losant_rest/experience_endpoints.rb +1 -1
- data/lib/losant_rest/experience_group.rb +5 -1
- data/lib/losant_rest/experience_groups.rb +1 -1
- data/lib/losant_rest/experience_slug.rb +1 -1
- data/lib/losant_rest/experience_slugs.rb +2 -2
- data/lib/losant_rest/experience_user.rb +1 -1
- data/lib/losant_rest/experience_users.rb +1 -1
- data/lib/losant_rest/experience_version.rb +4 -4
- data/lib/losant_rest/experience_versions.rb +3 -3
- data/lib/losant_rest/experience_view.rb +5 -5
- data/lib/losant_rest/experience_views.rb +3 -3
- data/lib/losant_rest/file.rb +5 -5
- data/lib/losant_rest/files.rb +3 -3
- data/lib/losant_rest/flow.rb +47 -1
- data/lib/losant_rest/flow_version.rb +1 -1
- data/lib/losant_rest/flow_versions.rb +54 -1
- data/lib/losant_rest/flows.rb +9 -1
- data/lib/losant_rest/instance.rb +226 -0
- data/lib/losant_rest/instance_api_token.rb +176 -0
- data/lib/losant_rest/instance_api_tokens.rb +136 -0
- data/lib/losant_rest/instance_member.rb +176 -0
- data/lib/losant_rest/instance_members.rb +134 -0
- data/lib/losant_rest/instance_org.rb +176 -0
- data/lib/losant_rest/instance_org_member.rb +182 -0
- data/lib/losant_rest/instance_org_members.rb +138 -0
- data/lib/losant_rest/instance_orgs.rb +139 -0
- data/lib/losant_rest/instances.rb +88 -0
- data/lib/losant_rest/integration.rb +3 -1
- data/lib/losant_rest/integrations.rb +1 -1
- data/lib/losant_rest/me.rb +2 -2
- data/lib/losant_rest/notebook.rb +1 -1
- data/lib/losant_rest/notebooks.rb +1 -1
- data/lib/losant_rest/org.rb +2 -2
- data/lib/losant_rest/org_invites.rb +1 -1
- data/lib/losant_rest/orgs.rb +1 -1
- data/lib/losant_rest/user_api_token.rb +170 -0
- data/lib/losant_rest/user_api_tokens.rb +132 -0
- data/lib/losant_rest/utils.rb +1 -1
- data/lib/losant_rest/version.rb +2 -2
- data/lib/losant_rest/webhook.rb +3 -1
- data/lib/losant_rest/webhooks.rb +1 -1
- data/schemas/advancedApplicationKeyQuery.json +1082 -0
- data/schemas/advancedDeviceQuery.json +309 -0
- data/schemas/advancedFlowByVersionQuery.json +665 -0
- data/schemas/advancedFlowQuery.json +883 -0
- data/schemas/advancedFlowVersionQuery.json +925 -0
- data/schemas/apiToken.json +2 -1
- data/schemas/apiTokenPost.json +420 -0
- data/schemas/apiTokens.json +4 -2
- data/schemas/applicationApiTokenPost.json +11 -0
- data/schemas/applicationDashboardPost.json +5687 -0
- data/schemas/applicationGlobalPatch.json +33 -0
- data/schemas/attributeNamesResponse.json +14 -0
- data/schemas/auditLog.json +4 -0
- data/schemas/auditLogFilter.json +4 -0
- data/schemas/auditLogs.json +4 -0
- data/schemas/authedUser.json +3 -0
- data/schemas/bulkDeleteResponse.json +12 -0
- data/schemas/changePassword.json +1 -1
- data/schemas/dashboard.json +72 -17
- data/schemas/dashboardPatch.json +72 -17
- data/schemas/dashboardPost.json +72 -17
- data/schemas/dashboardSendReport.json +4 -0
- data/schemas/dashboards.json +72 -17
- data/schemas/deviceAttributeDataTypeFilter.json +29 -0
- data/schemas/deviceClassFilter.json +1 -2
- data/schemas/devicesDeletePost.json +309 -0
- data/schemas/devicesExportPost.json +309 -0
- data/schemas/devicesPatch.json +309 -0
- data/schemas/devicesRemoveDataPost.json +309 -0
- data/schemas/experienceGroup.json +6 -0
- data/schemas/experienceGroups.json +6 -0
- data/schemas/experienceLinkedResources.json +57 -0
- data/schemas/experienceVersion.json +9 -0
- data/schemas/experienceVersionPatch.json +9 -0
- data/schemas/experienceVersions.json +9 -0
- data/schemas/filePost.json +8 -2
- data/schemas/files.json +3 -0
- data/schemas/flow.json +19 -0
- data/schemas/flowPatch.json +19 -0
- data/schemas/flowPost.json +19 -0
- data/schemas/flowStorageMetadata.json +13 -0
- data/schemas/flowVersion.json +38 -0
- data/schemas/flowVersionPost.json +19 -0
- data/schemas/flowVersions.json +38 -0
- data/schemas/flowVersionsDeletePost.json +941 -0
- data/schemas/flows.json +19 -0
- data/schemas/flowsImportPost.json +38 -0
- data/schemas/flowsImportResult.json +57 -0
- data/schemas/githubLogin.json +64 -1
- data/schemas/historicalSummaries.json +43 -0
- data/schemas/historicalSummary.json +458 -0
- data/schemas/instance.json +192 -0
- data/schemas/instanceMember.json +37 -0
- data/schemas/instanceMemberPatch.json +17 -0
- data/schemas/instanceMemberPost.json +22 -0
- data/schemas/instanceMembers.json +69 -0
- data/schemas/instanceOrg.json +133 -0
- data/schemas/instanceOrgMember.json +37 -0
- data/schemas/instanceOrgMemberPatch.json +69 -0
- data/schemas/instanceOrgMemberPost.json +161 -0
- data/schemas/instanceOrgMembers.json +34 -0
- data/schemas/instanceOrgPatch.json +122 -0
- data/schemas/instanceOrgPost.json +291 -0
- data/schemas/instanceOrgs.json +174 -0
- data/schemas/instancePatch.json +67 -0
- data/schemas/instanceReportOptionsPost.json +41 -0
- data/schemas/instances.json +43 -0
- data/schemas/integration.json +3 -0
- data/schemas/integrationPatch.json +3 -0
- data/schemas/integrationPost.json +3 -0
- data/schemas/integrations.json +3 -0
- data/schemas/me.json +3 -0
- data/schemas/mePatch.json +1 -1
- data/schemas/multiDeviceCommand.json +309 -0
- data/schemas/notebook.json +22 -0
- data/schemas/notebookExecutionLogs.json +7 -0
- data/schemas/notebookPatch.json +7 -0
- data/schemas/notebookPost.json +7 -0
- data/schemas/notebooks.json +22 -0
- data/schemas/orgPatch.json +0 -9
- data/schemas/passwordResetFinish.json +1 -1
- data/schemas/payloadStats.json +110 -0
- data/schemas/tagKeysResponse.json +14 -0
- data/schemas/tagValuesResponse.json +19 -0
- data/schemas/userCredentials.json +64 -1
- data/schemas/userPost.json +65 -2
- data/schemas/validateContextError.json +34 -0
- data/schemas/validateContextSuccess.json +34 -0
- metadata +64 -3
@@ -1,6 +1,6 @@
|
|
1
1
|
# The MIT License (MIT)
|
2
2
|
#
|
3
|
-
# Copyright (c)
|
3
|
+
# Copyright (c) 2021 Losant IoT, Inc.
|
4
4
|
#
|
5
5
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
6
|
# of this software and associated documentation files (the "Software"), to deal
|
data/lib/losant_rest/orgs.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# The MIT License (MIT)
|
2
2
|
#
|
3
|
-
# Copyright (c)
|
3
|
+
# Copyright (c) 2021 Losant IoT, Inc.
|
4
4
|
#
|
5
5
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
6
|
# of this software and associated documentation files (the "Software"), to deal
|
@@ -0,0 +1,170 @@
|
|
1
|
+
# The MIT License (MIT)
|
2
|
+
#
|
3
|
+
# Copyright (c) 2021 Losant IoT, Inc.
|
4
|
+
#
|
5
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
# of this software and associated documentation files (the "Software"), to deal
|
7
|
+
# in the Software without restriction, including without limitation the rights
|
8
|
+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
# copies of the Software, and to permit persons to whom the Software is
|
10
|
+
# furnished to do so, subject to the following conditions:
|
11
|
+
#
|
12
|
+
# The above copyright notice and this permission notice shall be included in all
|
13
|
+
# copies or substantial portions of the Software.
|
14
|
+
#
|
15
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
+
# SOFTWARE.
|
22
|
+
|
23
|
+
require "json"
|
24
|
+
|
25
|
+
module LosantRest
|
26
|
+
|
27
|
+
# Class containing all the actions for the User Api Token Resource
|
28
|
+
class UserApiToken
|
29
|
+
|
30
|
+
def initialize(client)
|
31
|
+
@client = client
|
32
|
+
end
|
33
|
+
|
34
|
+
# Deletes an API Token
|
35
|
+
#
|
36
|
+
# Authentication:
|
37
|
+
# The client must be configured with a valid api
|
38
|
+
# access token to call this action. The token
|
39
|
+
# must include at least one of the following scopes:
|
40
|
+
# all.User, userApiToken.*, or userApiToken.delete.
|
41
|
+
#
|
42
|
+
# Parameters:
|
43
|
+
# * {string} apiTokenId - ID associated with the API token
|
44
|
+
# * {string} losantdomain - Domain scope of request (rarely needed)
|
45
|
+
# * {boolean} _actions - Return resource actions in response
|
46
|
+
# * {boolean} _links - Return resource link in response
|
47
|
+
# * {boolean} _embedded - Return embedded resources in response
|
48
|
+
#
|
49
|
+
# Responses:
|
50
|
+
# * 200 - If API token was successfully deleted (https://api.losant.com/#/definitions/success)
|
51
|
+
#
|
52
|
+
# Errors:
|
53
|
+
# * 400 - Error if malformed request (https://api.losant.com/#/definitions/error)
|
54
|
+
# * 404 - Error if API token was not found (https://api.losant.com/#/definitions/error)
|
55
|
+
def delete(params = {})
|
56
|
+
params = Utils.symbolize_hash_keys(params)
|
57
|
+
query_params = { _actions: false, _links: true, _embedded: true }
|
58
|
+
headers = {}
|
59
|
+
body = nil
|
60
|
+
|
61
|
+
raise ArgumentError.new("apiTokenId is required") unless params.has_key?(:apiTokenId)
|
62
|
+
|
63
|
+
headers[:losantdomain] = params[:losantdomain] if params.has_key?(:losantdomain)
|
64
|
+
query_params[:_actions] = params[:_actions] if params.has_key?(:_actions)
|
65
|
+
query_params[:_links] = params[:_links] if params.has_key?(:_links)
|
66
|
+
query_params[:_embedded] = params[:_embedded] if params.has_key?(:_embedded)
|
67
|
+
|
68
|
+
path = "/me/tokens/#{params[:apiTokenId]}"
|
69
|
+
|
70
|
+
@client.request(
|
71
|
+
method: :delete,
|
72
|
+
path: path,
|
73
|
+
query: query_params,
|
74
|
+
headers: headers,
|
75
|
+
body: body)
|
76
|
+
end
|
77
|
+
|
78
|
+
# Retrieves information on an API token
|
79
|
+
#
|
80
|
+
# Authentication:
|
81
|
+
# The client must be configured with a valid api
|
82
|
+
# access token to call this action. The token
|
83
|
+
# must include at least one of the following scopes:
|
84
|
+
# all.User, all.User.read, userApiToken.*, or userApiToken.get.
|
85
|
+
#
|
86
|
+
# Parameters:
|
87
|
+
# * {string} apiTokenId - ID associated with the API token
|
88
|
+
# * {string} losantdomain - Domain scope of request (rarely needed)
|
89
|
+
# * {boolean} _actions - Return resource actions in response
|
90
|
+
# * {boolean} _links - Return resource link in response
|
91
|
+
# * {boolean} _embedded - Return embedded resources in response
|
92
|
+
#
|
93
|
+
# Responses:
|
94
|
+
# * 200 - API token information (https://api.losant.com/#/definitions/apiToken)
|
95
|
+
#
|
96
|
+
# Errors:
|
97
|
+
# * 400 - Error if malformed request (https://api.losant.com/#/definitions/error)
|
98
|
+
# * 404 - Error if API token was not found (https://api.losant.com/#/definitions/error)
|
99
|
+
def get(params = {})
|
100
|
+
params = Utils.symbolize_hash_keys(params)
|
101
|
+
query_params = { _actions: false, _links: true, _embedded: true }
|
102
|
+
headers = {}
|
103
|
+
body = nil
|
104
|
+
|
105
|
+
raise ArgumentError.new("apiTokenId is required") unless params.has_key?(:apiTokenId)
|
106
|
+
|
107
|
+
headers[:losantdomain] = params[:losantdomain] if params.has_key?(:losantdomain)
|
108
|
+
query_params[:_actions] = params[:_actions] if params.has_key?(:_actions)
|
109
|
+
query_params[:_links] = params[:_links] if params.has_key?(:_links)
|
110
|
+
query_params[:_embedded] = params[:_embedded] if params.has_key?(:_embedded)
|
111
|
+
|
112
|
+
path = "/me/tokens/#{params[:apiTokenId]}"
|
113
|
+
|
114
|
+
@client.request(
|
115
|
+
method: :get,
|
116
|
+
path: path,
|
117
|
+
query: query_params,
|
118
|
+
headers: headers,
|
119
|
+
body: body)
|
120
|
+
end
|
121
|
+
|
122
|
+
# Updates information about an API token
|
123
|
+
#
|
124
|
+
# Authentication:
|
125
|
+
# The client must be configured with a valid api
|
126
|
+
# access token to call this action. The token
|
127
|
+
# must include at least one of the following scopes:
|
128
|
+
# all.User, userApiToken.*, or userApiToken.patch.
|
129
|
+
#
|
130
|
+
# Parameters:
|
131
|
+
# * {string} apiTokenId - ID associated with the API token
|
132
|
+
# * {hash} apiToken - Object containing new properties of the API token (https://api.losant.com/#/definitions/apiTokenPatch)
|
133
|
+
# * {string} losantdomain - Domain scope of request (rarely needed)
|
134
|
+
# * {boolean} _actions - Return resource actions in response
|
135
|
+
# * {boolean} _links - Return resource link in response
|
136
|
+
# * {boolean} _embedded - Return embedded resources in response
|
137
|
+
#
|
138
|
+
# Responses:
|
139
|
+
# * 200 - Updated API token information (https://api.losant.com/#/definitions/apiToken)
|
140
|
+
#
|
141
|
+
# Errors:
|
142
|
+
# * 400 - Error if malformed request (https://api.losant.com/#/definitions/error)
|
143
|
+
# * 404 - Error if API token was not found (https://api.losant.com/#/definitions/error)
|
144
|
+
def patch(params = {})
|
145
|
+
params = Utils.symbolize_hash_keys(params)
|
146
|
+
query_params = { _actions: false, _links: true, _embedded: true }
|
147
|
+
headers = {}
|
148
|
+
body = nil
|
149
|
+
|
150
|
+
raise ArgumentError.new("apiTokenId is required") unless params.has_key?(:apiTokenId)
|
151
|
+
raise ArgumentError.new("apiToken is required") unless params.has_key?(:apiToken)
|
152
|
+
|
153
|
+
body = params[:apiToken] if params.has_key?(:apiToken)
|
154
|
+
headers[:losantdomain] = params[:losantdomain] if params.has_key?(:losantdomain)
|
155
|
+
query_params[:_actions] = params[:_actions] if params.has_key?(:_actions)
|
156
|
+
query_params[:_links] = params[:_links] if params.has_key?(:_links)
|
157
|
+
query_params[:_embedded] = params[:_embedded] if params.has_key?(:_embedded)
|
158
|
+
|
159
|
+
path = "/me/tokens/#{params[:apiTokenId]}"
|
160
|
+
|
161
|
+
@client.request(
|
162
|
+
method: :patch,
|
163
|
+
path: path,
|
164
|
+
query: query_params,
|
165
|
+
headers: headers,
|
166
|
+
body: body)
|
167
|
+
end
|
168
|
+
|
169
|
+
end
|
170
|
+
end
|
@@ -0,0 +1,132 @@
|
|
1
|
+
# The MIT License (MIT)
|
2
|
+
#
|
3
|
+
# Copyright (c) 2021 Losant IoT, Inc.
|
4
|
+
#
|
5
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
# of this software and associated documentation files (the "Software"), to deal
|
7
|
+
# in the Software without restriction, including without limitation the rights
|
8
|
+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
# copies of the Software, and to permit persons to whom the Software is
|
10
|
+
# furnished to do so, subject to the following conditions:
|
11
|
+
#
|
12
|
+
# The above copyright notice and this permission notice shall be included in all
|
13
|
+
# copies or substantial portions of the Software.
|
14
|
+
#
|
15
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
+
# SOFTWARE.
|
22
|
+
|
23
|
+
require "json"
|
24
|
+
|
25
|
+
module LosantRest
|
26
|
+
|
27
|
+
# Class containing all the actions for the User Api Tokens Resource
|
28
|
+
class UserApiTokens
|
29
|
+
|
30
|
+
def initialize(client)
|
31
|
+
@client = client
|
32
|
+
end
|
33
|
+
|
34
|
+
# Returns the API tokens for a user
|
35
|
+
#
|
36
|
+
# Authentication:
|
37
|
+
# The client must be configured with a valid api
|
38
|
+
# access token to call this action. The token
|
39
|
+
# must include at least one of the following scopes:
|
40
|
+
# all.User, all.User.read, userApiTokens.*, or userApiTokens.get.
|
41
|
+
#
|
42
|
+
# Parameters:
|
43
|
+
# * {string} sortField - Field to sort the results by. Accepted values are: name, status, id, creationDate, lastUpdated, expirationDate
|
44
|
+
# * {string} sortDirection - Direction to sort the results by. Accepted values are: asc, desc
|
45
|
+
# * {string} page - Which page of results to return
|
46
|
+
# * {string} perPage - How many items to return per page
|
47
|
+
# * {string} filterField - Field to filter the results by. Blank or not provided means no filtering. Accepted values are: name, status
|
48
|
+
# * {string} filter - Filter to apply against the filtered field. Supports globbing. Blank or not provided means no filtering.
|
49
|
+
# * {string} losantdomain - Domain scope of request (rarely needed)
|
50
|
+
# * {boolean} _actions - Return resource actions in response
|
51
|
+
# * {boolean} _links - Return resource link in response
|
52
|
+
# * {boolean} _embedded - Return embedded resources in response
|
53
|
+
#
|
54
|
+
# Responses:
|
55
|
+
# * 200 - Collection of API tokens (https://api.losant.com/#/definitions/apiToken)
|
56
|
+
#
|
57
|
+
# Errors:
|
58
|
+
# * 400 - Error if malformed request (https://api.losant.com/#/definitions/error)
|
59
|
+
def get(params = {})
|
60
|
+
params = Utils.symbolize_hash_keys(params)
|
61
|
+
query_params = { _actions: false, _links: true, _embedded: true }
|
62
|
+
headers = {}
|
63
|
+
body = nil
|
64
|
+
|
65
|
+
|
66
|
+
query_params[:sortField] = params[:sortField] if params.has_key?(:sortField)
|
67
|
+
query_params[:sortDirection] = params[:sortDirection] if params.has_key?(:sortDirection)
|
68
|
+
query_params[:page] = params[:page] if params.has_key?(:page)
|
69
|
+
query_params[:perPage] = params[:perPage] if params.has_key?(:perPage)
|
70
|
+
query_params[:filterField] = params[:filterField] if params.has_key?(:filterField)
|
71
|
+
query_params[:filter] = params[:filter] if params.has_key?(:filter)
|
72
|
+
headers[:losantdomain] = params[:losantdomain] if params.has_key?(:losantdomain)
|
73
|
+
query_params[:_actions] = params[:_actions] if params.has_key?(:_actions)
|
74
|
+
query_params[:_links] = params[:_links] if params.has_key?(:_links)
|
75
|
+
query_params[:_embedded] = params[:_embedded] if params.has_key?(:_embedded)
|
76
|
+
|
77
|
+
path = "/me/tokens"
|
78
|
+
|
79
|
+
@client.request(
|
80
|
+
method: :get,
|
81
|
+
path: path,
|
82
|
+
query: query_params,
|
83
|
+
headers: headers,
|
84
|
+
body: body)
|
85
|
+
end
|
86
|
+
|
87
|
+
# Create a new API token for an user
|
88
|
+
#
|
89
|
+
# Authentication:
|
90
|
+
# The client must be configured with a valid api
|
91
|
+
# access token to call this action. The token
|
92
|
+
# must include at least one of the following scopes:
|
93
|
+
# all.User, userApiTokens.*, or userApiTokens.post.
|
94
|
+
#
|
95
|
+
# Parameters:
|
96
|
+
# * {hash} apiToken - API token information (https://api.losant.com/#/definitions/apiTokenPost)
|
97
|
+
# * {string} losantdomain - Domain scope of request (rarely needed)
|
98
|
+
# * {boolean} _actions - Return resource actions in response
|
99
|
+
# * {boolean} _links - Return resource link in response
|
100
|
+
# * {boolean} _embedded - Return embedded resources in response
|
101
|
+
#
|
102
|
+
# Responses:
|
103
|
+
# * 201 - The successfully created API token (https://api.losant.com/#/definitions/apiToken)
|
104
|
+
#
|
105
|
+
# Errors:
|
106
|
+
# * 400 - Error if malformed request (https://api.losant.com/#/definitions/error)
|
107
|
+
def post(params = {})
|
108
|
+
params = Utils.symbolize_hash_keys(params)
|
109
|
+
query_params = { _actions: false, _links: true, _embedded: true }
|
110
|
+
headers = {}
|
111
|
+
body = nil
|
112
|
+
|
113
|
+
raise ArgumentError.new("apiToken is required") unless params.has_key?(:apiToken)
|
114
|
+
|
115
|
+
body = params[:apiToken] if params.has_key?(:apiToken)
|
116
|
+
headers[:losantdomain] = params[:losantdomain] if params.has_key?(:losantdomain)
|
117
|
+
query_params[:_actions] = params[:_actions] if params.has_key?(:_actions)
|
118
|
+
query_params[:_links] = params[:_links] if params.has_key?(:_links)
|
119
|
+
query_params[:_embedded] = params[:_embedded] if params.has_key?(:_embedded)
|
120
|
+
|
121
|
+
path = "/me/tokens"
|
122
|
+
|
123
|
+
@client.request(
|
124
|
+
method: :post,
|
125
|
+
path: path,
|
126
|
+
query: query_params,
|
127
|
+
headers: headers,
|
128
|
+
body: body)
|
129
|
+
end
|
130
|
+
|
131
|
+
end
|
132
|
+
end
|
data/lib/losant_rest/utils.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# The MIT License (MIT)
|
2
2
|
#
|
3
|
-
# Copyright (c)
|
3
|
+
# Copyright (c) 2021 Losant IoT, Inc.
|
4
4
|
#
|
5
5
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
6
|
# of this software and associated documentation files (the "Software"), to deal
|
data/lib/losant_rest/version.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# The MIT License (MIT)
|
2
2
|
#
|
3
|
-
# Copyright (c)
|
3
|
+
# Copyright (c) 2021 Losant IoT, Inc.
|
4
4
|
#
|
5
5
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
6
|
# of this software and associated documentation files (the "Software"), to deal
|
@@ -21,5 +21,5 @@
|
|
21
21
|
# SOFTWARE.
|
22
22
|
|
23
23
|
module LosantRest
|
24
|
-
VERSION = "1.
|
24
|
+
VERSION = "1.13.1"
|
25
25
|
end
|
data/lib/losant_rest/webhook.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# The MIT License (MIT)
|
2
2
|
#
|
3
|
-
# Copyright (c)
|
3
|
+
# Copyright (c) 2021 Losant IoT, Inc.
|
4
4
|
#
|
5
5
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
6
|
# of this software and associated documentation files (the "Software"), to deal
|
@@ -42,6 +42,7 @@ module LosantRest
|
|
42
42
|
# Parameters:
|
43
43
|
# * {string} applicationId - ID associated with the application
|
44
44
|
# * {string} webhookId - ID associated with the webhook
|
45
|
+
# * {string} includeWorkflows - If the workflows that utilize this webhook should also be deleted.
|
45
46
|
# * {string} losantdomain - Domain scope of request (rarely needed)
|
46
47
|
# * {boolean} _actions - Return resource actions in response
|
47
48
|
# * {boolean} _links - Return resource link in response
|
@@ -62,6 +63,7 @@ module LosantRest
|
|
62
63
|
raise ArgumentError.new("applicationId is required") unless params.has_key?(:applicationId)
|
63
64
|
raise ArgumentError.new("webhookId is required") unless params.has_key?(:webhookId)
|
64
65
|
|
66
|
+
query_params[:includeWorkflows] = params[:includeWorkflows] if params.has_key?(:includeWorkflows)
|
65
67
|
headers[:losantdomain] = params[:losantdomain] if params.has_key?(:losantdomain)
|
66
68
|
query_params[:_actions] = params[:_actions] if params.has_key?(:_actions)
|
67
69
|
query_params[:_links] = params[:_links] if params.has_key?(:_links)
|
data/lib/losant_rest/webhooks.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# The MIT License (MIT)
|
2
2
|
#
|
3
|
-
# Copyright (c)
|
3
|
+
# Copyright (c) 2021 Losant IoT, Inc.
|
4
4
|
#
|
5
5
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
6
|
# of this software and associated documentation files (the "Software"), to deal
|
@@ -0,0 +1,1082 @@
|
|
1
|
+
{
|
2
|
+
"$schema": "http://json-schema.org/draft-04/schema#",
|
3
|
+
"type": "object",
|
4
|
+
"properties": {
|
5
|
+
"$and": {
|
6
|
+
"type": "array",
|
7
|
+
"items": {
|
8
|
+
"$ref": "#/definitions/advancedApplicationKeyQuery"
|
9
|
+
},
|
10
|
+
"maxItems": 100
|
11
|
+
},
|
12
|
+
"$or": {
|
13
|
+
"type": "array",
|
14
|
+
"items": {
|
15
|
+
"$ref": "#/definitions/advancedApplicationKeyQuery"
|
16
|
+
},
|
17
|
+
"maxItems": 100
|
18
|
+
},
|
19
|
+
"$nor": {
|
20
|
+
"type": "array",
|
21
|
+
"items": {
|
22
|
+
"$ref": "#/definitions/advancedApplicationKeyQuery"
|
23
|
+
},
|
24
|
+
"maxItems": 100
|
25
|
+
},
|
26
|
+
"id": {
|
27
|
+
"oneOf": [
|
28
|
+
{
|
29
|
+
"oneOf": [
|
30
|
+
{
|
31
|
+
"type": "string",
|
32
|
+
"pattern": "^[A-Fa-f\\d]{24}$"
|
33
|
+
},
|
34
|
+
{
|
35
|
+
"type": "null"
|
36
|
+
}
|
37
|
+
]
|
38
|
+
},
|
39
|
+
{
|
40
|
+
"type": "object",
|
41
|
+
"properties": {
|
42
|
+
"$eq": {
|
43
|
+
"oneOf": [
|
44
|
+
{
|
45
|
+
"type": "string",
|
46
|
+
"pattern": "^[A-Fa-f\\d]{24}$"
|
47
|
+
},
|
48
|
+
{
|
49
|
+
"type": "null"
|
50
|
+
}
|
51
|
+
]
|
52
|
+
},
|
53
|
+
"$ne": {
|
54
|
+
"oneOf": [
|
55
|
+
{
|
56
|
+
"type": "string",
|
57
|
+
"pattern": "^[A-Fa-f\\d]{24}$"
|
58
|
+
},
|
59
|
+
{
|
60
|
+
"type": "null"
|
61
|
+
}
|
62
|
+
]
|
63
|
+
},
|
64
|
+
"$in": {
|
65
|
+
"type": "array",
|
66
|
+
"maxItems": 100,
|
67
|
+
"items": {
|
68
|
+
"type": "string",
|
69
|
+
"pattern": "^[A-Fa-f\\d]{24}$"
|
70
|
+
}
|
71
|
+
},
|
72
|
+
"$nin": {
|
73
|
+
"type": "array",
|
74
|
+
"maxItems": 100,
|
75
|
+
"items": {
|
76
|
+
"type": "string",
|
77
|
+
"pattern": "^[A-Fa-f\\d]{24}$"
|
78
|
+
}
|
79
|
+
}
|
80
|
+
},
|
81
|
+
"additionalProperties": false,
|
82
|
+
"minProperties": 1,
|
83
|
+
"maxProperties": 1
|
84
|
+
}
|
85
|
+
]
|
86
|
+
},
|
87
|
+
"creationDate": {
|
88
|
+
"oneOf": [
|
89
|
+
{
|
90
|
+
"type": [
|
91
|
+
"string",
|
92
|
+
"number",
|
93
|
+
"boolean",
|
94
|
+
"null"
|
95
|
+
]
|
96
|
+
},
|
97
|
+
{
|
98
|
+
"type": "object",
|
99
|
+
"properties": {
|
100
|
+
"$eq": {
|
101
|
+
"type": [
|
102
|
+
"string",
|
103
|
+
"number",
|
104
|
+
"boolean",
|
105
|
+
"null"
|
106
|
+
]
|
107
|
+
},
|
108
|
+
"$ne": {
|
109
|
+
"type": [
|
110
|
+
"string",
|
111
|
+
"number",
|
112
|
+
"boolean",
|
113
|
+
"null"
|
114
|
+
]
|
115
|
+
},
|
116
|
+
"$gt": {
|
117
|
+
"type": [
|
118
|
+
"string",
|
119
|
+
"number",
|
120
|
+
"boolean",
|
121
|
+
"null"
|
122
|
+
]
|
123
|
+
},
|
124
|
+
"$lt": {
|
125
|
+
"type": [
|
126
|
+
"string",
|
127
|
+
"number",
|
128
|
+
"boolean",
|
129
|
+
"null"
|
130
|
+
]
|
131
|
+
},
|
132
|
+
"$gte": {
|
133
|
+
"type": [
|
134
|
+
"string",
|
135
|
+
"number",
|
136
|
+
"boolean",
|
137
|
+
"null"
|
138
|
+
]
|
139
|
+
},
|
140
|
+
"$lte": {
|
141
|
+
"type": [
|
142
|
+
"string",
|
143
|
+
"number",
|
144
|
+
"boolean",
|
145
|
+
"null"
|
146
|
+
]
|
147
|
+
},
|
148
|
+
"$startsWith": {
|
149
|
+
"type": "string",
|
150
|
+
"minLength": 1
|
151
|
+
},
|
152
|
+
"$endsWith": {
|
153
|
+
"type": "string",
|
154
|
+
"minLength": 1
|
155
|
+
},
|
156
|
+
"$contains": {
|
157
|
+
"type": "string",
|
158
|
+
"minLength": 1
|
159
|
+
},
|
160
|
+
"$ci": {
|
161
|
+
"type": "boolean"
|
162
|
+
},
|
163
|
+
"$in": {
|
164
|
+
"type": "array",
|
165
|
+
"maxItems": 100,
|
166
|
+
"items": {
|
167
|
+
"type": [
|
168
|
+
"string",
|
169
|
+
"number",
|
170
|
+
"boolean"
|
171
|
+
]
|
172
|
+
}
|
173
|
+
},
|
174
|
+
"$nin": {
|
175
|
+
"type": "array",
|
176
|
+
"maxItems": 100,
|
177
|
+
"items": {
|
178
|
+
"type": [
|
179
|
+
"string",
|
180
|
+
"number",
|
181
|
+
"boolean"
|
182
|
+
]
|
183
|
+
}
|
184
|
+
}
|
185
|
+
},
|
186
|
+
"additionalProperties": false
|
187
|
+
}
|
188
|
+
]
|
189
|
+
},
|
190
|
+
"lastUpdated": {
|
191
|
+
"oneOf": [
|
192
|
+
{
|
193
|
+
"type": [
|
194
|
+
"string",
|
195
|
+
"number",
|
196
|
+
"boolean",
|
197
|
+
"null"
|
198
|
+
]
|
199
|
+
},
|
200
|
+
{
|
201
|
+
"type": "object",
|
202
|
+
"properties": {
|
203
|
+
"$eq": {
|
204
|
+
"type": [
|
205
|
+
"string",
|
206
|
+
"number",
|
207
|
+
"boolean",
|
208
|
+
"null"
|
209
|
+
]
|
210
|
+
},
|
211
|
+
"$ne": {
|
212
|
+
"type": [
|
213
|
+
"string",
|
214
|
+
"number",
|
215
|
+
"boolean",
|
216
|
+
"null"
|
217
|
+
]
|
218
|
+
},
|
219
|
+
"$gt": {
|
220
|
+
"type": [
|
221
|
+
"string",
|
222
|
+
"number",
|
223
|
+
"boolean",
|
224
|
+
"null"
|
225
|
+
]
|
226
|
+
},
|
227
|
+
"$lt": {
|
228
|
+
"type": [
|
229
|
+
"string",
|
230
|
+
"number",
|
231
|
+
"boolean",
|
232
|
+
"null"
|
233
|
+
]
|
234
|
+
},
|
235
|
+
"$gte": {
|
236
|
+
"type": [
|
237
|
+
"string",
|
238
|
+
"number",
|
239
|
+
"boolean",
|
240
|
+
"null"
|
241
|
+
]
|
242
|
+
},
|
243
|
+
"$lte": {
|
244
|
+
"type": [
|
245
|
+
"string",
|
246
|
+
"number",
|
247
|
+
"boolean",
|
248
|
+
"null"
|
249
|
+
]
|
250
|
+
},
|
251
|
+
"$startsWith": {
|
252
|
+
"type": "string",
|
253
|
+
"minLength": 1
|
254
|
+
},
|
255
|
+
"$endsWith": {
|
256
|
+
"type": "string",
|
257
|
+
"minLength": 1
|
258
|
+
},
|
259
|
+
"$contains": {
|
260
|
+
"type": "string",
|
261
|
+
"minLength": 1
|
262
|
+
},
|
263
|
+
"$ci": {
|
264
|
+
"type": "boolean"
|
265
|
+
},
|
266
|
+
"$in": {
|
267
|
+
"type": "array",
|
268
|
+
"maxItems": 100,
|
269
|
+
"items": {
|
270
|
+
"type": [
|
271
|
+
"string",
|
272
|
+
"number",
|
273
|
+
"boolean"
|
274
|
+
]
|
275
|
+
}
|
276
|
+
},
|
277
|
+
"$nin": {
|
278
|
+
"type": "array",
|
279
|
+
"maxItems": 100,
|
280
|
+
"items": {
|
281
|
+
"type": [
|
282
|
+
"string",
|
283
|
+
"number",
|
284
|
+
"boolean"
|
285
|
+
]
|
286
|
+
}
|
287
|
+
}
|
288
|
+
},
|
289
|
+
"additionalProperties": false
|
290
|
+
}
|
291
|
+
]
|
292
|
+
},
|
293
|
+
"status": {
|
294
|
+
"oneOf": [
|
295
|
+
{
|
296
|
+
"type": [
|
297
|
+
"string",
|
298
|
+
"number",
|
299
|
+
"boolean",
|
300
|
+
"null"
|
301
|
+
]
|
302
|
+
},
|
303
|
+
{
|
304
|
+
"type": "object",
|
305
|
+
"properties": {
|
306
|
+
"$eq": {
|
307
|
+
"type": [
|
308
|
+
"string",
|
309
|
+
"number",
|
310
|
+
"boolean",
|
311
|
+
"null"
|
312
|
+
]
|
313
|
+
},
|
314
|
+
"$ne": {
|
315
|
+
"type": [
|
316
|
+
"string",
|
317
|
+
"number",
|
318
|
+
"boolean",
|
319
|
+
"null"
|
320
|
+
]
|
321
|
+
},
|
322
|
+
"$gt": {
|
323
|
+
"type": [
|
324
|
+
"string",
|
325
|
+
"number",
|
326
|
+
"boolean",
|
327
|
+
"null"
|
328
|
+
]
|
329
|
+
},
|
330
|
+
"$lt": {
|
331
|
+
"type": [
|
332
|
+
"string",
|
333
|
+
"number",
|
334
|
+
"boolean",
|
335
|
+
"null"
|
336
|
+
]
|
337
|
+
},
|
338
|
+
"$gte": {
|
339
|
+
"type": [
|
340
|
+
"string",
|
341
|
+
"number",
|
342
|
+
"boolean",
|
343
|
+
"null"
|
344
|
+
]
|
345
|
+
},
|
346
|
+
"$lte": {
|
347
|
+
"type": [
|
348
|
+
"string",
|
349
|
+
"number",
|
350
|
+
"boolean",
|
351
|
+
"null"
|
352
|
+
]
|
353
|
+
},
|
354
|
+
"$startsWith": {
|
355
|
+
"type": "string",
|
356
|
+
"minLength": 1
|
357
|
+
},
|
358
|
+
"$endsWith": {
|
359
|
+
"type": "string",
|
360
|
+
"minLength": 1
|
361
|
+
},
|
362
|
+
"$contains": {
|
363
|
+
"type": "string",
|
364
|
+
"minLength": 1
|
365
|
+
},
|
366
|
+
"$ci": {
|
367
|
+
"type": "boolean"
|
368
|
+
},
|
369
|
+
"$in": {
|
370
|
+
"type": "array",
|
371
|
+
"maxItems": 100,
|
372
|
+
"items": {
|
373
|
+
"type": [
|
374
|
+
"string",
|
375
|
+
"number",
|
376
|
+
"boolean"
|
377
|
+
]
|
378
|
+
}
|
379
|
+
},
|
380
|
+
"$nin": {
|
381
|
+
"type": "array",
|
382
|
+
"maxItems": 100,
|
383
|
+
"items": {
|
384
|
+
"type": [
|
385
|
+
"string",
|
386
|
+
"number",
|
387
|
+
"boolean"
|
388
|
+
]
|
389
|
+
}
|
390
|
+
}
|
391
|
+
},
|
392
|
+
"additionalProperties": false
|
393
|
+
}
|
394
|
+
]
|
395
|
+
},
|
396
|
+
"deviceIds": {
|
397
|
+
"oneOf": [
|
398
|
+
{
|
399
|
+
"oneOf": [
|
400
|
+
{
|
401
|
+
"type": "string",
|
402
|
+
"pattern": "^[A-Fa-f\\d]{24}$"
|
403
|
+
},
|
404
|
+
{
|
405
|
+
"type": "null"
|
406
|
+
}
|
407
|
+
]
|
408
|
+
},
|
409
|
+
{
|
410
|
+
"type": "object",
|
411
|
+
"properties": {
|
412
|
+
"$eq": {
|
413
|
+
"oneOf": [
|
414
|
+
{
|
415
|
+
"type": "string",
|
416
|
+
"pattern": "^[A-Fa-f\\d]{24}$"
|
417
|
+
},
|
418
|
+
{
|
419
|
+
"type": "null"
|
420
|
+
}
|
421
|
+
]
|
422
|
+
},
|
423
|
+
"$ne": {
|
424
|
+
"oneOf": [
|
425
|
+
{
|
426
|
+
"type": "string",
|
427
|
+
"pattern": "^[A-Fa-f\\d]{24}$"
|
428
|
+
},
|
429
|
+
{
|
430
|
+
"type": "null"
|
431
|
+
}
|
432
|
+
]
|
433
|
+
},
|
434
|
+
"$in": {
|
435
|
+
"type": "array",
|
436
|
+
"maxItems": 100,
|
437
|
+
"items": {
|
438
|
+
"type": "string",
|
439
|
+
"pattern": "^[A-Fa-f\\d]{24}$"
|
440
|
+
}
|
441
|
+
},
|
442
|
+
"$nin": {
|
443
|
+
"type": "array",
|
444
|
+
"maxItems": 100,
|
445
|
+
"items": {
|
446
|
+
"type": "string",
|
447
|
+
"pattern": "^[A-Fa-f\\d]{24}$"
|
448
|
+
}
|
449
|
+
}
|
450
|
+
},
|
451
|
+
"additionalProperties": false,
|
452
|
+
"minProperties": 1,
|
453
|
+
"maxProperties": 1
|
454
|
+
}
|
455
|
+
]
|
456
|
+
},
|
457
|
+
"deviceTags": {
|
458
|
+
"oneOf": [
|
459
|
+
{
|
460
|
+
"oneOf": [
|
461
|
+
{
|
462
|
+
"type": "object",
|
463
|
+
"properties": {
|
464
|
+
"$tagKey": {
|
465
|
+
"type": "string",
|
466
|
+
"maxLength": 255
|
467
|
+
},
|
468
|
+
"$tagValue": {
|
469
|
+
"type": "string",
|
470
|
+
"maxLength": 255
|
471
|
+
}
|
472
|
+
},
|
473
|
+
"additionalProperties": false,
|
474
|
+
"minProperties": 1
|
475
|
+
},
|
476
|
+
{
|
477
|
+
"type": "object",
|
478
|
+
"patternProperties": {
|
479
|
+
"^[0-9a-zA-Z_-]{1,255}": {
|
480
|
+
"type": "string",
|
481
|
+
"maxLength": 255
|
482
|
+
}
|
483
|
+
},
|
484
|
+
"additionalProperties": false
|
485
|
+
}
|
486
|
+
]
|
487
|
+
},
|
488
|
+
{
|
489
|
+
"type": "object",
|
490
|
+
"properties": {
|
491
|
+
"$eq": {
|
492
|
+
"oneOf": [
|
493
|
+
{
|
494
|
+
"type": "object",
|
495
|
+
"properties": {
|
496
|
+
"$tagKey": {
|
497
|
+
"type": "string",
|
498
|
+
"maxLength": 255
|
499
|
+
},
|
500
|
+
"$tagValue": {
|
501
|
+
"type": "string",
|
502
|
+
"maxLength": 255
|
503
|
+
}
|
504
|
+
},
|
505
|
+
"additionalProperties": false,
|
506
|
+
"minProperties": 1
|
507
|
+
},
|
508
|
+
{
|
509
|
+
"type": "object",
|
510
|
+
"patternProperties": {
|
511
|
+
"^[0-9a-zA-Z_-]{1,255}": {
|
512
|
+
"type": "string",
|
513
|
+
"maxLength": 255
|
514
|
+
}
|
515
|
+
},
|
516
|
+
"additionalProperties": false
|
517
|
+
}
|
518
|
+
]
|
519
|
+
}
|
520
|
+
},
|
521
|
+
"required": [
|
522
|
+
"$eq"
|
523
|
+
],
|
524
|
+
"additionalProperties": false
|
525
|
+
},
|
526
|
+
{
|
527
|
+
"type": "object",
|
528
|
+
"properties": {
|
529
|
+
"$ne": {
|
530
|
+
"oneOf": [
|
531
|
+
{
|
532
|
+
"type": "object",
|
533
|
+
"properties": {
|
534
|
+
"$tagKey": {
|
535
|
+
"type": "string",
|
536
|
+
"maxLength": 255
|
537
|
+
},
|
538
|
+
"$tagValue": {
|
539
|
+
"type": "string",
|
540
|
+
"maxLength": 255
|
541
|
+
}
|
542
|
+
},
|
543
|
+
"additionalProperties": false,
|
544
|
+
"minProperties": 1
|
545
|
+
},
|
546
|
+
{
|
547
|
+
"type": "object",
|
548
|
+
"patternProperties": {
|
549
|
+
"^[0-9a-zA-Z_-]{1,255}": {
|
550
|
+
"type": "string",
|
551
|
+
"maxLength": 255
|
552
|
+
}
|
553
|
+
},
|
554
|
+
"additionalProperties": false
|
555
|
+
}
|
556
|
+
]
|
557
|
+
}
|
558
|
+
},
|
559
|
+
"required": [
|
560
|
+
"$ne"
|
561
|
+
],
|
562
|
+
"additionalProperties": false
|
563
|
+
}
|
564
|
+
]
|
565
|
+
},
|
566
|
+
"key": {
|
567
|
+
"oneOf": [
|
568
|
+
{
|
569
|
+
"type": [
|
570
|
+
"string",
|
571
|
+
"number",
|
572
|
+
"boolean",
|
573
|
+
"null"
|
574
|
+
]
|
575
|
+
},
|
576
|
+
{
|
577
|
+
"type": "object",
|
578
|
+
"properties": {
|
579
|
+
"$eq": {
|
580
|
+
"type": [
|
581
|
+
"string",
|
582
|
+
"number",
|
583
|
+
"boolean",
|
584
|
+
"null"
|
585
|
+
]
|
586
|
+
},
|
587
|
+
"$ne": {
|
588
|
+
"type": [
|
589
|
+
"string",
|
590
|
+
"number",
|
591
|
+
"boolean",
|
592
|
+
"null"
|
593
|
+
]
|
594
|
+
},
|
595
|
+
"$gt": {
|
596
|
+
"type": [
|
597
|
+
"string",
|
598
|
+
"number",
|
599
|
+
"boolean",
|
600
|
+
"null"
|
601
|
+
]
|
602
|
+
},
|
603
|
+
"$lt": {
|
604
|
+
"type": [
|
605
|
+
"string",
|
606
|
+
"number",
|
607
|
+
"boolean",
|
608
|
+
"null"
|
609
|
+
]
|
610
|
+
},
|
611
|
+
"$gte": {
|
612
|
+
"type": [
|
613
|
+
"string",
|
614
|
+
"number",
|
615
|
+
"boolean",
|
616
|
+
"null"
|
617
|
+
]
|
618
|
+
},
|
619
|
+
"$lte": {
|
620
|
+
"type": [
|
621
|
+
"string",
|
622
|
+
"number",
|
623
|
+
"boolean",
|
624
|
+
"null"
|
625
|
+
]
|
626
|
+
},
|
627
|
+
"$startsWith": {
|
628
|
+
"type": "string",
|
629
|
+
"minLength": 1
|
630
|
+
},
|
631
|
+
"$endsWith": {
|
632
|
+
"type": "string",
|
633
|
+
"minLength": 1
|
634
|
+
},
|
635
|
+
"$contains": {
|
636
|
+
"type": "string",
|
637
|
+
"minLength": 1
|
638
|
+
},
|
639
|
+
"$ci": {
|
640
|
+
"type": "boolean"
|
641
|
+
},
|
642
|
+
"$in": {
|
643
|
+
"type": "array",
|
644
|
+
"maxItems": 100,
|
645
|
+
"items": {
|
646
|
+
"type": [
|
647
|
+
"string",
|
648
|
+
"number",
|
649
|
+
"boolean"
|
650
|
+
]
|
651
|
+
}
|
652
|
+
},
|
653
|
+
"$nin": {
|
654
|
+
"type": "array",
|
655
|
+
"maxItems": 100,
|
656
|
+
"items": {
|
657
|
+
"type": [
|
658
|
+
"string",
|
659
|
+
"number",
|
660
|
+
"boolean"
|
661
|
+
]
|
662
|
+
}
|
663
|
+
}
|
664
|
+
},
|
665
|
+
"additionalProperties": false
|
666
|
+
}
|
667
|
+
]
|
668
|
+
},
|
669
|
+
"description": {
|
670
|
+
"oneOf": [
|
671
|
+
{
|
672
|
+
"type": [
|
673
|
+
"string",
|
674
|
+
"number",
|
675
|
+
"boolean",
|
676
|
+
"null"
|
677
|
+
]
|
678
|
+
},
|
679
|
+
{
|
680
|
+
"type": "object",
|
681
|
+
"properties": {
|
682
|
+
"$eq": {
|
683
|
+
"type": [
|
684
|
+
"string",
|
685
|
+
"number",
|
686
|
+
"boolean",
|
687
|
+
"null"
|
688
|
+
]
|
689
|
+
},
|
690
|
+
"$ne": {
|
691
|
+
"type": [
|
692
|
+
"string",
|
693
|
+
"number",
|
694
|
+
"boolean",
|
695
|
+
"null"
|
696
|
+
]
|
697
|
+
},
|
698
|
+
"$gt": {
|
699
|
+
"type": [
|
700
|
+
"string",
|
701
|
+
"number",
|
702
|
+
"boolean",
|
703
|
+
"null"
|
704
|
+
]
|
705
|
+
},
|
706
|
+
"$lt": {
|
707
|
+
"type": [
|
708
|
+
"string",
|
709
|
+
"number",
|
710
|
+
"boolean",
|
711
|
+
"null"
|
712
|
+
]
|
713
|
+
},
|
714
|
+
"$gte": {
|
715
|
+
"type": [
|
716
|
+
"string",
|
717
|
+
"number",
|
718
|
+
"boolean",
|
719
|
+
"null"
|
720
|
+
]
|
721
|
+
},
|
722
|
+
"$lte": {
|
723
|
+
"type": [
|
724
|
+
"string",
|
725
|
+
"number",
|
726
|
+
"boolean",
|
727
|
+
"null"
|
728
|
+
]
|
729
|
+
},
|
730
|
+
"$startsWith": {
|
731
|
+
"type": "string",
|
732
|
+
"minLength": 1
|
733
|
+
},
|
734
|
+
"$endsWith": {
|
735
|
+
"type": "string",
|
736
|
+
"minLength": 1
|
737
|
+
},
|
738
|
+
"$contains": {
|
739
|
+
"type": "string",
|
740
|
+
"minLength": 1
|
741
|
+
},
|
742
|
+
"$ci": {
|
743
|
+
"type": "boolean"
|
744
|
+
},
|
745
|
+
"$in": {
|
746
|
+
"type": "array",
|
747
|
+
"maxItems": 100,
|
748
|
+
"items": {
|
749
|
+
"type": [
|
750
|
+
"string",
|
751
|
+
"number",
|
752
|
+
"boolean"
|
753
|
+
]
|
754
|
+
}
|
755
|
+
},
|
756
|
+
"$nin": {
|
757
|
+
"type": "array",
|
758
|
+
"maxItems": 100,
|
759
|
+
"items": {
|
760
|
+
"type": [
|
761
|
+
"string",
|
762
|
+
"number",
|
763
|
+
"boolean"
|
764
|
+
]
|
765
|
+
}
|
766
|
+
}
|
767
|
+
},
|
768
|
+
"additionalProperties": false
|
769
|
+
}
|
770
|
+
]
|
771
|
+
},
|
772
|
+
"filterType": {
|
773
|
+
"oneOf": [
|
774
|
+
{
|
775
|
+
"type": [
|
776
|
+
"string",
|
777
|
+
"number",
|
778
|
+
"boolean",
|
779
|
+
"null"
|
780
|
+
]
|
781
|
+
},
|
782
|
+
{
|
783
|
+
"type": "object",
|
784
|
+
"properties": {
|
785
|
+
"$eq": {
|
786
|
+
"type": [
|
787
|
+
"string",
|
788
|
+
"number",
|
789
|
+
"boolean",
|
790
|
+
"null"
|
791
|
+
]
|
792
|
+
},
|
793
|
+
"$ne": {
|
794
|
+
"type": [
|
795
|
+
"string",
|
796
|
+
"number",
|
797
|
+
"boolean",
|
798
|
+
"null"
|
799
|
+
]
|
800
|
+
},
|
801
|
+
"$gt": {
|
802
|
+
"type": [
|
803
|
+
"string",
|
804
|
+
"number",
|
805
|
+
"boolean",
|
806
|
+
"null"
|
807
|
+
]
|
808
|
+
},
|
809
|
+
"$lt": {
|
810
|
+
"type": [
|
811
|
+
"string",
|
812
|
+
"number",
|
813
|
+
"boolean",
|
814
|
+
"null"
|
815
|
+
]
|
816
|
+
},
|
817
|
+
"$gte": {
|
818
|
+
"type": [
|
819
|
+
"string",
|
820
|
+
"number",
|
821
|
+
"boolean",
|
822
|
+
"null"
|
823
|
+
]
|
824
|
+
},
|
825
|
+
"$lte": {
|
826
|
+
"type": [
|
827
|
+
"string",
|
828
|
+
"number",
|
829
|
+
"boolean",
|
830
|
+
"null"
|
831
|
+
]
|
832
|
+
},
|
833
|
+
"$startsWith": {
|
834
|
+
"type": "string",
|
835
|
+
"minLength": 1
|
836
|
+
},
|
837
|
+
"$endsWith": {
|
838
|
+
"type": "string",
|
839
|
+
"minLength": 1
|
840
|
+
},
|
841
|
+
"$contains": {
|
842
|
+
"type": "string",
|
843
|
+
"minLength": 1
|
844
|
+
},
|
845
|
+
"$ci": {
|
846
|
+
"type": "boolean"
|
847
|
+
},
|
848
|
+
"$in": {
|
849
|
+
"type": "array",
|
850
|
+
"maxItems": 100,
|
851
|
+
"items": {
|
852
|
+
"type": [
|
853
|
+
"string",
|
854
|
+
"number",
|
855
|
+
"boolean"
|
856
|
+
]
|
857
|
+
}
|
858
|
+
},
|
859
|
+
"$nin": {
|
860
|
+
"type": "array",
|
861
|
+
"maxItems": 100,
|
862
|
+
"items": {
|
863
|
+
"type": [
|
864
|
+
"string",
|
865
|
+
"number",
|
866
|
+
"boolean"
|
867
|
+
]
|
868
|
+
}
|
869
|
+
}
|
870
|
+
},
|
871
|
+
"additionalProperties": false
|
872
|
+
}
|
873
|
+
]
|
874
|
+
},
|
875
|
+
"pubTopics": {
|
876
|
+
"oneOf": [
|
877
|
+
{
|
878
|
+
"type": [
|
879
|
+
"string",
|
880
|
+
"number",
|
881
|
+
"boolean",
|
882
|
+
"null"
|
883
|
+
]
|
884
|
+
},
|
885
|
+
{
|
886
|
+
"type": "object",
|
887
|
+
"properties": {
|
888
|
+
"$eq": {
|
889
|
+
"type": [
|
890
|
+
"string",
|
891
|
+
"number",
|
892
|
+
"boolean",
|
893
|
+
"null"
|
894
|
+
]
|
895
|
+
},
|
896
|
+
"$ne": {
|
897
|
+
"type": [
|
898
|
+
"string",
|
899
|
+
"number",
|
900
|
+
"boolean",
|
901
|
+
"null"
|
902
|
+
]
|
903
|
+
},
|
904
|
+
"$gt": {
|
905
|
+
"type": [
|
906
|
+
"string",
|
907
|
+
"number",
|
908
|
+
"boolean",
|
909
|
+
"null"
|
910
|
+
]
|
911
|
+
},
|
912
|
+
"$lt": {
|
913
|
+
"type": [
|
914
|
+
"string",
|
915
|
+
"number",
|
916
|
+
"boolean",
|
917
|
+
"null"
|
918
|
+
]
|
919
|
+
},
|
920
|
+
"$gte": {
|
921
|
+
"type": [
|
922
|
+
"string",
|
923
|
+
"number",
|
924
|
+
"boolean",
|
925
|
+
"null"
|
926
|
+
]
|
927
|
+
},
|
928
|
+
"$lte": {
|
929
|
+
"type": [
|
930
|
+
"string",
|
931
|
+
"number",
|
932
|
+
"boolean",
|
933
|
+
"null"
|
934
|
+
]
|
935
|
+
},
|
936
|
+
"$startsWith": {
|
937
|
+
"type": "string",
|
938
|
+
"minLength": 1
|
939
|
+
},
|
940
|
+
"$endsWith": {
|
941
|
+
"type": "string",
|
942
|
+
"minLength": 1
|
943
|
+
},
|
944
|
+
"$contains": {
|
945
|
+
"type": "string",
|
946
|
+
"minLength": 1
|
947
|
+
},
|
948
|
+
"$ci": {
|
949
|
+
"type": "boolean"
|
950
|
+
},
|
951
|
+
"$in": {
|
952
|
+
"type": "array",
|
953
|
+
"maxItems": 100,
|
954
|
+
"items": {
|
955
|
+
"type": [
|
956
|
+
"string",
|
957
|
+
"number",
|
958
|
+
"boolean"
|
959
|
+
]
|
960
|
+
}
|
961
|
+
},
|
962
|
+
"$nin": {
|
963
|
+
"type": "array",
|
964
|
+
"maxItems": 100,
|
965
|
+
"items": {
|
966
|
+
"type": [
|
967
|
+
"string",
|
968
|
+
"number",
|
969
|
+
"boolean"
|
970
|
+
]
|
971
|
+
}
|
972
|
+
}
|
973
|
+
},
|
974
|
+
"additionalProperties": false
|
975
|
+
}
|
976
|
+
]
|
977
|
+
},
|
978
|
+
"subTopics": {
|
979
|
+
"oneOf": [
|
980
|
+
{
|
981
|
+
"type": [
|
982
|
+
"string",
|
983
|
+
"number",
|
984
|
+
"boolean",
|
985
|
+
"null"
|
986
|
+
]
|
987
|
+
},
|
988
|
+
{
|
989
|
+
"type": "object",
|
990
|
+
"properties": {
|
991
|
+
"$eq": {
|
992
|
+
"type": [
|
993
|
+
"string",
|
994
|
+
"number",
|
995
|
+
"boolean",
|
996
|
+
"null"
|
997
|
+
]
|
998
|
+
},
|
999
|
+
"$ne": {
|
1000
|
+
"type": [
|
1001
|
+
"string",
|
1002
|
+
"number",
|
1003
|
+
"boolean",
|
1004
|
+
"null"
|
1005
|
+
]
|
1006
|
+
},
|
1007
|
+
"$gt": {
|
1008
|
+
"type": [
|
1009
|
+
"string",
|
1010
|
+
"number",
|
1011
|
+
"boolean",
|
1012
|
+
"null"
|
1013
|
+
]
|
1014
|
+
},
|
1015
|
+
"$lt": {
|
1016
|
+
"type": [
|
1017
|
+
"string",
|
1018
|
+
"number",
|
1019
|
+
"boolean",
|
1020
|
+
"null"
|
1021
|
+
]
|
1022
|
+
},
|
1023
|
+
"$gte": {
|
1024
|
+
"type": [
|
1025
|
+
"string",
|
1026
|
+
"number",
|
1027
|
+
"boolean",
|
1028
|
+
"null"
|
1029
|
+
]
|
1030
|
+
},
|
1031
|
+
"$lte": {
|
1032
|
+
"type": [
|
1033
|
+
"string",
|
1034
|
+
"number",
|
1035
|
+
"boolean",
|
1036
|
+
"null"
|
1037
|
+
]
|
1038
|
+
},
|
1039
|
+
"$startsWith": {
|
1040
|
+
"type": "string",
|
1041
|
+
"minLength": 1
|
1042
|
+
},
|
1043
|
+
"$endsWith": {
|
1044
|
+
"type": "string",
|
1045
|
+
"minLength": 1
|
1046
|
+
},
|
1047
|
+
"$contains": {
|
1048
|
+
"type": "string",
|
1049
|
+
"minLength": 1
|
1050
|
+
},
|
1051
|
+
"$ci": {
|
1052
|
+
"type": "boolean"
|
1053
|
+
},
|
1054
|
+
"$in": {
|
1055
|
+
"type": "array",
|
1056
|
+
"maxItems": 100,
|
1057
|
+
"items": {
|
1058
|
+
"type": [
|
1059
|
+
"string",
|
1060
|
+
"number",
|
1061
|
+
"boolean"
|
1062
|
+
]
|
1063
|
+
}
|
1064
|
+
},
|
1065
|
+
"$nin": {
|
1066
|
+
"type": "array",
|
1067
|
+
"maxItems": 100,
|
1068
|
+
"items": {
|
1069
|
+
"type": [
|
1070
|
+
"string",
|
1071
|
+
"number",
|
1072
|
+
"boolean"
|
1073
|
+
]
|
1074
|
+
}
|
1075
|
+
}
|
1076
|
+
},
|
1077
|
+
"additionalProperties": false
|
1078
|
+
}
|
1079
|
+
]
|
1080
|
+
}
|
1081
|
+
}
|
1082
|
+
}
|