foliolib.folio.api.organizationsStorage.Url
- class foliolib.folio.api.organizationsStorage.Url(tenant: str, okapi: Optional[foliolib.okapi.okapiClient.OkapiClient] = None)
Bases:
foliolib.folio.FolioApiDeprecated. URLs
- CRUD APIs used to manage URLs.
These APIs are not currently in use and may at some point be removed or resurrected
- Parameters
tenant (str) – Tenant id
okapi (OkapiClient, optional) – Instance of OkapiClient. Defaults to None.
Methods
delete_url(urlsId)Delete url item with given {urlId}
get_url(urlsId)Retrieve url item with given {urlId}
get_urls(**kwargs)Get list of URLs
modify_url(urlsId, url)Update url item with given {urlId}
set_url(url)Create a new url item.
- delete_url(urlsId: str)
Delete url item with given {urlId}
DELETE /organizations-storage/urls/{urlsId}- Parameters
urlsId (str) –
- Raises
OkapiRequestNotFound – Not Found
OkapiRequestError – Bad Request
OkapiFatalError – Server Error
- get_url(urlsId: str)
Retrieve url item with given {urlId}
GET /organizations-storage/urls/{urlsId}- Parameters
urlsId (str) –
- Returns
See Schema below
- Return type
dict
- Raises
OkapiRequestNotFound – Not Found
OkapiFatalError – Server Error
Schema
{ "$schema": "http://json-schema.org/draft-04/schema#", "description": "A URL record", "type": "object", "properties": { "id": { "description": "The unique id of this url", "$ref": "../../common/schemas/uuid.json" }, "value": { "description": "The value for this URL", "type": "string", "pattern": "^$|(([Hh][Tt][Tt][Pp]|[Ff][Tt][Pp])([Ss])?://.+$)" }, "description": { "description": "The description for this URL", "type": "string" }, "language": { "description": "The language for this organization URL", "type": "string" }, "isPrimary": { "description": "Used to set this url as primary for the contact", "type": "boolean" }, "categories": { "id": "categories", "description": "The list of categories for this organization URL", "type": "array", "items": { "type": "string" } }, "notes": { "description": "The notes for this organization URL", "type": "string" }, "metadata": { "type": "object", "$ref": "../../../raml-util/schemas/metadata.schema", "readonly": true } }, "additionalProperties": false, "required": [ "value" ] }
- get_urls(**kwargs)
Get list of URLs
GET /organizations-storage/urls- Parameters
**kwargs (properties) – Keyword Arguments
- Keyword Arguments
query (str) –
A query expressed as a CQL string (see [dev.folio.org/reference/glossary#cql](https://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.
with valid searchable fields: for example code
Example
(username==”ab*” or personal.firstName==”ab*” or personal.lastName==”ab*”) and active==”true” sortby personal.lastName personal.firstName barcode
[“code”, “MEDGRANT”, “=”]
totalRecords (str) –
(default=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 (int) –
(default=0) Skip over a number of elements by specifying an offset value for the query
Example
0
limit (int) –
(default=10) Limit the number of elements returned in the response
Example
10
- Returns
See Schema below
- Return type
dict
- Raises
OkapiRequestError – Bad Request
OkapiRequestUnauthorized – Authentication is required
OkapiFatalError – Server Error
Schema
{ "$schema": "http://json-schema.org/draft-04/schema#", "description": "Collection of URL records", "type": "object", "properties": { "urls": { "description": "The list of urls in this collection", "type": "array", "id": "urls", "items": { "type": "object", "$ref": "url.json" } }, "totalRecords": { "description": "The number of URL records returned in this collection", "type": "integer" } }, "additionalProperties": false, "required": [ "urls", "totalRecords" ] }
- modify_url(urlsId: str, url: dict)
Update url item with given {urlId}
PUT /organizations-storage/urls/{urlsId}- Parameters
urlsId (str) –
url (dict) – See Schema below
- Raises
OkapiRequestNotFound – Not Found
OkapiRequestError – Bad Request
OkapiRequestConflict – Conflict
OkapiFatalError – Server Error
Schema
{ "$schema": "http://json-schema.org/draft-04/schema#", "description": "A URL record", "type": "object", "properties": { "id": { "description": "The unique id of this url", "$ref": "../../common/schemas/uuid.json" }, "value": { "description": "The value for this URL", "type": "string", "pattern": "^$|(([Hh][Tt][Tt][Pp]|[Ff][Tt][Pp])([Ss])?://.+$)" }, "description": { "description": "The description for this URL", "type": "string" }, "language": { "description": "The language for this organization URL", "type": "string" }, "isPrimary": { "description": "Used to set this url as primary for the contact", "type": "boolean" }, "categories": { "id": "categories", "description": "The list of categories for this organization URL", "type": "array", "items": { "type": "string" } }, "notes": { "description": "The notes for this organization URL", "type": "string" }, "metadata": { "type": "object", "$ref": "../../../raml-util/schemas/metadata.schema", "readonly": true } }, "additionalProperties": false, "required": [ "value" ] }
- set_url(url: dict)
Create a new url item.
POST /organizations-storage/urls- Parameters
url (dict) – See Schema below
- Raises
OkapiRequestError – Bad Request
OkapiRequestUnauthorized – Authentication is required
OkapiFatalError – Server Error
Headers
Location - URI to the created url item
Schema
{ "$schema": "http://json-schema.org/draft-04/schema#", "description": "A URL record", "type": "object", "properties": { "id": { "description": "The unique id of this url", "$ref": "../../common/schemas/uuid.json" }, "value": { "description": "The value for this URL", "type": "string", "pattern": "^$|(([Hh][Tt][Tt][Pp]|[Ff][Tt][Pp])([Ss])?://.+$)" }, "description": { "description": "The description for this URL", "type": "string" }, "language": { "description": "The language for this organization URL", "type": "string" }, "isPrimary": { "description": "Used to set this url as primary for the contact", "type": "boolean" }, "categories": { "id": "categories", "description": "The list of categories for this organization URL", "type": "array", "items": { "type": "string" } }, "notes": { "description": "The notes for this organization URL", "type": "string" }, "metadata": { "type": "object", "$ref": "../../../raml-util/schemas/metadata.schema", "readonly": true } }, "additionalProperties": false, "required": [ "value" ] }