Change item ownership

post

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

Change the ownership of catalog objects. Objects you can change ownership of include workbooks, dashboards, analyses, reports, folders, connections, datasets, data flows, replications, sequences, models, semantic models, and watchlists. You need Manage Content permission to change ownership of objects by this method.

Request

Path Parameters
  • Catalog item ID in base64url format.
  • Type of catalog item. These content types are supported
    • folders - Folders containing catalog objects.
    • workbooks - Workbooks.
    • subjectAreas - Subject areas.
    • datasets - Datasets.
    • connections - Objects containing connection details.
    • dataflows - Data flows.
    • models - Predictive and machine learning models.
    • sequences - Sequences.
    • analysis - Analyses.
    • reports - Pixel-perfect reports (BIP reports).
    • dashboards - Dashboards.
    • dashboardpages - Dashboard pages.
    • dashboardgroupfolders - Workbooks and dashboards available from the Navigation menu on the Home page.
    • scripts - Custom scripts for machine learning and data curation.
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 : schema
Type: string

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

These examples show you how to copy a catalog object with a given type and id.

  • Example 1 - Change ownership of a workbook to a user with a given user ID
  • Example 2 - Change ownership of a workbook to an application role

Example 1 - Change catalog item ownership to a user with a given user ID

In this example, you change ownership of a catalog object with a given type (workbook) and a given ID to a new user. 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.

cURL Example:

First, obtain the object ID of the workbook you want to change ownership for and the user ID of the new owner. Base64URL-safe encode the object ID value to determine the id. You can obtain the Object ID value from the Inspect dialog for the workbook (or folder) in Oracle Analytics Cloud. You can obtain the user ID from the Inspect dialog for the user in Users and Roles.

Run the cURL command with the required accountType and owner:

curl -i \
     --header 'Authorization: Bearer <token>' \
     --header 'Content-Type: application/json' \
     --request POST 'https://<hostname>/api/20210901/catalog/workbooks/L0BDYXRhbG9nL3NoYXJlZC9TYWxlcy9NeVNhbGVzV29ya2Jvb2s/actions/changeOwnership' \
     --data '{"accountType":"User",
              "owner": "user.name@Oracle.com"}'

Example of Request Body

{"accountType": "string",
      "owner": "string"}

Example of Response Body

Status 200:

Example 2 - Change catalog item ownership to an application role

In this example, you change ownership of a catalog object with a given type (workbook) and a given ID to a new application role. 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.

cURL Example:

First, obtain the object ID of the workbook you want to change ownership for and the application role name. Base64URL-safe encode the object ID value to determine the id. You can obtain the Object ID value from the Inspect dialog for the workbook (or folder) in Oracle Analytics Cloud. You can obtain the application role name from the Inspect dialog for the application role in Oracle Analytics Cloud.

Run the cURL command with the required accountType and owner:

curl -i \
     --header 'Authorization: Bearer <token>' \
     --header 'Content-Type: application/json' \
     --request POST 'https://<hostname>/api/20210901/catalog/workbooks/L0BDYXRhbG9nL3NoYXJlZC9TYWxlcy9NeVNhbGVzV29ya2Jvb2s/actions/changeOwnership' \
     --data '{"accountType":"ApplicationRole",
              "owner": "DVContentAuthor"}'

Example of Request Body

{"accountType": "string",
      "owner": "string"}

Example of Response Body

Status 200:
Back to Top