Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Il contenuto trasportato dall'oggetto JSON è il PAYLOAD.


Dalla versione v1 sono permesse solo richieste GET.

...

Tutti i nomi delle risorse disponibili resource-collection-name sono dettagliati nelle seguenti sezioni.

Per ottenere l'elenco di tutte le risorse in una raccolta, l'URL costruito deve seguire questo modello:

http://<iris-host>/gw/rest/api/<resource-collection-name>

...


Ad esempio, per recuperare un dipartimento specifico (dipartimento identificato da 328235 per esempio), si dovrebbe accedere a:
 https://<iris-host>/gw/rest/api/departments/328235

Quasi tutte le raccolte di risorse disponibili sono fornite in due varianti:

  • base (predefinito)
    1. Viene restituito solo un piccolo sottoinsieme di dati.
    2. I risultati sono divisi in pagine e ogni pagina mostra 20 risultati.
    3. Il numero di elementi per pagina può essere personalizzato fino a 500, ma non è consigliabile
  1. ,
    1. per evitare problemi di prestazioni.
    2. Per modificare la divisione delle pagine, deve essere utilizzato il parametro pageSize. 
    3. è il formato che DEVE essere utilizzato per la ricerca.
  • completo (identificato dal parametro ;full)
    1. Tutti i metadati vengono restituiti.
    2. DEVE essere utilizzato per recuperare informazioni dettagliate per un articolo specifico.
    3. Questa versione NON fornisce tutte le funzionalità di filtraggio fornite dalla controparte di base.
    4. Se questa versione viene utilizzata per effettuare una ricerca, la dimensione della pagina è limitata a un articolo per pagina per evitare problemi di prestazioni, poiché il singolo elemento può contenere molte informazioni.
    5. Nel prossimo futuro saranno presumibilmente realizzati dei miglioramenti per consentire l'aumento del numero di articoli per pagina in questa versione completa, al fine di ottimizzare l'accesso batch.


Secondo le convenzioni REST:
• viene restituito un array JSON ([]) che richiama un URL che fa riferimento a tutte le risorse in una raccolta
• viene restituito un oggetto JSON ({}) che richiama un URL che fa riferimento a una singola risorsa.

Parametri di filtro per le richieste REST

...


Tutti i parametri di filtro disponibili per ogni tipo di risorsa sono elencati nella sezione specifica per ogni raccolta.

Le convenzioni REST non specificano come costruire un URL per ottenere una risorsa specifica quando questa risorsa ha più identificatori.

Per soddisfare questo requisito, le API GW REST consentono di specificare quale identificatore si desidera utilizzare quando si effettua una richiesta.

...

Ciascuna delle precedenti richieste restituisce un array JSON contenente l'oggetto corrispondente [{}].

Tutti gli identificatori disponibili per ogni tipo di risorsa sono elencati nella sezione specifica per ogni raccolta.

Se non viene fornito alcun tipo di identificatore, l'uso dell'identificatore "id" è implicito.

...

  • id
  • pid
  • year
  • name
  • startDate
  • lastModified

...

Gestione degli errori REST

...

Nei rilasci futuri, queste intestazioni potrebbero essere saranno rinominate diventando rispettivamente Error-Code e Error-Message.

...

Ammettiamo che alcuni giorni dopo l'utente scopra un errore di battitura ortografico e riapra quell'oggetto (o, o più precisamente, riapra l'oggetto principale, perché invece l'istantanea è congelata).

Abbiamo ancora due versioni dello stesso oggetto: la master riaperta e la snapshot approvata.

...

Campi disponibili per l'ordinamento: id, pid, name, year, startDate, lastModified.

Request Query Parameters

Paramentri della Query di richiesta:

parametrovaloredescrizioneparametervaluedescription

*id

stringa String containing the ID of the item. See response for values

Stringa contenente l'id dell'ITEM

*pid

stringa String containing the persistent identifier. See response for values

Stringa contenente l'identificativo persistente

[type]

stringa String containing the item type. Contact IRIS helpdesk for all available types

Stringa contenente il tipo di Item. Fare riferimento all'helpdesk di IRIS per conoscere i tipi disponibili.

validation.relation

string

The only allowed values are Valori permessi: master|mostValidated|all. If not provided mostValidated is assumed. More infoSe non c'è, allora il valore default è mostValidated

visibleOnPortal

boolean

Questo parametro permette il filtraggio degli item basati sull'autorizzazione data dal creatore dell'elemento stesso.

I valori possibili sono TRUE e FALSE.

Se il valore di questo parametro non viene fornito, allora vengono restituiti tutti gli item

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

numberItem create year

Anno di creazione dell'item

wfState

stringa

String containing the wfState of the item. See response for valuesStringa contenente wfState dell'item

name

string

a String containing the description of the item. Stringa contenente la descrizione dell'item. Si può anche usare il carattere asterisco "*" character can be used. See response for values

person.id

string

a String containing the Stringa contenente l'IRIS person id. See response for values

person.idAb

string

a String containing the Stringa contenente il Person idAb. See response for values

person.cf

string

a String containing the Person CF (Codice Fiscale). See response for values

person.sourceId

string

a String containing the Person (for universities not using U-GOV). See response for values

person.pid

string

a String containing the Person PID (IRIS IR). See response for values

person.orcid

string

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.

department.id

string

a String containing the department id. See response for values

department.idAb

string

a String containing the department idAb (U-GOV). See response for values

department.sourceId

string

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


Esempi

Per cercare tutti gli elementi:


					https://<iris-host>/gw/rest/api/public-engagements
					

To search Item with ID like 123456


Per cercare un Item con id=123456:

					https://<iris-host>/gw/rest/api/public-engagements?id=123456
					

To search Item with miurIdentifier like 123456

Per cercare un Item con miurIdentifier=123456:


					https://<iris-host>/gw/rest/api/public-engagements?miurIdentifier=123456
					

To search Item with name like Scienze:

Per cercare un Item il cui nome è Scienze:


					https://<iris-host>/gw/rest/api/public-engagements?name=Scienze
					

To search a public-engagements on witch its owner had a currentPer cercare una TerzaMissione il cui proprietario ha un attuale (by person) or past o precedente (byDepartment) department id 4400dipartimento il cui identificativo è 4400:


					https://<iris-host>/gw/rest/api/public-engagements?department.relation=owner&department.match=byPerson&department.id=4400
	

Sono disponibili le seguenti risposte:				

...

  • BASE OUTPUT: https://<iris-host>/gw/rest/api/public-engagements/id=12345 [expand]
  • FULL OUTPUT: https://<iris-host>/gw/rest/api/public-engagements;full/id=12345 [expand]