SAP Sponsorships Engine Security Webservices API

URL: /api/restsecurity/ownership

Description:

The service obtains or changes the ownership of object, or obtains or changes access control list (ACL) properties of an object.


Change Ownership
Request Method: PUT /{objectType}/{typeRelativeObjectId}
Output format: a JSON document of the following format
{ "responseStatus": "true", "responseMessage": "Ownership changed successfully"}
Parameter (path and body):
typeRelativeObjectId
Unique Object id.
objectType
Object type represents the type of object to change the ownership.
groupId
GroupId to assign given group to ownership of object object. If the property is missing in the body, the group ownership is not touched. If it is null, the group ownership is reset to null.
username
Username to search the user in order to attach it with given Object ownership. If the property is missing in the body, the user ownership is not touched. If it is null, the user ownership is reset to null.
Example: curl -X POST -d '{ "groupId":"admin-tenant", "username":"admin" }' -H 'Content-type: application/json' "http://admin:admin@127.0.0.1:8888/security/api/restsecurity/ownership/USER_GROUP/427ebd42-ac69-4f74-a171-376d9bea9457"
Will provide a JSON document as explained above.
Request Method: GET /{objectType}/{typeRelativeObjectId}
Output format: a JSON document of the following format
{"objectType":"USER_GROUP","objectId":"82832851-07ac-47ee-9ddf-6f4f9eaa7823","groupId":"82832851-07ac-47ee-9ddf-6f4f9eaa7823","username":"admin"}
Parameter (path)
objectType
Object type represents the type of object to change the ownership.
objectId
Unique Object id.
Example: curl "http://127.0.0.1:8888/security/api/restsecurity/ownership/USER_GROUP/82832851-07ac-47ee-9ddf-6f4f9eaa7823"
Will provide a JSON document as explained above.
Request Method: GET /{objectType}?id={typeRelativeObjectIdPart1}&id={typeRelativeObjectIdPart2}&...
Output format: a JSON document of the following format
{"objectType":"USER_GROUP","objectId":"82832851-07ac-47ee-9ddf-6f4f9eaa7823","groupId":"82832851-07ac-47ee-9ddf-6f4f9eaa7823","username":"admin"}
Parameter (path)
objectType
Object type represents the type of object to change the ownership.
id
Can be used multiple times, e.g., in order to encode a composite type-relative object ID such as they are used for objects of type TRACKED_RACE.
Example: curl "http://127.0.0.1:8888/security/api/restsecurity/ownership/TRACKED_RACE?id=Croatia%20Coast%20Cup%202019%20-%20ORC%20with%20Spinnaker&id=Race%201%20-%20ORC%20mit%20Spi"
Will provide a JSON document as explained above.
Request Method: GET /{objectType}/{typeRelativeObjectId}/acl
Output format: a JSON document of the following format
{"objectType":"USER_GROUP","objectId":"82832851-07ac-47ee-9ddf-6f4f9eaa7823","displayName": null,"acl":[{"groupId":null,"actions":["READ","!DELETE"]},{"groupId":"82832851-07ac-47ee-9ddf-6f4f9eaa7823","actions":["READ","!UPDATE"]}]}
Parameter (path)
objectType
Object type represents the type of object to request the ACL information for
objectId
Unique Object id.
Example: curl -i -X GET "http://admin:admin@127.0.0.1:8888/security/api/restsecurity/ownership/USER_GROUP/82832851-07ac-47ee-9ddf-6f4f9eaa7823/acl"
Will provide a JSON document as explained above.
Request Method: PUT /{objectType}/{typeRelativeObjectId}/acl
Output format: a JSON document of the following format
{ "responseStatus": "true", "responseMessage": "Ownership changed successfully"}
Parameter (path, body)
objectType
Object type represents the type of object to request the ACL information for
objectId
Unique Object id.
The body must contain a document as the one returned by the GET method, only that the objectType and objectId fields are not required in the body and will be ignored as these parameters are expected to be provided in the path.
Example: curl -i -X PUT -H 'Content-Type: application/json' -d '{"objectType":"USER_GROUP","objectId":"82832851-07ac-47ee-9ddf-6f4f9eaa7823","displayName":"The Admin Tenant ACL","acl":[{"groupId":null,"actions":["READ","!UPDATE"]},{"groupId":"82832851-07ac-47ee-9ddf-6f4f9eaa7823","actions":["READ","!DELETE"]}]}' "http://admin:admin@127.0.0.1:8888/security/api/restsecurity/ownership/USER_GROUP/82832851-07ac-47ee-9ddf-6f4f9eaa7823/acl"
Will provide a JSON document as explained above.