Bulk Builder

BulkBuilder

BulkBuilder Objects

class BulkBuilder()

This class allow set simple values.

constructor
function constructor()

Constructor

Arguments:

  • ogapi InternalOpenGateAPI - required field. This is ogapi instance
  • resource resource - required field. This is the resource used for the bulk provision
  • extension extension - required field. Type of file to send
  • timeout number (optional) - timeout in millisecons. The request will have a specific time out if it will be exceeded then the promise throw an exception

create
function create(rawFile: string,Blob,csv_response: boolean) -> '*'

Execute the bulk creation operation

Arguments:

  • rawFile string,Blob - File with format string or Blob
  • csv_response boolean (optional) - true if you want a response on format csv. False or null if you want a response on format json

Returns:

  • *

Example:

 ogapi.newCsvBulkBuilder('orgname', 'entities', 10000).create(rawFile)
 ogapi.newCsvBulkBuilder('orgname', 'entities', 10000).create(new Blob(), true)

delete
function delete(rawFile: string,Blob,csv_response: boolean) -> '*'

Execute the bulk delete operation

Arguments:

  • rawFile string,Blob - File with format string or Blob
  • csv_response boolean (optional) - true if you want a response on format csv. False or null if you want a response on format json

Returns:

  • *

Example:

 ogapi.newCsvBulkBuilder('orgname', 'entities', 10000).delete(rawFile)
 ogapi.newCsvBulkBuilder('orgname', 'entities', 10000).delete(new Blob(), true)

deleteAll
function deleteAll(rawFile: string,Blob,csv_response: boolean) -> '*'

Execute the bulk delete full operation

Arguments:

  • rawFile string,Blob - File with format string or Blob
  • csv_response boolean (optional) - true if you want a response on format csv. False or null if you want a response on format json

Returns:

  • *

Example:

 ogapi.newCsvBulkBuilder('orgname', 'entities', 10000).deleteAll(rawFile)
 ogapi.newCsvBulkBuilder('orgname', 'entities', 10000).deleteAll(new Blob(), true)

patch
function patch(rawFile: string,Blob,csv_response: boolean) -> '*'

Execute the bulk patch operation

Arguments:

  • rawFile string,Blob - File with format string or Blob
  • csv_response boolean (optional) - true if you want a response on format csv. False or null if you want a response on format json

Returns:

  • *

Example:

 ogapi.newCsvBulkBuilder('orgname', 'entities', 10000).update(rawFile)
 ogapi.newCsvBulkBuilder('orgname', 'entities', 10000).update(new Blob(), true)

update
function update(rawFile: string,Blob,csv_response: boolean) -> '*'

Execute the bulk update operation

Arguments:

  • rawFile string,Blob - File with format string or Blob
  • csv_response boolean (optional) - true if you want a response on format csv. False or null if you want a response on format json

Returns:

  • *

Example:

 ogapi.newCsvBulkBuilder('orgname', 'entities', 10000).update(rawFile)
 ogapi.newCsvBulkBuilder('orgname', 'entities', 10000).update(new Blob(), true)