http://localhost:9130
Replace the stored loan anonymization preferences of the users who deviate from the library policy
Replace all stored preferences: add or update the given users, remove all others
PUT /loan-anonymization-preference-storage/loan-anonymization-preferencesMedia type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "All users whose loan anonymization preference deviates from the library policy",
"type": "object",
"properties": {
"preferences": {
"description": "One entry per user, users who follow the library policy are not listed",
"type": "array",
"items": {
"description": "Loan anonymization preference of one user",
"type": "object",
"javaType": "org.folio.rest.jaxrs.model.UserLoanAnonymizationPreference",
"properties": {
"userId": {
"description": "ID of the user",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "uuid.schema",
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"
},
"preference": {
"description": "The user's loan anonymization preference",
"type": "string",
"enum": [
"asEarlyAsPossible",
"never"
]
}
},
"additionalProperties": false,
"required": [
"userId",
"preference"
]
}
}
},
"additionalProperties": false,
"required": [
"preferences"
]
}Preferences replaced
Validation errors
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "errors.schema",
"description": "A set of errors",
"type": "object",
"properties": {
"errors": {
"description": "List of errors",
"id": "errors",
"type": "array",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "error.schema",
"description": "An error",
"properties": {
"message": {
"type": "string",
"description": "Error message text"
},
"type": {
"type": "string",
"description": "Error message type"
},
"code": {
"type": "string",
"description": "Error message code"
},
"parameters": {
"description": "Error message parameters",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "parameters.schema",
"type": "array",
"items": {
"type": "object",
"properties": {
"key": {
"type": "string"
},
"value": {
"type": "string"
}
}
}
}
},
"required": [
"message"
]
}
},
"total_records": {
"description": "Total number of errors",
"type": "integer"
}
}
}Example:
{
"errors": [
{
"message": "may not be null",
"type": "1",
"code": "-1",
"parameters": [
{
"key": "moduleTo",
"value": "null"
}
]
}
]
}
Internal server error, e.g. due to misconfiguration
Media type: text/plain
Type: any
Example:
Internal server error, contact administrator