export.collection.dump

The export.collection.dump is used to export all or part of a collection from an organization.

You can specify the number of records to export from a collection, as well as a database Object ID to start exporting from.

If the collection is too large and only part of the collection is exported, it returns the value of the last database Object ID it exported to enable you to use it as part of another export.collection.dump request.

TR50 Request


                            {
  "1" : {
    "command" : "export.collection.dump",
    "params" : {
      "afterId":"12391210910921091091",
      "collection" : "properties",
      "count":2000
    }
  }
}
      

Request Parameters

Name

Type

Required

Description

afterID

String

 

Identifies the database Object ID that precedes the first record that will be exported.

collection

String

Yes

Identifies the collection that will be exported from.

count

Integer

 

Identifies the max count of records that can be exported from the collection.

start

String

A timestamp representing the start of the absolute time period.

end

String

A timestamp representing the end of the absolute time period.

TR50 Response


                            {
  "1" : {
    "success" : true,
    "params" : {
      "lastId":"12391210910921091091",
      "records" : [
         { ... },
         { ... },
         ...
      ]
    }
  }
}
      

Response Parameters

Name

Type

Description

lastId

String

The database Object ID of the last record exported

records

Array

An array of record objects from a collection.

Warning:

The organization that is being exported, will not contain records of objects for historial collections such as alarms, properties, and so on.