Unable to access Cloud Endpoints on GCP Endpoints Portal

5/6/2020

I created the API using GKE and Cloud Endpoint gRPC everything is fine but when I try to access my API from Endpoints Portal this is not working.

EndPoint Portal For API

Enter any id in ayah_id and try to execute you will see error.

ENOTFOUND: Error resolving domain "https://quran.endpoints.utopian-button-227405.cloud.goog"

I don't know why this is not working even my API is running successfully on http://34.71.56.199/v1/image/ayah/ayah-1 I'm using Http Transcoding actual gRPC running on 34.71.56.199:81

I think I missed some configuration steps. Can someone please let me know what I miss.

Update

api_config.yaml

# The configuration schema is defined by service.proto file
# https://github.com/googleapis/googleapis/blob/master/google/api/service.proto
type: google.api.Service
config_version: 3

name: quran.endpoints.utopian-button-227405.cloud.goog

usage:
  rules:
  # Allow unregistered calls for all methods.
  - selector: "*"
    allow_unregistered_calls: true

#
# API title to appear in the user interface (Google Cloud Console).
#
title: Quran gRPC API
apis:
- name: quran.Audio
- name: quran.Ayah
- name: quran.Edition
- name: quran.Image
- name: quran.Surah
- name: quran.Translation

Update 2

api_config.yaml

# The configuration schema is defined by service.proto file
# https://github.com/googleapis/googleapis/blob/master/google/api/service.proto
type: google.api.Service
config_version: 3

name: quran.endpoints.utopian-button-227405.cloud.goog

endpoints:
- name: quran.endpoints.utopian-button-227405.cloud.goog
  target: "34.71.56.199"

usage:
  rules:
  # Allow unregistered calls for all methods.
  - selector: "*"
    allow_unregistered_calls: true

#
# API title to appear in the user interface (Google Cloud Console).
#
title: Quran gRPC API
apis:
- name: quran.Audio
- name: quran.Ayah
- name: quran.Edition
- name: quran.Image
- name: quran.Surah
- name: quran.Translation

api_config_http.yaml

# The configuration schema is defined by service.proto file
# https://github.com/googleapis/googleapis/blob/master/google/api/service.proto
type: google.api.Service
config_version: 3

name: quran.endpoints.utopian-button-227405.cloud.goog

#
# Http Transcoding.
#
# HTTP rules define translation from HTTP/REST/JSON to gRPC. With these rules
# HTTP/REST/JSON clients will be able to call the Quran service.
#

http:
  rules:

  #
  # Image Service transcoding
  #
  - selector: quran.Image.CreateImage
    post: '/v1/image'
    body: '*'

  - selector: quran.Image.FindImageByAyahId
    get: '/v1/image/ayah/{id}'
-- Azeem Haider
google-cloud-endpoints-v2
google-cloud-platform
google-kubernetes-engine

0 Answers