losant_rest 1.15.1 → 1.16.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/docs/_schemas.md +12170 -4718
- data/docs/application.md +3 -4
- data/docs/applicationDashboard.md +43 -0
- data/docs/applications.md +3 -2
- data/docs/devices.md +40 -0
- data/docs/flows.md +38 -0
- data/docs/instanceCustomNode.md +222 -0
- data/docs/instanceCustomNodes.md +91 -0
- data/lib/losant_rest/application.rb +1 -1
- data/lib/losant_rest/application_api_token.rb +1 -1
- data/lib/losant_rest/application_api_tokens.rb +1 -1
- 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 +50 -1
- data/lib/losant_rest/application_dashboards.rb +1 -1
- data/lib/losant_rest/application_key.rb +1 -1
- data/lib/losant_rest/application_keys.rb +1 -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 +1 -1
- 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 +11 -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 +1 -1
- data/lib/losant_rest/data_table_row.rb +1 -1
- data/lib/losant_rest/data_table_rows.rb +1 -1
- data/lib/losant_rest/data_tables.rb +1 -1
- 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 +50 -1
- data/lib/losant_rest/edge_deployment.rb +1 -1
- data/lib/losant_rest/edge_deployments.rb +1 -1
- data/lib/losant_rest/embedded_deployment.rb +1 -1
- data/lib/losant_rest/embedded_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 +1 -1
- data/lib/losant_rest/experience.rb +1 -1
- data/lib/losant_rest/experience_domain.rb +1 -1
- data/lib/losant_rest/experience_domains.rb +1 -1
- data/lib/losant_rest/experience_endpoint.rb +1 -1
- data/lib/losant_rest/experience_endpoints.rb +1 -1
- data/lib/losant_rest/experience_group.rb +1 -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 +1 -1
- 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 +1 -1
- data/lib/losant_rest/experience_versions.rb +1 -1
- data/lib/losant_rest/experience_view.rb +1 -1
- data/lib/losant_rest/experience_views.rb +1 -1
- data/lib/losant_rest/file.rb +1 -1
- data/lib/losant_rest/files.rb +1 -1
- data/lib/losant_rest/flow.rb +1 -1
- data/lib/losant_rest/flow_version.rb +1 -1
- data/lib/losant_rest/flow_versions.rb +1 -1
- data/lib/losant_rest/flows.rb +45 -1
- data/lib/losant_rest/instance.rb +1 -1
- data/lib/losant_rest/instance_api_token.rb +1 -1
- data/lib/losant_rest/instance_api_tokens.rb +1 -1
- data/lib/losant_rest/instance_custom_node.rb +282 -0
- data/lib/losant_rest/instance_custom_nodes.rb +136 -0
- data/lib/losant_rest/instance_member.rb +1 -1
- data/lib/losant_rest/instance_members.rb +1 -1
- data/lib/losant_rest/instance_org.rb +1 -1
- data/lib/losant_rest/instance_org_invite.rb +1 -1
- data/lib/losant_rest/instance_org_invites.rb +1 -1
- data/lib/losant_rest/instance_org_member.rb +1 -1
- data/lib/losant_rest/instance_org_members.rb +1 -1
- data/lib/losant_rest/instance_orgs.rb +1 -1
- data/lib/losant_rest/instances.rb +1 -1
- data/lib/losant_rest/integration.rb +1 -1
- data/lib/losant_rest/integrations.rb +1 -1
- data/lib/losant_rest/me.rb +1 -1
- data/lib/losant_rest/notebook.rb +1 -1
- data/lib/losant_rest/notebooks.rb +1 -1
- data/lib/losant_rest/org.rb +1 -1
- 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 +1 -1
- data/lib/losant_rest/user_api_tokens.rb +1 -1
- data/lib/losant_rest/utils.rb +1 -1
- data/lib/losant_rest/version.rb +2 -2
- data/lib/losant_rest/webhook.rb +1 -1
- data/lib/losant_rest/webhooks.rb +1 -1
- data/lib/losant_rest.rb +3 -1
- data/schemas/apiTokenPost.json +13 -1
- data/schemas/application.json +1 -1
- data/schemas/applicationApplyTemplatePatch.json +5 -0
- data/schemas/applicationClonePost.json +5 -0
- data/schemas/applicationCreationByTemplateResult.json +1 -1
- data/schemas/applicationDashboardPost.json +162 -3
- data/schemas/applicationExportPost.json +4 -0
- data/schemas/applicationImportOptions.json +43 -0
- data/schemas/applicationPatch.json +1 -1
- data/schemas/applicationPost.json +1 -1
- data/schemas/applications.json +1 -1
- data/schemas/dashboard.json +162 -3
- data/schemas/dashboardPatch.json +162 -3
- data/schemas/dashboardPost.json +162 -3
- data/schemas/dashboardSendReport.json +20 -3
- data/schemas/dashboards.json +162 -3
- data/schemas/deviceNamesResponse.json +36 -0
- data/schemas/experienceBootstrapOptions.json +1 -1
- data/schemas/experienceLinkedResources.json +485 -5
- data/schemas/experienceSlug.json +1 -1
- data/schemas/experienceSlugPatch.json +1 -1
- data/schemas/experienceSlugPost.json +1 -1
- data/schemas/experienceSlugs.json +1 -1
- data/schemas/experienceUser.json +2 -1
- data/schemas/experienceUsers.json +2 -1
- data/schemas/flow.json +173 -0
- data/schemas/flowPatch.json +174 -0
- data/schemas/flowPost.json +174 -0
- data/schemas/flowVersion.json +312 -5
- data/schemas/flowVersionPost.json +156 -0
- data/schemas/flowVersions.json +312 -5
- data/schemas/flows.json +173 -0
- data/schemas/flowsImportPost.json +339 -2
- data/schemas/flowsImportResult.json +485 -5
- data/schemas/githubLogin.json +13 -1
- data/schemas/instanceCustomNode.json +589 -0
- data/schemas/instanceCustomNodePatch.json +674 -0
- data/schemas/instanceCustomNodePost.json +679 -0
- data/schemas/instanceCustomNodes.json +634 -0
- data/schemas/instanceMember.json +2 -2
- data/schemas/instanceMembers.json +2 -2
- data/schemas/instanceOrg.json +8 -0
- data/schemas/instanceOrgMember.json +2 -2
- data/schemas/instanceOrgs.json +8 -0
- data/schemas/integration.json +30 -2
- data/schemas/integrationPatch.json +30 -2
- data/schemas/integrationPost.json +30 -2
- data/schemas/integrations.json +30 -2
- data/schemas/me.json +2 -2
- data/schemas/mePatch.json +0 -1
- data/schemas/org.json +2 -2
- data/schemas/orgs.json +2 -2
- data/schemas/paletteResponse.json +785 -0
- data/schemas/userCredentials.json +13 -1
- data/schemas/userPost.json +13 -2
- metadata +13 -2
@@ -1,6 +1,6 @@
|
|
1
1
|
# The MIT License (MIT)
|
2
2
|
#
|
3
|
-
# Copyright (c)
|
3
|
+
# Copyright (c) 2022 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
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# The MIT License (MIT)
|
2
2
|
#
|
3
|
-
# Copyright (c)
|
3
|
+
# Copyright (c) 2022 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
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# The MIT License (MIT)
|
2
2
|
#
|
3
|
-
# Copyright (c)
|
3
|
+
# Copyright (c) 2022 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
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# The MIT License (MIT)
|
2
2
|
#
|
3
|
-
# Copyright (c)
|
3
|
+
# Copyright (c) 2022 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
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# The MIT License (MIT)
|
2
2
|
#
|
3
|
-
# Copyright (c)
|
3
|
+
# Copyright (c) 2022 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/auth.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# The MIT License (MIT)
|
2
2
|
#
|
3
|
-
# Copyright (c)
|
3
|
+
# Copyright (c) 2022 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/client.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# The MIT License (MIT)
|
2
2
|
#
|
3
|
-
# Copyright (c)
|
3
|
+
# Copyright (c) 2022 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
|
@@ -27,7 +27,7 @@ module LosantRest
|
|
27
27
|
#
|
28
28
|
# User API for accessing Losant data
|
29
29
|
#
|
30
|
-
# Built For Version 1.
|
30
|
+
# Built For Version 1.23.1
|
31
31
|
class Client
|
32
32
|
attr_accessor :auth_token, :url
|
33
33
|
|
@@ -268,6 +268,14 @@ module LosantRest
|
|
268
268
|
@instance_api_tokens ||= InstanceApiTokens.new(self)
|
269
269
|
end
|
270
270
|
|
271
|
+
def instance_custom_node
|
272
|
+
@instance_custom_node ||= InstanceCustomNode.new(self)
|
273
|
+
end
|
274
|
+
|
275
|
+
def instance_custom_nodes
|
276
|
+
@instance_custom_nodes ||= InstanceCustomNodes.new(self)
|
277
|
+
end
|
278
|
+
|
271
279
|
def instance_member
|
272
280
|
@instance_member ||= InstanceMember.new(self)
|
273
281
|
end
|
@@ -358,7 +366,7 @@ module LosantRest
|
|
358
366
|
|
359
367
|
headers["Accept"] = "application/json"
|
360
368
|
headers["Content-Type"] = "application/json"
|
361
|
-
headers["Accept-Version"] = "^1.
|
369
|
+
headers["Accept-Version"] = "^1.23.1"
|
362
370
|
headers["Authorization"] = "Bearer #{self.auth_token}" if self.auth_token
|
363
371
|
path = self.url + options.fetch(:path, "")
|
364
372
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# The MIT License (MIT)
|
2
2
|
#
|
3
|
-
# Copyright (c)
|
3
|
+
# Copyright (c) 2022 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
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# The MIT License (MIT)
|
2
2
|
#
|
3
|
-
# Copyright (c)
|
3
|
+
# Copyright (c) 2022 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/data.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# The MIT License (MIT)
|
2
2
|
#
|
3
|
-
# Copyright (c)
|
3
|
+
# Copyright (c) 2022 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
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# The MIT License (MIT)
|
2
2
|
#
|
3
|
-
# Copyright (c)
|
3
|
+
# Copyright (c) 2022 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
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# The MIT License (MIT)
|
2
2
|
#
|
3
|
-
# Copyright (c)
|
3
|
+
# Copyright (c) 2022 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
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# The MIT License (MIT)
|
2
2
|
#
|
3
|
-
# Copyright (c)
|
3
|
+
# Copyright (c) 2022 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
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# The MIT License (MIT)
|
2
2
|
#
|
3
|
-
# Copyright (c)
|
3
|
+
# Copyright (c) 2022 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/device.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# The MIT License (MIT)
|
2
2
|
#
|
3
|
-
# Copyright (c)
|
3
|
+
# Copyright (c) 2022 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
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# The MIT License (MIT)
|
2
2
|
#
|
3
|
-
# Copyright (c)
|
3
|
+
# Copyright (c) 2022 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
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# The MIT License (MIT)
|
2
2
|
#
|
3
|
-
# Copyright (c)
|
3
|
+
# Copyright (c) 2022 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/devices.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# The MIT License (MIT)
|
2
2
|
#
|
3
|
-
# Copyright (c)
|
3
|
+
# Copyright (c) 2022 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
|
@@ -130,6 +130,55 @@ module LosantRest
|
|
130
130
|
body: body)
|
131
131
|
end
|
132
132
|
|
133
|
+
# Gets the device names that match the given query. Maximum 1K returned.
|
134
|
+
#
|
135
|
+
# Authentication:
|
136
|
+
# The client must be configured with a valid api
|
137
|
+
# access token to call this action. The token
|
138
|
+
# must include at least one of the following scopes:
|
139
|
+
# all.Application, all.Application.read, all.Organization, all.Organization.read, all.User, all.User.read, devices.*, or devices.deviceNames.
|
140
|
+
#
|
141
|
+
# Parameters:
|
142
|
+
# * {string} applicationId - ID associated with the application
|
143
|
+
# * {hash} query - Device filter JSON object (https://api.losant.com/#/definitions/advancedDeviceQuery)
|
144
|
+
# * {string} startsWith - Filter devices down to those that have names starting with the given string. Case insensitive.
|
145
|
+
# * {string} losantdomain - Domain scope of request (rarely needed)
|
146
|
+
# * {boolean} _actions - Return resource actions in response
|
147
|
+
# * {boolean} _links - Return resource link in response
|
148
|
+
# * {boolean} _embedded - Return embedded resources in response
|
149
|
+
#
|
150
|
+
# Responses:
|
151
|
+
# * 200 - The matching device names (https://api.losant.com/#/definitions/deviceNamesResponse)
|
152
|
+
#
|
153
|
+
# Errors:
|
154
|
+
# * 400 - Error if malformed request (https://api.losant.com/#/definitions/error)
|
155
|
+
# * 404 - Error if application was not found (https://api.losant.com/#/definitions/error)
|
156
|
+
def device_names(params = {})
|
157
|
+
params = Utils.symbolize_hash_keys(params)
|
158
|
+
query_params = { _actions: false, _links: true, _embedded: true }
|
159
|
+
headers = {}
|
160
|
+
body = nil
|
161
|
+
|
162
|
+
raise ArgumentError.new("applicationId is required") unless params.has_key?(:applicationId)
|
163
|
+
|
164
|
+
query_params[:query] = params[:query] if params.has_key?(:query)
|
165
|
+
query_params[:query] = JSON.dump(query_params[:query]) if query_params.has_key?(:query)
|
166
|
+
query_params[:startsWith] = params[:startsWith] if params.has_key?(:startsWith)
|
167
|
+
headers[:losantdomain] = params[:losantdomain] if params.has_key?(:losantdomain)
|
168
|
+
query_params[:_actions] = params[:_actions] if params.has_key?(:_actions)
|
169
|
+
query_params[:_links] = params[:_links] if params.has_key?(:_links)
|
170
|
+
query_params[:_embedded] = params[:_embedded] if params.has_key?(:_embedded)
|
171
|
+
|
172
|
+
path = "/applications/#{params[:applicationId]}/devices/deviceNames"
|
173
|
+
|
174
|
+
@client.request(
|
175
|
+
method: :get,
|
176
|
+
path: path,
|
177
|
+
query: query_params,
|
178
|
+
headers: headers,
|
179
|
+
body: body)
|
180
|
+
end
|
181
|
+
|
133
182
|
# Creates an export of all device metadata
|
134
183
|
#
|
135
184
|
# Authentication:
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# The MIT License (MIT)
|
2
2
|
#
|
3
|
-
# Copyright (c)
|
3
|
+
# Copyright (c) 2022 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
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# The MIT License (MIT)
|
2
2
|
#
|
3
|
-
# Copyright (c)
|
3
|
+
# Copyright (c) 2022 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
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# The MIT License (MIT)
|
2
2
|
#
|
3
|
-
# Copyright (c)
|
3
|
+
# Copyright (c) 2022 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
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# The MIT License (MIT)
|
2
2
|
#
|
3
|
-
# Copyright (c)
|
3
|
+
# Copyright (c) 2022 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/error.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# The MIT License (MIT)
|
2
2
|
#
|
3
|
-
# Copyright (c)
|
3
|
+
# Copyright (c) 2022 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/event.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# The MIT License (MIT)
|
2
2
|
#
|
3
|
-
# Copyright (c)
|
3
|
+
# Copyright (c) 2022 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/events.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# The MIT License (MIT)
|
2
2
|
#
|
3
|
-
# Copyright (c)
|
3
|
+
# Copyright (c) 2022 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
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# The MIT License (MIT)
|
2
2
|
#
|
3
|
-
# Copyright (c)
|
3
|
+
# Copyright (c) 2022 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
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# The MIT License (MIT)
|
2
2
|
#
|
3
|
-
# Copyright (c)
|
3
|
+
# Copyright (c) 2022 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
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# The MIT License (MIT)
|
2
2
|
#
|
3
|
-
# Copyright (c)
|
3
|
+
# Copyright (c) 2022 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
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# The MIT License (MIT)
|
2
2
|
#
|
3
|
-
# Copyright (c)
|
3
|
+
# Copyright (c) 2022 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
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# The MIT License (MIT)
|
2
2
|
#
|
3
|
-
# Copyright (c)
|
3
|
+
# Copyright (c) 2022 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
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# The MIT License (MIT)
|
2
2
|
#
|
3
|
-
# Copyright (c)
|
3
|
+
# Copyright (c) 2022 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
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# The MIT License (MIT)
|
2
2
|
#
|
3
|
-
# Copyright (c)
|
3
|
+
# Copyright (c) 2022 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
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# The MIT License (MIT)
|
2
2
|
#
|
3
|
-
# Copyright (c)
|
3
|
+
# Copyright (c) 2022 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
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# The MIT License (MIT)
|
2
2
|
#
|
3
|
-
# Copyright (c)
|
3
|
+
# Copyright (c) 2022 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
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# The MIT License (MIT)
|
2
2
|
#
|
3
|
-
# Copyright (c)
|
3
|
+
# Copyright (c) 2022 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
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# The MIT License (MIT)
|
2
2
|
#
|
3
|
-
# Copyright (c)
|
3
|
+
# Copyright (c) 2022 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
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# The MIT License (MIT)
|
2
2
|
#
|
3
|
-
# Copyright (c)
|
3
|
+
# Copyright (c) 2022 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
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# The MIT License (MIT)
|
2
2
|
#
|
3
|
-
# Copyright (c)
|
3
|
+
# Copyright (c) 2022 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
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# The MIT License (MIT)
|
2
2
|
#
|
3
|
-
# Copyright (c)
|
3
|
+
# Copyright (c) 2022 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
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# The MIT License (MIT)
|
2
2
|
#
|
3
|
-
# Copyright (c)
|
3
|
+
# Copyright (c) 2022 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/file.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# The MIT License (MIT)
|
2
2
|
#
|
3
|
-
# Copyright (c)
|
3
|
+
# Copyright (c) 2022 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/files.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# The MIT License (MIT)
|
2
2
|
#
|
3
|
-
# Copyright (c)
|
3
|
+
# Copyright (c) 2022 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/flow.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# The MIT License (MIT)
|
2
2
|
#
|
3
|
-
# Copyright (c)
|
3
|
+
# Copyright (c) 2022 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
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# The MIT License (MIT)
|
2
2
|
#
|
3
|
-
# Copyright (c)
|
3
|
+
# Copyright (c) 2022 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
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# The MIT License (MIT)
|
2
2
|
#
|
3
|
-
# Copyright (c)
|
3
|
+
# Copyright (c) 2022 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/flows.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# The MIT License (MIT)
|
2
2
|
#
|
3
|
-
# Copyright (c)
|
3
|
+
# Copyright (c) 2022 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
|
@@ -213,6 +213,50 @@ module LosantRest
|
|
213
213
|
body: body)
|
214
214
|
end
|
215
215
|
|
216
|
+
# Gets additional nodes that should be available in the palette
|
217
|
+
#
|
218
|
+
# Authentication:
|
219
|
+
# The client must be configured with a valid api
|
220
|
+
# access token to call this action. The token
|
221
|
+
# must include at least one of the following scopes:
|
222
|
+
# all.Application, all.Application.read, all.Organization, all.Organization.read, all.User, all.User.read, flows.*, or flows.palette.
|
223
|
+
#
|
224
|
+
# Parameters:
|
225
|
+
# * {string} applicationId - ID associated with the application
|
226
|
+
# * {string} losantdomain - Domain scope of request (rarely needed)
|
227
|
+
# * {boolean} _actions - Return resource actions in response
|
228
|
+
# * {boolean} _links - Return resource link in response
|
229
|
+
# * {boolean} _embedded - Return embedded resources in response
|
230
|
+
#
|
231
|
+
# Responses:
|
232
|
+
# * 200 - The additional nodes available in the palette (https://api.losant.com/#/definitions/paletteResponse)
|
233
|
+
#
|
234
|
+
# Errors:
|
235
|
+
# * 400 - Error if malformed request (https://api.losant.com/#/definitions/error)
|
236
|
+
# * 404 - Error if application was not found (https://api.losant.com/#/definitions/error)
|
237
|
+
def palette(params = {})
|
238
|
+
params = Utils.symbolize_hash_keys(params)
|
239
|
+
query_params = { _actions: false, _links: true, _embedded: true }
|
240
|
+
headers = {}
|
241
|
+
body = nil
|
242
|
+
|
243
|
+
raise ArgumentError.new("applicationId is required") unless params.has_key?(:applicationId)
|
244
|
+
|
245
|
+
headers[:losantdomain] = params[:losantdomain] if params.has_key?(:losantdomain)
|
246
|
+
query_params[:_actions] = params[:_actions] if params.has_key?(:_actions)
|
247
|
+
query_params[:_links] = params[:_links] if params.has_key?(:_links)
|
248
|
+
query_params[:_embedded] = params[:_embedded] if params.has_key?(:_embedded)
|
249
|
+
|
250
|
+
path = "/applications/#{params[:applicationId]}/flows/palette"
|
251
|
+
|
252
|
+
@client.request(
|
253
|
+
method: :get,
|
254
|
+
path: path,
|
255
|
+
query: query_params,
|
256
|
+
headers: headers,
|
257
|
+
body: body)
|
258
|
+
end
|
259
|
+
|
216
260
|
# Create a new flow for an application
|
217
261
|
#
|
218
262
|
# Authentication:
|
data/lib/losant_rest/instance.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# The MIT License (MIT)
|
2
2
|
#
|
3
|
-
# Copyright (c)
|
3
|
+
# Copyright (c) 2022 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
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# The MIT License (MIT)
|
2
2
|
#
|
3
|
-
# Copyright (c)
|
3
|
+
# Copyright (c) 2022 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
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# The MIT License (MIT)
|
2
2
|
#
|
3
|
-
# Copyright (c)
|
3
|
+
# Copyright (c) 2022 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
|