A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://cloud.google.com/endpoints/docs/frameworks/java/test-deploy below:

Deploying and testing an API | Cloud Endpoints Frameworks for App Engine

Deploying and testing an API

Stay organized with collections Save and categorize content based on your preferences.

This page describes how to deploy your API.

Before you begin Deploying an API

You can deploy your API using the App Engine Apache Maven or Gradle plugins. To deploy your API to a production App Engine standard environment, use the command for your plugin:

  1. Use the command for your plugin: Maven
    mvn appengine:deploy
    Gradle
    gradle appengineDeploy
  2. Wait for the deployment to finish.
  3. Send a test request to your deployed API. For example, using curl:

    curl \
        -H "Content-Type: application/json" \
        -X POST \
        -d '{"message": "echo"}' \
        "https://YOUR-PROJECT-ID.appspot.com/_ah/api/echo/v1/echo?n=2"
    

    Your response is similar to the following:

    {
      "message": "echo echo"
    }
    

If you didn't get a successful response, see Troubleshooting response errors.

Deploying to multiple application versions

For information on how to do API versioning, and how to deploy to versions, see Handling API versioning

Running and testing API backends locally

To test your API locally:

  1. Build the project in the root directory of the project. For example:

    Maven
    mvn clean package
    Gradle
    gradle clean build
  2. Start the App Engine development server. For example:

    Maven
    mvn appengine:run
    Gradle
    gradle appengineRun
  3. Make an API request to test your API. For example, using curl:

    curl \
        -H "Content-Type: application/json" \
        -X POST \
        -d '{"message": "echo"}' \
        "${HOST}/_ah/api/echo/v1/echo?n=2"
    
Serving your API from a different path

To serve your API from a different path, in your web.xml file, change the url-pattern in the EndpointsServlet section and redeploy your API. For example:

<servlet-mapping>
    <servlet-name>EndpointsServlet</servlet-name>
    <url-pattern>/example-api/*</url-pattern>
</servlet-mapping>
Adding API management

Endpoints Frameworks provides API management features such as:

For your API to be managed by Endpoints Frameworks, you must generate and deploy an OpenAPI document that describes your API, as described in Adding API management.

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-08-07 UTC.

[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["This guide details the process of deploying an API using either the App Engine Apache Maven or Gradle plugins, providing the necessary commands for each."],["You can test your deployed API by sending a request using `curl`, as illustrated with an example that includes the expected response format."],["The document explains how to deploy to multiple API versions and how to handle API versioning."],["It outlines the steps to run and test your API backends locally, involving project build and starting the App Engine development server."],["Endpoints Frameworks offers API management features such as monitoring, logging, quotas, and a developer portal, requiring the deployment of an OpenAPI document for full functionality."]]],[]]


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4