Create a GroupPolicy
A GroupPolicy resource type is a collection of roles that define the governance policy for entities interacting with SAP Health Data Services for FHIR.
The GroupPolicy stores the details of the referenced RolePermission. You must provide the RolePermission URL and version with the piped operator.
The GroupPolicy resource type has the following elements:
-
url - The mandatory element url indicates the canonical identifier for the GroupPolicy resource, represented as a URI.
-
version - The mandatory element version indicates the version of the GroupPolicy resource.
-
name - The mandatory element name indicates the name of the GroupPolicy resource.
-
status - The mandatory element status is of type Coding and consists of the following:
-
system - The CodeSystem is http://hl7.org/fhir/resource-status and the ValueSet binding is http://hl7.org/fhir/ValueSet/resource-status|4.0.1.
-
code - The code indicates the status of the resource.
-
display - The display indicates the text for the status code.
-
-
rolePermission - The mandatory element rolePermission indicates the canonical reference to the RolePermission.
HTTP Request
You can use an HTTP POST request to create a GroupPolicy resource:
POST [base]/GroupPolicy
Path Parameters
base: Service endpoint to interact with FHIR resources. For more information, see Service Endpoint.
Example
{
"resourceType": "GroupPolicy",
"url": "https://sap.com/healthcare/fhir/GroupPolicy/Developer",
"version": "1.0.0",
"name": "Example-Group-Policy",
"status": {
"system": "http://hl7.org/fhir/resource-status",
"code": "active",
"display": "active-en"
},
"description": "This policy define permissions to perform RESTful interactions on all resources",
"rolePermission": [
"https://sap.com/healthcare/fhir/RolePermission/Developer|1.0.0"
],
"publisher": "SAP SE",
"copyright": "© 2023 SAP SE or an SAP affiliate company. All rights reserved."
}
Administrators can't directly assign permissions to users. They can only assign a GroupPolicy.
HTTP Status Response Codes
{The following HTTP status response codes are returned for the create request:
|
HTTP Code |
Scenario |
Description |
|---|---|---|
|
201 |
Successful creation |
The GroupPolicy resource is successfully created. |
|
400 |
Bad Request |
Client error |
|
422 |
Unprocessable Entity |
Validation error. Returns 422 with corresponding error message in response body. |
|
404 |
No Data Found |
Authorization error. Returns 404 with no response body. |
|
500 |
Internal Server Error |
Server encountered an internal error. |
