Presentation is loading. Please wait.

Presentation is loading. Please wait.

Advanced hands-on on programmatic access to an Open Access Repository

Similar presentations


Presentation on theme: "Advanced hands-on on programmatic access to an Open Access Repository"— Presentation transcript:

1 Advanced hands-on on programmatic access to an Open Access Repository
Mario TORRISI - PI4 22 February 2018 Friendship International Hotel, Addis Ababa

2 Outline Search engine API Upload records XML API JSON API Examples
curl php

3 Search engine API

4 Search engine API Allow you to search digital asset on the Open Access repository, sending HTML requests. Three different kinds of APIs XML JSON Python API

5 XML API Syntax: Example: GET /search?param1=value1&...¶mN=valueN
Get the first 10 records in XML format Parameters jrec - jump to record ID (e.g. 1 for first hit) rg - records-in-group-of (e.g. 10 hits per page) of - output format (e.g. Xm for XML format)

6 XML API Set jrec and rg properly to paginate the output
Example Do not set rg too high – there is a server-wide safety limit for it

7 XML API Get the first 10 records that contains the string “Hackfest” in the title: Parameters p - pattern (e.g. your query) f - field to search within (e.g. “title”, “athors”..)

8 XML API Get all records uploaded from a given date (e.g ) to another given date (e.g. today) Parameters d1 - first date YYYY-mm-dd format d2 - second date YYYY-mm-dd format

9 JSON API Syntax: Example: GET /search?param1=value1&...¶mN=valueN
Get the first 10 records in XML format Parameters jrec - jump to record ID (e.g. 1 for first hit) rg - records-in-group-of (e.g. 10 hits per page) of - output format (e.g. Xm for XML format)

10 JSON API Set jrec and rg properly to paginate the output
Example Do not set rg too high – there is a server-wide safety limit for it

11 JSON API Get the first 10 records that contains the string “Hackfest” in the title: Parameters p - pattern (e.g. your query) f - field to search within (e.g. “title”, “athors”..)

12 JSON API Get all records uploaded from a given date (e.g ) to another given date (e.g. today) Parameters d1 - first date YYYY-mm-dd format d2 - second date YYYY-mm-dd format Get only the abstract, title and authors of resources: ot - output tags (e.g. ‘’ to get all fields, ‘title’ to get titles only)

13 Search engine references
To know more about Python, XML and JSON API visit this guide:

14 Upload records

15 Upload records Create a MARCXML file as input (e.g. your_file.xml)
curl –T your_file.xml -A invenio_webupload -H “Content-Type: application/marcxml+xml”

16 your_file.xml

17 your_file.xml

18 your_file.xml

19 Examples repository Github repository containing some trivial examples on how to upload records to the Open Access Repository

20 Upload records references
BibUpload admin guide MARC XML


Download ppt "Advanced hands-on on programmatic access to an Open Access Repository"

Similar presentations


Ads by Google