# Import/export of a document/document types from one env to another env

**URL:** <https://community.bloomreach.com/t/import-export-of-a-document-document-types-from-one-env-to-another-env/3104>\
**Category:** Experience Manager (PaaS/OnPrem)\
**Created:** [March 25, 2022, 5:39am UTC](https://community.bloomreach.com/t/import-export-of-a-document-document-types-from-one-env-to-another-env/3104 "2022-03-25T05:39:09Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![kumamanish](https://yyz1.discourse-cdn.com/flex027/user_avatar/community.bloomreach.com/kumamanish/32/1134_2.png) [@kumamanish](https://community.bloomreach.com/u/kumamanish)\
**Post date:** [March 25, 2022, 5:39am UTC](https://community.bloomreach.com/t/import-export-of-a-document-document-types-from-one-env-to-another-env/3104/1 "2022-03-25T05:39:09Z")

</div>

Hi team,

I have a requirement of import/export of a document/document types from one environment to another environment through api. I have choosen my local as one env and also I have installed blommreach on remote machine as a second env, I have follow some step to manually import/export documents among them.

1. In first env I created a document, downlaoded through below api  
**[http://localhost:8080/cms/ws/exim/export/](http://localhost:8080/cms/ws/exim/export/)**  
In body I passed only params as a attachement and it contains :  
{  
“documents”: {  
“queries”: [  
‘/jcr:root/content/documents/xyz/doc1/import3//element(\*,hippo:document)’  
]  
}  
}

my file downloaded  
2. After that I copied downloaded document to remote machine then uploaded through below api

**[http://localhost:8080/cms/ws/exim/import/](http://localhost:8080/cms/ws/exim/import/)**  
In body I passed only package as a attachement and referenced to downloaded document in remote machine.

As a result document uploaded successfully.

Above process was for uploading document , please correct me if I am doing in a wrong way.

Like document now I need to export and import document types through api but no luck, I am getting error, is there a same way of doing import or export(might I am missing some parameters that will allow to import or export document types) or I need to follow some other steps. Need your suggestions here, will be appreciated.

---

<div class="post-metadata">

**Author:** ![PCentgraf](https://yyz1.discourse-cdn.com/flex027/user_avatar/community.bloomreach.com/pcentgraf/32/55_2.png) [@PCentgraf](https://community.bloomreach.com/u/PCentgraf)\
**Post date:** [March 31, 2022, 6:50am UTC](https://community.bloomreach.com/t/import-export-of-a-document-document-types-from-one-env-to-another-env/3104/2 "2022-03-31T06:50:22Z")

</div>

The ability to import and export content types via API is available in our SaaS product, but not in the brXM on-prem / PaaS product. The expected mechanism for updating content types in brXM is via the deployment and bootstrapping mechanisms that require a process restart. More details are documented below. We tend to refer to this by the term “namespace”, since content types are typically organized into CND files that include multiple types organized by a common name prefix.

> **[Manage Configuration - Bloomreach Experience Manager - The Fast and Flexible...](https://xmdocumentation.bloomreach.com/14/library/concepts/configuration-management/manage-configuration.html)**
>
> The fast and flexible on-premise or PaaS headless CMS

Note that you can still update content types without site downtime, but this requires more than one cluster node for hosting. There are also some updates that are best to handle in blue-green style deployments, if they require significant rewriting of existing content.

---

<div class="post-metadata">

**Author:** ![kumamanish](https://yyz1.discourse-cdn.com/flex027/user_avatar/community.bloomreach.com/kumamanish/32/1134_2.png) [@kumamanish](https://community.bloomreach.com/u/kumamanish)\
**Post date:** [April 5, 2022, 7:34am UTC](https://community.bloomreach.com/t/import-export-of-a-document-document-types-from-one-env-to-another-env/3104/3 "2022-04-05T07:34:28Z")

</div>

Thanks @PCentgraf,

I gone through shared link but sorry to say still I am unable to understand how I can achieve my requirments through **deployment and bootstrapping mechanisms**.

can you please help me more or provide any example for the documenttypes import/export.

---

<div class="post-metadata">

**Author:** ![katmandu25](https://yyz1.discourse-cdn.com/flex027/user_avatar/community.bloomreach.com/katmandu25/32/1485_2.png) [@katmandu25](https://community.bloomreach.com/u/katmandu25)\
**Post date:** [January 26, 2023, 3:46pm UTC](https://community.bloomreach.com/t/import-export-of-a-document-document-types-from-one-env-to-another-env/3104/4 "2023-01-26T15:46:11Z")

</div>

Hi @kumamanish kumamanish:

Could you deploy a new document type. I am trying to do but when target environment start gives me an error

_Failed to apply config_

_javax.jcr.nodetype.NoSuchNodeTypeException: {[http://www.mysite.com/mysite/nt/1.0](http://www.mysite.com/mysite/nt/1.0)}MenuItem_

Thanks in advance

---

<div class="post-metadata">

**Author:** ![kumamanish](https://yyz1.discourse-cdn.com/flex027/user_avatar/community.bloomreach.com/kumamanish/32/1134_2.png) [@kumamanish](https://community.bloomreach.com/u/kumamanish)\
**Post date:** [February 2, 2023, 1:45pm UTC](https://community.bloomreach.com/t/import-export-of-a-document-document-types-from-one-env-to-another-env/3104/5 "2023-02-02T13:45:54Z")

</div>

Hi @katmandu25 ,

Yes I deployed in envs, we need to first update **myproject.cnd** (take reference of existing data) and 2nd is when we export document type it prefix with some data that needs to remove, after that only you can able to uplaod it at any envs.
