Method Requests Avg req size Avg resp size 4xx 5xx Latency 98% Latency 95% Latency median
GET /1.0.0/test 12 201 B 221 B 0 0 784 ms 460 ms 50 ms
GET /1.0.0/test2 0 - - 0 0 - - -
on that same page there's some links to logs, and so checking the google cloud platform endpoints log, I do see the requests to /test2/ and here's the log detail
url: "/1.0.0/test2/?key=[... my api key ...]"
producer_project_id: "[.. my project id...]"
request_latency_in_ms: 0
request_size: 221
error_cause: "service_control"
http_response_code: 404
response_size: 362
location: "us-central1-b"
log_message: "Endpoints management skipped for an unrecognized HTTP call: GET /1.0.0/test2/?key=[... my key here ..]"
http_method: "GET"
timestamp: 1492025976.863675
5. so here's a test call to /1.0.0/test/ just using curl, and you can see the working response "hello world"
curl -k -v -X GET https://[... my host here ...]/1.0.0/test/?key=[... my key here ...]
* About to connect() to [.. my host here ...] port 443 (#0)
* Trying 130.211.189.191... connected
* Connected to [.. my host here ..] (130.211.189.191) port 443 (#0)
* Initializing NSS with certpath: sql:/etc/pki/nssdb
* warning: ignoring value of ssl.verifyhost
* skipping SSL peer certificate verification
* SSL connection using TLS_RSA_WITH_AES_256_CBC_SHA
* Server certificate:
* subject: CN=[.. my host here ...],OU=PositiveSSL,OU=Domain Control Validated
* start date: Apr 08 00:00:00 2017 GMT
* expire date: Apr 07 23:59:59 2020 GMT
* common name: [... my host here ...]
* issuer: CN=COMODO RSA Domain Validation Secure Server CA,O=COMODO CA Limited,L=Salford,ST=Greater Manchester,C=GB
> GET /1.0.0/test/?key=[... my key here ...] HTTP/1.1
> User-Agent: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.15.3 zlib/1.2.3 libidn/1.18 libssh2/1.4.2
> Host: [... my host here ...]
> Accept: */*
>
< HTTP/1.1 200 OK
< Server: nginx
< Date: Wed, 12 Apr 2017 19:28:47 GMT
< Content-Type: text/html; charset=UTF-8
< Content-Length: 11
< Connection: keep-alive
< X-Powered-By: PHP/7.1.2
<
* Connection #0 to host [... my host here ..] left intact
* Closing connection #0
hello world
and here's a call to the path I just added
curl -k -v -X GET https://[.. my host here..]/1.0.0/test2/?key=[.. my key here..]
* About to connect() to [.. my host here..] port 443 (#0)
* Trying 130.211.189.191... connected
* Connected to [.. my host here..] (130.211.189.191) port 443 (#0)
* Initializing NSS with certpath: sql:/etc/pki/nssdb
* warning: ignoring value of ssl.verifyhost
* skipping SSL peer certificate verification
* SSL connection using TLS_RSA_WITH_AES_256_CBC_SHA
* Server certificate:
* subject: CN=[.. my host here..],OU=PositiveSSL,OU=Domain Control Validated
* start date: Apr 08 00:00:00 2017 GMT
* expire date: Apr 07 23:59:59 2020 GMT
* common name: [.. my host here..]
* issuer: CN=COMODO RSA Domain Validation Secure Server CA,O=COMODO CA Limited,L=Salford,ST=Greater Manchester,C=GB
> GET /1.0.0/test2/?key=[.. my key here..] HTTP/1.1
> User-Agent: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.15.3 zlib/1.2.3 libidn/1.18 libssh2/1.4.2
> Host: [.. my host here..]
> Accept: */*
>
< HTTP/1.1 404 Not Found
< Server: nginx
< Date: Wed, 12 Apr 2017 19:31:32 GMT
< Content-Type: application/json
< Transfer-Encoding: chunked
< Connection: keep-alive
<
{
"code": 5,
"message": "Method does not exist.",
"details": [
{
"stackEntries": [],
"detail": "service_control"
}
]
}
* Connection #0 to host [.. my host here..] left intact
* Closing connection #0
just in case you're wondering if /test2 its there, it is and I can hit both urls on the internal ip
first /1.0.0/test/
curl -v -X GET http://10.1.0.3:8081/1.0.0/test/
* About to connect() to 10.1.0.3 port 8081 (#0)
* Trying 10.1.0.3... connected
* Connected to 10.1.0.3 (10.1.0.3) port 8081 (#0)
> GET /1.0.0/test/ HTTP/1.1
> User-Agent: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.15.3 zlib/1.2.3 libidn/1.18 libssh2/1.4.2
> Host: 10.1.0.3:8081
> Accept: */*
>
< HTTP/1.1 200 OK
< Date: Wed, 12 Apr 2017 19:40:37 GMT
< Server: Apache/2.4.25 (Unix) PHP/7.1.2
< X-Powered-By: PHP/7.1.2
< Content-Length: 11
< Content-Type: text/html; charset=UTF-8
<
* Connection #0 to host 10.1.0.3 left intact
* Closing connection #0
hello world
and /test2/
curl -v -X GET http://10.1.0.3:8081/1.0.0/test2/
* About to connect() to 10.1.0.3 port 8081 (#0)
* Trying 10.1.0.3... connected
* Connected to 10.1.0.3 (10.1.0.3) port 8081 (#0)
> GET /1.0.0/test2/ HTTP/1.1
> User-Agent: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.15.3 zlib/1.2.3 libidn/1.18 libssh2/1.4.2
> Host: 10.1.0.3:8081
> Accept: */*
>
< HTTP/1.1 200 OK
< Date: Wed, 12 Apr 2017 19:40:44 GMT
< Server: Apache/2.4.25 (Unix) PHP/7.1.2
< X-Powered-By: PHP/7.1.2
< Content-Length: 13
< Content-Type: text/html; charset=UTF-8
<
* Connection #0 to host 10.1.0.3 left intact
* Closing connection #0
hello world 2
any help appreciated. while I'm familiar with using api's and all of my experience is with unix/php for this, I'm still wrapping my head around endpoints and all the terminology around openapi etc.
swagger: "2.0"
info:
description: "A simple Google Cloud Endpoints API example."
title: "Endpoints Example"
version: "1.0.0"
host: "[... my host here ...]"
basePath: "/1.0.0"
consumes:
- "application/json"
produces:
- "application/json"
schemes:
- "http"
paths:
"/test":
get:
description: "Echo back a given message."
operationId: "echo"
produces:
- "application/json"
responses:
200:
description: "Echo"
schema:
$ref: "#/definitions/echoMessage"
security:
- api_key: []
"/test2":
get:
description: "Echo back a given message."
operationId: "echo2"
produces:
- "application/json"
responses:
200:
description: "Echo"
schema:
$ref: "#/definitions/echoMessage"
security:
- api_key: []
definitions:
echoMessage:
properties:
message:
type: "string"
securityDefinitions:
# This section configures basic authentication with an API key.
api_key:
type: "apiKey"
name: "key"
in: "query"