Exporting Repository Content Using an API
Programmers can use a dedicated API to export repository content.
Requirements Management and Systems Modeling provides an API that lets you export repository content.
In order to be able to use the API, you must be connected to Requirements Management and Systems Modeling or call a GET query from the same browser session.
The query syntax for a model is as follows:
<Web-client-URL>/api/v1/repositoryDocuments?path=<path to model>&documentType=<model-type>
The query syntax for a folder is as follows:
<Web-client-URL>/api/v1/repositoryDocuments?path=<path to folder>&documentType=Folder
You must encode the path using encodeComponentUI() (JavaScript).
documentType indicates the type of path. If the path refers to a folder you must specify documentType=Folder, if the path refers to a model you must specify the model type (EAM, BPM...). documentType can be omitted if the path name is unambiguous, but is required is there are several models with different types and the same name.
In order to produce a ZIP result similar to the result obtained when using the Export to Repository Zip File command from the from the GUI, you must then decode the exported content (which is a base64 encoded ZIP blob) using your favorite converter tool or method.
The resulting ZIP file can contain folders, model JSON files and extension JSON files.
-
200: Repository document successfully exported
-
400: Invalid document path or type. Document path is empty, document path is a non-existing folder or document, or document type is incorrect.
-
401: Permission denied. User does not have the permission to view or export the document.
-
404: Repository document not found. The document specified in path does not exist.
-
406: Export is not supported. Repository folder is root, repository folder contains branch or document does not support export.
-
500: Internal error
You can access dedicated Swagger page here:
http://<host-name>:<port-number>/eadesigner/api/v1/docs