Creating copy of a Layout using an API
You can also use an API to create a copy of a Layout by following the steps given below.
Go to the REST client and do the followings.
Enter the endpoint URL of the API to be used for copying a Layout.
Refer to the table given below for the API Endpoint URLs.
API Name
Endpoint URL
Example
Copy Schema
<application URL>/rest/entities/copy/schemas/<Type of the Layout>/<ID of the Layout>
- Where, Type can be extracted from the URL of the Layout. For example, the Type for a Database Layout can be seen as db in the following URL:
https://hostURL.com/#configure/layouts/db?projectId=all&type=layouts&activity=db - You can retrieve the ID from the Action > View menu of the respective Layout.
- Where, Type can be extracted from the URL of the Layout. For example, the Type for a Database Layout can be seen as db in the following URL:
https://hostURL.com/rest/entities/copy/schemas/db/192168001006160326156458789963
Enter the method as PUT.
- Copy cookies from the logged-in user session by navigating as follows:
- From the logged-in user session in the browser, open Developer Tools, and select Network menu.
- In the Adeptia Connect activity manage page, select any activity, for example, an Excel Layout.
- In the Developer Tools > Network page, select any URL that appears.
- Select the Headers tab.
- Scroll down to the Request Headers section.
- Within the Request Headers section, copy the entire content available in the Cookie parameter.
- Paste the copied cookies into Headers > Cookie parameter of the REST client.
In the Body of the REST client, enter the name and description for the copy of Layout in key value pair as shown in the example below:
{“entityName”:”Layout_Copy”,
“description”:”Copy_of_Layout”}- Send the request.
If you receive the response code as “200”, it implies that you’ve successfully created the copy of the Layout.