def METHOD_NAME(annex_path):
    # If running under gunicorn, use that logger
    gunicorn_logger = logging.getLogger('gunicorn.error')
    logging.basicConfig(handlers=gunicorn_logger.handlers,
                        level=gunicorn_logger.level)
    middleware = [AuthenticateMiddleware()]
    if datalad_service.config.ELASTIC_APM_SERVER_URL:
        middleware.append(ElasticApmMiddleware(service_name='datalad-service',
                                               server_url=datalad_service.config.ELASTIC_APM_SERVER_URL))
    api = falcon.API(
        middleware=middleware)
    api.router_options.converters['path'] = PathConverter
    store = DataladStore(annex_path)
    heartbeat = HeartbeatResource()
    datasets = DatasetResource(store)
    dataset_draft = DraftResource(store)
    dataset_validation = ValidationResource(store)
    dataset_history = HistoryResource(store)
    dataset_description = DescriptionResource(store)
    dataset_files = FilesResource(store)
    dataset_objects = ObjectsResource(store)
    dataset_annex_objects = AnnexObjectsResource(store)
    dataset_publish = PublishResource(store)
    dataset_tree = TreeResource(store)
    dataset_snapshots = SnapshotResource(store)
    dataset_upload = UploadResource(store)
    dataset_upload_file = UploadFileResource(store)
    dataset_git_refs_resource = GitRefsResource(store)
    dataset_git_receive_resource = GitReceiveResource(store)
    dataset_git_upload_resource = GitUploadResource(store)
    dataset_git_annex_resource = GitAnnexResource(store)
    dataset_reexporter_resources = ReexporterResource(store)
    dataset_reset_resource = ResetResource(store)
    dataset_remote_import_resource = RemoteImportResource(store)
    api.add_route('/heartbeat', heartbeat)
    api.add_route('/datasets', datasets)
    api.add_route('/datasets/{dataset}', datasets)
    api.add_route('/datasets/{dataset}/draft', dataset_draft)
    api.add_route('/datasets/{dataset}/history', dataset_history)
    api.add_route('/datasets/{dataset}/description', dataset_description)
    api.add_route('/datasets/{dataset}/validate/{hexsha}', dataset_validation)
    api.add_route('/datasets/{dataset}/reset/{hexsha}', dataset_reset_resource)
    api.add_route('/datasets/{dataset}/files', dataset_files)
    api.add_route('/datasets/{dataset}/files/{filename:path}', dataset_files)
    api.add_route('/datasets/{dataset}/tree/{tree}', dataset_tree)
    api.add_route('/datasets/{dataset}/objects/{obj}', dataset_objects)
    api.add_route('/datasets/{dataset}/snapshots', dataset_snapshots)
    api.add_route(
        '/datasets/{dataset}/snapshots/{snapshot}', dataset_snapshots)
    api.add_route(
        '/datasets/{dataset}/snapshots/{snapshot}/files', dataset_files)
    api.add_route(
        '/datasets/{dataset}/snapshots/{snapshot}/files/{filename:path}', dataset_files)
    api.add_route(
        '/datasets/{dataset}/snapshots/{snapshot}/annex-key/{annex_key}', dataset_annex_objects)
    api.add_route(
        '/datasets/{dataset}/publish', dataset_publish
    )
    api.add_route('/datasets/{dataset}/reexport-remotes',
                  dataset_reexporter_resources)
    api.add_route(
        '/datasets/{dataset}/upload/{upload}', dataset_upload
    )
    api.add_route(
        '/uploads/{worker}/{dataset}/{upload}/{filename:path}', dataset_upload_file
    )
    api.add_route('/git/{worker}/{dataset}/info/refs',
                  dataset_git_refs_resource)
    api.add_route('/git/{worker}/{dataset}/git-receive-pack',
                  dataset_git_receive_resource)
    api.add_route('/git/{worker}/{dataset}/git-upload-pack',
                  dataset_git_upload_resource)
    api.add_route('/git/{worker}/{dataset}/annex/{key}',
                  dataset_git_annex_resource)
    # Serving keys internally as well (read only)
    api.add_route('/datasets/{dataset}/annex/{key}',
                  dataset_git_annex_resource)
    api.add_route('/datasets/{dataset}/import/{import_id}',
                  dataset_remote_import_resource)
    return api