Gitpod gitpod.v1.WebhookService API

The gitpod.v1.WebhookService API from Gitpod — 8 operation(s) for gitpod.v1.webhookservice.

OpenAPI Specification

gitpod-gitpod-v1-webhookservice-api-openapi.yml Raw ↑
openapi: 3.0.0
info:
  title: gitpod.v1 gitpod.v1.AccountService gitpod.v1.WebhookService API
  version: v1.0.0
servers:
- url: https://api.gitpod.io
  description: Gitpod API
tags:
- name: gitpod.v1.WebhookService
  x-displayName: gitpod.v1.WebhookService
paths:
  /gitpod.v1.WebhookService/CreateWebhook:
    servers: []
    post:
      description: "Creates a new webhook for receiving SCM events.\n\n Use this method to:\n - Set up webhooks for repository or organization events\n - Configure webhook scopes and provider\n\n ### Examples\n\n - Create repository webhook with multiple scopes:\n\n   Creates a webhook scoped to specific repositories.\n\n   ```yaml\n   name: \"My Repo Webhook\"\n   type: WEBHOOK_TYPE_SCM_REPOSITORY\n   scopes:\n     - host: \"github.com\"\n       owner: \"gitpod-io\"\n       name: \"gitpod\"\n     - host: \"github.com\"\n       owner: \"gitpod-io\"\n       name: \"gitpod-next\"\n   provider: WEBHOOK_PROVIDER_GITHUB\n   ```\n\n - Create organization webhook:\n\n   Creates a webhook scoped to all repositories in an organization.\n\n   ```yaml\n   name: \"Org Webhook\"\n   type: WEBHOOK_TYPE_SCM_ORGANIZATION\n   organizationScope:\n     host: \"github.com\"\n     name: \"gitpod-io\"\n   provider: WEBHOOK_PROVIDER_GITHUB\n   ```"
      operationId: gitpod.v1.WebhookService.CreateWebhook
      parameters: []
      requestBody:
        content:
          application/json:
            examples:
              create_organization_webhook:
                description: Creates a webhook scoped to all repositories in an organization.
                value:
                  name: Org Webhook
                  organizationScope:
                    host: github.com
                    name: gitpod-io
                  provider: WEBHOOK_PROVIDER_GITHUB
                  type: WEBHOOK_TYPE_SCM_ORGANIZATION
              create_repository_webhook_with_multiple_scopes:
                description: Creates a webhook scoped to specific repositories.
                value:
                  name: My Repo Webhook
                  provider: WEBHOOK_PROVIDER_GITHUB
                  scopes:
                  - host: github.com
                    name: gitpod
                    owner: gitpod-io
                  - host: github.com
                    name: gitpod-next
                    owner: gitpod-io
                  type: WEBHOOK_TYPE_SCM_REPOSITORY
            schema:
              $ref: '#/components/schemas/gitpod.v1.CreateWebhookRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/gitpod.v1.CreateWebhookResponse'
          description: Success
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/connect.error'
          description: Error
      security:
      - bearerAuth: []
      summary: CreateWebhook
      tags:
      - gitpod.v1.WebhookService
  /gitpod.v1.WebhookService/DeleteWebhook:
    servers: []
    post:
      description: "Deletes a webhook permanently.\n\n Use this method to:\n - Remove unused webhooks\n - Clean up webhook configurations\n\n ### Examples\n\n - Delete webhook:\n\n   Permanently removes a webhook.\n\n   ```yaml\n   webhookId: \"b0e12f6c-4c67-429d-a4a6-d9838b5da047\"\n   ```"
      operationId: gitpod.v1.WebhookService.DeleteWebhook
      parameters: []
      requestBody:
        content:
          application/json:
            examples:
              delete_webhook:
                description: Permanently removes a webhook.
                value:
                  webhookId: b0e12f6c-4c67-429d-a4a6-d9838b5da047
            schema:
              $ref: '#/components/schemas/gitpod.v1.DeleteWebhookRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/gitpod.v1.DeleteWebhookResponse'
          description: Success
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/connect.error'
          description: Error
      security:
      - bearerAuth: []
      summary: DeleteWebhook
      tags:
      - gitpod.v1.WebhookService
  /gitpod.v1.WebhookService/GetWebhook:
    servers: []
    post:
      description: "Gets details about a specific webhook.\n\n Use this method to:\n - View webhook configuration\n - Check webhook URL\n - See bound workflow count\n\n ### Examples\n\n - Get webhook details:\n\n   Retrieves information about a specific webhook.\n\n   ```yaml\n   webhookId: \"b0e12f6c-4c67-429d-a4a6-d9838b5da047\"\n   ```"
      operationId: gitpod.v1.WebhookService.GetWebhook
      parameters: []
      requestBody:
        content:
          application/json:
            examples:
              get_webhook_details:
                description: Retrieves information about a specific webhook.
                value:
                  webhookId: b0e12f6c-4c67-429d-a4a6-d9838b5da047
            schema:
              $ref: '#/components/schemas/gitpod.v1.GetWebhookRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/gitpod.v1.GetWebhookResponse'
          description: Success
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/connect.error'
          description: Error
      security:
      - bearerAuth: []
      summary: GetWebhook
      tags:
      - gitpod.v1.WebhookService
  /gitpod.v1.WebhookService/GetWebhookSecret:
    servers: []
    post:
      description: "Gets the webhook secret for signature validation.\n\n This operation is audited for security purposes.\n\n Use this method to:\n - Retrieve webhook secret for SCM configuration\n - Verify webhook signatures\n\n ### Examples\n\n - Get webhook secret:\n\n   Retrieves the webhook secret.\n\n   ```yaml\n   webhookId: \"b0e12f6c-4c67-429d-a4a6-d9838b5da047\"\n   ```"
      operationId: gitpod.v1.WebhookService.GetWebhookSecret
      parameters: []
      requestBody:
        content:
          application/json:
            examples:
              get_webhook_secret:
                description: Retrieves the webhook secret.
                value:
                  webhookId: b0e12f6c-4c67-429d-a4a6-d9838b5da047
            schema:
              $ref: '#/components/schemas/gitpod.v1.GetWebhookSecretRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/gitpod.v1.GetWebhookSecretResponse'
          description: Success
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/connect.error'
          description: Error
      security:
      - bearerAuth: []
      summary: GetWebhookSecret
      tags:
      - gitpod.v1.WebhookService
  /gitpod.v1.WebhookService/ListWebhookWorkflows:
    servers: []
    post:
      description: "Lists workflows bound to a webhook.\n\n Use this method to:\n - View all workflows triggered by a webhook\n - Check workflow bindings\n\n ### Examples\n\n - List webhook workflows:\n\n   Shows all workflows bound to a webhook.\n\n   ```yaml\n   webhookId: \"b0e12f6c-4c67-429d-a4a6-d9838b5da047\"\n   pagination:\n     pageSize: 20\n   ```"
      operationId: gitpod.v1.WebhookService.ListWebhookWorkflows
      parameters:
      - in: query
        name: pageSize
        schema:
          default: 25
          maximum: 100
          minimum: 0
          type: integer
      - in: query
        name: token
        schema:
          default: ''
          type: string
      requestBody:
        content:
          application/json:
            examples:
              list_webhook_workflows:
                description: Shows all workflows bound to a webhook.
                value:
                  pagination:
                    pageSize: 20
                  webhookId: b0e12f6c-4c67-429d-a4a6-d9838b5da047
            schema:
              $ref: '#/components/schemas/gitpod.v1.ListWebhookWorkflowsRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/gitpod.v1.ListWebhookWorkflowsResponse'
          description: Success
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/connect.error'
          description: Error
      security:
      - bearerAuth: []
      summary: ListWebhookWorkflows
      tags:
      - gitpod.v1.WebhookService
  /gitpod.v1.WebhookService/ListWebhooks:
    servers: []
    post:
      description: "Lists webhooks with optional filtering.\n\n Use this method to:\n - View all webhooks in an organization\n - Filter webhooks by type or provider\n\n ### Examples\n\n - List all webhooks:\n\n   Shows all webhooks with pagination.\n\n   ```yaml\n   pagination:\n     pageSize: 20\n   ```"
      operationId: gitpod.v1.WebhookService.ListWebhooks
      parameters:
      - in: query
        name: pageSize
        schema:
          default: 25
          maximum: 100
          minimum: 0
          type: integer
      - in: query
        name: token
        schema:
          default: ''
          type: string
      requestBody:
        content:
          application/json:
            examples:
              list_all_webhooks:
                description: Shows all webhooks with pagination.
                value:
                  pagination:
                    pageSize: 20
            schema:
              $ref: '#/components/schemas/gitpod.v1.ListWebhooksRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/gitpod.v1.ListWebhooksResponse'
          description: Success
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/connect.error'
          description: Error
      security:
      - bearerAuth: []
      summary: ListWebhooks
      tags:
      - gitpod.v1.WebhookService
  /gitpod.v1.WebhookService/RotateWebhookSecret:
    servers: []
    post:
      description: "Rotates the webhook secret.\n\n Use this method to:\n - Generate a new webhook secret\n - Invalidate the old webhook secret\n\n ### Examples\n\n - Rotate webhook secret:\n\n   Generates a new webhook secret.\n\n   ```yaml\n   webhookId: \"b0e12f6c-4c67-429d-a4a6-d9838b5da047\"\n   ```"
      operationId: gitpod.v1.WebhookService.RotateWebhookSecret
      parameters: []
      requestBody:
        content:
          application/json:
            examples:
              rotate_webhook_secret:
                description: Generates a new webhook secret.
                value:
                  webhookId: b0e12f6c-4c67-429d-a4a6-d9838b5da047
            schema:
              $ref: '#/components/schemas/gitpod.v1.RotateWebhookSecretRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/gitpod.v1.RotateWebhookSecretResponse'
          description: Success
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/connect.error'
          description: Error
      security:
      - bearerAuth: []
      summary: RotateWebhookSecret
      tags:
      - gitpod.v1.WebhookService
  /gitpod.v1.WebhookService/UpdateWebhook:
    servers: []
    post:
      description: "Updates a webhook's configuration.\n\n Use this method to:\n - Change webhook name or description\n - Change webhook scopes (the target repositories or organization)\n\n Note: The webhook type and provider cannot be changed after creation.\n\n ### Examples\n\n - Update webhook name:\n\n   Changes the webhook's display name.\n\n   ```yaml\n   webhookId: \"b0e12f6c-4c67-429d-a4a6-d9838b5da047\"\n   name: \"Updated Webhook Name\"\n   ```\n\n - Update webhook scopes:\n\n   Changes the webhook's target repositories.\n\n   ```yaml\n   webhookId: \"b0e12f6c-4c67-429d-a4a6-d9838b5da047\"\n   scopes:\n     - host: \"github.com\"\n       owner: \"gitpod-io\"\n       name: \"new-repo\"\n   ```"
      operationId: gitpod.v1.WebhookService.UpdateWebhook
      parameters: []
      requestBody:
        content:
          application/json:
            examples:
              update_webhook_name:
                description: Changes the webhook's display name.
                value:
                  name: Updated Webhook Name
                  webhookId: b0e12f6c-4c67-429d-a4a6-d9838b5da047
              update_webhook_scopes:
                description: Changes the webhook's target repositories.
                value:
                  scopes:
                  - host: github.com
                    name: new-repo
                    owner: gitpod-io
                  webhookId: b0e12f6c-4c67-429d-a4a6-d9838b5da047
            schema:
              $ref: '#/components/schemas/gitpod.v1.UpdateWebhookRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/gitpod.v1.UpdateWebhookResponse'
          description: Success
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/connect.error'
          description: Error
      security:
      - bearerAuth: []
      summary: UpdateWebhook
      tags:
      - gitpod.v1.WebhookService
components:
  schemas:
    gitpod.v1.Principal:
      enum:
      - PRINCIPAL_UNSPECIFIED
      - PRINCIPAL_ACCOUNT
      - PRINCIPAL_USER
      - PRINCIPAL_RUNNER
      - PRINCIPAL_ENVIRONMENT
      - PRINCIPAL_SERVICE_ACCOUNT
      - PRINCIPAL_RUNNER_MANAGER
      title: Principal
      type: string
    gitpod.v1.WorkflowTrigger.PullRequest:
      additionalProperties: false
      description: "Pull request trigger - executed when specified PR events occur.\n Only triggers for PRs in repositories matching the trigger context."
      properties:
        events:
          items:
            $ref: '#/components/schemas/gitpod.v1.WorkflowTrigger.PullRequestEvent'
          title: events
          type: array
        webhookId:
          description: "webhook_id is the optional ID of a webhook that this trigger is bound to.\n When set, the trigger will be activated when the webhook receives events.\n This allows multiple workflows to share a single webhook endpoint."
          format: uuid
          nullable: true
          title: webhook_id
          type: string
      title: PullRequest
      type: object
    gitpod.v1.ListWebhookWorkflowsRequest:
      additionalProperties: false
      description: ListWebhookWorkflowsRequest lists workflows bound to a webhook.
      properties:
        pagination:
          $ref: '#/components/schemas/gitpod.v1.PaginationRequest'
          title: pagination
        webhookId:
          format: uuid
          title: webhook_id
          type: string
      title: ListWebhookWorkflowsRequest
      type: object
    gitpod.v1.WebhookOrganizationScope:
      additionalProperties: false
      description: WebhookOrganizationScope represents an SCM organization in the webhook's scope.
      properties:
        host:
          description: host is the SCM host (e.g., "github.com", "gitlab.com")
          minLength: 1
          title: host
          type: string
        name:
          description: name is the organization or group name (e.g., "gitpod-io")
          minLength: 1
          title: name
          type: string
      title: WebhookOrganizationScope
      type: object
    gitpod.v1.WorkflowStep.Report.OutputSpec:
      additionalProperties: false
      allOf:
      - anyOf:
        - required:
          - command
        - required:
          - prompt
        - not:
            anyOf:
            - required:
              - command
            - required:
              - prompt
      - anyOf:
        - required:
          - boolean
        - required:
          - float
        - required:
          - integer
        - required:
          - string
        - not:
            anyOf:
            - required:
              - boolean
            - required:
              - float
            - required:
              - integer
            - required:
              - string
      properties:
        acceptanceCriteria:
          description: "Optional CEL expression that decides if the value is acceptable,\n e.g. is the test coverage high enough. Has one variable (value), must eval to boolean."
          nullable: true
          title: acceptance_criteria
          type: string
        boolean:
          $ref: '#/components/schemas/gitpod.v1.WorkflowStep.Report.BooleanSchema'
          title: boolean
        command:
          description: 'Extraction command must be between 1 and 20,000 characters:

            ```

            size(this) >= 1 && size(this) <= 20000

            ```


            '
          title: command
          type: string
        float:
          $ref: '#/components/schemas/gitpod.v1.WorkflowStep.Report.FloatSchema'
          title: float
        integer:
          $ref: '#/components/schemas/gitpod.v1.WorkflowStep.Report.IntegerSchema'
          title: integer
        key:
          description: 'Output key must be between 1 and 50 characters:

            ```

            size(this) >= 1 && size(this) <= 50

            ```


            Output key must be snake_case (e.g., my_output_key):

            ```

            this.matches(''^[a-z]+(_[a-z]+)*$'')

            ```


            '
          title: key
          type: string
        prompt:
          description: 'Extraction prompt must be between 1 and 20,000 characters:

            ```

            size(this) >= 1 && size(this) <= 20000

            ```


            '
          title: prompt
          type: string
        string:
          $ref: '#/components/schemas/gitpod.v1.WorkflowStep.Report.StringSchema'
          title: string
        title:
          description: 'Output title must be between 1 and 200 characters:

            ```

            size(this) >= 1 && size(this) <= 200

            ```


            '
          title: title
          type: string
      title: OutputSpec
      type: object
    gitpod.v1.RotateWebhookSecretRequest:
      additionalProperties: false
      description: RotateWebhookSecretRequest rotates the webhook secret.
      properties:
        webhookId:
          format: uuid
          title: webhook_id
          type: string
      title: RotateWebhookSecretRequest
      type: object
    gitpod.v1.RotateWebhookSecretResponse:
      additionalProperties: false
      properties:
        secret:
          description: The new webhook secret (decrypted)
          title: secret
          type: string
      title: RotateWebhookSecretResponse
      type: object
    gitpod.v1.WorkflowStep:
      additionalProperties: false
      description: WorkflowStep defines a single step in a workflow action.
      oneOf:
      - not:
          anyOf:
          - required:
            - pullRequest
          - required:
            - report
          - required:
            - task
        required:
        - agent
      - not:
          anyOf:
          - required:
            - agent
          - required:
            - report
          - required:
            - task
        required:
        - pullRequest
      - not:
          anyOf:
          - required:
            - agent
          - required:
            - pullRequest
          - required:
            - task
        required:
        - report
      - not:
          anyOf:
          - required:
            - agent
          - required:
            - pullRequest
          - required:
            - report
        required:
        - task
      properties:
        agent:
          $ref: '#/components/schemas/gitpod.v1.WorkflowStep.Agent'
          title: agent
        pullRequest:
          $ref: '#/components/schemas/gitpod.v1.WorkflowStep.PullRequest'
          title: pull_request
        report:
          $ref: '#/components/schemas/gitpod.v1.WorkflowStep.Report'
          title: report
        task:
          $ref: '#/components/schemas/gitpod.v1.WorkflowStep.Task'
          title: task
      title: WorkflowStep
      type: object
    gitpod.v1.DeleteWebhookRequest:
      additionalProperties: false
      description: DeleteWebhookRequest deletes a webhook permanently.
      properties:
        webhookId:
          format: uuid
          title: webhook_id
          type: string
      title: DeleteWebhookRequest
      type: object
    gitpod.v1.Subject:
      additionalProperties: false
      properties:
        id:
          description: id is the UUID of the subject
          format: uuid
          title: id
          type: string
        principal:
          $ref: '#/components/schemas/gitpod.v1.Principal'
          description: Principal is the principal of the subject
          title: principal
      title: Subject
      type: object
    gitpod.v1.WorkflowStep.Report.IntegerSchema:
      additionalProperties: false
      properties:
        max:
          format: int32
          nullable: true
          title: max
          type: integer
        min:
          format: int32
          nullable: true
          title: min
          type: integer
      title: IntegerSchema
      type: object
    gitpod.v1.WorkflowTriggerContext.Projects:
      additionalProperties: false
      description: "Execute workflow in specific project environments.\n Creates environments for each specified project."
      properties:
        projectIds:
          items:
            format: uuid
            maxItems: 25
            type: string
          maxItems: 25
          title: project_ids
          type: array
      title: Projects
      type: object
    connect.error:
      additionalProperties: true
      description: 'Error type returned by Connect: https://connectrpc.com/docs/go/errors/#http-representation'
      properties:
        code:
          description: The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].
          enum:
          - canceled
          - unknown
          - invalid_argument
          - deadline_exceeded
          - not_found
          - already_exists
          - permission_denied
          - resource_exhausted
          - failed_precondition
          - aborted
          - out_of_range
          - unimplemented
          - internal
          - unavailable
          - data_loss
          - unauthenticated
          example:
          - not_found
          type: string
        message:
          description: A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client.
          type: string
      title: Connect Error
      type: object
    gitpod.v1.WorkflowTriggerContext.Repositories:
      additionalProperties: false
      description: "Execute workflow in environments created from repository URLs.\n Supports both explicit repository URLs and search patterns."
      oneOf:
      - not:
          anyOf:
          - required:
            - repositoryUrls
        required:
        - repoSelector
      - not:
          anyOf:
          - required:
            - repoSelector
        required:
        - repositoryUrls
      properties:
        environmentClassId:
          format: uuid
          title: environment_class_id
          type: string
        repoSelector:
          $ref: '#/components/schemas/gitpod.v1.WorkflowTriggerContext.Repositories.RepositorySelector'
          title: repo_selector
        repositoryUrls:
          $ref: '#/components/schemas/gitpod.v1.WorkflowTriggerContext.Repositories.RepositoryURLs'
          title: repository_urls
      title: Repositories
      type: object
    gitpod.v1.WorkflowTrigger.Time:
      additionalProperties: false
      description: "Time-based trigger - executed automatically based on cron schedule.\n Uses standard cron expression format (minute hour day month weekday)."
      properties:
        cronExpression:
          description: 'Cron expression must be between 1 and 100 characters:

            ```

            size(this) >= 1 && size(this) <= 100

            ```


            '
          title: cron_expression
          type: string
      title: Time
      type: object
    gitpod.v1.PaginationRequest:
      additionalProperties: false
      properties:
        pageSize:
          description: "Page size is the maximum number of results to retrieve per page.\n Defaults to 25. Maximum 100."
          format: int32
          maximum: 100
          title: page_size
          type: integer
        token:
          description: "Token for the next set of results that was returned as next_token of a\n PaginationResponse"
          title: token
          type: string
      title: PaginationRequest
      type: object
    gitpod.v1.WorkflowStep.Report:
      additionalProperties: false
      properties:
        outputs:
          description: 'Report must have at least one output:

            ```

            size(this) >= 1

            ```


            '
          items:
            $ref: '#/components/schemas/gitpod.v1.WorkflowStep.Report.OutputSpec'
          title: outputs
          type: array
      title: Report
      type: object
    gitpod.v1.WebhookProvider:
      description: WebhookProvider identifies the Git provider.
      enum:
      - WEBHOOK_PROVIDER_UNSPECIFIED
      - WEBHOOK_PROVIDER_GITHUB
      - WEBHOOK_PROVIDER_GITLAB
      title: WebhookProvider
      type: string
    gitpod.v1.WorkflowTrigger.Manual:
      additionalProperties: false
      description: "Manual trigger - executed when StartWorkflow RPC is called.\n No additional configuration needed."
      title: Manual
      type: object
    gitpod.v1.Webhook:
      additionalProperties: false
      description: Webhook represents a webhook endpoint for receiving SCM events.
      properties:
        boundWorkflowCount:
          description: "bound_workflow_count is the number of workflows bound to this webhook\n Read-only, computed from workflow_webhook_bindings"
          format: int32
          title: bound_workflow_count
          type: integer
        id:
          description: id is the unique identifier of the webhook
          format: uuid
          title: id
          type: string
        lastTriggeredAt:
          $ref: '#/components/schemas/google.protobuf.Timestamp'
          description: "last_triggered_at is when the webhook was last triggered by an incoming event\n Read-only, updated automatically when the webhook receives an event"
          title: last_triggered_at
        metadata:
          $ref: '#/components/schemas/gitpod.v1.Webhook.Metadata'
          description: metadata contains organizational and ownership information
          title: metadata
        spec:
          $ref: '#/components/schemas/gitpod.v1.Webhook.Spec'
          description: spec contains the webhook configuration
          title: spec
        url:
          description: "url is the generated webhook endpoint URL\n Format: https://{domain}/webhooks/{id}\n Read-only, computed from id"
          title: url
          type: string
      title: Webhook
      type: object
    google.protobuf.Duration:
      description: "A Duration represents a signed, fixed-length span of time represented\n as a count of seconds and fractions of seconds at nanosecond\n resolution. It is independent of any calendar and concepts like \"day\"\n or \"month\". It is related to Timestamp in that the difference between\n two Timestamp values is a Duration and it can be added or subtracted\n from a Timestamp. Range is approximately +-10,000 years.\n\n # Examples\n\n Example 1: Compute Duration from two Timestamps in pseudo code.\n\n     Timestamp start = ...;\n     Timestamp end = ...;\n     Duration duration = ...;\n\n     duration.seconds = end.seconds - start.seconds;\n     duration.nanos = end.nanos - start.nanos;\n\n     if (duration.seconds < 0 && duration.nanos > 0) {\n       duration.seconds += 1;\n       duration.nanos -= 1000000000;\n     } else if (duration.seconds > 0 && duration.nanos < 0) {\n       duration.seconds -= 1;\n       duration.nanos += 1000000000;\n     }\n\n Example 2: Compute Timestamp from Timestamp + Duration in pseudo code.\n\n     Timestamp start = ...;\n     Duration duration = ...;\n     Timestamp end = ...;\n\n     end.seconds = start.seconds + duration.seconds;\n     end.nanos = start.nanos + duration.nanos;\n\n     if (end.nanos < 0) {\n       end.seconds -= 1;\n       end.nanos += 1000000000;\n     } else if (end.nanos >= 1000000000) {\n       end.seconds += 1;\n       end.nanos -= 1000000000;\n     }\n\n Example 3: Compute Duration from datetime.timedelta in Python.\n\n     td = datetime.timedelta(days=3, minutes=10)\n     duration = Duration()\n     duration.FromTimedelta(td)\n\n # JSON Mapping\n\n In JSON format, the Duration type is encoded as a string rather than an\n object, where the string ends in the suffix \"s\" (indicating seconds) and\n is preceded by the number of seconds, with nanoseconds expressed as\n fractional seconds. For example, 3 seconds with 0 nanoseconds should be\n encoded in JSON format as \"3s\", while 3 seconds and 1 nanosecond should\n be expressed in JSON format as \"3.000000001s\", and 3 seconds and 1\n microsecond should be expressed in JSON format as \"3.000001s\"."
      format: regex
      pattern: ^[-\+]?([0-9]+\.?[0-9]*|\.[0-9]+)s$
      type: string
    gitpod.v1.WorkflowStep.PullRequest:
      additionalProperties: false
      description: WorkflowPullRequestStep represents a pull request creation step.
      properties:
        branch:
          description: 'Branch name must be between 1 and 255 characters:

            ```

            size(this) >= 1 && size(this) <= 255

            ```


            '
          title: branch
          type: string
        description:
          description: 'Description must be at most 20,000 characters:

            ```

            size(this) <= 20000

            ```


            '
          title: description
          type: string
        draft:
          title: draft
          type: boolean
        title:
          description: 'Title must be between 1 and 500 characters:

            ```

            size(this) >= 1 && size(this) <= 500

            ```


            '
          title: title
          type: string
      title: PullRequest
      type: object
    gitpod.v1.WorkflowStep.Report.FloatSchema:
      additionalProperties: false
      properties:
        max:
          format: float
          nullable: true
          title: max
          type: number
        min:
          format: float
          nullable: true
          title: min
          type: number
      title: FloatSchema
      type: object
    gitpod.v1.WorkflowTriggerContext.FromTrigger:
      additionalProperties: false
      description: "Use context derived from the trigger event.\n Currently only supported for PullRequest triggers - uses PR repository context."
      title: FromTrigger
      type: object
    gitpod.v1.Webhook.Metadata:
      additionalProperties: false
      description: Metadata contains organizational and ownership information.
      properties:
        createdAt:
          $ref: '#/components/schemas/google.protobuf.Timestamp'
          description: created_at is when the webhook was created
          title: created_at
        creator:
          $ref: '#/components/schemas/gitpod.v1.Subject'
          description: creator is the identity of who created the webhook
          title: creator
        description:
          description: description is an optional description of the webhook's purpose
          title: description
          type: string
        name:
          description: name is the display name of the webhook
          title: name
          type: string
        organizationId:
          description: organization_id is the ID of the organization that owns this webhook
          format: uuid
          title: organization_

# --- truncated at 32 KB (60 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/gitpod/refs/heads/main/openapi/gitpod-gitpod-v1-webhookservice-api-openapi.yml