Create Policies | RESTful API | Teradata Data Mover - 17.10 - Create Policies (RESTful API) - Teradata Data Mover

Teradata® Data Mover User Guide

Product
Teradata Data Mover
Release Number
17.10
Release Date
June 2021
Content Type
User Guide
Publication ID
B035-4101-061K
Language
English (United States)

Overview

Create permissions needed for jobs, daemon advanced settings, and daemon access using the following URL and method:
Item Description
URL /datamover/policies
Method POST
When security is enabled, only a Viewpoint or command line super user can create policies.

Request Header

Authorization
Description: Basic header authentication
User must be dmcl_admin if call is from Viewpoint.
JSON Data Type: String
Required: No, unless securityMgmt is enabled.
Portlet-User
Description: Viewpoint user login
JSON Data Type: String
Required: No, unless call is made from Viewpoint
Portlet-Roles
Description: Roles associated with Viewpoint user login
JSON Data Type: String, separated by commas when more than one role exists
Required: No, unless call is made from Viewpoint

Request Parameters

policies
Description: A list of objects which associate a set of permissions to a set of users or roles
JSON Data Type: String
Required: Yes

Response Parameters

No response parameters required.

Examples

The following is a request example to create policies:
[ {
  "service" : "datamover",
  "type" : "user",
  "principals" : [ "admin", "user1"],
  "actions" : [ "read", "write", "execute" ],
  "resources" : [ "tdrn:datamover:job:test", "tdrn:datamover:job:testCP_002",  "tdrn:datamover:job:dm31111_001" ]
}, {
  "service" : "datamover",
  "type" : "user",
  "principals" : [ "user1" ],
  "actions" : [ "owner" ],
  "resources" : [ "tdrn:datamover:job:test", "tdrn:datamover:job:testCP_002" ] 
},{
  "service" : "datamover",
  "type" : "user",
  "principals" : [ "tester_002"],
  "actions" : [ "owner" ],
  "resources" : [ "tdrn:datamover:job:dm31111_001" ]
}
  
]
The following failed response code example is when the user does not have permissions to create or replace policies:
{ "message" : "When security is on, only commandline super user or viewpoint could create policies. The user does not have the permission to run UPDATE_JOB_PERMISSIONS command" }