Users (v16.1)

http://github.com/org/folio/mod-users

Table of contents

mod-users API

This documents the API calls that can be made to query and manage users of the system

/users

Collection of user items.

GET /users

Return a list of users

GET /users
Query Parameters
  • query: (string)

    A query expressed as a CQL string (see dev.folio.org/reference/glossary#cql) using valid searchable fields. The first example below shows the general form of a full CQL query, but those fields might not be relevant in this context.

    Example:

    (username=="ab*" or personal.firstName=="ab*" or personal.lastName=="ab*") and active=="true" sortby personal.lastName personal.firstName barcode
    
    active=true sortBy username
    
  • totalRecords: (string - default: auto - pattern: exact|estimated|none|auto)

    How to calculate the totalRecords property. "exact" for the correct number, "estimated" for an estimation, "auto" to automatically select "exact" or "estimated", "none" for suppressing the totalRecords property. For details see https://github.com/folio-org/raml-module-builder#estimated-totalrecords

    Example:

    none
  • offset: (integer - default: 0 - minimum: 0 - maximum: 2147483647)

    Skip over a number of elements by specifying an offset value for the query

    Example:

    0
  • limit: (integer - default: 10 - minimum: 0 - maximum: 2147483647)

    Limit the number of elements returned in the response

    Example:

    10

Response 200

Returns a list of user items

Body

Media type: application/json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "description": "Collection of users",
  "properties": {
    "users": {
      "description": "List of userdata items",
      "type": "array",
      "id": "usersData",
      "items": {
        "type": "object",
        "$schema": "http://json-schema.org/draft-04/schema#",
        "title": "User Schema",
        "description": "A user",
        "javaName": "User",
        "properties": {
          "username": {
            "description": "A unique name belonging to a user. Typically used for login",
            "type": "string"
          },
          "id": {
            "description": "A globally unique (UUID) identifier for the user",
            "type": "string"
          },
          "externalSystemId": {
            "description": "A unique ID that corresponds to an external authority",
            "type": "string"
          },
          "barcode": {
            "description": "The unique library barcode for this user",
            "type": "string"
          },
          "active": {
            "description": "A flag to determine if the user's account is effective and not expired. The tenant configuration can require the user to be active for login. Active is different from the loan patron block",
            "type": "boolean"
          },
          "type": {
            "description": "The class of user like staff or patron; this is different from patronGroup; it can store shadow, system user and dcb types also",
            "type": "string"
          },
          "patronGroup": {
            "description": "A UUID corresponding to the group the user belongs to, see /groups API, example groups are undergraduate and faculty; loan rules, patron blocks, fees/fines and expiration days can use the patron group",
            "type": "string",
            "$schema": "http://json-schema.org/draft-04/schema#",
            "id": "uuid.schema",
            "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}$"
          },
          "departments": {
            "description": "A list of UUIDs corresponding to the departments the user belongs to, see /departments API",
            "type": "array",
            "uniqueItems": true,
            "items": {
              "type": "string",
              "$schema": "http://json-schema.org/draft-04/schema#",
              "id": "uuid.schema",
              "description": "A universally unique identifier (UUID), this is a 128-bit number used to identify a record and is shown in hex with dashes, for example 6312d172-f0cf-40f6-b27d-9fa8feaf332f; the UUID version must be from 1-5; see https://dev.folio.org/guides/uuids/",
              "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}$"
            }
          },
          "meta": {
            "description": "Deprecated",
            "type": "object"
          },
          "proxyFor": {
            "description": "Deprecated",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "personal": {
            "description": "Personal information about the user",
            "type": "object",
            "properties": {
              "pronouns": {
                "description": "The user's pronouns",
                "type": "string",
                "maxLength": 300
              },
              "lastName": {
                "description": "The user's surname",
                "type": "string"
              },
              "firstName": {
                "description": "The user's given name",
                "type": "string"
              },
              "middleName": {
                "description": "The user's middle name (if any)",
                "type": "string"
              },
              "preferredFirstName": {
                "description": "The user's preferred name",
                "type": "string"
              },
              "email": {
                "description": "The user's email address",
                "type": "string"
              },
              "phone": {
                "description": "The user's primary phone number",
                "type": "string"
              },
              "mobilePhone": {
                "description": "The user's mobile phone number",
                "type": "string"
              },
              "dateOfBirth": {
                "type": "string",
                "description": "The user's birth date",
                "format": "date-time"
              },
              "addresses": {
                "description": "Physical addresses associated with the user",
                "type": "array",
                "minItems": 0,
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "description": "A unique id for this address",
                      "type": "string"
                    },
                    "countryId": {
                      "description": "The country code for this address",
                      "type": "string"
                    },
                    "addressLine1": {
                      "description": "Address, Line 1",
                      "type": "string"
                    },
                    "addressLine2": {
                      "description": "Address, Line 2",
                      "type": "string"
                    },
                    "city": {
                      "description": "City name",
                      "type": "string"
                    },
                    "region": {
                      "description": "Region",
                      "type": "string"
                    },
                    "postalCode": {
                      "description": "Postal Code",
                      "type": "string"
                    },
                    "addressTypeId": {
                      "description": "A UUID that corresponds with an address type object",
                      "type": "string",
                      "$schema": "http://json-schema.org/draft-04/schema#",
                      "id": "uuid.schema",
                      "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}$"
                    },
                    "primaryAddress": {
                      "description": "Is this the user's primary address?",
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "addressTypeId"
                  ],
                  "additionalProperties": false
                }
              },
              "preferredContactTypeId": {
                "description": "Id of user's preferred contact type like Email, Mail or Text Message, see /addresstypes API",
                "type": "string"
              },
              "profilePictureLink": {
                "description": "Link to the profile picture, or only the id of the /users/profile-picture entry",
                "type": "string",
                "format": "uri"
              }
            },
            "additionalProperties": false,
            "required": [
              "lastName"
            ]
          },
          "enrollmentDate": {
            "description": "The date in which the user joined the organization",
            "type": "string",
            "format": "date-time"
          },
          "expirationDate": {
            "description": "The date for when the user becomes inactive",
            "type": "string",
            "format": "date-time"
          },
          "createdDate": {
            "description": "Deprecated",
            "type": "string",
            "format": "date-time"
          },
          "updatedDate": {
            "description": "Deprecated",
            "type": "string",
            "format": "date-time"
          },
          "metadata": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-04/schema#",
            "id": "metadata.schema",
            "title": "Metadata Schema",
            "description": "Metadata about creation and changes to records, provided by the server (client should not provide)",
            "properties": {
              "createdDate": {
                "description": "Date and time when the record was created",
                "type": "string",
                "format": "date-time"
              },
              "createdByUserId": {
                "description": "ID of the user who created the record (when available)",
                "type": "string",
                "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
              },
              "createdByUsername": {
                "description": "Username of the user who created the record (when available)",
                "type": "string"
              },
              "updatedDate": {
                "description": "Date and time when the record was last updated",
                "type": "string",
                "format": "date-time"
              },
              "updatedByUserId": {
                "description": "ID of the user who last updated the record (when available)",
                "type": "string",
                "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
              },
              "updatedByUsername": {
                "description": "Username of the user who last updated the record (when available)",
                "type": "string"
              }
            },
            "additionalProperties": false,
            "required": [
              "createdDate"
            ]
          },
          "tags": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-04/schema#",
            "id": "tags.schema",
            "title": "tags",
            "description": "List of simple tags that can be added to an object",
            "properties": {
              "tagList": {
                "description": "List of tags",
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            },
            "additionalProperties": false
          },
          "customFields": {
            "description": "Object that contains custom field",
            "type": "object",
            "additionalProperties": true
          },
          "preferredEmailCommunication": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "Support",
                "Programs",
                "Services"
              ]
            },
            "maxItems": 3,
            "uniqueItems": true,
            "description": "Preferred email communication types"
          }
        },
        "additionalProperties": false
      }
    },
    "totalRecords": {
      "type": "integer",
      "description": "Estimated or exact total number of records, see https://github.com/folio-org/raml-module-builder#estimated-totalrecords for details"
    },
    "resultInfo": {
      "readonly": true,
      "$schema": "http://json-schema.org/draft-04/schema#",
      "id": "resultInfo.schema",
      "description": "Faceting of result sets",
      "type": "object",
      "properties": {
        "totalRecords": {
          "type": "integer",
          "description": "Estimated or exact total number of records"
        },
        "totalRecordsEstimated": {
          "type": "boolean",
          "description": "True if totalRecords is an estimation, false if it is the exact number"
        },
        "totalRecordsRounded": {
          "type": "integer",
          "description": "The rounded value of totalRecords if totalRecords is an estimation"
        },
        "responseTime": {
          "type": "number",
          "description": "Response time"
        },
        "facets": {
          "type": "array",
          "description": "Array of facets",
          "items": {
            "type": "object",
            "description": "A facet",
            "properties": {
              "facetValues": {
                "type": "array",
                "description": "Array of facet values",
                "items": {
                  "type": "object",
                  "description": "A facet value",
                  "properties": {
                    "count": {
                      "type": "integer",
                      "description": "Count of facet values"
                    },
                    "value": {
                      "description": "Value Object"
                    }
                  }
                },
                "additionalProperties": false
              },
              "type": {
                "type": "string",
                "description": "Type of facet"
              }
            },
            "additionalProperties": false
          }
        },
        "diagnostics": {
          "type": "array",
          "description": "Array of diagnostic information",
          "items": {
            "type": "object",
            "description": "Diagnostic information",
            "properties": {
              "source": {
                "type": "string",
                "description": "Source reporting the diagnostic information"
              },
              "code": {
                "type": "string",
                "description": "Diagnostic Code"
              },
              "message": {
                "type": "string",
                "description": "Diagnostic Message"
              },
              "module": {
                "type": "string",
                "description": "Module reporting diagnostic information"
              },
              "recordCount": {
                "type": "integer",
                "description": "Record Count for diagnostics"
              },
              "query": {
                "type": "string",
                "description": "CQL Query associated with results"
              }
            }
          }
        }
      },
      "additionalProperties": false
    }
  },
  "required": [
    "users",
    "totalRecords"
  ]
}

Example:

{
  "users": [
    {
      "username": "jhandey",
      "id": "7261ecaae3a74dc68b468e12a70b1aec",
      "active": true,
      "patronGroup": "4bb563d9-3f9d-4e1e-8d1d-04e75666d68f",
      "meta": {
        "creation_date": "2016-11-05T0723",
        "last_login_date": ""
      },
      "personal": {
        "lastName": "Handey",
        "firstName": "Jack",
        "middleName": "Michael",
        "dateOfBirth": "1965-07-08T00:00:01Z",
        "phone": "+1 (212) 567-8912",
        "mobilePhone": "+1 (212) 678-9123",
        "email": "jhandey@biglibrary.org"
      }
    }
  ],
  "totalRecords": 1
}

Response 400

Bad request, e.g. malformed request body or query parameter. Details of the error (e.g. name of the parameter or line/character number with malformed data) provided in the response.

Body

Media type: text/plain

Type: any

Example:

unable to list users -- malformed parameter 'query', syntax error at column 6

Response 401

Not authorized to perform requested action

Body

Media type: text/plain

Type: any

Example:

unable to list users -- unauthorized

Response 500

Internal server error, e.g. due to misconfiguration

Body

Media type: text/plain

Type: any

Example:

internal server error, contact administrator

POST /users

Create a user. Before creating the user you need to create a permission record for the user using the POST /perms/users API; the permissions list may be empty.

POST /users
Body

Media type: application/json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "title": "User Schema",
  "description": "A user",
  "javaName": "User",
  "type": "object",
  "properties": {
    "username": {
      "description": "A unique name belonging to a user. Typically used for login",
      "type": "string"
    },
    "id": {
      "description": "A globally unique (UUID) identifier for the user",
      "type": "string"
    },
    "externalSystemId": {
      "description": "A unique ID that corresponds to an external authority",
      "type": "string"
    },
    "barcode": {
      "description": "The unique library barcode for this user",
      "type": "string"
    },
    "active": {
      "description": "A flag to determine if the user's account is effective and not expired. The tenant configuration can require the user to be active for login. Active is different from the loan patron block",
      "type": "boolean"
    },
    "type": {
      "description": "The class of user like staff or patron; this is different from patronGroup; it can store shadow, system user and dcb types also",
      "type": "string"
    },
    "patronGroup": {
      "description": "A UUID corresponding to the group the user belongs to, see /groups API, example groups are undergraduate and faculty; loan rules, patron blocks, fees/fines and expiration days can use the patron group",
      "type": "string",
      "$schema": "http://json-schema.org/draft-04/schema#",
      "id": "uuid.schema",
      "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}$"
    },
    "departments": {
      "description": "A list of UUIDs corresponding to the departments the user belongs to, see /departments API",
      "type": "array",
      "uniqueItems": true,
      "items": {
        "type": "string",
        "$schema": "http://json-schema.org/draft-04/schema#",
        "id": "uuid.schema",
        "description": "A universally unique identifier (UUID), this is a 128-bit number used to identify a record and is shown in hex with dashes, for example 6312d172-f0cf-40f6-b27d-9fa8feaf332f; the UUID version must be from 1-5; see https://dev.folio.org/guides/uuids/",
        "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}$"
      }
    },
    "meta": {
      "description": "Deprecated",
      "type": "object"
    },
    "proxyFor": {
      "description": "Deprecated",
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "personal": {
      "description": "Personal information about the user",
      "type": "object",
      "properties": {
        "pronouns": {
          "description": "The user's pronouns",
          "type": "string",
          "maxLength": 300
        },
        "lastName": {
          "description": "The user's surname",
          "type": "string"
        },
        "firstName": {
          "description": "The user's given name",
          "type": "string"
        },
        "middleName": {
          "description": "The user's middle name (if any)",
          "type": "string"
        },
        "preferredFirstName": {
          "description": "The user's preferred name",
          "type": "string"
        },
        "email": {
          "description": "The user's email address",
          "type": "string"
        },
        "phone": {
          "description": "The user's primary phone number",
          "type": "string"
        },
        "mobilePhone": {
          "description": "The user's mobile phone number",
          "type": "string"
        },
        "dateOfBirth": {
          "type": "string",
          "description": "The user's birth date",
          "format": "date-time"
        },
        "addresses": {
          "description": "Physical addresses associated with the user",
          "type": "array",
          "minItems": 0,
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "description": "A unique id for this address",
                "type": "string"
              },
              "countryId": {
                "description": "The country code for this address",
                "type": "string"
              },
              "addressLine1": {
                "description": "Address, Line 1",
                "type": "string"
              },
              "addressLine2": {
                "description": "Address, Line 2",
                "type": "string"
              },
              "city": {
                "description": "City name",
                "type": "string"
              },
              "region": {
                "description": "Region",
                "type": "string"
              },
              "postalCode": {
                "description": "Postal Code",
                "type": "string"
              },
              "addressTypeId": {
                "description": "A UUID that corresponds with an address type object",
                "type": "string",
                "$schema": "http://json-schema.org/draft-04/schema#",
                "id": "uuid.schema",
                "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}$"
              },
              "primaryAddress": {
                "description": "Is this the user's primary address?",
                "type": "boolean"
              }
            },
            "required": [
              "addressTypeId"
            ],
            "additionalProperties": false
          }
        },
        "preferredContactTypeId": {
          "description": "Id of user's preferred contact type like Email, Mail or Text Message, see /addresstypes API",
          "type": "string"
        },
        "profilePictureLink": {
          "description": "Link to the profile picture, or only the id of the /users/profile-picture entry",
          "type": "string",
          "format": "uri"
        }
      },
      "additionalProperties": false,
      "required": [
        "lastName"
      ]
    },
    "enrollmentDate": {
      "description": "The date in which the user joined the organization",
      "type": "string",
      "format": "date-time"
    },
    "expirationDate": {
      "description": "The date for when the user becomes inactive",
      "type": "string",
      "format": "date-time"
    },
    "createdDate": {
      "description": "Deprecated",
      "type": "string",
      "format": "date-time"
    },
    "updatedDate": {
      "description": "Deprecated",
      "type": "string",
      "format": "date-time"
    },
    "metadata": {
      "type": "object",
      "$schema": "http://json-schema.org/draft-04/schema#",
      "id": "metadata.schema",
      "title": "Metadata Schema",
      "description": "Metadata about creation and changes to records, provided by the server (client should not provide)",
      "properties": {
        "createdDate": {
          "description": "Date and time when the record was created",
          "type": "string",
          "format": "date-time"
        },
        "createdByUserId": {
          "description": "ID of the user who created the record (when available)",
          "type": "string",
          "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
        },
        "createdByUsername": {
          "description": "Username of the user who created the record (when available)",
          "type": "string"
        },
        "updatedDate": {
          "description": "Date and time when the record was last updated",
          "type": "string",
          "format": "date-time"
        },
        "updatedByUserId": {
          "description": "ID of the user who last updated the record (when available)",
          "type": "string",
          "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
        },
        "updatedByUsername": {
          "description": "Username of the user who last updated the record (when available)",
          "type": "string"
        }
      },
      "additionalProperties": false,
      "required": [
        "createdDate"
      ]
    },
    "tags": {
      "type": "object",
      "$schema": "http://json-schema.org/draft-04/schema#",
      "id": "tags.schema",
      "title": "tags",
      "description": "List of simple tags that can be added to an object",
      "properties": {
        "tagList": {
          "description": "List of tags",
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      },
      "additionalProperties": false
    },
    "customFields": {
      "description": "Object that contains custom field",
      "type": "object",
      "additionalProperties": true
    },
    "preferredEmailCommunication": {
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "Support",
          "Programs",
          "Services"
        ]
      },
      "maxItems": 3,
      "uniqueItems": true,
      "description": "Preferred email communication types"
    }
  },
  "additionalProperties": false
}

Example:

{
  "username": "jhandey",
  "id": "7261ecaae3a74dc68b468e12a70b1aec",
  "active": true,
  "type": "patron",
  "patronGroup": "4bb563d9-3f9d-4e1e-8d1d-04e75666d68f",
  "meta": {
    "creation_date": "2016-11-05T0723",
    "last_login_date": ""
  },
  "personal": {
    "lastName": "Handey",
    "firstName": "Jack",
    "preferredFirstName": "Jackie",
    "email": "jhandey@biglibrary.org",
    "phone": "2125551212"
  }
}

Response 201

Returns a newly created item, with server-controlled fields like 'id' populated

Headers
  • Location: required (string)

    URI to the created user item

Body

Media type: application/json

Type: any

Example:

{
  "username": "jhandey",
  "id": "7261ecaae3a74dc68b468e12a70b1aec",
  "active": true,
  "type": "patron",
  "patronGroup": "4bb563d9-3f9d-4e1e-8d1d-04e75666d68f",
  "meta": {
    "creation_date": "2016-11-05T0723",
    "last_login_date": ""
  },
  "personal": {
    "lastName": "Handey",
    "firstName": "Jack",
    "preferredFirstName": "Jackie",
    "email": "jhandey@biglibrary.org",
    "phone": "2125551212"
  }
}

Response 400

Bad request, e.g. malformed request body or query parameter. Details of the error (e.g. name of the parameter or line/character number with malformed data) provided in the response.

Body

Media type: text/plain

Type: any

Example:

"unable to add user -- malformed JSON at 13:3"

Response 401

Not authorized to perform requested action

Body

Media type: text/plain

Type: any

Example:

unable to create users -- unauthorized

Response 422

Validation errors

Body

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"
        }
      ]
    }
  ]
}

Response 500

Internal server error, e.g. due to misconfiguration

Body

Media type: text/plain

Type: any

Example:

Internal server error, contact administrator

DELETE /users

Delete a collection of users selected by a CQL query; this doesn't delete proxyFor records that reference them

DELETE /users
Query Parameters
  • query: (string)

    A query expressed as a CQL string (see dev.folio.org/reference/glossary#cql) using valid searchable fields. The first example below shows the general form of a full CQL query, but those fields might not be relevant in this context.

    CQL query

    Example:

    (username=="ab*" or personal.firstName=="ab*" or personal.lastName=="ab*") and active=="true" sortby personal.lastName personal.firstName barcode
    
    active==false
    

Response 204

All selected users deleted

Response 400

Bad request

Body

Media type: text/plain

Type: any

Example:

Invalid CQL syntax

Response 500

Internal server error, e.g. due to misconfiguration

Body

Media type: text/plain

Type: any

Example:

Internal server error, contact administrator

GET /users/{userId}

Get a single user

GET /users/{userId}
URI Parameters
  • userId: required (string)

Response 200

Returns item with a given ID

Body

Media type: application/json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "title": "User Schema",
  "description": "A user",
  "javaName": "User",
  "type": "object",
  "properties": {
    "username": {
      "description": "A unique name belonging to a user. Typically used for login",
      "type": "string"
    },
    "id": {
      "description": "A globally unique (UUID) identifier for the user",
      "type": "string"
    },
    "externalSystemId": {
      "description": "A unique ID that corresponds to an external authority",
      "type": "string"
    },
    "barcode": {
      "description": "The unique library barcode for this user",
      "type": "string"
    },
    "active": {
      "description": "A flag to determine if the user's account is effective and not expired. The tenant configuration can require the user to be active for login. Active is different from the loan patron block",
      "type": "boolean"
    },
    "type": {
      "description": "The class of user like staff or patron; this is different from patronGroup; it can store shadow, system user and dcb types also",
      "type": "string"
    },
    "patronGroup": {
      "description": "A UUID corresponding to the group the user belongs to, see /groups API, example groups are undergraduate and faculty; loan rules, patron blocks, fees/fines and expiration days can use the patron group",
      "type": "string",
      "$schema": "http://json-schema.org/draft-04/schema#",
      "id": "uuid.schema",
      "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}$"
    },
    "departments": {
      "description": "A list of UUIDs corresponding to the departments the user belongs to, see /departments API",
      "type": "array",
      "uniqueItems": true,
      "items": {
        "type": "string",
        "$schema": "http://json-schema.org/draft-04/schema#",
        "id": "uuid.schema",
        "description": "A universally unique identifier (UUID), this is a 128-bit number used to identify a record and is shown in hex with dashes, for example 6312d172-f0cf-40f6-b27d-9fa8feaf332f; the UUID version must be from 1-5; see https://dev.folio.org/guides/uuids/",
        "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}$"
      }
    },
    "meta": {
      "description": "Deprecated",
      "type": "object"
    },
    "proxyFor": {
      "description": "Deprecated",
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "personal": {
      "description": "Personal information about the user",
      "type": "object",
      "properties": {
        "pronouns": {
          "description": "The user's pronouns",
          "type": "string",
          "maxLength": 300
        },
        "lastName": {
          "description": "The user's surname",
          "type": "string"
        },
        "firstName": {
          "description": "The user's given name",
          "type": "string"
        },
        "middleName": {
          "description": "The user's middle name (if any)",
          "type": "string"
        },
        "preferredFirstName": {
          "description": "The user's preferred name",
          "type": "string"
        },
        "email": {
          "description": "The user's email address",
          "type": "string"
        },
        "phone": {
          "description": "The user's primary phone number",
          "type": "string"
        },
        "mobilePhone": {
          "description": "The user's mobile phone number",
          "type": "string"
        },
        "dateOfBirth": {
          "type": "string",
          "description": "The user's birth date",
          "format": "date-time"
        },
        "addresses": {
          "description": "Physical addresses associated with the user",
          "type": "array",
          "minItems": 0,
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "description": "A unique id for this address",
                "type": "string"
              },
              "countryId": {
                "description": "The country code for this address",
                "type": "string"
              },
              "addressLine1": {
                "description": "Address, Line 1",
                "type": "string"
              },
              "addressLine2": {
                "description": "Address, Line 2",
                "type": "string"
              },
              "city": {
                "description": "City name",
                "type": "string"
              },
              "region": {
                "description": "Region",
                "type": "string"
              },
              "postalCode": {
                "description": "Postal Code",
                "type": "string"
              },
              "addressTypeId": {
                "description": "A UUID that corresponds with an address type object",
                "type": "string",
                "$schema": "http://json-schema.org/draft-04/schema#",
                "id": "uuid.schema",
                "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}$"
              },
              "primaryAddress": {
                "description": "Is this the user's primary address?",
                "type": "boolean"
              }
            },
            "required": [
              "addressTypeId"
            ],
            "additionalProperties": false
          }
        },
        "preferredContactTypeId": {
          "description": "Id of user's preferred contact type like Email, Mail or Text Message, see /addresstypes API",
          "type": "string"
        },
        "profilePictureLink": {
          "description": "Link to the profile picture, or only the id of the /users/profile-picture entry",
          "type": "string",
          "format": "uri"
        }
      },
      "additionalProperties": false,
      "required": [
        "lastName"
      ]
    },
    "enrollmentDate": {
      "description": "The date in which the user joined the organization",
      "type": "string",
      "format": "date-time"
    },
    "expirationDate": {
      "description": "The date for when the user becomes inactive",
      "type": "string",
      "format": "date-time"
    },
    "createdDate": {
      "description": "Deprecated",
      "type": "string",
      "format": "date-time"
    },
    "updatedDate": {
      "description": "Deprecated",
      "type": "string",
      "format": "date-time"
    },
    "metadata": {
      "type": "object",
      "$schema": "http://json-schema.org/draft-04/schema#",
      "id": "metadata.schema",
      "title": "Metadata Schema",
      "description": "Metadata about creation and changes to records, provided by the server (client should not provide)",
      "properties": {
        "createdDate": {
          "description": "Date and time when the record was created",
          "type": "string",
          "format": "date-time"
        },
        "createdByUserId": {
          "description": "ID of the user who created the record (when available)",
          "type": "string",
          "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
        },
        "createdByUsername": {
          "description": "Username of the user who created the record (when available)",
          "type": "string"
        },
        "updatedDate": {
          "description": "Date and time when the record was last updated",
          "type": "string",
          "format": "date-time"
        },
        "updatedByUserId": {
          "description": "ID of the user who last updated the record (when available)",
          "type": "string",
          "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
        },
        "updatedByUsername": {
          "description": "Username of the user who last updated the record (when available)",
          "type": "string"
        }
      },
      "additionalProperties": false,
      "required": [
        "createdDate"
      ]
    },
    "tags": {
      "type": "object",
      "$schema": "http://json-schema.org/draft-04/schema#",
      "id": "tags.schema",
      "title": "tags",
      "description": "List of simple tags that can be added to an object",
      "properties": {
        "tagList": {
          "description": "List of tags",
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      },
      "additionalProperties": false
    },
    "customFields": {
      "description": "Object that contains custom field",
      "type": "object",
      "additionalProperties": true
    },
    "preferredEmailCommunication": {
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "Support",
          "Programs",
          "Services"
        ]
      },
      "maxItems": 3,
      "uniqueItems": true,
      "description": "Preferred email communication types"
    }
  },
  "additionalProperties": false
}

Example:

{
  "username": "jhandey",
  "id": "7261ecaae3a74dc68b468e12a70b1aec",
  "active": true,
  "type": "patron",
  "patronGroup": "4bb563d9-3f9d-4e1e-8d1d-04e75666d68f",
  "meta": {
    "creation_date": "2016-11-05T0723",
    "last_login_date": ""
  },
  "personal": {
    "lastName": "Handey",
    "firstName": "Jack",
    "preferredFirstName": "Jackie",
    "email": "jhandey@biglibrary.org",
    "phone": "2125551212"
  }
}

Response 404

Item with a given ID not found

Body

Media type: text/plain

Type: any

Example:

"user not found"

Response 500

Internal server error, e.g. due to misconfiguration

Body

Media type: text/plain

Type: any

Example:

internal server error, contact administrator

DELETE /users/{userId}

Delete user item with given {userId}

DELETE /users/{userId}
URI Parameters
  • userId: required (string)

Response 204

Item deleted successfully

Response 400

Bad request, e.g. malformed request body or query parameter. Details of the error (e.g. name of the parameter or line/character number with malformed data) provided in the response.

Body

Media type: text/plain

Type: any

Example:

"unable to delete user -- constraint violation"

Response 404

Item with a given ID not found

Body

Media type: text/plain

Type: any

Example:

"user not found"

Response 500

Internal server error, e.g. due to misconfiguration

Body

Media type: text/plain

Type: any

Example:

Internal server error, contact administrator

PUT /users/{userId}

Update user item with given {userId}

PUT /users/{userId}
URI Parameters
  • userId: required (string)
Body

Media type: application/json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "title": "User Schema",
  "description": "A user",
  "javaName": "User",
  "type": "object",
  "properties": {
    "username": {
      "description": "A unique name belonging to a user. Typically used for login",
      "type": "string"
    },
    "id": {
      "description": "A globally unique (UUID) identifier for the user",
      "type": "string"
    },
    "externalSystemId": {
      "description": "A unique ID that corresponds to an external authority",
      "type": "string"
    },
    "barcode": {
      "description": "The unique library barcode for this user",
      "type": "string"
    },
    "active": {
      "description": "A flag to determine if the user's account is effective and not expired. The tenant configuration can require the user to be active for login. Active is different from the loan patron block",
      "type": "boolean"
    },
    "type": {
      "description": "The class of user like staff or patron; this is different from patronGroup; it can store shadow, system user and dcb types also",
      "type": "string"
    },
    "patronGroup": {
      "description": "A UUID corresponding to the group the user belongs to, see /groups API, example groups are undergraduate and faculty; loan rules, patron blocks, fees/fines and expiration days can use the patron group",
      "type": "string",
      "$schema": "http://json-schema.org/draft-04/schema#",
      "id": "uuid.schema",
      "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}$"
    },
    "departments": {
      "description": "A list of UUIDs corresponding to the departments the user belongs to, see /departments API",
      "type": "array",
      "uniqueItems": true,
      "items": {
        "type": "string",
        "$schema": "http://json-schema.org/draft-04/schema#",
        "id": "uuid.schema",
        "description": "A universally unique identifier (UUID), this is a 128-bit number used to identify a record and is shown in hex with dashes, for example 6312d172-f0cf-40f6-b27d-9fa8feaf332f; the UUID version must be from 1-5; see https://dev.folio.org/guides/uuids/",
        "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}$"
      }
    },
    "meta": {
      "description": "Deprecated",
      "type": "object"
    },
    "proxyFor": {
      "description": "Deprecated",
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "personal": {
      "description": "Personal information about the user",
      "type": "object",
      "properties": {
        "pronouns": {
          "description": "The user's pronouns",
          "type": "string",
          "maxLength": 300
        },
        "lastName": {
          "description": "The user's surname",
          "type": "string"
        },
        "firstName": {
          "description": "The user's given name",
          "type": "string"
        },
        "middleName": {
          "description": "The user's middle name (if any)",
          "type": "string"
        },
        "preferredFirstName": {
          "description": "The user's preferred name",
          "type": "string"
        },
        "email": {
          "description": "The user's email address",
          "type": "string"
        },
        "phone": {
          "description": "The user's primary phone number",
          "type": "string"
        },
        "mobilePhone": {
          "description": "The user's mobile phone number",
          "type": "string"
        },
        "dateOfBirth": {
          "type": "string",
          "description": "The user's birth date",
          "format": "date-time"
        },
        "addresses": {
          "description": "Physical addresses associated with the user",
          "type": "array",
          "minItems": 0,
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "description": "A unique id for this address",
                "type": "string"
              },
              "countryId": {
                "description": "The country code for this address",
                "type": "string"
              },
              "addressLine1": {
                "description": "Address, Line 1",
                "type": "string"
              },
              "addressLine2": {
                "description": "Address, Line 2",
                "type": "string"
              },
              "city": {
                "description": "City name",
                "type": "string"
              },
              "region": {
                "description": "Region",
                "type": "string"
              },
              "postalCode": {
                "description": "Postal Code",
                "type": "string"
              },
              "addressTypeId": {
                "description": "A UUID that corresponds with an address type object",
                "type": "string",
                "$schema": "http://json-schema.org/draft-04/schema#",
                "id": "uuid.schema",
                "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}$"
              },
              "primaryAddress": {
                "description": "Is this the user's primary address?",
                "type": "boolean"
              }
            },
            "required": [
              "addressTypeId"
            ],
            "additionalProperties": false
          }
        },
        "preferredContactTypeId": {
          "description": "Id of user's preferred contact type like Email, Mail or Text Message, see /addresstypes API",
          "type": "string"
        },
        "profilePictureLink": {
          "description": "Link to the profile picture, or only the id of the /users/profile-picture entry",
          "type": "string",
          "format": "uri"
        }
      },
      "additionalProperties": false,
      "required": [
        "lastName"
      ]
    },
    "enrollmentDate": {
      "description": "The date in which the user joined the organization",
      "type": "string",
      "format": "date-time"
    },
    "expirationDate": {
      "description": "The date for when the user becomes inactive",
      "type": "string",
      "format": "date-time"
    },
    "createdDate": {
      "description": "Deprecated",
      "type": "string",
      "format": "date-time"
    },
    "updatedDate": {
      "description": "Deprecated",
      "type": "string",
      "format": "date-time"
    },
    "metadata": {
      "type": "object",
      "$schema": "http://json-schema.org/draft-04/schema#",
      "id": "metadata.schema",
      "title": "Metadata Schema",
      "description": "Metadata about creation and changes to records, provided by the server (client should not provide)",
      "properties": {
        "createdDate": {
          "description": "Date and time when the record was created",
          "type": "string",
          "format": "date-time"
        },
        "createdByUserId": {
          "description": "ID of the user who created the record (when available)",
          "type": "string",
          "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
        },
        "createdByUsername": {
          "description": "Username of the user who created the record (when available)",
          "type": "string"
        },
        "updatedDate": {
          "description": "Date and time when the record was last updated",
          "type": "string",
          "format": "date-time"
        },
        "updatedByUserId": {
          "description": "ID of the user who last updated the record (when available)",
          "type": "string",
          "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
        },
        "updatedByUsername": {
          "description": "Username of the user who last updated the record (when available)",
          "type": "string"
        }
      },
      "additionalProperties": false,
      "required": [
        "createdDate"
      ]
    },
    "tags": {
      "type": "object",
      "$schema": "http://json-schema.org/draft-04/schema#",
      "id": "tags.schema",
      "title": "tags",
      "description": "List of simple tags that can be added to an object",
      "properties": {
        "tagList": {
          "description": "List of tags",
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      },
      "additionalProperties": false
    },
    "customFields": {
      "description": "Object that contains custom field",
      "type": "object",
      "additionalProperties": true
    },
    "preferredEmailCommunication": {
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "Support",
          "Programs",
          "Services"
        ]
      },
      "maxItems": 3,
      "uniqueItems": true,
      "description": "Preferred email communication types"
    }
  },
  "additionalProperties": false
}

Example:

{
  "username": "jhandey",
  "id": "7261ecaae3a74dc68b468e12a70b1aec",
  "active": true,
  "type": "patron",
  "patronGroup": "4bb563d9-3f9d-4e1e-8d1d-04e75666d68f",
  "meta": {
    "creation_date": "2016-11-05T0723",
    "last_login_date": ""
  },
  "personal": {
    "lastName": "Handey",
    "firstName": "Jack",
    "preferredFirstName": "Jackie",
    "email": "jhandey@biglibrary.org",
    "phone": "2125551212"
  }
}

Response 204

Item successfully updated

Response 400

Bad request, e.g. malformed request body or query parameter. Details of the error (e.g. name of the parameter or line/character number with malformed data) provided in the response.

Body

Media type: text/plain

Type: any

Example:

"unable to update user -- malformed JSON at 13:4"

Response 404

Item with a given ID not found

Body

Media type: text/plain

Type: any

Example:

"user not found"

Response 409

Optimistic locking version conflict

Body

Media type: text/plain

Type: any

Example:

version conflict

Response 500

Internal server error, e.g. due to misconfiguration

Body

Media type: text/plain

Type: any

Example:

internal server error, contact administrator

POST /users/expire/timer

Expire timer (timer event)

POST /users/expire/timer

Response 204

Expired ok

Response 400

User Error

Body

Media type: text/plain

Type: any

Response 500

Internal error

Body

Media type: text/plain

Type: any

POST /users/outbox/process

Read audit events from DB and send them to Kafka

POST /users/outbox/process

POST /users/profile-picture

Upload user profile picture

POST /users/profile-picture
Body

Media type: application/octet-stream

Type: any

Response 201

OK

Body

Media type: application/json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "title": "ProfilePicture",
  "description": "Profile picture",
  "type": "object",
  "properties": {
    "id": {
      "description": "uuid of profile picture, to be put into the personal.profilePictureLink field of the user record",
      "type": "string",
      "format": "uuid"
    },
    "profile_picture_blob": {
      "description": "byte array of image",
      "type": "string",
      "format": "base64"
    },
    "hmac": {
      "description": "Checksum of the profile picture",
      "type": "string",
      "format": "base64"
    }
  },
  "required": [
    "id",
    "profile_picture_blob"
  ]
}

Response 400

Bad request

Body

Media type: application/json

Type: any

Response 500

Internal server error

Body

Media type: application/json

Type: any

GET /users/profile-picture/{profileId}

GET /users/profile-picture/{profileId}
URI Parameters
  • profileId: required (string)

Response 200

Body

Media type: application/json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "title": "ProfilePicture",
  "description": "Profile picture",
  "type": "object",
  "properties": {
    "id": {
      "description": "uuid of profile picture, to be put into the personal.profilePictureLink field of the user record",
      "type": "string",
      "format": "uuid"
    },
    "profile_picture_blob": {
      "description": "byte array of image",
      "type": "string",
      "format": "base64"
    },
    "hmac": {
      "description": "Checksum of the profile picture",
      "type": "string",
      "format": "base64"
    }
  },
  "required": [
    "id",
    "profile_picture_blob"
  ]
}

Response 400

Bad request

Body

Media type: application/json

Type: any

Response 404

profile picture not found

Body

Media type: text/plain

Type: any

Example:

profile picture not found

PUT /users/profile-picture/{profileId}

update user profile picture

PUT /users/profile-picture/{profileId}
URI Parameters
  • profileId: required (string)
Body

Media type: application/octet-stream

Type: any

Response 200

Body

Media type: application/json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "title": "ProfilePicture",
  "description": "Profile picture",
  "type": "object",
  "properties": {
    "id": {
      "description": "uuid of profile picture, to be put into the personal.profilePictureLink field of the user record",
      "type": "string",
      "format": "uuid"
    },
    "profile_picture_blob": {
      "description": "byte array of image",
      "type": "string",
      "format": "base64"
    },
    "hmac": {
      "description": "Checksum of the profile picture",
      "type": "string",
      "format": "base64"
    }
  },
  "required": [
    "id",
    "profile_picture_blob"
  ]
}

Response 400

Bad request

Body

Media type: application/json

Type: any

Response 404

profile picture not found

Body

Media type: text/plain

Type: any

Example:

profile picture not found

Response 500

Internal server error

Body

Media type: application/json

Type: any

DELETE /users/profile-picture/{profileId}

delete user profile picture

DELETE /users/profile-picture/{profileId}
URI Parameters
  • profileId: required (string)

Response 204

profile picture deleted

Response 404

profile picture not found

Body

Media type: text/plain

Type: any

Example:

profile picture not found

Response 500

Internal server error

Body

Media type: application/json

Type: any

POST /users/profile-picture/cleanup

Remove unused profile picture from object and db storage

POST /users/profile-picture/cleanup

GET /users/configurations/entry

GET /users/configurations/entry

Response 200

Body

Media type: application/json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "A configuration type",
  "title": "Configuration Type Schema",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "UUID of configuration",
      "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
    },
    "configName": {
      "description": "Name of configuration",
      "type": "string"
    },
    "enabled": {
      "description": "Status of configuration",
      "type": "boolean",
      "default": false
    },
    "enabledObjectStorage": {
      "description": "Status of object storage configuration",
      "type": "boolean",
      "default": false
    },
    "encryptionKey": {
      "description": "Encryption key for encoding/decoding profile picture",
      "type": "string"
    },
    "maxFileSize": {
      "description": "Size of profile picture in MB",
      "type": "number"
    },
    "metadata": {
      "readonly": true,
      "$schema": "http://json-schema.org/draft-04/schema#",
      "id": "metadata.schema",
      "title": "Metadata Schema",
      "description": "Metadata about creation and changes to records, provided by the server (client should not provide)",
      "type": "object",
      "properties": {
        "createdDate": {
          "description": "Date and time when the record was created",
          "type": "string",
          "format": "date-time"
        },
        "createdByUserId": {
          "description": "ID of the user who created the record (when available)",
          "type": "string",
          "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
        },
        "createdByUsername": {
          "description": "Username of the user who created the record (when available)",
          "type": "string"
        },
        "updatedDate": {
          "description": "Date and time when the record was last updated",
          "type": "string",
          "format": "date-time"
        },
        "updatedByUserId": {
          "description": "ID of the user who last updated the record (when available)",
          "type": "string",
          "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
        },
        "updatedByUsername": {
          "description": "Username of the user who last updated the record (when available)",
          "type": "string"
        }
      },
      "additionalProperties": false,
      "required": [
        "createdDate"
      ]
    }
  },
  "additionalProperties": false,
  "required": [
    "configName"
  ]
}

Example:

{
    "id": "012510bd-db44-47f2-839d-2d72b28008f3",
    "configName": "PROFILE_PICTURE_CONFIG",
    "enabled": false,
    "enabledObjectStorage": false,
    "encryptionKey": "fgrdvbfgjhutyrdhvbcxzmturdhgtiok"
}

Response 400

Bad request

Body

Media type: text/plain

Type: any

Response 404

configuration not found

Body

Media type: text/plain

Type: any

Example:

configuration not found

Response 500

Internal server error, e.g. due to misconfiguration

Body

Media type: text/plain

Type: any

Example:

Internal server error, contact administrator

PUT /users/configurations/entry/{configId}

PUT /users/configurations/entry/{configId}
URI Parameters
  • configId: required (string)
Body

Media type: application/json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "A configuration type",
  "title": "Configuration Type Schema",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "UUID of configuration",
      "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
    },
    "configName": {
      "description": "Name of configuration",
      "type": "string"
    },
    "enabled": {
      "description": "Status of configuration",
      "type": "boolean",
      "default": false
    },
    "enabledObjectStorage": {
      "description": "Status of object storage configuration",
      "type": "boolean",
      "default": false
    },
    "encryptionKey": {
      "description": "Encryption key for encoding/decoding profile picture",
      "type": "string"
    },
    "maxFileSize": {
      "description": "Size of profile picture in MB",
      "type": "number"
    },
    "metadata": {
      "readonly": true,
      "$schema": "http://json-schema.org/draft-04/schema#",
      "id": "metadata.schema",
      "title": "Metadata Schema",
      "description": "Metadata about creation and changes to records, provided by the server (client should not provide)",
      "type": "object",
      "properties": {
        "createdDate": {
          "description": "Date and time when the record was created",
          "type": "string",
          "format": "date-time"
        },
        "createdByUserId": {
          "description": "ID of the user who created the record (when available)",
          "type": "string",
          "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
        },
        "createdByUsername": {
          "description": "Username of the user who created the record (when available)",
          "type": "string"
        },
        "updatedDate": {
          "description": "Date and time when the record was last updated",
          "type": "string",
          "format": "date-time"
        },
        "updatedByUserId": {
          "description": "ID of the user who last updated the record (when available)",
          "type": "string",
          "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
        },
        "updatedByUsername": {
          "description": "Username of the user who last updated the record (when available)",
          "type": "string"
        }
      },
      "additionalProperties": false,
      "required": [
        "createdDate"
      ]
    }
  },
  "additionalProperties": false,
  "required": [
    "configName"
  ]
}

Example:

{
    "id": "012510bd-db44-47f2-839d-2d72b28008f3",
    "configName": "PROFILE_PICTURE_CONFIG",
    "enabled": false,
    "enabledObjectStorage": false,
    "encryptionKey": "fgrdvbfgjhutyrdhvbcxzmturdhgtiok"
}

Response 204

configuration updated

Response 400

Bad request

Body

Media type: text/plain

Type: any

Response 404

configuration not found

Body

Media type: text/plain

Type: any

Example:

configuration not found

Response 500

Internal server error, e.g. due to misconfiguration

Body

Media type: text/plain

Type: any

Example:

Internal server error, contact administrator