# Org Actions Details on the various actions that can be performed on the Org resource, including the expected parameters and the potential responses. ##### Contents * [Delete](#delete) * [Device Counts](#device-counts) * [Get](#get) * [Invite Member](#invite-member) * [Modify Member](#modify-member) * [Notebook Minute Counts](#notebook-minute-counts) * [Patch](#patch) * [Payload Counts](#payload-counts) * [Payload Counts Breakdown](#payload-counts-breakdown) * [Pending Invites](#pending-invites) * [Remove Member](#remove-member) * [Revoke Invite](#revoke-invite) * [Transfer Resources](#transfer-resources)
## Delete Deletes an organization ```ruby result = client.org.delete(orgId: my_org_id) puts result ``` #### Authentication The client must be configured with a valid api access token to call this action. The token must include at least one of the following scopes: all.Organization, all.User, org.*, or org.delete. #### Available Parameters | Name | Type | Required | Description | Default | Example | | ---- | ---- | -------- | ----------- | ------- | ------- | | orgId | string | Y | ID associated with the organization | | 575ed6e87ae143cd83dc4aa8 | | losantdomain | string | N | Domain scope of request (rarely needed) | | example.com | #### Successful Responses | Code | Type | Description | | ---- | ---- | ----------- | | 200 | [Success](_schemas.md#success) | If organization was successfully deleted | #### Error Responses | Code | Type | Description | | ---- | ---- | ----------- | | 400 | [Error](_schemas.md#error) | Error if malformed request | | 404 | [Error](_schemas.md#error) | Error if organization was not found |
## Device Counts Returns device counts by day for the time range specified for this organization ```ruby result = client.org.device_counts(orgId: my_org_id) puts result ``` #### Authentication The client must be configured with a valid api access token to call this action. The token must include at least one of the following scopes: all.Organization, all.Organization.read, all.User, all.User.read, org.*, or org.deviceCounts. #### Available Parameters | Name | Type | Required | Description | Default | Example | | ---- | ---- | -------- | ----------- | ------- | ------- | | orgId | string | Y | ID associated with the organization | | 575ed6e87ae143cd83dc4aa8 | | start | string | N | Start of range for device count query (ms since epoch) | | 0 | | end | string | N | End of range for device count query (ms since epoch) | | 1465790400000 | | losantdomain | string | N | Domain scope of request (rarely needed) | | example.com | #### Successful Responses | Code | Type | Description | | ---- | ---- | ----------- | | 200 | [Device Counts](_schemas.md#device-counts) | Device counts by day | #### Error Responses | Code | Type | Description | | ---- | ---- | ----------- | | 400 | [Error](_schemas.md#error) | Error if malformed request | | 404 | [Error](_schemas.md#error) | Error if organization was not found |
## Get Retrieves information on an organization ```ruby result = client.org.get(orgId: my_org_id) puts result ``` #### Authentication The client must be configured with a valid api access token to call this action. The token must include at least one of the following scopes: all.Organization, all.Organization.read, all.User, all.User.read, org.*, or org.get. #### Available Parameters | Name | Type | Required | Description | Default | Example | | ---- | ---- | -------- | ----------- | ------- | ------- | | orgId | string | Y | ID associated with the organization | | 575ed6e87ae143cd83dc4aa8 | | summaryExclude | string | N | Comma-separated list of summary fields to exclude from org summary | | payloadCount | | summaryInclude | string | N | Comma-separated list of summary fields to include in org summary | | payloadCount | | losantdomain | string | N | Domain scope of request (rarely needed) | | example.com | #### Successful Responses | Code | Type | Description | | ---- | ---- | ----------- | | 200 | [Organization](_schemas.md#organization) | Organization information | #### Error Responses | Code | Type | Description | | ---- | ---- | ----------- | | 400 | [Error](_schemas.md#error) | Error if malformed request | | 404 | [Error](_schemas.md#error) | Error if organization not found |
## Invite Member Invites a person to an organization ```ruby result = client.org.invite_member( orgId: my_org_id, invite: my_invite) puts result ``` #### Authentication The client must be configured with a valid api access token to call this action. The token must include at least one of the following scopes: all.Organization, all.User, org.*, or org.inviteMember. #### Available Parameters | Name | Type | Required | Description | Default | Example | | ---- | ---- | -------- | ----------- | ------- | ------- | | orgId | string | Y | ID associated with the organization | | 575ed6e87ae143cd83dc4aa8 | | invite | [Organization Invitation Post](_schemas.md#organization-invitation-post) | Y | Object containing new invite info | | [Organization Invitation Post Example](_schemas.md#organization-invitation-post-example) | | losantdomain | string | N | Domain scope of request (rarely needed) | | example.com | #### Successful Responses | Code | Type | Description | | ---- | ---- | ----------- | | 200 | [Organization Invitations](_schemas.md#organization-invitations) | Invitation information | #### Error Responses | Code | Type | Description | | ---- | ---- | ----------- | | 400 | [Error](_schemas.md#error) | Error if malformed request | | 404 | [Error](_schemas.md#error) | Error if organization not found |
## Modify Member Modifies a current org member's role ```ruby result = client.org.modify_member( orgId: my_org_id, member: my_member) puts result ``` #### Authentication The client must be configured with a valid api access token to call this action. The token must include at least one of the following scopes: all.Organization, all.User, org.*, or org.modifyMember. #### Available Parameters | Name | Type | Required | Description | Default | Example | | ---- | ---- | -------- | ----------- | ------- | ------- | | orgId | string | Y | ID associated with the organization | | 575ed6e87ae143cd83dc4aa8 | | member | [Organization Member Patch](_schemas.md#organization-member-patch) | Y | Object containing new member pair | | [Organization Member Patch Example](_schemas.md#organization-member-patch-example) | | summaryExclude | string | N | Comma-separated list of summary fields to exclude from org summary | | payloadCount | | summaryInclude | string | N | Comma-separated list of summary fields to include in org summary | | payloadCount | | losantdomain | string | N | Domain scope of request (rarely needed) | | example.com | #### Successful Responses | Code | Type | Description | | ---- | ---- | ----------- | | 200 | [Organization](_schemas.md#organization) | Updated organization information | #### Error Responses | Code | Type | Description | | ---- | ---- | ----------- | | 400 | [Error](_schemas.md#error) | Error if malformed request | | 404 | [Error](_schemas.md#error) | Error if organization not found |
## Notebook Minute Counts Returns notebook execution usage by day for the time range specified for this organization ```ruby result = client.org.notebook_minute_counts(orgId: my_org_id) puts result ``` #### Authentication The client must be configured with a valid api access token to call this action. The token must include at least one of the following scopes: all.Organization, all.Organization.read, all.User, all.User.read, org.*, or org.notebookMinuteCounts. #### Available Parameters | Name | Type | Required | Description | Default | Example | | ---- | ---- | -------- | ----------- | ------- | ------- | | orgId | string | Y | ID associated with the organization | | 575ed6e87ae143cd83dc4aa8 | | start | string | N | Start of range for notebook execution query (ms since epoch) | | 0 | | end | string | N | End of range for notebook execution query (ms since epoch) | | 1465790400000 | | losantdomain | string | N | Domain scope of request (rarely needed) | | example.com | #### Successful Responses | Code | Type | Description | | ---- | ---- | ----------- | | 200 | [Notebook Minute Counts](_schemas.md#notebook-minute-counts) | Notebook usage information | #### Error Responses | Code | Type | Description | | ---- | ---- | ----------- | | 400 | [Error](_schemas.md#error) | Error if malformed request | | 404 | [Error](_schemas.md#error) | Error if organization was not found |
## Patch Updates information about an organization ```ruby result = client.org.patch( orgId: my_org_id, organization: my_organization) puts result ``` #### Authentication The client must be configured with a valid api access token to call this action. The token must include at least one of the following scopes: all.Organization, all.User, org.*, or org.patch. #### Available Parameters | Name | Type | Required | Description | Default | Example | | ---- | ---- | -------- | ----------- | ------- | ------- | | orgId | string | Y | ID associated with the organization | | 575ed6e87ae143cd83dc4aa8 | | organization | [Organization Patch](_schemas.md#organization-patch) | Y | Object containing new organization properties | | [Organization Patch Example](_schemas.md#organization-patch-example) | | summaryExclude | string | N | Comma-separated list of summary fields to exclude from org summary | | payloadCount | | summaryInclude | string | N | Comma-separated list of summary fields to include in org summary | | payloadCount | | losantdomain | string | N | Domain scope of request (rarely needed) | | example.com | #### Successful Responses | Code | Type | Description | | ---- | ---- | ----------- | | 200 | [Organization](_schemas.md#organization) | Updated organization information | #### Error Responses | Code | Type | Description | | ---- | ---- | ----------- | | 400 | [Error](_schemas.md#error) | Error if malformed request | | 404 | [Error](_schemas.md#error) | Error if organization was not found |
## Payload Counts Returns payload counts for the time range specified for all applications this organization owns ```ruby result = client.org.payload_counts(orgId: my_org_id) puts result ``` #### Authentication The client must be configured with a valid api access token to call this action. The token must include at least one of the following scopes: all.Organization, all.Organization.read, all.User, all.User.read, org.*, or org.payloadCounts. #### Available Parameters | Name | Type | Required | Description | Default | Example | | ---- | ---- | -------- | ----------- | ------- | ------- | | orgId | string | Y | ID associated with the organization | | 575ed6e87ae143cd83dc4aa8 | | start | string | N | Start of range for payload count query (ms since epoch) | | 0 | | end | string | N | End of range for payload count query (ms since epoch) | | 1465790400000 | | losantdomain | string | N | Domain scope of request (rarely needed) | | example.com | #### Successful Responses | Code | Type | Description | | ---- | ---- | ----------- | | 200 | [Payload Stats](_schemas.md#payload-stats) | Payload counts, by type and source | #### Error Responses | Code | Type | Description | | ---- | ---- | ----------- | | 400 | [Error](_schemas.md#error) | Error if malformed request | | 404 | [Error](_schemas.md#error) | Error if organization was not found |
## Payload Counts Breakdown Returns payload counts per resolution in the time range specified for all application this organization owns ```ruby result = client.org.payload_counts_breakdown(orgId: my_org_id) puts result ``` #### Authentication The client must be configured with a valid api access token to call this action. The token must include at least one of the following scopes: all.Organization, all.Organization.read, all.User, all.User.read, org.*, or org.payloadCountsBreakdown. #### Available Parameters | Name | Type | Required | Description | Default | Example | | ---- | ---- | -------- | ----------- | ------- | ------- | | orgId | string | Y | ID associated with the organization | | 575ed6e87ae143cd83dc4aa8 | | start | string | N | Start of range for payload count query (ms since epoch) | | 0 | | end | string | N | End of range for payload count query (ms since epoch) | | 1465790400000 | | resolution | string | N | Resolution in milliseconds. Accepted values are: 86400000, 3600000 | 86400000 | 86400000 | | asBytes | string | N | If the resulting stats should be returned as bytes | false | true | | includeNonBillable | string | N | If non-billable payloads should be included in the result | false | true | | losantdomain | string | N | Domain scope of request (rarely needed) | | example.com | #### Successful Responses | Code | Type | Description | | ---- | ---- | ----------- | | 200 | [Payload Counts Breakdown](_schemas.md#payload-counts-breakdown) | Sum of payload counts by date | #### Error Responses | Code | Type | Description | | ---- | ---- | ----------- | | 400 | [Error](_schemas.md#error) | Error if malformed request | | 404 | [Error](_schemas.md#error) | Error if organization was not found |
## Pending Invites Gets the current pending invites ```ruby result = client.org.pending_invites(orgId: my_org_id) puts result ``` #### Authentication The client must be configured with a valid api access token to call this action. The token must include at least one of the following scopes: all.Organization, all.Organization.read, all.User, all.User.read, org.*, or org.pendingInvites. #### Available Parameters | Name | Type | Required | Description | Default | Example | | ---- | ---- | -------- | ----------- | ------- | ------- | | orgId | string | Y | ID associated with the organization | | 575ed6e87ae143cd83dc4aa8 | | losantdomain | string | N | Domain scope of request (rarely needed) | | example.com | #### Successful Responses | Code | Type | Description | | ---- | ---- | ----------- | | 200 | [Organization Invitations](_schemas.md#organization-invitations) | Invitation information | #### Error Responses | Code | Type | Description | | ---- | ---- | ----------- | | 400 | [Error](_schemas.md#error) | Error if malformed request | | 404 | [Error](_schemas.md#error) | Error if organization not found |
## Remove Member Removes a member from the org ```ruby result = client.org.remove_member( orgId: my_org_id, userId: my_user_id) puts result ``` #### Authentication The client must be configured with a valid api access token to call this action. The token must include at least one of the following scopes: all.Organization, all.User, org.*, or org.removeMember. #### Available Parameters | Name | Type | Required | Description | Default | Example | | ---- | ---- | -------- | ----------- | ------- | ------- | | orgId | string | Y | ID associated with the organization | | 575ed6e87ae143cd83dc4aa8 | | userId | string | Y | Id of user to remove | | 575ed70c7ae143cd83dc4aa9 | | summaryExclude | string | N | Comma-separated list of summary fields to exclude from org summary | | payloadCount | | summaryInclude | string | N | Comma-separated list of summary fields to include in org summary | | payloadCount | | losantdomain | string | N | Domain scope of request (rarely needed) | | example.com | #### Successful Responses | Code | Type | Description | | ---- | ---- | ----------- | | 200 | [Organization](_schemas.md#organization) | Updated organization information | #### Error Responses | Code | Type | Description | | ---- | ---- | ----------- | | 400 | [Error](_schemas.md#error) | Error if malformed request | | 404 | [Error](_schemas.md#error) | Error if organization not found |
## Revoke Invite Revokes an existing invite ```ruby result = client.org.revoke_invite( orgId: my_org_id, inviteId: my_invite_id) puts result ``` #### Authentication The client must be configured with a valid api access token to call this action. The token must include at least one of the following scopes: all.Organization, all.User, org.*, or org.revokeInvite. #### Available Parameters | Name | Type | Required | Description | Default | Example | | ---- | ---- | -------- | ----------- | ------- | ------- | | orgId | string | Y | ID associated with the organization | | 575ed6e87ae143cd83dc4aa8 | | inviteId | string | Y | Id of invite to revoke | | 575ed71e7ae143cd83dc4aaa | | losantdomain | string | N | Domain scope of request (rarely needed) | | example.com | #### Successful Responses | Code | Type | Description | | ---- | ---- | ----------- | | 200 | [Organization Invitations](_schemas.md#organization-invitations) | Invitation information | #### Error Responses | Code | Type | Description | | ---- | ---- | ----------- | | 400 | [Error](_schemas.md#error) | Error if malformed request | | 404 | [Error](_schemas.md#error) | Error if organization not found |
## Transfer Resources Moves resources to a new owner ```ruby result = client.org.transfer_resources( orgId: my_org_id, transfer: my_transfer) puts result ``` #### Authentication The client must be configured with a valid api access token to call this action. The token must include at least one of the following scopes: all.Organization, all.User, org.*, or org.transferResources. #### Available Parameters | Name | Type | Required | Description | Default | Example | | ---- | ---- | -------- | ----------- | ------- | ------- | | orgId | string | Y | ID associated with the organization | | 575ed6e87ae143cd83dc4aa8 | | transfer | [Resource Transfer](_schemas.md#resource-transfer) | Y | Object containing properties of the transfer | | [Resource Transfer Example](_schemas.md#resource-transfer-example) | | losantdomain | string | N | Domain scope of request (rarely needed) | | example.com | #### Successful Responses | Code | Type | Description | | ---- | ---- | ----------- | | 200 | [Success](_schemas.md#success) | If resource transfer was successful | #### Error Responses | Code | Type | Description | | ---- | ---- | ----------- | | 400 | [Error](_schemas.md#error) | Error if malformed request | | 404 | [Error](_schemas.md#error) | Error if organization was not found |