Note that there are some explanatory texts on larger screens.

plurals
  1. POWhy is my API not showing up on deployment?
    primarykey
    data
    text
    <p>I suspect this is caused by the following bug in Endpoints (if valid) but I'm also sure there's a workaround somewhere.</p> <p><a href="https://code.google.com/p/googleappengine/issues/detail?id=9050&amp;can=4&amp;colspec=ID%20Type%20Component%20Status%20Stars%20Summary%20Language%20Priority%20Owner%20Log" rel="nofollow">https://code.google.com/p/googleappengine/issues/detail?id=9050&amp;can=4&amp;colspec=ID%20Type%20Component%20Status%20Stars%20Summary%20Language%20Priority%20Owner%20Log</a></p> <p>Steps to reproduce:</p> <ol> <li>Change a method name, API name of a method, or parameter list in an Endpoints class.</li> <li>Run the endpoints.sh script to generate the API files.</li> <li>Inspect the API files locally and witness the changes being there. So far so good.</li> <li>Deploy to the default version of the app on the server.</li> <li>Check the logs for the call to /_ah/spi/BackendService.getApiConfigs. There are no errors!</li> <li>Go to API Explorer and clear the browser cache. Inspect the API. The change is not there.</li> <li>Request the API file directly in the browser, eg. https://[app-id].appspot.com/_ah/api/discovery/v1/apis/[api-name]/v1/rpc The change is not there.</li> </ol> <p>Frustrated with the above, I decided to start completely from scratch on a new app ID. I still see no API in the API Explorer and get a 404 on the URL in step 7 above!</p> <p>Here's my endpoint class:</p> <pre><code>@Api(name = "ditto", version = "v1") public class CategoryEndpoint extends BaseEndpoint { @SuppressWarnings("unused") private static final Logger log = Logger.getLogger(CategoryEndpoint.class.getName()); @ApiMethod(name = "category.list") public WireCategory list() { Category root = categoryDao.getRoot(); WireCategory wireRootCategory = new WireCategory(root); return wireRootCategory; } } </code></pre> <p>And here's the generated .api file:</p> <pre><code>{ "extends" : "thirdParty.api", "abstract" : false, "root" : "https://1.eliot-dev-uk-ditto-do.appspot.com/_ah/api", "name" : "ditto", "version" : "v1", "defaultVersion" : false, "adapter" : { "bns" : "https://1.eliot-dev-uk-ditto-do.appspot.com/_ah/spi", "deadline" : 10.0, "type" : "lily" }, "auth" : { "allowCookieAuth" : false }, "frontendLimits" : { "unregisteredUserQps" : -1, "unregisteredQps" : -1, "unregisteredDaily" : -1, "rules" : [ ] }, "cacheControl" : { "type" : "no-cache", "maxAge" : 0 }, "methods" : { "ditto.category.list" : { "path" : "list", "httpMethod" : "GET", "scopes" : [ ], "audiences" : [ ], "clientIds" : [ ], "rosyMethod" : "ditto.api.CategoryEndpoint.list", "request" : { "body" : "empty" }, "response" : { "body" : "autoTemplate(backendResponse)" } } }, "descriptor" : { "schemas" : { "WireCategory" : { "id" : "WireCategory", "type" : "object", "properties" : { "webSafePath" : { "type" : "string" }, "prettyPath" : { "type" : "string" }, "children" : { "type" : "array", "items" : { "$ref" : "WireCategory" } }, "path" : { "type" : "array", "items" : { "type" : "string" } }, "name" : { "type" : "string" }, "id" : { "type" : "string", "format" : "int64" } } } }, "methods" : { "ditto.api.CategoryEndpoint.list" : { "response" : { "$ref" : "WireCategory" } } } } } </code></pre> <p>This URL gives me a 404 where I expect to see my API JSON:</p> <p><a href="https://eliot-dev-uk-ditto-do.appspot.com/_ah/api/discovery/v1/apis/ditto/v1" rel="nofollow">https://eliot-dev-uk-ditto-do.appspot.com/_ah/api/discovery/v1/apis/ditto/v1</a></p> <p>This is killing me!</p> <p>EDIT:</p> <p>Here's a diff I just spotted between the .api file generated by App Engine 1.7.5 and 1.7.6. Not sure why the URLs have changed.</p> <pre><code>ditto-v1.api from 1.7.6: { "extends" : "thirdParty.api", "abstract" : false, "root" : "https://1.eliot-dev-uk-ditto-do.appspot.com/_ah/api", "name" : "ditto", "version" : "v1", "defaultVersion" : false, "adapter" : { "bns" : "https://1.eliot-dev-uk-ditto-do.appspot.com/_ah/spi", "deadline" : 10.0, "type" : "lily" } ... ditto-v1.api from 1.7.5: { "extends" : "thirdParty.api", "abstract" : false, "root" : "https://eliot-dev-uk-ditto-do.appspot.com/_ah/api", "name" : "ditto", "version" : "v1", "defaultVersion" : false, "adapter" : { "bns" : "http://eliot-dev-uk-ditto-do.appspot.com/_ah/spi", "deadline" : 10.0, "type" : "lily" } ... </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload