Move a catalog item

post

/api/20210901/catalog/{type}/{id}/actions/move

Move a catalog item with a given type and id to a specific folder. Use this API to move folders, workbooks, subject areas, analyses, dashboards, dashboard pages, and reports. You can't use the API to move connections, datasets, data flows, sequences, scripts, or semantic models.

Request

Path Parameters
  • Catalog item ID in base64url format.
  • 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.
Supported Media Types
Request Body - application/json ()
Root Schema : schema
Type: object
Show Source
Back to Top

Response

Supported Media Types

200 Response

Successful operation
Body ()
Root Schema : CatalogItem
Match All
Show Source
Nested Schema : Discriminator: type
Type: object
Show Source
Nested Schema : CatalogItemIdRef
Type: object
Show Source
Nested Schema : CatalogItemParentIdNameRef
Type: object
Show Source

400 Response

Bad Request (invalid query parameters, malformed headers, and so on).
Body ()
Root Schema : Error
Type: object
Show Source

401 Response

Unauthorized (missing or expired credentials, and so on).
Body ()
Root Schema : Error
Type: object
Show Source

403 Response

Forbidden (missing permissions for operation, request denied for unspecified reason, and so on).
Body ()
Root Schema : Error
Type: object
Show Source

404 Response

Not Found. The requested resource was not found.
Body ()
Root Schema : Error
Type: object
Show Source

500 Response

Internal Server Error. The server encountered an unexpected condition preventing fulfilment of the request.
Body ()
Root Schema : Error
Type: object
Show Source
Back to Top

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 Cloud.

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"
Back to Top