...
Le API GW REST sono accessibili tramite un browser Web, ma si consiglia l'uso di un client specifico o di plug-in del browser (ci sono diversi plugin per Mozilla Firefox, Google Chrome, ...)
Se si tratta della prima lettura, si consiglia di consultare il documento, altrimenti è possibile passare ai dettagli del servizio REST.
Autenticazione e autorizzazione
Per accedere all'API GEST REST deve essere utilizzata l'autenticazione di base HTTP su https.
Un È necessario disporre di un account specifico è necessario e che può essere fornito dallo staff di IRIS, su richiesta.
...
Le API GW REST forniscono accesso alle risorse (entità dati) tramite i percorsi URI in base alle convenzioni REST e agli standard RFC HTTP.
Tutte le risposte sono in formato JSON (JavaScript Object Notation. È un formato leggero per lo scambio di dati, facile da leggere e scrivere per gli esseri umani e facile da generare e analizzare da parte delle macchine. Si basa su un sottoinsieme del linguaggio di programmazione JavaScript, ma è un formato di testo completamente indipendente dal linguaggio. Usa convenzioni già familiari ai programmatori dei linguaggi derivati dal C.)
Sintassi di JSON
JSON prende origine dalla sintassi degli oggetti letterali in JavaScript. Un oggetto letterale può essere definito così:
var JSON = {
proprieta1: 'Valore',
proprieta2: 'Valore',
proprietaN: 'Valore'
}
Il contenuto trasportato dall'oggetto JSON è il PAYLOAD.
Dalla formato JSON e dalla versione v1 sono permesse solo richieste GET.
Gli URI dell'API REST di GW seguono questo schema:
...
http://<iris-host>/gw/rest/api/<resource-collection-name>
...
Per ottenere una risorsa single resource l'URL costruito deve seguire questo modello
...
Ad esempio, per recuperare un dipartimento specifico (dipartimento identificato da 328235 per esempio), si dovrebbe accedere a:
https://iris.unixx.it<iris-host>/gw/rest/api/departments/328235
...
Le richieste GW REST possono specificare vari parametri di filtro che variano da raccolta a raccolta.
I parametri di query standard sono consentiti per le richieste di raccolte o di singole risorse.
Per esempio:
• https://iris.unixx.it<iris-host>/gw/rest/api/public-engagements?validation.relation=mostValidated
• https://iris.unixx.it<iris-host>/gw/rest/api/public-engagements/12345?validation.relation=mostValidated
...
Ad esempio per ottenere una singola persona è possibile utilizzare uno dei seguenti URL:
• https://iris.unixx.it<iris-host>/gw/rest/api/people/12345
• https://iris.unixx.it<iris-host>/gw/rest/api/people/id=12345 (stesso risultato di quello precedente)
• https://iris.unixx.it<iris-host>/gw/rest/api/people/pid=rp12345
• https://iris.unixx.it<iris-host>/gw/rest/api/people/idAb=67890
• https://iris.unixx.it<iris-host>/gw/rest/api/people/cf=XXXXXX00X00X000X
• https://iris.unixx.it<iris-host>/gw/rest/api/people/sourceId=xxxx
• https://iris.unixx.it<iris-host>/gw/rest/api/people/orcid=yyyyyy
...
Lo stesso risultato può essere ottenuto facendo queste richieste:
• https://iris.unixx.it<iris-host>/gw/rest/api/people?id=12345
• https://iris.unixx.it<iris-host>/gw/rest/api/people?pid=rp12345
• https://iris.unixx.it<iris-host>/gw/rest/api/people?idAb=67890
• https://iris.unixx.it<iris-host>/gw/rest/api/people?cf=XXXXXX00X00X000X
• https://iris.unixx.it<iris-host>/gw/rest/api/people?sourceId=xxxx
• https://iris.unixx.it<iris-host>/gw/rest/api/people?orcid=yyyyyy
...
- page
numero di pagina da recuperare - sort
campo di ordinamento - dir
direzione dell'ordinamento (asc, desc)
Per esempio:
• https://iris.unixx.it<iris-host>/gw/rest/api/people?page=2
• https://iris.unixx.it<iris-host>/gw/rest/api/people?name=xxx&sort=name,id
...
Resource | Source | Endpoint | Method | Base | Full | Versioned | Description |
---|---|---|---|---|---|---|---|
Projects (Progetti di ricerca) | AP | https://iris.unixx.it<iris-host>/gw/rest/api/projects | GET | X | X | Questa collezione contiene tutti i projects (Progetti di ricerca) estratti da IRIS AP | |
Calls (Bandi di finanziamento) | AP | https://iris.unixx.it<iris-host>/gw/rest/api/calls | GET | X | X | Questa collezione contiene tutti i calls for proposal (Bandi di finanziamento) estratti da IRIS AP | |
Contracts (Contratti e convenzioni) | AP | https://iris.unixx.it<iris-host>/gw/rest/api/calls | GET | X | X | Questa collezione contiene tutti i contracts and conventions (Contratti) estratti da IRIS AP | |
Equipments (Grandi attrezzature) | RM | https://iris.unixx.it<iris-host>/gw/rest/api/equipments | GET | X | X | X | Questa collezione contiene tutti gli equipments (Grandi Attrezzature) estratti da IRIS RM |
Incoming people (Mobilità in ingresso) | RM | https://iris.unixx.it<iris-host>/gw/rest/api/incoming-people | GET | X | X | Questa collezione contiene tutti gli incoming people (Mobilità in ingresso) estratti da IRIS RM | |
Laboratories (Laboratori) | RM | https://iris.unixx.it<iris-host>/gw/rest/api/laboratories | GET | X | X | X | Questa collezione contiene tutti i laboratories (Laboratori) estratti da IRIS RM |
Libraries (Biblioteche) | RM | https://iris.unixx.it<iris-host>/gw/rest/api/libraries | GET | X | X | Questa collezione contiene tutte le libraries (Biblioteche) estratte da IRIS RM | |
People (Persone) | RM | https://iris.unixx.it<iris-host>/gw/rest/api/people | GET | X | X | Questa collezione contiene people (Personale di Ateneo) estratti da IRIS RM | |
Prizes (Premi della ricerca) | RM | https://iris.unixx.it<iris-host>/gw/rest/api/prizes | GET | X | X | Questa collezione contiene tutti i prizes (Premi della ricerca) estratti da IRIS RM | |
Public Engagements (Iniziative di Public engagements - Terza Missione) | RM | https://iris.unixx.it<iris-host>/gw/rest/api/public-engagements | GET | X | X | X | Questa collezione contiene tutti i public engagements initiatives (Iniziative di public engagements - Terza Missione) estratti da IRIS RM |
Workgroups (Gruppi di ricerca) | RM | https://iris.unixx.it<iris-host>/gw/rest/api/workgroups | GET | X | X | X | Questa collezione contiene tutti i workgroups (Gruppi di ricerca) estratti da IRIS RM |
Academic Fields (SSD PRE riforma 2000) | RM | https://iris.unixx.it<iris-host>/gw/rest/api/academic-fields | GET | X | Questa collezione contiene tutti gli academic fields (SSD pre riforma 2000) estratti da IRIS RM | ||
Academic Fields 2000 (SSD POST riforma 2000) | RM | https://iris.unixx.it<iris-host>/gw/rest/api/academic-fields-2000 | GET | X | Questa collezione contiene tutti gli academic fields (SSD post riforma 2000) estratti da IRIS RM | ||
Academic Areas (Macrosettori Concorsuali) | RM | https://iris.unixx.it<iris-host>/gw/rest/api/academic-areas | GET | X | Questa collezione contiene tutti gli academic groups (Macrosettori Concorsuali) estratti da IRIS RM | ||
Academic Groups (Settori Concorsuali) | RM | https://iris.unixx.it<iris-host>/gw/rest/api/academic-groups | GET | X | Questa collezione contiene tutti gli academic groups (Settori Concorsuali) estratti da IRIS RM | ||
Departments (Dipartimenti) | RM | https://iris.unixx.it<iris-host>/gw/rest/api/departments | GET | X | Questa collezione contiene tutti i departments of the University (Dipartimenti) estratti da IRIS RM | ||
External Organizations (Organizzazioni esterne) | RM | https://iris.unixx.it<iris-host>/gw/rest/api/external-organizations | GET | X | Questa collezione contiene tutte le organizzazioni con cui l'Università ha una collaborazione (Organizzazioni esterne) estratti da IRIS RM | ||
Faculties (Facoltà) | RM | https://iris.unixx.it<iris-host>/gw/rest/api/faculties | GET | X | Questa collezione contiene tutte le faculties (Facoltà) estratte da IRIS RM | ||
Journals (Riviste) | RM | https://iris.unixx.it<iris-host>/gw/rest/api/journals | GET | X | Questa collezione contiene tutti i journals (Riviste) estratti da IRIS RM | ||
Person roles (Ruoli delle persone) | RM | https://iris.unixx.it<iris-host>/gw/rest/api/person-roles | GET | X | Questa collezione contiene tutti i person roles (Ruoli delle persone) estratti da IRIS RM | ||
Person titles (Profili delle persone) | RM | https://iris.unixx.it<iris-host>/gw/rest/api/person-titles | GET | X | Questa collezione contiene tutti i person titles (Profili delle persone) estratti da IRIS RM | ||
Publications (Pubblicazioni) - NB: in dismissione per la fine del 2019 | AP | https://iris.unixx.it<iris-host>/gw/rest/api/publications.tmp | GET | X | Questa collezione contiene tutte le pubblicazioni (Publications) estratte da IRIS IR. |
...
Campi disponibili per l'ordinamento: id, pid, name, year, startDate, lastModified
Request Query Parameters
parameter | value | description |
---|---|---|
*id | a String containing the ID of the item. See response for values | |
*pid | a String containing the persistent identifier. See response for values | |
[type] | a String containing the item type. Contact IRIS helpdesk for all available types | |
validation.relation | The only allowed values are master|mostValidated|all. If not provided mostValidated is assumed. More info | |
visibleOnPortal | This parameter allows the filtering of items based on the grant given by creator.The only allowed values are true|false. If not provided, all items are returned. |This parameter allows the filtering of items based on the grant given by creator.The only allowed values are true|false. If not provided, all items are returned. | |
year | Item create year | |
wfState | a String containing the wfState of the item. See response for values | |
name | a String containing the description of the item. "*" character can be used. See response for values | |
a String containing the IRIS person id. See response for values | ||
person.idAb | a String containing the Person idAb. See response for values | |
a String containing the Person CF (Codice Fiscale). See response for values | ||
person.sourceId | a String containing the Person (for universities not using U-GOV). See response for values | |
person.pid | a String containing the Person PID (IRIS IR). See response for values | |
person.orcid | a String containing the Person ORCID. See response for values | |
person.relation | owner|contributor | This field select a specific relation for a person. This field is intended in association with other person filters like person.cf. If you don't specify this field, all kind of relation is selected. See examples. |
a String containing the department id. See response for values | ||
department.idAb | a String containing the department idAb (U-GOV). See response for values | |
department.sourceId | a String containing the department sourceId (for universities not using U-GOV). See response for values | |
department.relation | owner|contributor | This parameter allows to specify the department role: main(owner) or secondary (contributor) Only owner|contributor values are allowed. This field must be used in association with other department filters like department.idAb. If specified, only the items that match the specified department and the role are returned. If not provided, all items that match the specified department are returned. See examples. |
department.match | byPerson|byDepartment | This parameter allows to specify the department match strategy: byPerson or byDepartment Only byPerson|byDepartment values are allowed. This field must be used in association with other department filters like department.idAb. If not provided, both strategy match are used otherwise only the one specified. The "byPerson" strategy infers the current department from the person owner/contributor The "byDepartment" strategy extract the department at item creation time. See examples. |
Examples:
To search all Item
https://arts.units.it<iris-host>/gw/rest/api/public-engagements
To search Item with ID like 123456
https://arts.units.it<iris-host>/gw/rest/api/public-engagements?id=123456
To search Item with miurIdentifier like 123456
https://arts.units.it<iris-host>/gw/rest/api/public-engagements?miurIdentifier=123456
To search Item with name like Scienze:
https://arts.units.it<iris-host>/gw/rest/api/public-engagements?name=Scienze
To search a public-engagements on witch its owner had a current(by person) or past (byDepartment) department id 4400
https://arts.units.it<iris-host>/gw/rest/api/public-engagements?department.relation=owner&department.match=byPerson&department.id=4400
available response representations: