5.6. API (REST)¶
REST API slouží pro integraci aplikace Elza s dalšími komponentami a informačními systémy. REST API je doplňkem k pokročilejšímu WSDL API.
API je popsáno pomocí OpenAPI definice.
Definice OpenAPI je dostupné na adrese: <ELZA_URL>/swagger-ui/index.html
.
5.6.1. Vstupní URL¶
Rozhraní je dostupné na adrese: <ELZA_URL>/api/v1
.
5.6.2. Definice rozhraní¶
Definice rozhraní REST: elza-openapi.yml
5.6.3. Funkce REST rozhraní¶
-
POST
/fund
¶ Založené nového archivního souboru
- Status Codes
200 OK – Úspěšné založení archivního souboru
400 Bad Request – Neplatné údaje pro založení AS
-
GET
/fund
¶ Vyhledání archivních souborů
- Query Parameters
fulltext (string) – Vyhledávaný výraz
institutionIdentifier (string) – Identifikátor instituce (podpora pro kód instituce i UUID přístupového bodu)
max (integer) – Maximální počet výsledků na stránku
from (integer) – Od kolikátého záznamu se mají výsledky vracet (0 = žádné se nepřeskočí)
- Status Codes
200 OK – Výsledek hledání AS
-
GET
/fund/{id}
¶ Získání detailu AS
- Parameters
id (string) – Identifikátor AS
- Status Codes
200 OK – Detail AS
404 Not Found – AS neexistuje
-
PUT
/fund/{id}
¶ Změna AS
- Parameters
id (string) – Identifikátor AS
- Status Codes
200 OK – Detail AS
400 Bad Request – Neplatné údaje pro úpravu AS
404 Not Found – AS neexistuje
-
PUT
/fund/{id}/import
¶ Import additional data to the existing fund.
- Parameters
id (string) – Fund ID. Might be ID or fund UUID.
- Status Codes
200 OK – Potvrzení o úspěšném importu
404 Not Found – Fund neexistuje
406 Not Acceptable – Chybný formát vstupního souboru
-
DELETE
/fund/{id}/structuredObject
¶ Smazání seznamu hodnot strukturovaného datového typu
- Parameters
id (integer) – Identifikátor AS
- Status Codes
200 OK – Seznam smazaných id hodnot strukturovaného datového typu
-
DELETE
/accesspoint/{id}/part/{partId}
¶ Delete part of ApAccessPoint
- Parameters
id (integer) – id of accesspoint
partId (integer) – partId of ApAccessPoint
- Query Parameters
apVersion (integer) – actual version of ApAccessPoint
- Status Codes
200 OK – The request has succeeded.
404 Not Found – AP neexistuje
-
PUT
/accesspoint/{id}/part/{partId}/prefer-name
¶ Set the preferred name of ApAccessPoint
- Parameters
id (integer) – id of accesspoint
partId (integer) – partId of ApAccessPoint
- Query Parameters
apVersion (integer) – actual version of ApAccessPoint
- Status Codes
200 OK – The request has succeeded.
-
POST
/accesspoint/{id}/revision/merge
¶ Merge ApRevision & ApAccessPoint
- Parameters
id (integer) – id of accesspoint
- Query Parameters
apVersion (integer) – actual version of ApAccessPoint
- Status Codes
200 OK – The request has succeeded.
-
DELETE
/accesspoint/{id}/revision/part/{partId}
¶ Delete part of revision of ApAccessPoint
- Parameters
id (integer) – id of accesspoint
partId (integer) – partId of revision
- Query Parameters
apVersion (integer) – actual version of ApAccessPoint
- Status Codes
200 OK – The request has succeeded.
404 Not Found – The server cannot find the requested resource.
-
PUT
/accesspoint/{id}/revision/part/{partId}/prefer-name
¶ Set the preferred name of revision of ApAccessPoint
- Parameters
id (integer) – id of accesspoint
partId (integer) – partId of revision
- Query Parameters
apVersion (integer) – actual version of ApAccessPoint
- Status Codes
200 OK – The request has succeeded.
404 Not Found – AP nebo revize neexistuje
-
PUT
/accesspoint/{id}/revision/state
¶ Change state of revision of ApAccessPoint
- Parameters
id (integer) – id of accesspoint
- Query Parameters
apVersion (integer) – actual version of ApAccessPoint
- Status Codes
200 OK – The request has succeeded.
404 Not Found – AP nebo revize neexistuje
-
PUT
/accesspoint/{id}/state
¶ Change state of ApAccessPoint
- Parameters
id (integer) – id of accesspoint
- Query Parameters
apVersion (integer) – actual version of ApAccessPoint
- Status Codes
200 OK – The request has succeeded.
-
DELETE
/accesspoints/{id}
¶ Zneplatnění přístupového bodu
- Parameters
id (string) – Identifikátor archivní entity
- Status Codes
200 OK – Potvrzení o úspěšném odstranění
404 Not Found – AP neexistuje
-
GET
/accesspoints/{id}/autoitems
¶ Vrátí seznam automaticky generovaných prvků popisu
- Parameters
id (string) – Identifikátor archivní entity
- Status Codes
200 OK – Seznam navržených prvků popisu
404 Not Found – AP neexistuje
-
PUT
/accesspoints/{id}/copy
¶ Kopírování archivní entity
- Parameters
id (string) – Identifikátor archivní entity
- Status Codes
200 OK – Návratová hodnota
404 Not Found – AP neexistuje
-
PUT
/accesspoints/{id}/restore
¶ Obnovení neplatné entity a návrat do původního stavu
- Parameters
id (string) – Identifikátor archivní entity
- Status Codes
200 OK – Entita byla obnovena
404 Not Found – AP neexistuje
-
PUT
/accesspoints/{id}/validate
¶ Ověřování entity
- Parameters
id (string) – Identifikátor archivní entity
- Status Codes
200 OK – Entita byla ověřena
404 Not Found – AP neexistuje
-
DELETE
/accesspoints
¶ Zneplatnění přístupovych bodu
- Status Codes
200 OK – Potvrzení o úspěšném odstranění
404 Not Found – AP neexistuje
-
POST
/revision/{id}
¶ Vytvoření nové revize přístupového bodu
- Parameters
id (integer) – Identifikátor archivní entity
- Status Codes
200 OK – Potvrzení o úspěšném založení
404 Not Found – AP neexistuje
-
DELETE
/revision/{id}
¶ Smazání revize přístupového bodu
- Parameters
id (integer) – Identifikátor archivní entity
- Status Codes
200 OK – Potvrzení o úspěšném smazání
404 Not Found – AP nebo revize neexistuje
-
GET
/revision/{id}/autoitems
¶ Vrátí seznam automaticky generovaných prvků popisu pro revizi
- Parameters
id (string) – Identifikátor archivní entity
- Status Codes
200 OK – Seznam navržených prvků popisu
404 Not Found – AP neexistuje
-
POST
/daos/{id}/change-scenario
¶ Změna scénáře napojení dao
- Parameters
id (integer) – Identifikátor dao
- Status Codes
200 OK – Změna scénáře provedena
404 Not Found – Dao neexistuje
-
POST
/search-ap
¶ searches for entity
- Status Codes
200 OK – OK
400 Bad Request – Bad Request, query with incorrect parameters
401 Unauthorized – Unauthorized
403 Forbidden – Forbidden
-
POST
/search-arr
¶ searches for entity
- Status Codes
200 OK – OK
400 Bad Request – Bad Request, query with incorrect parameters
401 Unauthorized – Unauthorized
403 Forbidden – Forbidden
-
GET
/admin/admin/arrangement/missing-cached-nodes
¶ Creating missing items in arr_cached_node
- Status Codes
200 OK – The request has succeeded.
-
GET
/admin/info/logged-users
¶ Return list of logged users
- Status Codes
200 OK – The request has succeeded.
-
GET
/fund/{fundId}/fsrepo/{fsrepoId}/item-data
¶ - Parameters
fundId (integer) – Fund ID
fsrepoId (integer) – FileSystem repository ID
- Query Parameters
path (string) – file path in the repository (Required)
- Status Codes
200 OK – The request has succeeded.
-
GET
/fund/{fundId}/fsrepo/{fsrepoId}/items
¶ - Parameters
fundId (integer) – Fund ID
fsrepoId (integer) – FileSystem repository ID
- Query Parameters
filterType (string) – Optional filter to return only folders or files. If not specified all items are returned
path (string) – Optional path in the repository
lastKey (string) – Optional parameter to return next batch of items. See FsItems for more details.
- Status Codes
200 OK – The request has succeeded.
-
PUT
/fund/{fundId}/fsrepo/{fsrepoId}/linkitem/{nodeId}
¶ - Parameters
fundId (integer) – Fund ID
fsrepoId (integer) – FileSystem repository ID
nodeId (integer) – Node ID
- Query Parameters
path (string) –
- Status Codes
200 OK – The request has succeeded.
-
GET
/fund/{fundId}/fsrepos
¶ Return list of filesystem repositories
- Parameters
fundId (integer) – Fund ID
- Status Codes
200 OK – The request has succeeded.
-
POST
/io/export
¶ Create export file of funds or access points
- Status Codes
200 OK – The request has succeeded.
-
GET
/io/export-status/{requestId}
¶ Getting the export status by request id
- Parameters
requestId (integer) –
- Status Codes
200 OK – The request has succeeded.
404 Not Found – The server cannot find the requested resource.
500 Internal Server Error – Server Error
-
GET
/io/file/{requestId}
¶ Getting the generated file by request id
- Parameters
requestId (integer) –
- Status Codes
102 Processing – Informational
200 OK – The request has succeeded.
404 Not Found – The server cannot find the requested resource.
500 Internal Server Error – Server Error