https://github.com/library-data-platform/mod-ldp
API calls to obtain information generated by the LDP
The FOLIO Reporting API provides simple mediated access to a reporting database (LDP Classic or MetaDB) hosted elsewhere (as configured in the DB_HOST, DB_PORT and DB_DATABASE environment variables). It provides only five entry points, each of them very simple:
/ldp/db/tables: Request a list of all the tables in their various schemas/ldp/db/columns: Request a list of all the columns in a specified table. (The schema and table names are povided as URL query parameters)/ldp/db/query: Submit a query/ldp/db/reports: Run a report from a repository/ldp/config and /ldp/config/{key}: Simple key/valye configuration storeSeveral types are defined to support these operations:
tables, a list of table-and-schema-name pairs.columns, a list of column definitions including information such as the column name and type.query, a set of parameters such as the table to search in, the criteria, and the columns to return. It returns results, a list of objects representing rows that satisfy the query, each containing the specified set of columns.template query, specifying where to find the report and what values to substituted into its parameters. It returns template results, a list of result objects together with a result count.config objects and lists thereofReturn a list of configuration items
GET /ldp/configMedia type: application/json
Type:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description" : "A list of configuration records",
"type": "array",
"items": {
"type": "object",
"$ref": "configuration.json"
}
}
Example:
[
{
"key":"foo",
"value":"bar"
},
{
"key":"ping",
"value":"pong"
}
]
Retrieve a single configuration by key
GET /ldp/config/{key}Media type: application/json
Type:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description" : "A configuration entry for mod-ldp",
"type" : "object",
"properties" : {
"key" : {
"type": "string",
"description": "The key to the configuration value"
},
"value" : {
"type" : "string",
"description" : "The value of the configuration"
}
},
"additionalProperties": true,
"required" : [
"key",
"value"
]
}
Example:
{
"key":"foo",
"value":"bar"
}
Modify or add a configuration by key
PUT /ldp/config/{key}Media type: application/json
Type:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description" : "A configuration entry for mod-ldp",
"type" : "object",
"properties" : {
"key" : {
"type": "string",
"description": "The key to the configuration value"
},
"value" : {
"type" : "string",
"description" : "The value of the configuration"
}
},
"additionalProperties": true,
"required" : [
"key",
"value"
]
}
Example:
{
"key":"foo",
"value":"bar"
}
Media type: application/json
Type:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description" : "A configuration entry for mod-ldp",
"type" : "object",
"properties" : {
"key" : {
"type": "string",
"description": "The key to the configuration value"
},
"value" : {
"type" : "string",
"description" : "The value of the configuration"
}
},
"additionalProperties": true,
"required" : [
"key",
"value"
]
}
Example:
{
"key":"foo",
"value":"bar"
}
Return a list of all tables in all schemas
GET /ldp/db/tablesMedia type: application/json
Type:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "A collection of LDP table-and-schema pairs",
"type": "array",
"items": {
"type": "object",
"properties": {
"tableName": {
"type": "string",
"description": "The name of a table within an LDP schema"
},
"tableSchema": {
"type": "string",
"description": "The name of the LDP schema containing the table"
}
},
"additionalProperties": false,
"required": [
"tableName",
"tableSchema"
]
}
}
Example:
[
{
"tableName": "instance_identifiers",
"tableSchema": "folio_reporting"
},
{
"tableName": "po_lines_cost",
"tableSchema": "folio_reporting"
},
{
"tableName": "invoice_adjustments_ext",
"tableSchema": "folio_reporting"
},
{
"tableName": "po_lines_details_subscription",
"tableSchema": "folio_reporting"
},
{
"tableName": "po_lines_eresource",
"tableSchema": "folio_reporting"
},
{
"tableName": "finance_transaction_invoices",
"tableSchema": "folio_reporting"
},
{
"tableName": "holdings_notes",
"tableSchema": "folio_reporting"
},
{
"tableName": "po_lines_er_mat_type",
"tableSchema": "folio_reporting"
},
{
"tableName": "invoice_lines_adjustments",
"tableSchema": "folio_reporting"
},
{
"tableName": "instance_languages",
"tableSchema": "folio_reporting"
},
{
"tableName": "instance_alternative_titles",
"tableSchema": "folio_reporting"
},
{
"tableName": "po_lines_locations",
"tableSchema": "folio_reporting"
},
{
"tableName": "invoice_lines_fund_distributions",
"tableSchema": "folio_reporting"
},
{
"tableName": "holdings_electronic_access",
"tableSchema": "folio_reporting"
},
{
"tableName": "po_lines_physical",
"tableSchema": "folio_reporting"
},
{
"tableName": "item_effective_callno_components",
"tableSchema": "folio_reporting"
},
{
"tableName": "po_lines_phys_mat_type",
"tableSchema": "folio_reporting"
},
{
"tableName": "instance_nature_content",
"tableSchema": "folio_reporting"
},
{
"tableName": "po_lines_tags",
"tableSchema": "folio_reporting"
},
{
"tableName": "po_ongoing",
"tableSchema": "folio_reporting"
},
{
"tableName": "holdings_statements_indexes",
"tableSchema": "folio_reporting"
},
{
"tableName": "po_organization",
"tableSchema": "folio_reporting"
},
{
"tableName": "item_electronic_access",
"tableSchema": "folio_reporting"
},
{
"tableName": "instance_notes",
"tableSchema": "folio_reporting"
},
{
"tableName": "instance_contributors",
"tableSchema": "folio_reporting"
},
{
"tableName": "instance_publication",
"tableSchema": "folio_reporting"
},
{
"tableName": "requests_items",
"tableSchema": "folio_reporting"
},
{
"tableName": "holdings_statements",
"tableSchema": "folio_reporting"
},
{
"tableName": "users_addresses",
"tableSchema": "folio_reporting"
},
{
"tableName": "users_departments_unpacked",
"tableSchema": "folio_reporting"
},
{
"tableName": "item_ext",
"tableSchema": "folio_reporting"
},
{
"tableName": "instance_relationships_ext",
"tableSchema": "folio_reporting"
},
{
"tableName": "users_groups",
"tableSchema": "folio_reporting"
},
{
"tableName": "instance_editions",
"tableSchema": "folio_reporting"
},
{
"tableName": "po_prod_ids",
"tableSchema": "folio_reporting"
},
{
"tableName": "item_notes",
"tableSchema": "folio_reporting"
},
{
"tableName": "instance_series",
"tableSchema": "folio_reporting"
},
{
"tableName": "loans_renewal_dates",
"tableSchema": "folio_reporting"
},
{
"tableName": "items_holdings_instances",
"tableSchema": "folio_reporting"
},
{
"tableName": "locations_service_points",
"tableSchema": "folio_reporting"
},
{
"tableName": "feesfines_accounts_actions",
"tableSchema": "folio_reporting"
},
{
"tableName": "instance_electronic_access",
"tableSchema": "folio_reporting"
},
{
"tableName": "instance_statistical_codes",
"tableSchema": "folio_reporting"
},
{
"tableName": "item_statistical_codes",
"tableSchema": "folio_reporting"
},
{
"tableName": "finance_transaction_purchase_order",
"tableSchema": "folio_reporting"
},
{
"tableName": "holdings_ext",
"tableSchema": "folio_reporting"
},
{
"tableName": "loans_renewal_count",
"tableSchema": "folio_reporting"
},
{
"tableName": "instance_subjects",
"tableSchema": "folio_reporting"
},
{
"tableName": "locations_libraries",
"tableSchema": "folio_reporting"
},
{
"tableName": "instance_ext",
"tableSchema": "folio_reporting"
},
{
"tableName": "holdings_statements_supplements",
"tableSchema": "folio_reporting"
},
{
"tableName": "loans_items",
"tableSchema": "folio_reporting"
},
{
"tableName": "po_acq_unit_ids",
"tableSchema": "folio_reporting"
},
{
"tableName": "instance_formats",
"tableSchema": "folio_reporting"
},
{
"tableName": "po_instance",
"tableSchema": "folio_reporting"
},
{
"tableName": "holdings_statistical_codes",
"tableSchema": "folio_reporting"
},
{
"tableName": "invoice_adjustments_in_addition_to",
"tableSchema": "folio_reporting"
},
{
"tableName": "invoice_lines",
"tableSchema": "public"
},
{
"tableName": "feesfines_refunds",
"tableSchema": "public"
},
{
"tableName": "feesfines_transfer_criterias",
"tableSchema": "public"
},
{
"tableName": "invoice_voucher_lines",
"tableSchema": "public"
},
{
"tableName": "organization_urls",
"tableSchema": "public"
},
{
"tableName": "feesfines_transfers",
"tableSchema": "public"
},
{
"tableName": "invoice_vouchers",
"tableSchema": "public"
},
{
"tableName": "feesfines_waives",
"tableSchema": "public"
},
{
"tableName": "finance_budgets",
"tableSchema": "public"
},
{
"tableName": "notes",
"tableSchema": "public"
},
{
"tableName": "finance_expense_classes",
"tableSchema": "public"
},
{
"tableName": "finance_fiscal_years",
"tableSchema": "public"
},
{
"tableName": "acquisitions_memberships",
"tableSchema": "public"
},
{
"tableName": "user_addresstypes",
"tableSchema": "public"
},
{
"tableName": "finance_fund_types",
"tableSchema": "public"
},
{
"tableName": "finance_funds",
"tableSchema": "public"
},
{
"tableName": "acquisitions_units",
"tableSchema": "public"
},
{
"tableName": "finance_group_fund_fiscal_years",
"tableSchema": "public"
},
{
"tableName": "po_alerts",
"tableSchema": "public"
},
{
"tableName": "user_departments",
"tableSchema": "public"
},
{
"tableName": "finance_groups",
"tableSchema": "public"
},
{
"tableName": "po_lines",
"tableSchema": "public"
},
{
"tableName": "finance_ledgers",
"tableSchema": "public"
},
{
"tableName": "finance_transactions",
"tableSchema": "public"
},
{
"tableName": "inventory_alternative_title_types",
"tableSchema": "public"
},
{
"tableName": "inventory_call_number_types",
"tableSchema": "public"
},
{
"tableName": "po_order_invoice_relns",
"tableSchema": "public"
},
{
"tableName": "user_groups",
"tableSchema": "public"
},
{
"tableName": "inventory_campuses",
"tableSchema": "public"
},
{
"tableName": "po_order_templates",
"tableSchema": "public"
},
{
"tableName": "inventory_classification_types",
"tableSchema": "public"
},
{
"tableName": "inventory_contributor_name_types",
"tableSchema": "public"
},
{
"tableName": "inventory_contributor_types",
"tableSchema": "public"
},
{
"tableName": "inventory_electronic_access_relationships",
"tableSchema": "public"
},
{
"tableName": "po_pieces",
"tableSchema": "public"
},
{
"tableName": "inventory_holdings",
"tableSchema": "public"
},
{
"tableName": "po_purchase_orders",
"tableSchema": "public"
},
{
"tableName": "inventory_holdings_note_types",
"tableSchema": "public"
},
{
"tableName": "inventory_holdings_types",
"tableSchema": "public"
},
{
"tableName": "inventory_identifier_types",
"tableSchema": "public"
},
{
"tableName": "po_receiving_history",
"tableSchema": "public"
},
{
"tableName": "user_proxiesfor",
"tableSchema": "public"
},
{
"tableName": "inventory_ill_policies",
"tableSchema": "public"
},
{
"tableName": "inventory_instance_formats",
"tableSchema": "public"
},
{
"tableName": "inventory_instance_note_types",
"tableSchema": "public"
},
{
"tableName": "po_reporting_codes",
"tableSchema": "public"
},
{
"tableName": "inventory_instance_relationship_types",
"tableSchema": "public"
},
{
"tableName": "inventory_instance_relationships",
"tableSchema": "public"
},
{
"tableName": "inventory_instance_statuses",
"tableSchema": "public"
},
{
"tableName": "organization_addresses",
"tableSchema": "public"
},
{
"tableName": "inventory_instance_types",
"tableSchema": "public"
},
{
"tableName": "organization_categories",
"tableSchema": "public"
},
{
"tableName": "audit_circulation_logs",
"tableSchema": "public"
},
{
"tableName": "inventory_instances",
"tableSchema": "public"
},
{
"tableName": "circulation_patron_notice_policies",
"tableSchema": "public"
},
{
"tableName": "circulation_cancellation_reasons",
"tableSchema": "public"
},
{
"tableName": "inventory_item_damaged_statuses",
"tableSchema": "public"
},
{
"tableName": "circulation_check_ins",
"tableSchema": "public"
},
{
"tableName": "circulation_fixed_due_date_schedules",
"tableSchema": "public"
},
{
"tableName": "circulation_loan_history",
"tableSchema": "public"
},
{
"tableName": "inventory_item_note_types",
"tableSchema": "public"
},
{
"tableName": "organization_contacts",
"tableSchema": "public"
},
{
"tableName": "circulation_loan_policies",
"tableSchema": "public"
},
{
"tableName": "circulation_loans",
"tableSchema": "public"
},
{
"tableName": "circulation_patron_action_sessions",
"tableSchema": "public"
},
{
"tableName": "inventory_items",
"tableSchema": "public"
},
{
"tableName": "circulation_request_policies",
"tableSchema": "public"
},
{
"tableName": "circulation_request_preference",
"tableSchema": "public"
},
{
"tableName": "circulation_requests",
"tableSchema": "public"
},
{
"tableName": "inventory_institutions",
"tableSchema": "public"
},
{
"tableName": "user_users",
"tableSchema": "public"
},
{
"tableName": "circulation_scheduled_notices",
"tableSchema": "public"
},
{
"tableName": "inventory_libraries",
"tableSchema": "public"
},
{
"tableName": "circulation_staff_slips",
"tableSchema": "public"
},
{
"tableName": "inventory_loan_types",
"tableSchema": "public"
},
{
"tableName": "configuration_entries",
"tableSchema": "public"
},
{
"tableName": "organization_emails",
"tableSchema": "public"
},
{
"tableName": "course_copyrightstatuses",
"tableSchema": "public"
},
{
"tableName": "inventory_locations",
"tableSchema": "public"
},
{
"tableName": "course_courselistings",
"tableSchema": "public"
},
{
"tableName": "course_courses",
"tableSchema": "public"
},
{
"tableName": "course_coursetypes",
"tableSchema": "public"
},
{
"tableName": "inventory_material_types",
"tableSchema": "public"
},
{
"tableName": "course_departments",
"tableSchema": "public"
},
{
"tableName": "organization_interfaces",
"tableSchema": "public"
},
{
"tableName": "course_processingstatuses",
"tableSchema": "public"
},
{
"tableName": "course_reserves",
"tableSchema": "public"
},
{
"tableName": "inventory_modes_of_issuance",
"tableSchema": "public"
},
{
"tableName": "course_roles",
"tableSchema": "public"
},
{
"tableName": "course_terms",
"tableSchema": "public"
},
{
"tableName": "inventory_nature_of_content_terms",
"tableSchema": "public"
},
{
"tableName": "srs_marc",
"tableSchema": "public"
},
{
"tableName": "email_email",
"tableSchema": "public"
},
{
"tableName": "srs_records",
"tableSchema": "public"
},
{
"tableName": "feesfines_accounts",
"tableSchema": "public"
},
{
"tableName": "inventory_service_points",
"tableSchema": "public"
},
{
"tableName": "organization_organizations",
"tableSchema": "public"
},
{
"tableName": "feesfines_comments",
"tableSchema": "public"
},
{
"tableName": "feesfines_feefineactions",
"tableSchema": "public"
},
{
"tableName": "inventory_service_points_users",
"tableSchema": "public"
},
{
"tableName": "feesfines_feefines",
"tableSchema": "public"
},
{
"tableName": "inventory_statistical_code_types",
"tableSchema": "public"
},
{
"tableName": "feesfines_lost_item_fees_policies",
"tableSchema": "public"
},
{
"tableName": "feesfines_manualblocks",
"tableSchema": "public"
},
{
"tableName": "inventory_statistical_codes",
"tableSchema": "public"
},
{
"tableName": "feesfines_overdue_fines_policies",
"tableSchema": "public"
},
{
"tableName": "feesfines_owners",
"tableSchema": "public"
},
{
"tableName": "invoice_invoices",
"tableSchema": "public"
},
{
"tableName": "organization_phone_numbers",
"tableSchema": "public"
},
{
"tableName": "feesfines_payments",
"tableSchema": "public"
}
]
Return a list of all columns in a table. Example: /ldp/db/columns?schema=public&table=user_users
GET /ldp/db/columnsThe name of the schema containing the specified table
Example:
publicThe name of the table within the specified schema
Example:
user_usersMedia type: application/json
Type:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "A list of columns in an LDP table",
"type": "array",
"items": {
"type": "object",
"properties": {
"columnName": {
"type": "string",
"description": "The name of a column within the specified table"
},
"data_type": {
"type": "string",
"description": "The type of the column",
"example": "boolean, character varying, timestamp with time zone"
},
"ordinalPosition": {
"type": "string",
"description": "a small integer specifying ordinal position (though encoded as a string)"
},
"tableSchema": {
"type": "string",
"description": "The schema containing the table containing this column"
},
"tableName": {
"type": "string",
"description": "The table, within its schema, containing this column"
}
},
"additionalProperties": false,
"required": [
"tableName",
"tableSchema"
]
}
}
Example:
[
{
"columnName": "id",
"data_type": "character varying",
"ordinalPosition": "1",
"tableSchema": "public",
"tableName": "user_users"
},
{
"columnName": "active",
"data_type": "boolean",
"ordinalPosition": "2",
"tableSchema": "public",
"tableName": "user_users"
},
{
"columnName": "barcode",
"data_type": "character varying",
"ordinalPosition": "3",
"tableSchema": "public",
"tableName": "user_users"
},
{
"columnName": "created_date",
"data_type": "timestamp with time zone",
"ordinalPosition": "4",
"tableSchema": "public",
"tableName": "user_users"
},
{
"columnName": "enrollment_date",
"data_type": "timestamp with time zone",
"ordinalPosition": "5",
"tableSchema": "public",
"tableName": "user_users"
},
{
"columnName": "expiration_date",
"data_type": "timestamp with time zone",
"ordinalPosition": "6",
"tableSchema": "public",
"tableName": "user_users"
},
{
"columnName": "external_system_id",
"data_type": "character varying",
"ordinalPosition": "7",
"tableSchema": "public",
"tableName": "user_users"
},
{
"columnName": "patron_group",
"data_type": "character varying",
"ordinalPosition": "8",
"tableSchema": "public",
"tableName": "user_users"
},
{
"columnName": "type",
"data_type": "character varying",
"ordinalPosition": "9",
"tableSchema": "public",
"tableName": "user_users"
},
{
"columnName": "updated_date",
"data_type": "timestamp with time zone",
"ordinalPosition": "10",
"tableSchema": "public",
"tableName": "user_users"
},
{
"columnName": "username",
"data_type": "character varying",
"ordinalPosition": "11",
"tableSchema": "public",
"tableName": "user_users"
}
]
Send a query to the LDP server and obtain results
POST /ldp/db/queryMedia type: application/json
Type:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "A query to send to the LDP",
"type": "object",
"properties": {
"tables": {
"type": "array",
"description": "A currently redundant wrapper",
"items": {
"type": "object",
"properties": {
"schema": {
"type": "string",
"description": "The LDP schema containing the table to query"
},
"tableName": {
"type": "string",
"description": "The table to query"
},
"columnFilters": {
"type": "array",
"description": "A set of conditions which result rows must satisfy",
"items": {
"type": "object",
"description": "A single condition which result rows must satisfy",
"properties": {
"key": {
"type": "string",
"description": "The name of a column within the specified table"
},
"value": {
"type": "string",
"description": "The value that the specified column must match"
}
},
"additionalProperties": false,
"required": [
"key",
"value"
]
}
},
"showColumns": {
"type": "array",
"description": "An ordered list of column to include in the results",
"items": {
"type": "string",
"description": "The name of a column within the specified table"
}
},
"orderBy": {
"type": "array",
"description": "An ordered list of criteria to sort be",
"items": {
"type": "object",
"description": "A single sorting criterion",
"properties": {
"key": {
"type": "string",
"description": "The name of a column within the specified table"
},
"direction": {
"type": "string",
"enum": ["asc", "desc"],
"description": "Indication of which direction to sort this column [default: 'asc']"
},
"nulls": {
"type": "string",
"enum": ["start", "end"],
"description": "Indication of where null values should sort [default: 'end']"
}
},
"additionalProperties": false,
"required": [
"key"
]
}
},
"limit": {
"type": ["integer", "string"],
"description": "The maximum number of rows to return"
}
},
"additionalProperties": false,
"required": [
"schema",
"tableName"
]
}
}
},
"additionalProperties": false,
"required": [
"tables"
]
}
Example:
{
"tables": [
{
"schema": "public",
"tableName": "user_users",
"columnFilters": [
{
"key": "active",
"value": "true"
}
],
"showColumns": [
"active",
"barcode",
"type",
"username"
],
"orderBy": [
{
"key": "username",
"direction": "asc",
"nulls": "end"
},
{
"key": "barcode",
"direction": "desc",
"nulls": "start"
}
],
"limit": "1000"
}
]
}
Media type: application/json
Type:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "A set of results from an LDP query",
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": true
}
}
Example:
[
{
"active": true,
"barcode": null,
"type": null,
"username": "diku"
},
{
"active": true,
"barcode": "16206277239167908",
"type": "patron",
"username": "checkin-all"
},
{
"active": true,
"barcode": "1620627726218367299",
"type": "patron",
"username": "quick-marc-all"
},
{
"active": true,
"barcode": null,
"type": null,
"username": "pubsub-user"
},
{
"active": true,
"barcode": null,
"type": null,
"username": "diku_admin"
},
{
"active": true,
"barcode": "1620627723443114217",
"type": "patron",
"username": "acq-staff"
},
{
"active": true,
"barcode": "123",
"type": null,
"username": "rick"
},
{
"active": true,
"barcode": "1620627724015303580",
"type": "patron",
"username": "checkout-all"
},
{
"active": true,
"barcode": "1620627724777536415",
"type": "patron",
"username": "circ-student"
},
{
"active": true,
"barcode": "1620627723258340654",
"type": "patron",
"username": "acq-observer"
},
{
"active": true,
"barcode": "1620627726059114352",
"type": "patron",
"username": "metadata-admin"
},
{
"active": true,
"barcode": "1620627724501189635",
"type": "patron",
"username": "circ-observer"
},
{
"active": true,
"barcode": "1620627724613411811",
"type": "patron",
"username": "circ-staff"
},
{
"active": true,
"barcode": "20210101",
"type": null,
"username": "GTB-BIBLIOTECA"
},
{
"active": true,
"barcode": "1620627725930464595",
"type": "patron",
"username": "erm-staff"
},
{
"active": true,
"barcode": "1620627725656676560",
"type": "patron",
"username": "erm-manager"
},
{
"active": true,
"barcode": "1620627726469650965",
"type": "patron",
"username": "user-basic-view"
},
{
"active": true,
"barcode": "1620627722922523126",
"type": "patron",
"username": "acq-manager"
},
{
"active": true,
"barcode": "1620627725062599536",
"type": "patron",
"username": "data-export-admin"
},
{
"active": true,
"barcode": "1620627724930650147",
"type": "patron",
"username": "copy-cataloger"
},
{
"active": true,
"barcode": null,
"type": null,
"username": "mod-search"
},
{
"active": true,
"barcode": "1620627725258463052",
"type": "patron",
"username": "data-import"
},
{
"active": true,
"barcode": "1620627724123869414",
"type": "patron",
"username": "circ-admin"
},
{
"active": true,
"barcode": "1620627722235578722",
"type": "patron",
"username": "acq-admin"
},
{
"active": true,
"barcode": "1620627725817298392",
"type": "patron",
"username": "erm-observer"
},
{
"active": true,
"barcode": "789",
"type": null,
"username": "sheldon"
},
{
"active": true,
"barcode": "456",
"type": null,
"username": "morty"
},
{
"active": true,
"barcode": "1620627724328691779",
"type": "patron",
"username": "circ-manager"
},
{
"active": true,
"barcode": "1620627726312429916",
"type": "patron",
"username": "technical-service-staff"
},
{
"active": true,
"barcode": null,
"type": null,
"username": "data-export-system-user"
},
{
"active": true,
"barcode": "1620627723752242178",
"type": "patron",
"username": "cataloger"
},
{
"active": true,
"barcode": "01012015",
"type": null,
"username": "GTB-USU-PI"
},
{
"active": true,
"barcode": "1620627725385562486",
"type": "patron",
"username": "erm-admin"
},
{
"active": true,
"barcode": "16081963",
"type": null,
"username": "GTB-JM"
},
{
"active": true,
"barcode": "16121978",
"type": null,
"username": "GTB-SERGI"
},
{
"active": true,
"barcode": null,
"type": null,
"username": "system-user"
},
{
"active": true,
"barcode": "1620627725164426328",
"type": "patron",
"username": "data-export"
}
]
POST /ldp/db/reportsMedia type: application/json
Type:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "A report template with parameters to send to the LDP",
"type": "object",
"properties": {
"url" : {
"type" : "string",
"description" : "The remote URL of the SQL template to fetch"
},
"params" : {
"type" : "object",
"description" : "The parameters that the SQL template function will be called with",
"additionalProperties": {
"type" : "string"
}
},
"limit": {
"type" : ["integer", "string"],
"description": "The limit on how many records will be returned in a response"
}
},
"additionalProperties": false,
"required": [
"url",
"params"
]
}
Example:
{
"url": "https://github.com/folio-org/folio-analytics/blob/count_loans_and_renewals_ldp/reports/count_loans_and_renewals/count_loans_and_renewals.sql",
"params": {
"start_date": "2023-08-18T00:00:00.000Z",
"items_permanent_location_filter": "H",
"limit" : "20"
}
}
Media type: application/json
Type:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "The result from an LDP template query",
"type" : "object",
"properties" : {
"records" : {
"type": "array",
"description": "The returned rows",
"items": {
"type": "object",
"properties": {},
"additionalProperties": true
}
},
"totalRecords" : {
"type" : "integer",
"description": "The number of rows returned"
}
},
"additionalProperties": false,
"required" : [
"records",
"totalRecords"
]
}
Example:
{
"totalRecords": 2,
"records": [
{ "id": "123", "name": "Hillare Belloc" },
{ "id": "456", "name": "G. K. Chesterton" }
]
}