gitpod.v1.EnvironmentAutomationService

CreateService

Creates a new automation service for an environment.

Use this method to:

  • Set up long-running services
  • Configure service triggers
  • Define service dependencies
  • Specify runtime environments

Examples

  • Create basic service:

    Creates a simple service with start command.

    environmentId: "07e03a28-65a5-4d98-b532-8ea67b188048"
    metadata:
      reference: "web-server"
      name: "Web Server"
      description: "Runs the development web server"
      triggeredBy:
        - postDevcontainerStart: true
    spec:
      commands:
        start: "npm run dev"
        ready: "curl -s http://localhost:3000"
    
  • Create Docker-based service:

    Creates a service running in a specific container.

    environmentId: "07e03a28-65a5-4d98-b532-8ea67b188048"
    metadata:
      reference: "redis"
      name: "Redis Server"
      description: "Redis cache service"
    spec:
      commands:
        start: "redis-server"
      runsOn:
        docker:
          image: "redis:7"
    
post/gitpod.v1.EnvironmentAutomationService/CreateService

Request body

environmentIdstring uuid
metadataGitpodV1ServiceMetadata — unresolved $ref

Response

Success

Changes