Custom Objects Exporter
A package which exports commercetools custom objects in JSON
format from the commercetools platform.
Configuration
The constructor accepts two arguments:
A required object containing the following values:
apiConfig
(Object):AuthMiddleware
options for authentication on the commercetools platform. (Required. See here)accessToken
(String): [Access token] to be used to authenticate requests to API. Requires scope of [view_products
,view_orders
,view_customers
]. More info on how to get the access token herepredicate
(String): Query string specifying (where) predicate. More info on predicates here (Optional)
An optional logger object having four functions (
info
,warn
,error
anddebug
)
Usage
npm install @commercetools/custom-objects-exporter --global
CLI
Info on flags
The
--output
flag specifies where to output/save the exported custom objects. Several notes on this flag:If the file specified already exists, it will be overwritten.
The default location for status report logging is the standard output.
If no output path is specified, the exported objects will be logged to the standard output as a result, status reports will be logged to a
custom-objects-export.log
file in the current directory.
The
where
flag specifies an optional (where) query predicate to be included in the request. This predicate should be wrapped in single quotes ('single quoted predicate'). More info on predicates here
JS
For more direct usage, it is possible to use this module directly:
Last updated