http://github.com/org/folio/mod-users
Records that show the primary tenant for a user when doing single-sign-on
Collection of user-tenant items.
Return a list of user tenants
GET /user-tenants
Filter by user id
Example:
11484f66-5121-43ea-81e7-6d9e3711495f
Filter by user name
Example:
folio_user
Filter by tenant id
Example:
sfs000
Filter by email
Example:
test@mail.com
Filter by mobile number
Example:
12345676
Filter by mobile phone number
Example:
123456789
Filter by barcode
Example:
925162037753924
Filter by externalSystemId
Example:
945d62d8-702c-4ed1-a16b-83146a6d8eef
Query operation for searching
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
Skip over a number of elements by specifying an offset value for the query
Example:
0
Limit the number of elements returned in the response
Example:
10
Returns a list of user-tenant items
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"description": "Collection of primary tenant records",
"properties": {
"userTenants": {
"description": "List of primary tenant records",
"type": "array",
"id": "userTenants",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Primary tenant of a user used for single-sign-on",
"properties": {
"id": {
"description": "UUID of the user tenant",
"$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}$"
},
"userId": {
"description": "UUID 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}$"
},
"username": {
"description": "The user name",
"type": "string"
},
"tenantId": {
"description": "Primary tenant of the user for single-sign-on",
"type": "string"
},
"centralTenantId": {
"description": "Central tenant id in the consortium",
"type": "string"
},
"phoneNumber": {
"description": "The user's primary phone number",
"type": "string"
},
"mobilePhoneNumber": {
"description": "The user's mobile phone number",
"type": "string"
},
"email": {
"description": "The user's email address",
"type": "string"
},
"barcode": {
"description": "The barcode of the user's",
"type": "string"
},
"externalSystemId": {
"description": "The externalSystemId of the user's",
"type": "string"
},
"consortiumId": {
"description": "UUID of the consortiumId",
"$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}$"
}
},
"additionalProperties": false,
"required": [
"userId",
"tenantId"
]
}
},
"totalRecords": {
"type": "integer",
"description": "Estimated or exact total number of records, see https://github.com/folio-org/raml-module-builder#estimated-totalrecords for details"
}
},
"required": [
"userTenants",
"totalRecords"
]
}
Example:
{
"userTenants": [
{
"id": "0d6a9156-25b9-4bee-ab4d-dbb31afba0bd",
"userId": "11484f66-5121-43ea-81e7-6d9e3711495f",
"username": "folio_user",
"tenantId": "sfs000"
}
],
"totalRecords": 1
}
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.
Media type: text/plain
Type: any
Example:
unable to list user-tenants -- malformed parameter 'query', syntax error at column 6
Not authorized to perform requested action
Media type: text/plain
Type: any
Example:
unable to list user-tenants -- unauthorized
Internal server error
Media type: text/plain
Type: any
Example:
Internal server error
Create a user-tenant
POST /user-tenants
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Primary tenant of a user used for single-sign-on",
"type": "object",
"properties": {
"id": {
"description": "UUID of the user tenant",
"$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}$"
},
"userId": {
"description": "UUID 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}$"
},
"username": {
"description": "The user name",
"type": "string"
},
"tenantId": {
"description": "Primary tenant of the user for single-sign-on",
"type": "string"
},
"centralTenantId": {
"description": "Central tenant id in the consortium",
"type": "string"
},
"phoneNumber": {
"description": "The user's primary phone number",
"type": "string"
},
"mobilePhoneNumber": {
"description": "The user's mobile phone number",
"type": "string"
},
"email": {
"description": "The user's email address",
"type": "string"
},
"barcode": {
"description": "The barcode of the user's",
"type": "string"
},
"externalSystemId": {
"description": "The externalSystemId of the user's",
"type": "string"
},
"consortiumId": {
"description": "UUID of the consortiumId",
"$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}$"
}
},
"additionalProperties": false,
"required": [
"userId",
"tenantId"
]
}
Example:
{
"id": "0d6a9156-25b9-4bee-ab4d-dbb31afba0bd",
"userId": "11484f66-5121-43ea-81e7-6d9e3711495f",
"username": "folio_user",
"tenantId": "sfs000"
}
Returns only 201 status code without body
URI to the created user-tenant item
Media type: application/json
Type: any
Example:
{
"id": "0d6a9156-25b9-4bee-ab4d-dbb31afba0bd",
"userId": "11484f66-5121-43ea-81e7-6d9e3711495f",
"username": "folio_user",
"tenantId": "sfs000"
}
Bad request, e.g. malformed request body. Details of the error provided in the response.
Media type: text/plain
Type: any
Example:
"unable to add user-tenant -- malformed JSON at 13:3"
Not authorized to perform requested action
Media type: text/plain
Type: any
Example:
unable to create user-tenants -- unauthorized
Validation error, e.g. missing required field. Details of the error provided in the response.
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
Media type: text/plain
Type: any
Example:
Internal server error, contact administrator
Delete a user-tenant from member tenant. Deleting from the central tenant is forbidden.
DELETE /user-tenants
Filter by tenant id
Example:
sfs000
Successful deletion
Internal server error
Media type: text/plain
Type: any
Example:
Internal server error