foliolib.folio.api.consortiaKeycloak.Self

class foliolib.folio.api.consortiaKeycloak.Self(tenant: str)

Bases: foliolib.folio.FolioApi

Self integration API

Self integration API

Base class of the Folio API

Parameters

tenant (str) – Tenant id

Methods

getusertenantsforcurrentuser(consortiumId)

GET /consortia/{consortiumId}/_self

getusertenantsforcurrentuser(consortiumId)

GET /consortia/{consortiumId}/_self

Parameters

consortiumId (str) –

Returns

See Schema below.

Return type

dict

Raises
  • OkapiRequestError – Bad request

  • OkapiRequestUnauthorized – Not authorized to perform requested action

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