import EntityBuilder from 'opengate-js/src/provision/entities/EntityBuilder.js'EntityBuilder
This is a base object that contains all you can do about Devices.
Constructor Summary
| Public Constructor | ||
| public |
constructor(Reference: InternalOpenGateAPI) Constructor |
|
Method Summary
| Public Methods | ||
| public |
assetsBuilder(organization: string, timeout: number): Promise Get a AssetBuilder for operate with entities of type asset |
|
| public |
devicesBuilder(organization: string, timeout: number): Promise Get a DeviceBuilder for operate with entities of type device |
|
| public |
newCsvBulkBuilder(organization: string, resource: string, timeout: number, async: boolean): CsvBulkBuilder Get a new CsvBulkBuilder |
|
| public |
newJsonBulkBuilder(organization: string, resource: string, timeout: number, async: boolean): JsonBulkBuilder Get a new JsonBulkBuilder |
|
| public |
newJsonFlattenedBulkBuilder(organization: string, resource: string, timeout: number, async: boolean): JsonFlattenedBulkBuilder Get a new JsonFlattenedBulkBuilder |
|
| public |
subscribersBuilder(organization: string, timeout: number): Promise Get a SubscriberBuilder for operate with entities of type subscriber |
|
| public |
subscriptionsBuilder(organization: string, timeout: number): Promise Get a SubscriptionBuilder for operate with entities of type subscription |
|
| public |
ticketsBuilder(organization: string, timeout: number): Promise Get a TicketBuilder for operate with entities of type ticket |
|
Public Constructors
public constructor(Reference: InternalOpenGateAPI) source
Constructor
Params:
| Name | Type | Attribute | Description |
| Reference | InternalOpenGateAPI | to the API object. |
Public Methods
public assetsBuilder(organization: string, timeout: number): Promise source
Get a AssetBuilder for operate with entities of type asset
Example:
ogapi.assetsBuilder('orgname').then(function(assetBuilder){//...}).catch()
public devicesBuilder(organization: string, timeout: number): Promise source
Get a DeviceBuilder for operate with entities of type device
Example:
ogapi.devicesBuilder('orgname').then(function(deviceBuilder){//...}).catch()
public newCsvBulkBuilder(organization: string, resource: string, timeout: number, async: boolean): CsvBulkBuilder source
Get a new CsvBulkBuilder
Params:
| Name | Type | Attribute | Description |
| organization | string | required field. |
|
| resource | string | required field. Type of resource: entities or tickets |
|
| timeout | number |
|
timeout in millisecons. The request will have a specific time out if it will be exceeded then the promise throw an exception |
| async | boolean |
|
forces async execution for the bulk operation |
Example:
ogapi.newCsvBulkBuilder('orgname', 'entities', 10000, false)
ogapi.newCsvBulkBuilder('orgname', 'entities', 10000, true)
public newJsonBulkBuilder(organization: string, resource: string, timeout: number, async: boolean): JsonBulkBuilder source
Get a new JsonBulkBuilder
Params:
| Name | Type | Attribute | Description |
| organization | string | required field. |
|
| resource | string | required field. Type of resource: entities or tickets |
|
| timeout | number |
|
timeout in millisecons. The request will have a specific time out if it will be exceeded then the promise throw an exception |
| async | boolean |
|
forces async execution for the bulk operation |
Example:
ogapi.newJsonBulkBuilder('orgname', 'entities', 10000)
public newJsonFlattenedBulkBuilder(organization: string, resource: string, timeout: number, async: boolean): JsonFlattenedBulkBuilder source
Get a new JsonFlattenedBulkBuilder
Params:
| Name | Type | Attribute | Description |
| organization | string | required field. |
|
| resource | string | required field. Type of resource: entities or tickets |
|
| timeout | number |
|
timeout in millisecons. The request will have a specific time out if it will be exceeded then the promise throw an exception |
| async | boolean |
|
forces async execution for the bulk operation |
Example:
ogapi.newJsonFlattenedBulkBuilder('orgname', 'entities', 10000)
public subscribersBuilder(organization: string, timeout: number): Promise source
Get a SubscriberBuilder for operate with entities of type subscriber
Example:
ogapi.subscribersBuilder('orgname').then(function(subscriberBuilder){//...}).catch()
public subscriptionsBuilder(organization: string, timeout: number): Promise source
Get a SubscriptionBuilder for operate with entities of type subscription
Example:
ogapi.subscriptionsBuilder('orgname').then(function(subscriptionBuilder){//...}).catch()