Change item ownership
/api/20210901/catalog/{type}/{id}/actions/changeOwnership
Request
-
id(required): string
Catalog item ID in base64url format.
-
type(required):
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.
- application/json
object
-
accountType: string
Allowed Values:
[ "User", "ApplicationRole" ]
-
owner: string
Owner user id.
Response
- application/json
200 Response
string
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
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: