org.heigit.ohsome.ohsomeapi.controller.metadata.MetadataController Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ohsome-api Show documentation
Show all versions of ohsome-api Show documentation
A public Web-RESTful-API for "ohsome" OpenStreetMap history data.
The newest version!
package org.heigit.ohsome.ohsomeapi.controller.metadata;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import javax.servlet.http.HttpServletRequest;
import org.heigit.ohsome.ohsomeapi.executor.MetadataRequestExecutor;
import org.heigit.ohsome.ohsomeapi.output.metadata.MetadataResponse;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* REST controller containing the GET request, which enters through "/metadata".
*/
@Api(tags = "Metadata")
@RestController
@RequestMapping("/metadata")
public class MetadataController {
/**
* GET request giving the metadata of the underlying extract-region(s).
*
* @return {@link org.heigit.ohsome.ohsomeapi.output.metadata.MetadataResponse MetadataResponse}
*/
@GetMapping(produces = "application/json")
@ApiOperation(nickname = "Metadata", value = "Metadata of the underlying OSHDB data-extract")
public MetadataResponse getMetadata(HttpServletRequest servletRequest) {
return MetadataRequestExecutor.executeGetMetadata(servletRequest);
}
}