This guide will walk you through the process of configuring and deploying APIs to integrate the outputs of your models with other systems.


Peak Work > Services > APIs allows you to manage the final stage of the API deployment process. Once you've developed your API code, written a launcher script, and created a Dockerfile along with its image, you're ready to utilize this feature.


For an end-to-end guide to this process, see Deploying APIs.



Accessing APIs

To access the APIs:

  • Navigate to Work > Services.
  • Here, you'll find services grouped into two categories: Web Apps and APIs.If your organization hasn't configured any services yet, you'll be prompted to add one.
  • If services are already configured, they'll be listed here.




Managing API type Services


Creating a new API type Service

To create a new API service:

  • Click on the DEPLOY SERVICE button.
  • Fill out the required details such as Service name, title, and description.
  • Choose API as the Service Type.



  • On the next page, select the desired API type image and its version.


  • On the next page, specify the instance size for the API.


  • Under Advanced Attributes, provide optional details like:
    • Entrypoint: Entry point for the API.
    • Health Check URL: Endpoint to verify the operational status of the API (e.g., /health).
    • Environment Variables: Plain text or Secrets (External Credentials) that will be available as envs in the Service.
  • Once all details are provided, click on DEPLOY SERVICE to initiate the deployment process.


Testing the Service

After deploying the API service, you can test the endpoint:

  1. Option to test the service is available on the Service List page and Service Details page.
  2. Click on the Test Service Icon or Button.
  3. You'll be directed to a page where you can specify the HTTP Method and Payload to test the API service.
  4. The response, along with status and response time, will be displayed.



Logs

Accessing Service Logs

To view service logs:

  • Navigate to the desired service row on the list page.
  • By default, all available logs will be displayed.
  • Optionally, you can select the duration for which you want to view the logs.


Downloading Logs

You also have the option to download logs:

  • Click on the desired service row.
  • Click on the option to download logs.
  • Select the duration of logs you wish to download.
  • Once downloaded, logs can be found in the Work > Downloads section, under the Application Logs tab.


Viewing Image Build Logs

To view image build logs:

  • Select the multi-action button in the desired service row.
  • Click on the Image Build Logs option.
  • You will be redirected to the Logs page of the specific image version used in the service.