Skip to content

Commit 032dca3

Browse files
author
AlbaAliu
committed
rest contract for securitysettings endpoint for metadata security based on entity type
1 parent e641a35 commit 032dca3

File tree

2 files changed

+65
-0
lines changed

2 files changed

+65
-0
lines changed

endpoints.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
* [/api/core/epersons](epersons.md)
1717
* /api/core/groups
1818
* [/api/core/{model}/search](search-rels.md)
19+
* [/api/core/groups/securitysettings/<entityType>](securitysettings-endpoint.md)
1920
* [/api/authn/login](authentication.md#Login)
2021
* [/api/authn/logout](authentication.md#Logout)
2122
* [/api/authn/status](authentication.md#Status)

securitysettings-endpoint.md

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# Security Settings Endpoints
2+
[Back to the list of all defined endpoints](endpoints.md)
3+
4+
DSpace has functionality to show or hide the metadata related with an item in order to manage the security related with
5+
this item. DSpace, also offers to the user the possible levels of security, to define for each metadata related with an
6+
entity type. These levels are configured in configuration files and returned to che client by an endpoint, based on the
7+
entity type requested. This contract describes this endpoint.
8+
9+
## Security Settings Endpoint
10+
11+
**GET /api/core/securitysettings/<EntityType>
12+
13+
This endpoint will list all (REST supported) configurations defined in `dspace/config/modules/metadata-security.cfg`,
14+
based on an entity type. The configuration settings entries are embedded with a metadataSecurityDefault,
15+
metadataCustomSecurity and a self link, where metadataSecurityDefault is the fallback level of security, or the level of
16+
security for an EntityType, metadataCustomSecurity are all the configuration levels of the metadatas related with an
17+
EntityType.
18+
19+
The JSON response document is as follows
20+
21+
```json
22+
{
23+
"_embedded": {
24+
"id": "securitysetting",
25+
"type": "securitysetting",
26+
"metadataSecurityDefault": [
27+
2
28+
],
29+
"metadataCustomSecurity": {
30+
"dc.type": [
31+
1, 2
32+
],
33+
"dc.identifier.scopus": [
34+
1
35+
],
36+
"oairecerif.author.affiliation": [
37+
0, 1
38+
],
39+
"dc.identifier.isi": [
40+
1, 2
41+
],
42+
"dc.identifier.doi": [
43+
1
44+
]
45+
},
46+
"_links": {
47+
"self": {
48+
"href": "/api/core/securitysettings"
49+
}
50+
}
51+
}
52+
}
53+
54+
55+
```
56+
Attributes
57+
* metadataSecurityDefault: array with integers value of security configuration.
58+
* metadataCustomSecurity: a map with key value pairs, where key is the metadata name and value is an array with integers, representing the possible security configuration levels for that metadata.
59+
* type: string representing the type of the rest response.
60+
* id: string representing the type of the rest response.
61+
62+
Return codes:
63+
* 200 OK - if the operation succeed.
64+
* 401 Unauthorized - if user is not authenticated.

0 commit comments

Comments
 (0)