IRIS IR 1.0.0.0 REST API documentation

This is the reference document for the REST API and resources provided by Cineca IRIS IR. The REST APIs are developers who want to integrate IR with other applications.

Getting started

Because the REST API is based on open standards, you can use any web development language to access the API.

If you are using Java, however, the easiest way to get started using the IRIS IR REST API is obtain the REST IR IRIS JAVA CLIENT and use it as a library within your own application.

Structure of the REST URIs

IR's REST APIs provide access to resources (data entities) via URI paths. To use a REST API, your application will make an HTTP request and parse the response. The IR REST API uses JSON as its communication format, and the standard HTTP methods like GET, PUT, POST and DELETE (see API descriptions below for which methods are available for each resource). URIs for IR's REST API resource have the following structure:

http://host:port/context/rest/api-version/resource-name

The current API version is 1.

As an example, if you wanted to retrieve the JSON representation of item 328235, you would access:

https://unidemo.iris.cineca.it:443/rest/api/v1/items/328325

Due to negative performance each request has a limit for retrived object set to 50 elements and set to MAX java int for public items (SOLR)

Expansion in the REST APIs

In order to minimise network traffic and server CPU usage, the IR REST API sometimes uses a technique called expansion. When a REST resource uses expansion then parts of that resource will not be included in the JSON response unless explicitly requested. The way to request those fragments to be included is by using the expand query parameter.

You can use the expand query parameter to specify a comma-separated list of entities that you want expanded, identifying each of them by name. For example, appending ?expand=metadata,history to an item's URI requests the inclusion of the item metadata and item history in the response. Continuing with our example above, we would use the following URL to get that information for item 328325:

https://unidemo.iris.cineca.it:443/rest/api/v1/items/328325?expand=metadata,history

To discover the identifiers for each entity, look at the expand property in the parent object. In the JSON example below, the resource declares widgets as being expandable.

{"itemId": 328325,
"self": "/rest/api/v1/items/328325",
.....
"expand":[
"metadata",
"bitstreams",
"history",
"all"]
}

Authentication and Authorization

Authentication for REST API is HTTP Basic with using SSL.

Each request is necessary give username and password in header request that will use for http basic authentication.

For application purpose any authenticated user can operate (authorization) with specific profile or scope and can act as another IRIS user. To do this in each request  is possible set a specific HEADER TAG:

TAG HEADER		TAG VALUE

scope <ROLE_USER|ROLE_ADMIN>

on-behalf-of <username>

on-behalf-of-scope <ROLE_USER|ROLE_ADMIN>

If none scope is set the default is ROLE_USER.

Generally speaking the best way for retrieve all data is act like ROLE_ADMIN with the most powerfull user (aka restadmin)

Tag on-behalf-of is necessary only for "login as" feature. Tag on-behalf-of-scope, if not set, is ROLE_USER (default).

Index

This documents the current REST API provided by IRIS IR.

[Toggle all]
[Format all]

Items

Remember: Due to negative performance each request has a upper limit for retrived object set to 50 elements

Items JSON rappresentation explained:

rest/api/v1/items

Methods

GET 

rest/api/v1/items?expand&limit&offset&sort&asc

Returns a list of IRIS IR items for user authenticated or user set on on-behalf-of HEADER.

request query parameters
parameter value description

expand

string

a String containing acceptable expand list (separated by comma). See response for values

limit

int

a hint as to the the maximum number of items to return in each call. Note that the IRIS server reserves the right to impose a maxResults limit that is lower than the value that a client provides, dues to lack or resources or any other condition. When this happens, your results will be truncated.

offset

int

the index of the first item to return (0-based). must be 0 or any positive value

sort

string

a String containing the field based sort (default=itemId). Value: itemId | lastModified | lookupValues_year

asc

boolean

a boolean value for ascending or descending sort (default=true). Value true | false


Use Case 1: obtains author's items (alternative options to Search with POST):
TAG HEADER		TAG VALUE

scope <ROLE_ADMIN>

on-behalf-of <author username>

on-behalf-of-scope <ROLE_USER>

available response representations:

  • 200 - application/json [expand]
  • 401 - application/json [expand]
  • 500 - application/json[expand]

rest/api/v1/items/{itemid}
rest/api/v1/items/{namingAuthority}/{localName}

Methods

GET 

rest/api/v1/items/{itemid}?expand
rest/api/v1/items/namingAuthority}/{localName}?expand

Returns a IRIS IR item.

request query parameters
parameter value description

expand

string

a String containing acceptable expand list (separated by comma). See response for values

available response representations:

  • 200 - application/json [expand]
  • 401 - application/json[expand]
  • 404 - application/json[expand]
  • 500 - application/json[expand]

rest/api/v1/items/{itemid}/metadata
rest/api/v1/items/{namingAuthority}/{localName}/metadata

Methods

GET 

rest/api/v1/items/{itemid}/metadata
rest/api/v1/items/{namingAuthority}/{localName}/metadata

Returns a IRIS IR metadata item. (Hashmap key- values list)

request query parameters: none

available response representations:

  • 200 - application/json [expand]
  • 401 - application/json [expand]
  • 404 - application/json [expand]
  • 500 - application/json [expand]

rest/api/v1/items/{itemid}/metadata/{metadataKey}
rest/api/v1/items/{namingAuthority}/{localName}/metadata/{metadataKey}

Methods

GET 

rest/api/v1/items/{itemid}/metadata/{metadataKey}/
rest/api/v1/items/{namingAuthority}/{localName}/metadata/{metadataKey}/

Returns a IRIS IR specific metadata key (list of value) for specified item.

request query parameters: none

available response representations:

  • 200 - application/json [expand]
  • 401 - application/json [expand]
  • 404 - application/json [expand]
  • 500 - application/json [expand]

rest/api/v1/items/{itemid}/streams
rest/api/v1/items/{namingAuthority}/{localName}/streams

Methods

GET 

rest/api/v1/items/{itemid}/streams
rest/api/v1/items/{namingAuthority}/{localName}/streams

Returns a IRIS IR specific bitstreams item.

request query parameters: none

available response representations:

  • 200 - application/json [expand]
  • 401 - application/json [expand]
  • 404 - application/json [expand]
  • 500 - application/json [expand]

rest/api/v1/items/{itemid}/histories
rest/api/v1/items/{namingAuthority}/{localName}/histories

Methods

GET 

rest/api/v1/items/{itemid}/histories
rest/api/v1/items/{namingAuthority}/{localName}/histories

Returns a IRIS IR specific bitstreams item.

request query parameters: none

available response representations:

  • 200 - application/json [expand]
  • 401 - application/json [expand]
  • 404 - application/json [expand]
  • 500 - application/json [expand]

rest/api/v1/items/search

Methods

POST 

Search item by JSON search DTO

  • application/json [expand]

available response representations:

  • 200 - application/json [expand]
  • 401 - application/json [expand]
  • 500 - application/json [expand]

rest/api/v1/items/ids/search

Methods

POST 

Obtain incremental item id list from start id for count value

  • application/json [expand]

available response representations:

  • 200 - application/json [expand]
  • 401 - application/json [expand]
  • 500 - application/json [expand]

Collections

rest/api/v1/collections

Methods

GET 

rest/api/v1/collections?expand&limit&offset

Returns a list of IRIS IR collections.

request query parameters
parameter value description

expand

string

a String containing acceptable expand list (separated by comma). See response for values

limit

int

a hint as to the the maximum number of collections to return in each call. Note that the IRIS server reserves the right to impose a maxResults limit that is lower than the value that a client provides, dues to lack or resources or any other condition. When this happens, your results will be truncated.

offset

int

the index of the first collection to return (0-based). must be 0 or any positive value

available response representations:

  • 200 - application/json [expand]
  • 401 - application/json [expand]
  • 500 - application/json [expand]

rest/api/v1/collections/{colletionid}

Methods

GET 

rest/api/v1/collections/{colletionid}?expand

Returns a IRIS IR collection.

request query parameters
parameter value description

expand

string

a String containing acceptable expand list (separated by comma). See response for values

available response representations:

  • 200 - application/json [expand]
  • 401 - application/json [expand]
  • 404 - application/json [expand]
  • 500 - application/json [expand]

rest/api/v1/public/items/search

Methods

POST 

Search a public item (hosted in SOLR b.e.) by JSON search DTO with SOLR query

  • application/json [expand]

available response representations:

  • 200 - application/json [expand]
  • 500 - application/json [expand]

rest/api/v1/collections/{colletionid}/items

Methods

GET 

rest/api/v1/collections/{colletionid}/items?expand&limit&offset

Returns a IRIS IR collection items

request query parameters
parameter value description

expand

string

a String containing acceptable expand list (separated by comma). See response for values

limit

int

a hint as to the the maximum number of collections to return in each call. Note that the IRIS server reserves the right to impose a maxResults limit that is lower than the value that a client provides, dues to lack or resources or any other condition. When this happens, your results will be truncated.

offset

int

the index of the first collection to return (0-based). must be 0 or any positive value

available response representations:

  • 200 - application/json [expand]
  • 500 - application/json [expand]

rest/api/v1/collections/{colletionid}/licenceoptions

Methods

GET 

rest/api/v1/collections/{colletionid}/licenceoptions

Returns a IRIS IR collection license options. Important field is licenseTypeId

No request query parameters

available response representations:

  • 200 - application/json [expand]
  • 500 - application/json [expand]

rest/api/v1/collections/{colletionid}/embargoptions

Methods

GET 

rest/api/v1/collections/{colletionid}/embargoptions

Returns a IRIS IR collection embargo options. Important field is optionName

No request query parameters

available response representations:

  • 200 - application/json [expand]
  • 500 - application/json [expand]

Communities

rest/api/v1/communities

Methods

GET 

rest/api/v1/communities?expand&limit&offset

Returns a list of IRIS IR communities.

request query parameters
parameter value description

expand

string

a String containing acceptable expand list (separated by comma). See response for values

limit

int

a hint as to the the maximum number of communities to return in each call. Note that the IRIS server reserves the right to impose a maxResults limit that is lower than the value that a client provides, dues to lack or resources or any other condition. When this happens, your results will be truncated.

offset

int

the index of the first collection to return (0-based). must be 0 or any positive value

available response representations:

  • 200 - application/json [expand]
  • 401 - application/json [expand]
  • 500 - application/json [expand]

rest/api/v1/communities/{communityid}

Methods

GET 

rest/api/v1/communities/{communityid}?expand

Returns a IRIS IR collection.

request query parameters
parameter value description

expand

string

a String containing acceptable expand list (separated by comma). See response for values

available response representations:

  • 200 - application/json [expand]
  • 401 - application/json [expand]
  • 404 - application/json [expand]
  • 500 - application/json [expand]

rest/api/v1/communities/{communityid}/collections

Methods

GET 

rest/api/v1/communities/{communityid}/collections?expand

Returns a IRIS IR collection communities

request query parameters
parameter value description

expand

string

a String containing acceptable expand list (separated by comma). See response for values

available response representations:

  • 200 - application/json [expand]
  • 500 - application/json [expand]

rest/api/v1/communities/{communityid}/communities

Methods

GET 

rest/api/v1/communities/{communityid}/communities?expand

Returns a IRIS IR communities of a given community

request query parameters
parameter value description

expand

string

a String containing acceptable expand list (separated by comma). See response for values

limit

int

a hint as to the the maximum number of sub communities to return in each call. Note that the IRIS server reserves the right to impose a maxResults limit that is lower than the value that a client provides, dues to lack or resources or any other condition. When this happens, your results will be truncated.

offset

int

the index of the first collection to return (0-based). must be 0 or any positive value

available response representations:

  • 200 - application/json [expand]
  • 500 - application/json [expand]

Bitstreams

rest/api/v1/streams

Methods

GET 

rest/api/v1/collections?expand&limit&offset

Returns a list of IRIS IR bitstreams.

request query parameters
parameter value description

expand

string

a String containing acceptable expand list (separated by comma). See response for values

limit

int

a hint as to the the maximum number of bitstreams to return in each call. Note that the IRIS server reserves the right to impose a maxResults limit that is lower than the value that a client provides, dues to lack or resources or any other condition. When this happens, your results will be truncated.

offset

int

the index of the first collection to return (0-based). must be 0 or any positive value

available response representations:

  • 200 - application/json [expand]
  • 401 - application/json [expand]
  • 500 - application/json [expand]

rest/api/v1/streams/{bitstreamid}

Methods

GET 

rest/api/v1/streams/{bitstreamid}?expand

Returns a IRIS IR bitstream.

request query parameters
parameter value description

expand

string

a String containing acceptable expand list (separated by comma). See response for values

available response representations:

  • 200 - application/json [expand]
  • 401 - application/json [expand]
  • 404 - application/json [expand]
  • 500 - application/json [expand]

rest/api/v1/streams/{bitstreamid}/attachment

Methods

GET 

rest/api/v1/streams/{bitstreamid}/attachment

Returns a IRIS IR bitstream attachment

request query parameters: none

available response representations:

  • 200 - application/mimetype
  • 401 - application/json [expand]
  • 404 - application/json [expand]
  • 500 - application/json [expand]

Inputforms

rest/api/v1/inputforms/{inputformid}

Methods

GET 

rest/api/v1/inputforms/{inputformid}?expand

Returns a IRIS IR inputform.

request query parameters
parameter value description

expand

string

a String containing acceptable expand list (separated by comma). See response for values

available response representations:

  • 200 - application/json [expand]
  • 401 - application/json [expand]
  • 404 - application/json [expand]
  • 500 - application/json [expand]

rest/api/v1/inputforms/{inputformid}/form

Methods

GET 

rest/api/v1/inputforms/{inputformid}/form

Returns a IRIS IR inputform rows.

request query parameters: none

available response representations:

  • 200 - application/json [expand]
  • 401 - application/json [expand]
  • 404 - application/json [expand]
  • 500 - application/json [expand]

rest/api/v1/inputforms/{inputformid}/valuepairs

Methods

GET 

rest/api/v1/inputforms/{inputformid}/valuepairs

Returns a IRIS IR inputform value pairs.

request query parameters: none

available response representations:

  • 200 - application/json [expand]
  • 401 - application/json [expand]
  • 404 - application/json [expand]
  • 500 - application/json [expand]

Ance

rest/api/v1/ance/{crisid}

Methods

GET 

rest/api/v1/ance/{crisid}

Returns a IRIS IR ance series/journal.

request query parameters: no

available response representations:

  • 200 - application/json [expand]
  • 401 - application/json [expand]
  • 404 - application/json [expand]
  • 500 - application/json [expand]

rest/api/v1/ance/search

Methods

POST 

Search ance j/s by JSON ance search DTO

  • application/json [expand]

available response representations:

  • 200 - application/json [expand]
  • 401 - application/json [expand]
  • 500 - application/json [expand]

Authority

rest/api/v1/authorities/{metadata_key}/

Methods

GET 

rest/api/v1/authorities/{metadata_key}/?value={value}

Returns a IRIS IR decode authority values

request query parameters
parameter value description

metadata_key

string

the name of the authority metadata (Examples: dc.authority.people, dc.authority.project, dc.authority.ancejournal, dc.authority.academicField2000, dc.authority.anceserie, dc.authority.orgunit, dc.authority.advisor, dc.authority.researchcenter, dc.authority.phdCourse, dc.authority.isicrui)

value

string

a String for value search

strategy

enum

BEST|MATCH


Example
https://unidemo.iris.cineca.it:443/rest/api/v1/authorities/dc.authority.people/?value=ROSSI
https://unidemo.iris.cineca.it:443/rest/api/v1/authorities/dc.authority.academicField2000/?value=CHIM/05
https://unidemo.iris.cineca.it:443/rest/api/v1/authorities/dc.authority.academicField2000/?value=Scienza%20E%20Tecnologia%20Dei%20Materiali
https://unidemo.iris.cineca.it:443/rest/api/v1/authorities/dc.authority.phdCourse/?value=87R

available response representations:

  • 200 - application/json [expand]
  • 401 - application/json [expand]
  • 404 - application/json [expand]
  • 500 - application/json [expand]

Persons

rm/restservices/api/v1/personsbyrpid/{crisid}
rm/restservices/api/v1/personsbycf/{cf}
rm/restservices/api/v1/personsbyid/{id}

Methods

GET 

rm/restservices/api/v1/personsbyrpid/{crisid}
rm/restservices/api/v1/personsbycf/{cf}
rm/restservices/api/v1/personsbyid/{id}

Returns a IRIS RM person.

request query parameters: no

available response representations:

  • 200 - application/json [expand]
  • 404 - application/json [expand]

rm/restservices/api/v1/personsbyid/{id}/positions
rm/restservices/api/v1/personsbycf/{cf}/positions
rm/restservices/api/v1/personsbyrpid/{crisid}/positions

Methods

GET 

rm/restservices/api/v1/personsbyid/{id}/positions
rm/restservices/api/v1/personsbyrpid/{crisid}/positions
rm/restservices/api/v1/personsbycf/{cf}/positions

Returns a IRIS RM person careers.

request query parameters: no

available response representations:

  • 200 - application/json [expand]
  • 404 - application/json [expand]

rm/restservices/api/v1/personsbyid/{id}/positioncurrent
rm/restservices/api/v1/personsbycf/{cf}/positioncurrent
rm/restservices/api/v1/personsbyrpid/{crisid}/positioncurrent

Methods

GET 

rm/restservices/api/v1/personsbyid/{id}/positioncurrent
rm/restservices/api/v1/personsbycf/{cf}/positioncurrent
rm/restservices/api/v1/personsbyrpid/{crisid}/positioncurrent

Returns a IRIS RM person current career.

request query parameters: no

available response representations:

  • 200 - application/json [expand]
  • 404 - application/json [expand]