{"swagger":"2.0","info":{"description":"Welcome to the Navigae REST Application Programming Interface","version":"1.10.0","title":"Navigae REST API","contact":{"name":"Navigae","url":"https://www.navigae.fr","email":"contact@navigae.fr"}},"host":"www.navigae.fr","basePath":"/","tags":[{"name":"Get","description":"Get Elasticsearch Controller"},{"name":"Information","description":"Info Controller"},{"name":"List","description":"List Controller"},{"name":"Search","description":"Search Controller"},{"name":"Update","description":"Update Controller"}],"paths":{"/api/add/fieldnote":{"put":{"tags":["Update"],"summary":"Add fieldnote.","description":"Add fieldnote to the collection","operationId":"addFieldnoteEntryUsingPUT","consumes":["multipart/form-data"],"produces":["*/*"],"parameters":[{"name":"imageFile","in":"formData","description":"The fieldnote image file.","required":true,"type":"file","default":"{}"},{"name":"jsonFile","in":"formData","description":"The fieldnote JSON file.","required":true,"type":"file","x-example":"{'type':'Fieldnotes','properties':{'title':'Sur les pas d'Emmanuel de Martonne : 3e excursion Roumanie, 1921'..."},{"name":"name","in":"query","description":"The fieldnote name (used for id and folder name).","required":true,"type":"string","allowEmptyValue":false,"x-example":"demartonne-c3"},{"name":"source","in":"query","description":"The fieldnote source.","required":true,"type":"string","allowEmptyValue":false,"x-example":"Géographie-cités"}],"responses":{"200":{"description":"The fieldnote has been added.","schema":{"$ref":"#/definitions/AbstractResponseEntity«object»"}},"400":{"description":"The JSON file is not valid","schema":{"$ref":"#/definitions/ErrorResponse"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/ErrorResponse"}},"405":{"description":"POST is the only REST method allowed.","schema":{"$ref":"#/definitions/ErrorResponse"}}},"security":[{"basicAuth":[]}],"deprecated":false}},"/api/delete/fieldnote/{name}":{"delete":{"tags":["Update"],"summary":"Delete fieldnote.","description":"Delete fieldnote from the collection","operationId":"deleteFieldnoteEntryUsingDELETE","produces":["application/json"],"parameters":[{"name":"name","in":"path","description":"The fieldnote name.","required":true,"type":"string","x-example":"demartonne-c3"}],"responses":{"200":{"description":"The fieldnote has been deleted.","schema":{"$ref":"#/definitions/AbstractResponseEntity«object»"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/ErrorResponse"}},"404":{"description":"The fieldnote id does not exist","schema":{"$ref":"#/definitions/ErrorResponse"}},"405":{"description":"POST is the only REST method allowed.","schema":{"$ref":"#/definitions/ErrorResponse"}}},"security":[{"basicAuth":[]}],"deprecated":false}},"/api/get":{"get":{"tags":["Get"],"summary":"Get a document from params.","description":"Get a document on an index (cartes, photos, or fieldnotes) with URL parameters","operationId":"getFromParamUsingGET","produces":["application/json"],"parameters":[{"name":"id","in":"query","description":"The identifier of the document.","required":true,"type":"string","allowEmptyValue":false,"x-example":"oai:nakala.fr:hdl_11280_19601585"},{"name":"index","in":"query","description":"The index (cartes, photos, or fieldnotes).","required":true,"type":"string","allowEmptyValue":false,"x-example":"cartes","enum":["cartes","photos","fieldnotes"]}],"responses":{"200":{"description":"The document was found with this id in this index.","schema":{"type":"object","additionalProperties":{"type":"object"}}},"400":{"description":"The index or the id is not set and therefore no get is possible.","schema":{"$ref":"#/definitions/ErrorResponse"}},"404":{"description":"No document exists with this id in this index.","schema":{"$ref":"#/definitions/ErrorResponse"}},"405":{"description":"GET is the only REST method allowed.","schema":{"$ref":"#/definitions/ErrorResponse"}}},"deprecated":false}},"/api/get/handle":{"get":{"tags":["Get"],"summary":"Get a document by it handle.","description":"Get a document by it handle from our Handle.net prefix 20.500.12187","operationId":"getByHandleUsingGET","produces":["application/json"],"parameters":[{"name":"handle","in":"query","description":"The handle of the document.","required":true,"type":"string","allowEmptyValue":false,"x-example":"c1c837dd-dbb2-3135-b829-6ef263b3249f"}],"responses":{"200":{"description":"The document was found with this handle.","schema":{"type":"object","additionalProperties":{"type":"object"}}},"400":{"description":"The handle is not set and therefore no get is possible.","schema":{"$ref":"#/definitions/ErrorResponse"}},"404":{"description":"No document exists with this handle.","schema":{"$ref":"#/definitions/ErrorResponse"}},"405":{"description":"GET is the only REST method allowed.","schema":{"$ref":"#/definitions/ErrorResponse"}}},"deprecated":false}},"/api/get/{index}/**":{"get":{"tags":["Get"],"summary":"Get a document from URL path.","description":"Get a document which can contain slashes on an index (cartes, photos, or fieldnotes) with URL paths. The URL can be like /get/cartes/oai:geolyon:map/e8b52018-72eb-4afb-9b5c-c382f674cfc4","operationId":"getFromPathsUsingGET","produces":["application/json"],"parameters":[{"name":"index","in":"path","description":"The index (cartes, photos, or fieldnotes).","required":true,"type":"string","x-example":"cartes","enum":["cartes","photos","fieldnotes"]}],"responses":{"200":{"description":"The document was found with this id in this index.","schema":{"type":"object","additionalProperties":{"type":"object"}}},"400":{"description":"The index or the id is not set and therefore no get is possible.","schema":{"$ref":"#/definitions/ErrorResponse"}},"404":{"description":"No document exists with this id in this index.","schema":{"$ref":"#/definitions/ErrorResponse"}},"405":{"description":"GET is the only REST method allowed.","schema":{"$ref":"#/definitions/ErrorResponse"}}},"deprecated":false}},"/api/get/{index}/{id}":{"get":{"tags":["Get"],"summary":"Get a document from URL path.","description":"Get a document on an index (cartes, photos, or fieldnotes) with URL paths","operationId":"getFromPathUsingGET","produces":["application/json"],"parameters":[{"name":"id","in":"path","description":"The identifier of the document.","required":true,"type":"string","x-example":"oai:nakala.fr:hdl_11280_19601585"},{"name":"index","in":"path","description":"The index (cartes, photos, or fieldnotes).","required":true,"type":"string","x-example":"cartes","enum":["cartes","photos","fieldnotes"]}],"responses":{"200":{"description":"The document was found with this id in this index.","schema":{"type":"object","additionalProperties":{"type":"object"}}},"400":{"description":"The index or the id is not set and therefore no get is possible.","schema":{"$ref":"#/definitions/ErrorResponse"}},"404":{"description":"No document exists with this id in this index.","schema":{"$ref":"#/definitions/ErrorResponse"}},"405":{"description":"GET is the only REST method allowed.","schema":{"$ref":"#/definitions/ErrorResponse"}}},"deprecated":false}},"/api/list/scroll":{"post":{"tags":["List"],"summary":"scroll API for the list document identifiers API.","description":"Scroll results via a scroll id for the list document identifiers API. The body should be like {\\\"scroll_id\\\": \\\"VYtZndUQlNsdDcwakFMNjU1QQ\\\", \\\"scroll\\\": \\\"1m\\\"}","operationId":"scrollListUsingPOST","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"scrollBody","description":"The scroll id.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The query is correct.","schema":{"$ref":"#/definitions/IdsListResponse"}},"400":{"description":"The body message is not a correct scroll query","schema":{"$ref":"#/definitions/ErrorResponse"}},"404":{"description":"The scroll id is not found","schema":{"$ref":"#/definitions/ErrorResponse"}},"405":{"description":"POST is the only REST method allowed.","schema":{"$ref":"#/definitions/ErrorResponse"}}},"deprecated":false}},"/api/list/{indices}":{"get":{"tags":["List"],"summary":"List document identifiers.","description":"List identifiers on indices (cartes, photos, fieldnotes). Optional scroll should be like ?scroll=1m. See the scroll API the scroll option. Optionnal size should be like ?size=100","operationId":"listIdsUsingGET","produces":["application/json"],"parameters":[{"name":"indices","in":"path","description":"The indices (cartes, photos, fieldnotes).","required":true,"type":"string","x-example":"cartes,photos,fieldnotes","enum":["cartes","photos","fieldnotes"]},{"name":"scroll","in":"query","description":"Optional scroll query.","required":false,"type":"string","allowEmptyValue":true,"x-example":"1m"},{"name":"size","in":"query","description":"Optional size.","required":false,"type":"integer","default":10000,"format":"int32","allowEmptyValue":true,"x-example":5}],"responses":{"200":{"description":"The query is correct.","schema":{"$ref":"#/definitions/IdsListResponse"}},"400":{"description":"The query is not correct.","schema":{"$ref":"#/definitions/ErrorResponse"}},"405":{"description":"GET is the only REST method allowed.","schema":{"$ref":"#/definitions/ErrorResponse"}}},"deprecated":false}},"/api/list/{indices}/filter":{"get":{"tags":["List"],"summary":"List document identifiers with filters.","description":"List identifiers on indices (cartes, photos, fieldnotes) with optional filters. Optional scroll should be like ?scroll=1m. See the scroll API the scroll option. Optionnal size should be like ?size=100","operationId":"listFilteredIdsUsingGET","produces":["application/json"],"parameters":[{"name":"indices","in":"path","description":"The indices (cartes, photos, fieldnotes).","required":true,"type":"string","x-example":"cartes,photos,fieldnotes","enum":["cartes","photos","fieldnotes"]},{"name":"lat","in":"query","description":"Optional filter around a point latitude defined in the World Geodetic System 1984 as a decimal degree. Longitude and radius must also be defined","required":false,"type":"number","format":"double","allowEmptyValue":true,"x-example":4.292875},{"name":"lon","in":"query","description":"Optional filter around a point longitude defined in the World Geodetic System 1984 as a decimal degree. Latitude and radius must also be defined","required":false,"type":"number","format":"double","allowEmptyValue":true,"x-example":-53.063572},{"name":"maxDate","in":"query","description":"Optional filter on a maximum date.","required":false,"type":"string","allowEmptyValue":true,"x-example":"2012-08-26"},{"name":"minDate","in":"query","description":"Optional filter on a minimum date.","required":false,"type":"string","allowEmptyValue":true,"x-example":"1963-12-31"},{"name":"polygon","in":"query","description":"Optional filter around a polygon. The polygon is defined as a list of at least 3 points. A point is defined as a latitude and longitude pair in the World Geodetic System 1984 as a decimal degree. The format is lat1,lon1;lat2,lon2;lat3,lon3...","required":false,"type":"string","allowEmptyValue":true,"x-example":"6.8,-54.7;1.4,-54.6;3.2,-49.4"},{"name":"radius","in":"query","description":"Optional filter around a point radius in meters. Longitude and latitude must also be defined","required":false,"type":"integer","format":"int32","allowEmptyValue":true,"x-example":1000000},{"name":"scroll","in":"query","description":"Optional scroll query.","required":false,"type":"string","allowEmptyValue":true,"x-example":"1m"},{"name":"size","in":"query","description":"Optional size.","required":false,"type":"integer","default":10000,"format":"int32","allowEmptyValue":true,"x-example":5},{"name":"toponym","in":"query","description":"Optional filter on a toponym.","required":false,"type":"string","allowEmptyValue":true,"x-example":"Kourou"}],"responses":{"200":{"description":"The query is correct.","schema":{"$ref":"#/definitions/IdsListResponse"}},"400":{"description":"The query is not correct.","schema":{"$ref":"#/definitions/ErrorResponse"}},"405":{"description":"GET is the only REST method allowed.","schema":{"$ref":"#/definitions/ErrorResponse"}}},"deprecated":false}},"/api/mapping/{index}":{"get":{"tags":["Information"],"summary":"Get the index mapping.","description":"Get the mapping of an index (cartes, photos, or fieldnotes)","operationId":"mappingUsingGET","produces":["application/json"],"parameters":[{"name":"index","in":"path","description":"The index (cartes, photos, or fieldnotes).","required":true,"type":"string","x-example":"cartes","enum":["cartes","photos","fieldnotes"]}],"responses":{"200":{"description":"The mapping is returned.","schema":{"type":"object","additionalProperties":{"type":"object"}}},"400":{"description":"The index is not set.","schema":{"$ref":"#/definitions/ErrorResponse"}},"405":{"description":"GET is the only REST method allowed.","schema":{"$ref":"#/definitions/ErrorResponse"}}},"deprecated":false}},"/api/mget/{index}":{"post":{"tags":["Get"],"summary":"Get multiple entries.","description":"Get multiple entries on an index (cartes, photos, or fieldnotes). The body should be like {\\\"ids\\\": [\\\"oai:nakala.fr:hdl_11280_19601585\\\", \\\"oai:nakala.fr:hdl_11280_2e4403f5\\\"]}","operationId":"mgetFromBodyUsingPOST","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"index","in":"path","description":"The index (cartes, photos, or fieldnotes).","required":true,"type":"string","x-example":"cartes","enum":["cartes","photos","fieldnotes"]},{"in":"body","name":"queryBody","description":"A JSON value representing an mget query.","required":true,"schema":{"type":"string"},"x-examples":{"application/json":"{ids': ['1', '2']}"}}],"responses":{"200":{"description":"The query is correct.","schema":{"$ref":"#/definitions/MGetResponse"}},"400":{"description":"The body message is not a correct mget query","schema":{"$ref":"#/definitions/ErrorResponse"}},"404":{"description":"No document exists with this id in one of the index.","schema":{"$ref":"#/definitions/ErrorResponse"}},"405":{"description":"POST is the only REST method allowed.","schema":{"$ref":"#/definitions/ErrorResponse"}}},"deprecated":false}},"/api/search/scroll":{"post":{"tags":["Search"],"summary":"Search scroll from scroll id.","description":"Scroll results from a scroll id for a search query. The body should be like {\\\"scroll_id\\\": \\\"VYtZndUQlNsdDcwakFMNjU1QQ\\\", \\\"scroll\\\": \\\"1m\\\"}","operationId":"scrollSearchUsingPOST","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"scrollBody","description":"The scroll id.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The query is correct.","schema":{"$ref":"#/definitions/SearchResponse"}},"400":{"description":"The body message is not a correct scroll query","schema":{"$ref":"#/definitions/ErrorResponse"}},"404":{"description":"The scroll id is not found","schema":{"$ref":"#/definitions/ErrorResponse"}},"405":{"description":"POST is the only REST method allowed.","schema":{"$ref":"#/definitions/ErrorResponse"}}},"deprecated":false}},"/api/search/{indices}":{"post":{"tags":["Search"],"summary":"Search by query in indices.","description":"Search through Elasticsearch syntax on indices (cartes, photos, fieldnotes). Body should be like {\\\"query\\\": {\\\"query_string\\\": {\\\"query\\\": \\\"Alpes\\\"}}}, \\\"timeout\\\": \\\"30s\\\", \\\"_source\\\": {\\\"includes\\\": [\\\"title.fr\\\", \\\"location_point.location\\\"]}}. Optional scroll should be like ?scroll=1m","operationId":"searchByQueryUsingPOST","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"indices","in":"path","description":"The indices (cartes, photos, fieldnotes).","required":true,"type":"string","x-example":"cartes,photos,fieldnotes","enum":["cartes","photos","fieldnotes"]},{"in":"body","name":"queryBody","description":"A JSON value representing an Elasticsearch search query.","required":true,"schema":{"type":"string"},"x-examples":{"application/json":"{'size': 1}"}},{"name":"scroll","in":"query","description":"Optional scroll query.","required":false,"type":"string","allowEmptyValue":true,"x-example":"1m"}],"responses":{"200":{"description":"The query is correct.","schema":{"$ref":"#/definitions/SearchResponse"}},"400":{"description":"The body message is not a correct search query for Elasticsearch","schema":{"$ref":"#/definitions/ErrorResponse"}},"405":{"description":"POST is the only REST method allowed.","schema":{"$ref":"#/definitions/ErrorResponse"}}},"deprecated":false}},"/api/search/{indices}/{text}":{"get":{"tags":["Search"],"summary":"Search by text in indices.","description":"Search globally by text on indices (cartes, photos, fieldnotes). Optional scroll should be like ?scroll=1m. Optionnal size should be like ?size=100","operationId":"searchGlobalUsingGET","produces":["application/json"],"parameters":[{"name":"indices","in":"path","description":"The indices (cartes, photos, fieldnotes).","required":true,"type":"string","x-example":"cartes,photos,fieldnotes","enum":["cartes","photos","fieldnotes"]},{"name":"scroll","in":"query","description":"Optional scroll query.","required":false,"type":"string","allowEmptyValue":true,"x-example":"1m"},{"name":"size","in":"query","description":"Optional size.","required":false,"type":"integer","default":10000,"format":"int32","allowEmptyValue":true,"x-example":5},{"name":"text","in":"path","description":"A text to search.","required":true,"type":"string","x-example":"Alpes"}],"responses":{"200":{"description":"The query is correct.","schema":{"$ref":"#/definitions/SearchResponse"}},"400":{"description":"The index or the id is not set and therefore no get is possible.","schema":{"$ref":"#/definitions/ErrorResponse"}},"405":{"description":"GET is the only REST method allowed.","schema":{"$ref":"#/definitions/ErrorResponse"}}},"deprecated":false}},"/api/similar/{index}":{"get":{"tags":["Search"],"summary":"Get similar entries.","description":"Get similar entries on an index (cartes, photos, or fieldnotes). The body should be like {\\\"ids\\\": [\\\"oai:nakala.fr:hdl_11280_19601585\\\", \\\"oai:nakala.fr:hdl_11280_2e4403f5\\\"]}","operationId":"getSimilarUsingGET","produces":["application/json"],"parameters":[{"name":"id","in":"query","description":"The identifier of the document.","required":true,"type":"string","allowEmptyValue":false,"x-example":"oai:nakala.fr:hdl_11280_19601585"},{"name":"index","in":"path","description":"The index (cartes, photos, or fieldnotes).","required":true,"type":"string","x-example":"cartes","enum":["cartes","photos","fieldnotes"]},{"name":"size","in":"query","description":"Optional size.","required":false,"type":"integer","default":10,"format":"int32","allowEmptyValue":true,"x-example":5}],"responses":{"200":{"description":"The id exists in this index.","schema":{"$ref":"#/definitions/MGetResponse"}},"404":{"description":"No document exists with this id in this index.","schema":{"$ref":"#/definitions/ErrorResponse"}},"405":{"description":"GET is the only REST method allowed.","schema":{"$ref":"#/definitions/ErrorResponse"}}},"deprecated":false}}},"securityDefinitions":{"basicAuth":{"type":"basic"}},"definitions":{"AbstractResponseEntity«object»":{"type":"object","title":"AbstractResponseEntity«object»","description":"Abstract model of response"},"Document":{"type":"object","properties":{"id":{"type":"string","example":"oai:nakala.fr:hdl_11280_19601585","description":"The identifier"},"found":{"type":"boolean","example":true,"description":"If the id is found"},"properties":{"type":"object","description":"The properties of the id","additionalProperties":{"type":"object"}}},"title":"Document","description":"A document returned"},"ErrorResponse":{"type":"object","properties":{"error":{"type":"string","example":"Body media type should be application/json","description":"The error message"},"status":{"type":"integer","format":"int32","example":400,"description":"The error status code value","enum":[400,404,405,500]}},"title":"ErrorResponse","description":"Error response"},"File":{"type":"object","properties":{"absolute":{"type":"boolean"},"absoluteFile":{"$ref":"#/definitions/File"},"absolutePath":{"type":"string"},"canonicalFile":{"$ref":"#/definitions/File"},"canonicalPath":{"type":"string"},"directory":{"type":"boolean"},"executable":{"type":"boolean"},"file":{"type":"boolean"},"freeSpace":{"type":"integer","format":"int64"},"hidden":{"type":"boolean"},"lastModified":{"type":"integer","format":"int64"},"name":{"type":"string"},"parent":{"type":"string"},"parentFile":{"$ref":"#/definitions/File"},"path":{"type":"string"},"readable":{"type":"boolean"},"totalSpace":{"type":"integer","format":"int64"},"usableSpace":{"type":"integer","format":"int64"},"writable":{"type":"boolean"}},"title":"File"},"IdsListResponse":{"type":"object","properties":{"scroll_id":{"type":"string","example":"DnF1ZXJ5VGhlbk-ZldGNoCgA=","description":"The optional scroll id returned"},"total":{"type":"integer","format":"int32","example":2,"description":"The total of documents"},"ids":{"type":"array","example":["oai:nakala.fr:hdl_11280_19601585", "oai:nakala.fr:hdl_11280_c3721b5f"],"description":"The identifier list","items":{"type":"string"}}},"title":"IdsListResponse","description":"Identifiers list response"},"InputStream":{"type":"object","title":"InputStream"},"MGetResponse":{"type":"object","properties":{"docs":{"type":"array","description":"The document list","items":{"$ref":"#/definitions/Document"}}},"title":"MGetResponse","description":"Identifiers list response"},"Resource":{"type":"object","properties":{"description":{"type":"string"},"file":{"$ref":"#/definitions/File"},"filename":{"type":"string"},"inputStream":{"$ref":"#/definitions/InputStream"},"open":{"type":"boolean"},"readable":{"type":"boolean"},"uri":{"$ref":"#/definitions/URI"},"url":{"$ref":"#/definitions/URL"}},"title":"Resource"},"SearchResponse":{"type":"object","properties":{"scroll_id":{"type":"string","example":"DnF1ZXJ5VGhlbk-ZldGNoCgA=","description":"The optional scroll id returned"},"total":{"type":"integer","format":"int32","example":42,"description":"The total of matching documents"},"documents":{"type":"array","description":"The list of documents returned","items":{"$ref":"#/definitions/Document"}}},"title":"SearchResponse","description":"Search response"},"URI":{"type":"object","properties":{"absolute":{"type":"boolean"},"authority":{"type":"string"},"fragment":{"type":"string"},"host":{"type":"string"},"opaque":{"type":"boolean"},"path":{"type":"string"},"port":{"type":"integer","format":"int32"},"query":{"type":"string"},"rawAuthority":{"type":"string"},"rawFragment":{"type":"string"},"rawPath":{"type":"string"},"rawQuery":{"type":"string"},"rawSchemeSpecificPart":{"type":"string"},"rawUserInfo":{"type":"string"},"scheme":{"type":"string"},"schemeSpecificPart":{"type":"string"},"userInfo":{"type":"string"}},"title":"URI"},"URL":{"type":"object","properties":{"authority":{"type":"string"},"content":{"type":"object"},"defaultPort":{"type":"integer","format":"int32"},"deserializedFields":{"$ref":"#/definitions/URLStreamHandler"},"file":{"type":"string"},"host":{"type":"string"},"path":{"type":"string"},"port":{"type":"integer","format":"int32"},"protocol":{"type":"string"},"query":{"type":"string"},"ref":{"type":"string"},"serializedHashCode":{"type":"integer","format":"int32"},"userInfo":{"type":"string"}},"title":"URL"},"URLStreamHandler":{"type":"object","title":"URLStreamHandler"}}}