|
| 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