foliolib.folio.api.consortia.UserTenants
- class foliolib.folio.api.consortia.UserTenants(tenant: str)
Bases:
foliolib.folio.FolioApiUser Tenant Association integration API
User Tenant Association integration API
Base class of the Folio API
- Parameters
tenant (str) – Tenant id
Methods
deleteusertenant(consortiumId, **kwargs)Delete User Tenant Associations for particular user id and tenant id
getusertenantbyassociationid(consortiumId, ...)GET /consortia/{consortiumId}/user-tenants/{associationId}getusertenants(consortiumId, **kwargs)User Tenant Associations
postusertenants(consortiumId, userTenant)User Tenant Associations
- deleteusertenant(consortiumId, **kwargs)
Delete User Tenant Associations for particular user id and tenant id
DELETE /consortia/{consortiumId}/user-tenants- Parameters
consortiumId (str) –
- Keyword Arguments
userId (str) –
tenantId (str) – The ID of the tenant
- Raises
OkapiRequestError – Bad request
OkapiRequestNotFound – Resource not found
OkapiRequestFatalError – Internal server error
- getusertenantbyassociationid(consortiumId, associationId)
GET /consortia/{consortiumId}/user-tenants/{associationId}- Parameters
consortiumId (str) –
associationId (str) –
- Returns
See Schema below.
- Return type
dict
- Raises
OkapiRequestError – Bad request
OkapiRequestNotFound – Resource not found
OkapiRequestFatalError – Internal server error
Schema
{ "description": "A JSON schema for the User Tenant", "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "userId": { "type": "string", "format": "uuid" }, "username": { "type": "string" }, "tenantId": { "type": "string" }, "tenantName": { "type": "string" }, "isPrimary": { "type": "boolean" }, "centralTenantId": { "type": "string" }, "consortiumId": { "type": "string", "format": "uuid" }, "email": { "type": "string" }, "mobilePhoneNumber": { "type": "string" }, "phoneNumber": { "type": "string" } }, "additionalProperties": false, "required": [ "userId", "tenantId" ] }
- getusertenants(consortiumId, **kwargs)
User Tenant Associations
GET /consortia/{consortiumId}/user-tenants- Parameters
consortiumId (str) –
- Keyword Arguments
userId (str) –
username (str) – (description: The username of the user)
tenantId (str) – The ID of the tenant
offset (int) – Skip over a number of elements by specifying an offset value for the query (default: 0, minimum: 0, maximum: 2147483647)
limit (int) – Limit the number of elements returned in the response (default: 10, minimum: 0, maximum: 2147483647)
- Returns
See Schema below.
- Return type
dict
- Raises
OkapiRequestError – Bad request
OkapiRequestNotFound – Resource not found
OkapiRequestFatalError – Internal server error
Schema
{ "description": "A JSON schema for the User Tenants Collection", "type": "object", "properties": { "userTenants": { "type": "array", "description": "The list of user tenants", "items": { "description": "A JSON schema for the User Tenant", "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "userId": { "type": "string", "format": "uuid" }, "username": { "type": "string" }, "tenantId": { "type": "string" }, "tenantName": { "type": "string" }, "isPrimary": { "type": "boolean" }, "centralTenantId": { "type": "string" }, "consortiumId": { "type": "string", "format": "uuid" }, "email": { "type": "string" }, "mobilePhoneNumber": { "type": "string" }, "phoneNumber": { "type": "string" } }, "additionalProperties": false, "required": [ "userId", "tenantId" ] } }, "totalRecords": { "type": "integer" } }, "additionalProperties": false, "required": [ "userTenants", "totalRecords" ] }
- postusertenants(consortiumId, userTenant)
User Tenant Associations
POST /consortia/{consortiumId}/user-tenants- Parameters
consortiumId (str) –
userTenant (dict) – See Schema below.
- Returns
See Schema below.
- Return type
dict
- Raises
OkapiRequestError – Bad request
OkapiRequestNotFound – Resource not found
OkapiRequestFatalError – Internal server error
Schema
{ "description": "A JSON schema for the User Tenant", "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "userId": { "type": "string", "format": "uuid" }, "username": { "type": "string" }, "tenantId": { "type": "string" }, "tenantName": { "type": "string" }, "isPrimary": { "type": "boolean" }, "centralTenantId": { "type": "string" }, "consortiumId": { "type": "string", "format": "uuid" }, "email": { "type": "string" }, "mobilePhoneNumber": { "type": "string" }, "phoneNumber": { "type": "string" } }, "additionalProperties": false, "required": [ "userId", "tenantId" ] }