> For the complete documentation index, see [llms.txt](https://developer.emporix.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.emporix.io/api-references/readme/api-reference-31/export-import.md).

# Export / Import

## Exporting Custom Entities

> Exports custom entities with corresponding schemas.<br>

```json
{"openapi":"3.0.1","info":{"title":"Schema Service","version":"0.0.1"},"tags":[{"name":"Export / Import"}],"servers":[{"url":"https://api.emporix.io"}],"security":[{"OAuth2":["schema.schema_manage"]}],"components":{"securitySchemes":{"OAuth2":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"https://api.emporix.io/oauth/token","scopes":{"schema.schema_manage":"Required for managing schemas.","schema.schema_read":"Required for reading schemas.","schema.custominstance_read":"Read custom instances of any custom schema type.","schema.custominstance_manage":"Manage custom instances of any custom schema type.","custom.{lowerCaseType}_manage":"Manage custom instances of a given type. For example, for type `DOCUMENT` → `custom.document_manage`.","custom.{lowerCaseType}_manage_own":"Allows to manage only your own custom instances of a given type. For example, for type `DOCUMENT` → `custom.document_manage_own`.","custom.{lowerCaseType}_read":"Read custom instances of a given type. For example, for type `DOCUMENT` → `custom.document_read`.","custom.{lowerCaseType}_read_own":"Allows to read only your own custom instances of a given type. For example, for type `DOCUMENT` → `custom.document_read_own`."}}}}},"schemas":{"ExportImportResponse":{"allOf":[{"$ref":"#/components/schemas/ExportImportRequest"}],"type":"object","properties":{"exportedAt":{"type":"string","description":"Date and time when the object was created, compliant with the ISO 8601 standard. For example: `2022-03-31T09:52:15.423Z`"}},"required":["data"]},"ExportImportRequest":{"type":"object","properties":{"data":{"type":"string","format":"byte","description":"Base64 representation of custom entities with corresponding schemas."}},"required":["data"]},"ErrorResponse":{"required":["code","message","status"],"type":"object","properties":{"id":{"type":"string","nullable":true},"code":{"type":"integer","format":"int32"},"status":{"type":"string"},"message":{"type":"string"},"errorCode":{"type":"string","nullable":true},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"type":{"type":"string"},"message":{"type":"string"},"moreInfo":{"type":"string"}}}}}}},"responses":{"Bad_request_400_cl":{"description":"Unsupported content language provided.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"integer"},"status":{"type":"string"},"message":{"type":"string"},"errorCode":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"type":{"type":"string"},"message":{"type":"string"},"moreInfo":{"type":"string"}}}}}}}}},"Unauthorized_401":{"description":"Given request is unauthorized - the authorization token is invalid or has expired. It usually means that the tenant from the token does not match tenant from path.","content":{"application/json":{"schema":{"type":"object","properties":{"fault":{"type":"object","properties":{"faultstring":{"type":"string"},"detail":{"type":"object","properties":{"errorcode":{"type":"string"}}}}}}}}}}}},"paths":{"/schema/{tenant}/custom-entities/export":{"post":{"tags":["Export / Import"],"summary":"Exporting Custom Entities","description":"Exports custom entities with corresponding schemas.\n","operationId":"POST-schema-export-custom-entities","requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"type":"string"}}}}},"responses":{"200":{"description":"The request was successful.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExportImportResponse"}}}},"400":{"$ref":"#/components/responses/Bad_request_400_cl"},"401":{"$ref":"#/components/responses/Unauthorized_401"},"403":{"description":"Permission denied due to insufficient rights. This may happen when the request does not contain sufficient scopes for the given query values.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}}}
```

## Importing Custom Entities

> Imports custom entities with corresponding schemas.\
> \
> \
> \*\*Note\*\*: If given \`Custom Entity Type\` or \`Schema\` already exists then it will be created with \`\_COPY\` suffix. For example, \`CUSTOM\_PRODUCT\` will be created as \`CUSTOM\_PRODUCT\_COPY\`.<br>

```json
{"openapi":"3.0.1","info":{"title":"Schema Service","version":"0.0.1"},"tags":[{"name":"Export / Import"}],"servers":[{"url":"https://api.emporix.io"}],"security":[{"OAuth2":["schema.schema_manage"]}],"components":{"securitySchemes":{"OAuth2":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"https://api.emporix.io/oauth/token","scopes":{"schema.schema_manage":"Required for managing schemas.","schema.schema_read":"Required for reading schemas.","schema.custominstance_read":"Read custom instances of any custom schema type.","schema.custominstance_manage":"Manage custom instances of any custom schema type.","custom.{lowerCaseType}_manage":"Manage custom instances of a given type. For example, for type `DOCUMENT` → `custom.document_manage`.","custom.{lowerCaseType}_manage_own":"Allows to manage only your own custom instances of a given type. For example, for type `DOCUMENT` → `custom.document_manage_own`.","custom.{lowerCaseType}_read":"Read custom instances of a given type. For example, for type `DOCUMENT` → `custom.document_read`.","custom.{lowerCaseType}_read_own":"Allows to read only your own custom instances of a given type. For example, for type `DOCUMENT` → `custom.document_read_own`."}}}}},"schemas":{"ExportImportRequest":{"type":"object","properties":{"data":{"type":"string","format":"byte","description":"Base64 representation of custom entities with corresponding schemas."}},"required":["data"]},"ErrorResponse":{"required":["code","message","status"],"type":"object","properties":{"id":{"type":"string","nullable":true},"code":{"type":"integer","format":"int32"},"status":{"type":"string"},"message":{"type":"string"},"errorCode":{"type":"string","nullable":true},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"type":{"type":"string"},"message":{"type":"string"},"moreInfo":{"type":"string"}}}}}}},"responses":{"Bad_request_400_cl":{"description":"Unsupported content language provided.","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"integer"},"status":{"type":"string"},"message":{"type":"string"},"errorCode":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"type":{"type":"string"},"message":{"type":"string"},"moreInfo":{"type":"string"}}}}}}}}},"Unauthorized_401":{"description":"Given request is unauthorized - the authorization token is invalid or has expired. It usually means that the tenant from the token does not match tenant from path.","content":{"application/json":{"schema":{"type":"object","properties":{"fault":{"type":"object","properties":{"faultstring":{"type":"string"},"detail":{"type":"object","properties":{"errorcode":{"type":"string"}}}}}}}}}}}},"paths":{"/schema/{tenant}/custom-entities/import":{"post":{"tags":["Export / Import"],"summary":"Importing Custom Entities","description":"Imports custom entities with corresponding schemas.\n\n\n**Note**: If given `Custom Entity Type` or `Schema` already exists then it will be created with `_COPY` suffix. For example, `CUSTOM_PRODUCT` will be created as `CUSTOM_PRODUCT_COPY`.\n","operationId":"POST-schema-import-custom-entites","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExportImportRequest"}}}},"responses":{"204":{"description":"No content"},"400":{"$ref":"#/components/responses/Bad_request_400_cl"},"401":{"$ref":"#/components/responses/Unauthorized_401"},"403":{"description":"Permission denied due to insufficient rights. This may happen when the request does not contain sufficient scopes for the given query values.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://developer.emporix.io/api-references/readme/api-reference-31/export-import.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
