losant_rest 1.13.0 → 1.13.1
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 +2317 -650
- data/docs/application.md +5 -5
- data/docs/applicationApiTokens.md +1 -1
- data/docs/applications.md +1 -1
- data/docs/dataTable.md +1 -1
- data/docs/dataTableRows.md +1 -1
- data/docs/dataTables.md +1 -1
- data/docs/devices.md +2 -2
- data/docs/experience.md +1 -1
- data/docs/experienceDomains.md +1 -1
- data/docs/experienceGroup.md +2 -0
- data/docs/experienceSlugs.md +1 -1
- data/docs/experienceVersion.md +3 -3
- data/docs/experienceVersions.md +2 -2
- data/docs/experienceView.md +4 -4
- data/docs/experienceViews.md +2 -2
- data/docs/file.md +5 -5
- data/docs/files.md +2 -2
- data/docs/flowVersions.md +44 -0
- data/docs/instance.md +38 -0
- data/docs/instanceApiToken.md +133 -0
- data/docs/instanceApiTokens.md +91 -0
- data/docs/instanceMembers.md +1 -1
- data/docs/instanceOrgMembers.md +1 -1
- data/docs/userApiToken.md +125 -0
- data/docs/userApiTokens.md +87 -0
- data/lib/losant_rest.rb +4 -0
- data/lib/losant_rest/application.rb +5 -5
- data/lib/losant_rest/application_api_tokens.rb +1 -1
- data/lib/losant_rest/applications.rb +1 -1
- data/lib/losant_rest/client.rb +18 -2
- data/lib/losant_rest/data_table.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/devices.rb +2 -2
- data/lib/losant_rest/experience.rb +1 -1
- data/lib/losant_rest/experience_domains.rb +1 -1
- data/lib/losant_rest/experience_group.rb +4 -0
- data/lib/losant_rest/experience_slugs.rb +1 -1
- data/lib/losant_rest/experience_version.rb +3 -3
- data/lib/losant_rest/experience_versions.rb +2 -2
- data/lib/losant_rest/experience_view.rb +4 -4
- data/lib/losant_rest/experience_views.rb +2 -2
- data/lib/losant_rest/file.rb +4 -4
- data/lib/losant_rest/files.rb +2 -2
- data/lib/losant_rest/flow_versions.rb +50 -0
- data/lib/losant_rest/instance.rb +46 -1
- 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 +1 -1
- data/lib/losant_rest/instance_members.rb +2 -2
- data/lib/losant_rest/instance_org.rb +1 -1
- data/lib/losant_rest/instance_org_member.rb +1 -1
- data/lib/losant_rest/instance_org_members.rb +2 -2
- data/lib/losant_rest/instance_orgs.rb +1 -1
- data/lib/losant_rest/instances.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/version.rb +1 -1
- data/schemas/apiToken.json +2 -1
- data/schemas/apiTokenPost.json +420 -0
- data/schemas/apiTokens.json +4 -2
- data/schemas/applicationDashboardPost.json +20 -16
- data/schemas/auditLog.json +4 -0
- data/schemas/auditLogFilter.json +4 -0
- data/schemas/auditLogs.json +4 -0
- data/schemas/bulkDeleteResponse.json +12 -0
- data/schemas/dashboard.json +20 -16
- data/schemas/dashboardPatch.json +20 -16
- data/schemas/dashboardPost.json +20 -16
- data/schemas/dashboardSendReport.json +4 -0
- data/schemas/dashboards.json +20 -16
- data/schemas/experienceGroup.json +6 -0
- data/schemas/experienceGroups.json +6 -0
- data/schemas/flowVersionsDeletePost.json +941 -0
- data/schemas/githubLogin.json +19 -1
- data/schemas/historicalSummary.json +3 -0
- data/schemas/instance.json +60 -0
- data/schemas/instanceOrgPost.json +166 -0
- data/schemas/instancePatch.json +67 -0
- data/schemas/instanceReportOptionsPost.json +1 -0
- data/schemas/notebook.json +15 -0
- data/schemas/notebooks.json +15 -0
- data/schemas/userCredentials.json +19 -1
- data/schemas/userPost.json +19 -1
- data/schemas/validateContextError.json +34 -0
- data/schemas/validateContextSuccess.json +34 -0
- metadata +15 -3
@@ -0,0 +1,91 @@
|
|
1
|
+
# Instance Api Tokens Actions
|
2
|
+
|
3
|
+
Details on the various actions that can be performed on the
|
4
|
+
Instance Api Tokens 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 API tokens for an instance
|
17
|
+
|
18
|
+
```ruby
|
19
|
+
result = client.instance_api_tokens.get(instanceId: my_instance_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.Instance, all.Instance.read, all.User, all.User.read, instanceApiTokens.*, or instanceApiTokens.get.
|
28
|
+
|
29
|
+
#### Available Parameters
|
30
|
+
|
31
|
+
| Name | Type | Required | Description | Default | Example |
|
32
|
+
| ---- | ---- | -------- | ----------- | ------- | ------- |
|
33
|
+
| instanceId | string | Y | ID associated with the instance | | 575ec7417ae143cd83dc4a96 |
|
34
|
+
| sortField | string | N | Field to sort the results by. Accepted values are: name, status, id, creationDate, lastUpdated, expirationDate | name | 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, status | | key |
|
39
|
+
| filter | string | N | Filter to apply against the filtered field. Supports globbing. Blank or not provided means no filtering. | | my*token |
|
40
|
+
| losantdomain | string | N | Domain scope of request (rarely needed) | | example.com |
|
41
|
+
|
42
|
+
#### Successful Responses
|
43
|
+
|
44
|
+
| Code | Type | Description |
|
45
|
+
| ---- | ---- | ----------- |
|
46
|
+
| 200 | [API Token](_schemas.md#api-token) | Collection of API tokens |
|
47
|
+
|
48
|
+
#### Error Responses
|
49
|
+
|
50
|
+
| Code | Type | Description |
|
51
|
+
| ---- | ---- | ----------- |
|
52
|
+
| 400 | [Error](_schemas.md#error) | Error if malformed request |
|
53
|
+
|
54
|
+
<br/>
|
55
|
+
|
56
|
+
## Post
|
57
|
+
|
58
|
+
Create a new API token for an instance
|
59
|
+
|
60
|
+
```ruby
|
61
|
+
result = client.instance_api_tokens.post(
|
62
|
+
instanceId: my_instance_id,
|
63
|
+
apiToken: my_api_token)
|
64
|
+
|
65
|
+
puts result
|
66
|
+
```
|
67
|
+
|
68
|
+
#### Authentication
|
69
|
+
The client must be configured with a valid api access token to call this
|
70
|
+
action. The token must include at least one of the following scopes:
|
71
|
+
all.Instance, all.User, instanceApiTokens.*, or instanceApiTokens.post.
|
72
|
+
|
73
|
+
#### Available Parameters
|
74
|
+
|
75
|
+
| Name | Type | Required | Description | Default | Example |
|
76
|
+
| ---- | ---- | -------- | ----------- | ------- | ------- |
|
77
|
+
| instanceId | string | Y | ID associated with the instance | | 575ec7417ae143cd83dc4a96 |
|
78
|
+
| apiToken | [API Token Post](_schemas.md#api-token-post) | Y | API token information | | [API Token Post Example](_schemas.md#api-token-post-example) |
|
79
|
+
| losantdomain | string | N | Domain scope of request (rarely needed) | | example.com |
|
80
|
+
|
81
|
+
#### Successful Responses
|
82
|
+
|
83
|
+
| Code | Type | Description |
|
84
|
+
| ---- | ---- | ----------- |
|
85
|
+
| 201 | [API Token](_schemas.md#api-token) | The successfully created API token |
|
86
|
+
|
87
|
+
#### Error Responses
|
88
|
+
|
89
|
+
| Code | Type | Description |
|
90
|
+
| ---- | ---- | ----------- |
|
91
|
+
| 400 | [Error](_schemas.md#error) | Error if malformed request |
|
data/docs/instanceMembers.md
CHANGED
data/docs/instanceOrgMembers.md
CHANGED
@@ -0,0 +1,125 @@
|
|
1
|
+
# User Api Token Actions
|
2
|
+
|
3
|
+
Details on the various actions that can be performed on the
|
4
|
+
User Api Token resource, including the expected
|
5
|
+
parameters and the potential responses.
|
6
|
+
|
7
|
+
##### Contents
|
8
|
+
|
9
|
+
* [Delete](#delete)
|
10
|
+
* [Get](#get)
|
11
|
+
* [Patch](#patch)
|
12
|
+
|
13
|
+
<br/>
|
14
|
+
|
15
|
+
## Delete
|
16
|
+
|
17
|
+
Deletes an API Token
|
18
|
+
|
19
|
+
```ruby
|
20
|
+
result = client.user_api_token.delete(apiTokenId: my_api_token_id)
|
21
|
+
|
22
|
+
puts result
|
23
|
+
```
|
24
|
+
|
25
|
+
#### Authentication
|
26
|
+
The client must be configured with a valid api access token to call this
|
27
|
+
action. The token must include at least one of the following scopes:
|
28
|
+
all.User, userApiToken.*, or userApiToken.delete.
|
29
|
+
|
30
|
+
#### Available Parameters
|
31
|
+
|
32
|
+
| Name | Type | Required | Description | Default | Example |
|
33
|
+
| ---- | ---- | -------- | ----------- | ------- | ------- |
|
34
|
+
| apiTokenId | string | Y | ID associated with the API token | | 575ec7417ae143cd83dc4a95 |
|
35
|
+
| losantdomain | string | N | Domain scope of request (rarely needed) | | example.com |
|
36
|
+
|
37
|
+
#### Successful Responses
|
38
|
+
|
39
|
+
| Code | Type | Description |
|
40
|
+
| ---- | ---- | ----------- |
|
41
|
+
| 200 | [Success](_schemas.md#success) | If API token was successfully deleted |
|
42
|
+
|
43
|
+
#### Error Responses
|
44
|
+
|
45
|
+
| Code | Type | Description |
|
46
|
+
| ---- | ---- | ----------- |
|
47
|
+
| 400 | [Error](_schemas.md#error) | Error if malformed request |
|
48
|
+
| 404 | [Error](_schemas.md#error) | Error if API token was not found |
|
49
|
+
|
50
|
+
<br/>
|
51
|
+
|
52
|
+
## Get
|
53
|
+
|
54
|
+
Retrieves information on an API token
|
55
|
+
|
56
|
+
```ruby
|
57
|
+
result = client.user_api_token.get(apiTokenId: my_api_token_id)
|
58
|
+
|
59
|
+
puts result
|
60
|
+
```
|
61
|
+
|
62
|
+
#### Authentication
|
63
|
+
The client must be configured with a valid api access token to call this
|
64
|
+
action. The token must include at least one of the following scopes:
|
65
|
+
all.User, all.User.read, userApiToken.*, or userApiToken.get.
|
66
|
+
|
67
|
+
#### Available Parameters
|
68
|
+
|
69
|
+
| Name | Type | Required | Description | Default | Example |
|
70
|
+
| ---- | ---- | -------- | ----------- | ------- | ------- |
|
71
|
+
| apiTokenId | string | Y | ID associated with the API token | | 575ec7417ae143cd83dc4a95 |
|
72
|
+
| losantdomain | string | N | Domain scope of request (rarely needed) | | example.com |
|
73
|
+
|
74
|
+
#### Successful Responses
|
75
|
+
|
76
|
+
| Code | Type | Description |
|
77
|
+
| ---- | ---- | ----------- |
|
78
|
+
| 200 | [API Token](_schemas.md#api-token) | API token information |
|
79
|
+
|
80
|
+
#### Error Responses
|
81
|
+
|
82
|
+
| Code | Type | Description |
|
83
|
+
| ---- | ---- | ----------- |
|
84
|
+
| 400 | [Error](_schemas.md#error) | Error if malformed request |
|
85
|
+
| 404 | [Error](_schemas.md#error) | Error if API token was not found |
|
86
|
+
|
87
|
+
<br/>
|
88
|
+
|
89
|
+
## Patch
|
90
|
+
|
91
|
+
Updates information about an API token
|
92
|
+
|
93
|
+
```ruby
|
94
|
+
result = client.user_api_token.patch(
|
95
|
+
apiTokenId: my_api_token_id,
|
96
|
+
apiToken: my_api_token)
|
97
|
+
|
98
|
+
puts result
|
99
|
+
```
|
100
|
+
|
101
|
+
#### Authentication
|
102
|
+
The client must be configured with a valid api access token to call this
|
103
|
+
action. The token must include at least one of the following scopes:
|
104
|
+
all.User, userApiToken.*, or userApiToken.patch.
|
105
|
+
|
106
|
+
#### Available Parameters
|
107
|
+
|
108
|
+
| Name | Type | Required | Description | Default | Example |
|
109
|
+
| ---- | ---- | -------- | ----------- | ------- | ------- |
|
110
|
+
| apiTokenId | string | Y | ID associated with the API token | | 575ec7417ae143cd83dc4a95 |
|
111
|
+
| apiToken | [API Token Patch](_schemas.md#api-token-patch) | Y | Object containing new properties of the API token | | [API Token Patch Example](_schemas.md#api-token-patch-example) |
|
112
|
+
| losantdomain | string | N | Domain scope of request (rarely needed) | | example.com |
|
113
|
+
|
114
|
+
#### Successful Responses
|
115
|
+
|
116
|
+
| Code | Type | Description |
|
117
|
+
| ---- | ---- | ----------- |
|
118
|
+
| 200 | [API Token](_schemas.md#api-token) | Updated API token information |
|
119
|
+
|
120
|
+
#### Error Responses
|
121
|
+
|
122
|
+
| Code | Type | Description |
|
123
|
+
| ---- | ---- | ----------- |
|
124
|
+
| 400 | [Error](_schemas.md#error) | Error if malformed request |
|
125
|
+
| 404 | [Error](_schemas.md#error) | Error if API token was not found |
|
@@ -0,0 +1,87 @@
|
|
1
|
+
# User Api Tokens Actions
|
2
|
+
|
3
|
+
Details on the various actions that can be performed on the
|
4
|
+
User Api Tokens 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 API tokens for a user
|
17
|
+
|
18
|
+
```ruby
|
19
|
+
result = client.user_api_tokens.get(optional_params)
|
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.User, all.User.read, userApiTokens.*, or userApiTokens.get.
|
28
|
+
|
29
|
+
#### Available Parameters
|
30
|
+
|
31
|
+
| Name | Type | Required | Description | Default | Example |
|
32
|
+
| ---- | ---- | -------- | ----------- | ------- | ------- |
|
33
|
+
| sortField | string | N | Field to sort the results by. Accepted values are: name, status, id, creationDate, lastUpdated, expirationDate | name | name |
|
34
|
+
| sortDirection | string | N | Direction to sort the results by. Accepted values are: asc, desc | asc | asc |
|
35
|
+
| page | string | N | Which page of results to return | 0 | 0 |
|
36
|
+
| perPage | string | N | How many items to return per page | 100 | 10 |
|
37
|
+
| filterField | string | N | Field to filter the results by. Blank or not provided means no filtering. Accepted values are: name, status | | key |
|
38
|
+
| filter | string | N | Filter to apply against the filtered field. Supports globbing. Blank or not provided means no filtering. | | my*token |
|
39
|
+
| losantdomain | string | N | Domain scope of request (rarely needed) | | example.com |
|
40
|
+
|
41
|
+
#### Successful Responses
|
42
|
+
|
43
|
+
| Code | Type | Description |
|
44
|
+
| ---- | ---- | ----------- |
|
45
|
+
| 200 | [API Token](_schemas.md#api-token) | Collection of API tokens |
|
46
|
+
|
47
|
+
#### Error Responses
|
48
|
+
|
49
|
+
| Code | Type | Description |
|
50
|
+
| ---- | ---- | ----------- |
|
51
|
+
| 400 | [Error](_schemas.md#error) | Error if malformed request |
|
52
|
+
|
53
|
+
<br/>
|
54
|
+
|
55
|
+
## Post
|
56
|
+
|
57
|
+
Create a new API token for an user
|
58
|
+
|
59
|
+
```ruby
|
60
|
+
result = client.user_api_tokens.post(apiToken: my_api_token)
|
61
|
+
|
62
|
+
puts result
|
63
|
+
```
|
64
|
+
|
65
|
+
#### Authentication
|
66
|
+
The client must be configured with a valid api access token to call this
|
67
|
+
action. The token must include at least one of the following scopes:
|
68
|
+
all.User, userApiTokens.*, or userApiTokens.post.
|
69
|
+
|
70
|
+
#### Available Parameters
|
71
|
+
|
72
|
+
| Name | Type | Required | Description | Default | Example |
|
73
|
+
| ---- | ---- | -------- | ----------- | ------- | ------- |
|
74
|
+
| apiToken | [API Token Post](_schemas.md#api-token-post) | Y | API token information | | [API Token Post Example](_schemas.md#api-token-post-example) |
|
75
|
+
| losantdomain | string | N | Domain scope of request (rarely needed) | | example.com |
|
76
|
+
|
77
|
+
#### Successful Responses
|
78
|
+
|
79
|
+
| Code | Type | Description |
|
80
|
+
| ---- | ---- | ----------- |
|
81
|
+
| 201 | [API Token](_schemas.md#api-token) | The successfully created API token |
|
82
|
+
|
83
|
+
#### Error Responses
|
84
|
+
|
85
|
+
| Code | Type | Description |
|
86
|
+
| ---- | ---- | ----------- |
|
87
|
+
| 400 | [Error](_schemas.md#error) | Error if malformed request |
|
data/lib/losant_rest.rb
CHANGED
@@ -76,6 +76,8 @@ require_relative "losant_rest/flow_version"
|
|
76
76
|
require_relative "losant_rest/flow_versions"
|
77
77
|
require_relative "losant_rest/flows"
|
78
78
|
require_relative "losant_rest/instance"
|
79
|
+
require_relative "losant_rest/instance_api_token"
|
80
|
+
require_relative "losant_rest/instance_api_tokens"
|
79
81
|
require_relative "losant_rest/instance_member"
|
80
82
|
require_relative "losant_rest/instance_members"
|
81
83
|
require_relative "losant_rest/instance_org"
|
@@ -91,6 +93,8 @@ require_relative "losant_rest/notebooks"
|
|
91
93
|
require_relative "losant_rest/org"
|
92
94
|
require_relative "losant_rest/org_invites"
|
93
95
|
require_relative "losant_rest/orgs"
|
96
|
+
require_relative "losant_rest/user_api_token"
|
97
|
+
require_relative "losant_rest/user_api_tokens"
|
94
98
|
require_relative "losant_rest/webhook"
|
95
99
|
require_relative "losant_rest/webhooks"
|
96
100
|
require_relative "losant_rest/client"
|
@@ -405,7 +405,7 @@ module LosantRest
|
|
405
405
|
# The client must be configured with a valid api
|
406
406
|
# access token to call this action. The token
|
407
407
|
# must include at least one of the following scopes:
|
408
|
-
# all.Application, all.Application.read, all.Organization, all.Organization.read, all.User, all.User.read, application.*, or application.get.
|
408
|
+
# all.Application, all.Application.cli, all.Application.read, all.Organization, all.Organization.read, all.User, all.User.cli, all.User.read, application.*, or application.get.
|
409
409
|
#
|
410
410
|
# Parameters:
|
411
411
|
# * {string} applicationId - ID of the associated application
|
@@ -453,7 +453,7 @@ module LosantRest
|
|
453
453
|
# The client must be configured with a valid api
|
454
454
|
# access token to call this action. The token
|
455
455
|
# must include at least one of the following scopes:
|
456
|
-
# all.Application, all.Organization, all.User, application.*, or application.patch.
|
456
|
+
# all.Application, all.Application.cli, all.Organization, all.User, all.User.cli, application.*, or application.patch.
|
457
457
|
#
|
458
458
|
# Parameters:
|
459
459
|
# * {string} applicationId - ID of the associated application
|
@@ -547,7 +547,7 @@ module LosantRest
|
|
547
547
|
# The client must be configured with a valid api
|
548
548
|
# access token to call this action. The token
|
549
549
|
# must include at least one of the following scopes:
|
550
|
-
# all.Application, all.Organization, all.User, application.*, or application.patch.
|
550
|
+
# all.Application, all.Application.cli, all.Organization, all.User, all.User.cli, application.*, or application.patch.
|
551
551
|
#
|
552
552
|
# Parameters:
|
553
553
|
# * {string} applicationId - ID of the associated application
|
@@ -646,7 +646,7 @@ module LosantRest
|
|
646
646
|
# The client must be configured with a valid api
|
647
647
|
# access token to call this action. The token
|
648
648
|
# must include at least one of the following scopes:
|
649
|
-
# all.Application, all.Application.read, all.Organization, all.Organization.read, all.User, all.User.read, application.*, or application.get.
|
649
|
+
# all.Application, all.Application.cli, all.Application.read, all.Organization, all.Organization.read, all.User, all.User.cli, all.User.read, application.*, or application.get.
|
650
650
|
#
|
651
651
|
# Parameters:
|
652
652
|
# * {string} applicationId - ID of the associated application
|
@@ -690,7 +690,7 @@ module LosantRest
|
|
690
690
|
# The client must be configured with a valid api
|
691
691
|
# access token to call this action. The token
|
692
692
|
# must include at least one of the following scopes:
|
693
|
-
# all.Application, all.Organization, all.User, application.*, or application.patch.
|
693
|
+
# all.Application, all.Application.cli, all.Organization, all.User, all.User.cli, application.*, or application.patch.
|
694
694
|
#
|
695
695
|
# Parameters:
|
696
696
|
# * {string} applicationId - ID of the associated application
|
@@ -96,7 +96,7 @@ module LosantRest
|
|
96
96
|
#
|
97
97
|
# Parameters:
|
98
98
|
# * {string} applicationId - ID associated with the application
|
99
|
-
# * {hash} apiToken - API token information (https://api.losant.com/#/definitions/
|
99
|
+
# * {hash} apiToken - API token information (https://api.losant.com/#/definitions/apiTokenPost)
|
100
100
|
# * {string} losantdomain - Domain scope of request (rarely needed)
|
101
101
|
# * {boolean} _actions - Return resource actions in response
|
102
102
|
# * {boolean} _links - Return resource link in response
|
@@ -37,7 +37,7 @@ module LosantRest
|
|
37
37
|
# The client must be configured with a valid api
|
38
38
|
# access token to call this action. The token
|
39
39
|
# must include at least one of the following scopes:
|
40
|
-
# all.Organization, all.Organization.read, all.User, all.User.read, applications.*, or applications.get.
|
40
|
+
# all.Organization, all.Organization.read, all.User, all.User.cli, all.User.read, applications.*, or applications.get.
|
41
41
|
#
|
42
42
|
# Parameters:
|
43
43
|
# * {string} sortField - Field to sort the results by. Accepted values are: name, id, creationDate, ownerId, lastUpdated
|
data/lib/losant_rest/client.rb
CHANGED
@@ -27,7 +27,7 @@ module LosantRest
|
|
27
27
|
#
|
28
28
|
# User API for accessing Losant data
|
29
29
|
#
|
30
|
-
# Built For Version 1.20.
|
30
|
+
# Built For Version 1.20.1
|
31
31
|
class Client
|
32
32
|
attr_accessor :auth_token, :url
|
33
33
|
|
@@ -248,6 +248,14 @@ module LosantRest
|
|
248
248
|
@instance ||= Instance.new(self)
|
249
249
|
end
|
250
250
|
|
251
|
+
def instance_api_token
|
252
|
+
@instance_api_token ||= InstanceApiToken.new(self)
|
253
|
+
end
|
254
|
+
|
255
|
+
def instance_api_tokens
|
256
|
+
@instance_api_tokens ||= InstanceApiTokens.new(self)
|
257
|
+
end
|
258
|
+
|
251
259
|
def instance_member
|
252
260
|
@instance_member ||= InstanceMember.new(self)
|
253
261
|
end
|
@@ -308,6 +316,14 @@ module LosantRest
|
|
308
316
|
@orgs ||= Orgs.new(self)
|
309
317
|
end
|
310
318
|
|
319
|
+
def user_api_token
|
320
|
+
@user_api_token ||= UserApiToken.new(self)
|
321
|
+
end
|
322
|
+
|
323
|
+
def user_api_tokens
|
324
|
+
@user_api_tokens ||= UserApiTokens.new(self)
|
325
|
+
end
|
326
|
+
|
311
327
|
def webhook
|
312
328
|
@webhook ||= Webhook.new(self)
|
313
329
|
end
|
@@ -322,7 +338,7 @@ module LosantRest
|
|
322
338
|
|
323
339
|
headers["Accept"] = "application/json"
|
324
340
|
headers["Content-Type"] = "application/json"
|
325
|
-
headers["Accept-Version"] = "^1.20.
|
341
|
+
headers["Accept-Version"] = "^1.20.1"
|
326
342
|
headers["Authorization"] = "Bearer #{self.auth_token}" if self.auth_token
|
327
343
|
path = self.url + options.fetch(:path, "")
|
328
344
|
|