Is it possible to create a Cloud Endpoint in order to make HTTP calls to the Firestore REST API service?
The reason being to use a custom URL for the call - e.g. "https://whatever.com/api/things", instead of "https://firestore.googleapis.com/v1/projects/YOUR_PROJECT_ID/databases/(default)/documents/things".
I tried creating an Open API yaml file for this, but got an error:
User does not have permission to access services instance [firestore.googleapis.com] (or it may not exist): Caller does not have permission 'servicemanagement.services.update' on service 'firestore.googleapis.com'.
Is it even possible, or would I have to create a Cloud Function to achieve this instead?
UPDATE
Here is my yaml
file:
swagger: '2.0'
info:
title: "My API"
description: "Returns something"
version: 1.0.0
host: "firestore.googleapis.com"
basePath: "v1/projects/app-emojise-com/databases/(default)/documents"
schemes:
- "https"
produces:
- application/json
paths:
"/foo/{fooId}":
get:
summary: "Returns foo"
operationId: "foo"
parameters:
-
name: fooId
in: path
required: true
type: string
responses:
200:
description: "OK"
type: string
404:
description: "Error"
type: string
403:
description: "Forbidden"
type: string
I've tried following the example given here