Move a catalog item
/api/20210901/catalog/{type}/{id}/actions/move
Request
-
id(required): string
Catalog item ID in base64url format.
-
type(required):
Type of catalog item. The content types that this API supports include folders, workbooks, subject areas, analyses, dashboards, dashboard pages, reports, connections, datasets, data flows, sequences, scripts, and semantic models.
- application/json
object
-
createIntermediateFolders: boolean
Create all intermediate folders if any folder in the parent folder hierarchy doesn't currently exist.
-
destId: string
Catalog item identifier for destination item.
-
destParentId: string
Parent folder id.
-
newItemName: string
Name for the new catalog item that you copy.
-
overwrite: boolean
If specified and true, overwrite the destination catalog item if it exists.
Response
- application/json
200 Response
-
object
CatalogItemIdRef
-
object
CatalogItemParentIdNameRef
-
object
Discriminator: type
Discriminator:
{ "propertyName":"type" }
object
-
description: string
Catalog item description, if any
-
lastModified: string
(date-time)
Catalog item last modified date and time
-
owner: string
Catalog item owner
-
type:
type
object
-
name: string
Catalog item name
-
parentId: string
Catalog parent item identifier (if catalog item has a parent)
400 Response
object
-
code(required): string
Short error code that defines the error, meant for programmatic parsing.
-
message(required): string
Human-readable error string.
401 Response
object
-
code(required): string
Short error code that defines the error, meant for programmatic parsing.
-
message(required): string
Human-readable error string.
403 Response
object
-
code(required): string
Short error code that defines the error, meant for programmatic parsing.
-
message(required): string
Human-readable error string.
404 Response
object
-
code(required): string
Short error code that defines the error, meant for programmatic parsing.
-
message(required): string
Human-readable error string.
500 Response
object
-
code(required): string
Short error code that defines the error, meant for programmatic parsing.
-
message(required): string
Human-readable error string.
Examples
In this example, you move a catalog object with a given type
(workbook)
and a given id
to a specific folder. The workbook is called
MySalesWorkbook
. The object ID of the workbook is
/@Catalog/shared/Sales/MySalesWorkbook
which has the Base64URL-safe
encoded id
value
L0BDYXRhbG9nL3NoYXJlZC9TYWxlcy9NeVNhbGVzV29ya2Jvb2s
The object ID of the destination folder is
/@Catalog/shared/NewSales/MySalesWorkbook
which has the Base64URL-safe
encoded destId
value
L0BDYXRhbG9nL3NoYXJlZC9OZXdTYWxlcy9NeVNhbGVzV29ya2Jvb2s
cURL Example:
First, obtain the object ID of the workbook you want to move and the object ID if the
destination folder. Base64URL-safe encode both values to determine the id
and destId
. You can obtain the Object ID value from the Inspect
dialog for the workbook (or folder) in Oracle Analytics
Server.
Run the cURL command with the required type
, id
and
destId
:
curl -i \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --request POST 'https://<hostname>/api/20210901/catalog/workbooks/L0BDYXRhbG9nL3NoYXJlZC9TYWxlcy9NeVNhbGVzV29ya2Jvb2s/actions/move' \ --data '{"destId": "L0BDYXRhbG9nL3NoYXJlZC9OZXdTYWxlcy9NeVNhbGVzV29ya2Jvb2s"}'
Example of Request Body
{"destId": "string", "destParentId": "string", "newItemName": "string", "overwrite": true, "createIntermediateFolders": true}
For example:
{"destId": "L0BDYXRhbG9nL3NoYXJlZC9OZXdTYWxlcy9NeVNhbGVzV29ya2Jvb2s"}
Example of Response Body
Status 200: { "owner": "<User-Name>", "name": "MySalesWorkbook", "description": "", "id": "L3NoYXJlZC9OZXdTYWxlcy9NeVNhbGVzV29ya2Jvb2s", "lastModified": "2024-02-27T18:11:33Z", "type": "workbooks", "parentId": "L3NoYXJlZC9OZXdTYWxlcw"