Google Apps Script Projects API

The Projects API from Google Apps Script — 8 operation(s) for projects.

OpenAPI Specification

google-apps-script-projects-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Google Apps Script Processes Projects API
  description: The Apps Script API manages Google Apps Script projects, deployments, versions, and processes. It supports creating script projects, updating content, managing deployments, monitoring execution processes, and remotely running script functions.
  version: v1
  contact:
    name: Google
    url: https://developers.google.com/apps-script/api/concepts
servers:
- url: https://script.googleapis.com
tags:
- name: Projects
paths:
  /v1/projects:
    post:
      operationId: createProject
      summary: Google Apps Script Create Project
      description: Creates a new, empty script project with no script files.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateProjectRequest'
            examples:
              CreateprojectRequestExample:
                summary: Default createProject request
                x-microcks-default: true
                value:
                  title: Example Title
                  parentId: '500123'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Project'
              examples:
                Createproject200Example:
                  summary: Default createProject 200 response
                  x-microcks-default: true
                  value:
                    scriptId: '500123'
                    title: Example Title
                    parentId: '500123'
                    createTime: '2026-01-15T10:30:00Z'
                    updateTime: '2026-01-15T10:30:00Z'
                    creator:
                      email: user@example.com
                      name: Example Title
      tags:
      - Projects
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /v1/projects/{scriptId}:
    get:
      operationId: getProject
      summary: Google Apps Script Get Project
      description: Gets a script project's metadata.
      parameters:
      - name: scriptId
        in: path
        required: true
        schema:
          type: string
        example: '500123'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Project'
              examples:
                Getproject200Example:
                  summary: Default getProject 200 response
                  x-microcks-default: true
                  value:
                    scriptId: '500123'
                    title: Example Title
                    parentId: '500123'
                    createTime: '2026-01-15T10:30:00Z'
                    updateTime: '2026-01-15T10:30:00Z'
                    creator:
                      email: user@example.com
                      name: Example Title
      tags:
      - Projects
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /v1/projects/{scriptId}/content:
    get:
      operationId: getProjectContent
      summary: Google Apps Script Get Project Content
      description: Gets the content of the script project including code source and metadata.
      parameters:
      - name: scriptId
        in: path
        required: true
        schema:
          type: string
        example: '500123'
      - name: versionNumber
        in: query
        schema:
          type: integer
        example: 10
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Content'
              examples:
                Getprojectcontent200Example:
                  summary: Default getProjectContent 200 response
                  x-microcks-default: true
                  value:
                    scriptId: '500123'
                    files:
                    - name: Example Title
                      type: ENUM_TYPE_UNSPECIFIED
                      source: example_value
                      createTime: '2026-01-15T10:30:00Z'
                      updateTime: '2026-01-15T10:30:00Z'
      tags:
      - Projects
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    put:
      operationId: updateProjectContent
      summary: Google Apps Script Update Project Content
      description: Updates the content of the specified script project.
      parameters:
      - name: scriptId
        in: path
        required: true
        schema:
          type: string
        example: '500123'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Content'
            examples:
              UpdateprojectcontentRequestExample:
                summary: Default updateProjectContent request
                x-microcks-default: true
                value:
                  scriptId: '500123'
                  files:
                  - name: Example Title
                    type: ENUM_TYPE_UNSPECIFIED
                    source: example_value
                    createTime: '2026-01-15T10:30:00Z'
                    updateTime: '2026-01-15T10:30:00Z'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Content'
              examples:
                Updateprojectcontent200Example:
                  summary: Default updateProjectContent 200 response
                  x-microcks-default: true
                  value:
                    scriptId: '500123'
                    files:
                    - name: Example Title
                      type: ENUM_TYPE_UNSPECIFIED
                      source: example_value
                      createTime: '2026-01-15T10:30:00Z'
                      updateTime: '2026-01-15T10:30:00Z'
      tags:
      - Projects
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /v1/projects/{scriptId}/metrics:
    get:
      operationId: getProjectMetrics
      summary: Google Apps Script Get Project Metrics
      description: Get metrics data for scripts such as number of executions and active users.
      parameters:
      - name: scriptId
        in: path
        required: true
        schema:
          type: string
        example: '500123'
      - name: metricsGranularity
        in: query
        schema:
          type: string
          enum:
          - UNSPECIFIED_GRANULARITY
          - WEEKLY
          - DAILY
        example: UNSPECIFIED_GRANULARITY
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Metrics'
              examples:
                Getprojectmetrics200Example:
                  summary: Default getProjectMetrics 200 response
                  x-microcks-default: true
                  value:
                    activeUsers:
                    - {}
                    totalExecutions:
                    - {}
                    failedExecutions:
                    - {}
      tags:
      - Projects
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /v1/projects/{scriptId}/deployments:
    get:
      operationId: listDeployments
      summary: Google Apps Script List Deployments
      description: Lists the deployments of an Apps Script project.
      parameters:
      - name: scriptId
        in: path
        required: true
        schema:
          type: string
        example: '500123'
      - name: pageSize
        in: query
        schema:
          type: integer
        example: 10
      - name: pageToken
        in: query
        schema:
          type: string
        example: example_value
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListDeploymentsResponse'
              examples:
                Listdeployments200Example:
                  summary: Default listDeployments 200 response
                  x-microcks-default: true
                  value:
                    deployments:
                    - deploymentId: '500123'
                      updateTime: '2026-01-15T10:30:00Z'
                    nextPageToken: example_value
      tags:
      - Projects
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    post:
      operationId: createDeployment
      summary: Google Apps Script Create Deployment
      description: Creates a deployment of an Apps Script project.
      parameters:
      - name: scriptId
        in: path
        required: true
        schema:
          type: string
        example: '500123'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DeploymentConfig'
            examples:
              CreatedeploymentRequestExample:
                summary: Default createDeployment request
                x-microcks-default: true
                value:
                  scriptId: '500123'
                  versionNumber: 10
                  manifestFileName: example_value
                  description: A sample description.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Deployment'
              examples:
                Createdeployment200Example:
                  summary: Default createDeployment 200 response
                  x-microcks-default: true
                  value:
                    deploymentId: '500123'
                    deploymentConfig:
                      scriptId: '500123'
                      versionNumber: 10
                      manifestFileName: example_value
                      description: A sample description.
                    updateTime: '2026-01-15T10:30:00Z'
      tags:
      - Projects
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /v1/projects/{scriptId}/deployments/{deploymentId}:
    get:
      operationId: getDeployment
      summary: Google Apps Script Get Deployment
      description: Gets a deployment of an Apps Script project.
      parameters:
      - name: scriptId
        in: path
        required: true
        schema:
          type: string
        example: '500123'
      - name: deploymentId
        in: path
        required: true
        schema:
          type: string
        example: '500123'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Deployment'
              examples:
                Getdeployment200Example:
                  summary: Default getDeployment 200 response
                  x-microcks-default: true
                  value:
                    deploymentId: '500123'
                    deploymentConfig:
                      scriptId: '500123'
                      versionNumber: 10
                      manifestFileName: example_value
                      description: A sample description.
                    updateTime: '2026-01-15T10:30:00Z'
      tags:
      - Projects
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    put:
      operationId: updateDeployment
      summary: Google Apps Script Update Deployment
      description: Updates a deployment of an Apps Script project.
      parameters:
      - name: scriptId
        in: path
        required: true
        schema:
          type: string
        example: '500123'
      - name: deploymentId
        in: path
        required: true
        schema:
          type: string
        example: '500123'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateDeploymentRequest'
            examples:
              UpdatedeploymentRequestExample:
                summary: Default updateDeployment request
                x-microcks-default: true
                value:
                  deploymentConfig:
                    scriptId: '500123'
                    versionNumber: 10
                    manifestFileName: example_value
                    description: A sample description.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Deployment'
              examples:
                Updatedeployment200Example:
                  summary: Default updateDeployment 200 response
                  x-microcks-default: true
                  value:
                    deploymentId: '500123'
                    deploymentConfig:
                      scriptId: '500123'
                      versionNumber: 10
                      manifestFileName: example_value
                      description: A sample description.
                    updateTime: '2026-01-15T10:30:00Z'
      tags:
      - Projects
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    delete:
      operationId: deleteDeployment
      summary: Google Apps Script Delete Deployment
      description: Deletes a deployment of an Apps Script project.
      parameters:
      - name: scriptId
        in: path
        required: true
        schema:
          type: string
        example: '500123'
      - name: deploymentId
        in: path
        required: true
        schema:
          type: string
        example: '500123'
      responses:
        '200':
          description: Successful response
      tags:
      - Projects
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /v1/projects/{scriptId}/versions:
    get:
      operationId: listVersions
      summary: Google Apps Script List Versions
      description: List the versions of a script project.
      parameters:
      - name: scriptId
        in: path
        required: true
        schema:
          type: string
        example: '500123'
      - name: pageSize
        in: query
        schema:
          type: integer
        example: 10
      - name: pageToken
        in: query
        schema:
          type: string
        example: example_value
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListVersionsResponse'
              examples:
                Listversions200Example:
                  summary: Default listVersions 200 response
                  x-microcks-default: true
                  value:
                    versions:
                    - versionNumber: 10
                      description: A sample description.
                      createTime: '2026-01-15T10:30:00Z'
                      scriptId: '500123'
                    nextPageToken: example_value
      tags:
      - Projects
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    post:
      operationId: createVersion
      summary: Google Apps Script Create Version
      description: Creates a new immutable version using the current code.
      parameters:
      - name: scriptId
        in: path
        required: true
        schema:
          type: string
        example: '500123'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Version'
            examples:
              CreateversionRequestExample:
                summary: Default createVersion request
                x-microcks-default: true
                value:
                  versionNumber: 10
                  description: A sample description.
                  createTime: '2026-01-15T10:30:00Z'
                  scriptId: '500123'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Version'
              examples:
                Createversion200Example:
                  summary: Default createVersion 200 response
                  x-microcks-default: true
                  value:
                    versionNumber: 10
                    description: A sample description.
                    createTime: '2026-01-15T10:30:00Z'
                    scriptId: '500123'
      tags:
      - Projects
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /v1/projects/{scriptId}/versions/{versionNumber}:
    get:
      operationId: getVersion
      summary: Google Apps Script Get Version
      description: Gets a version of a script project.
      parameters:
      - name: scriptId
        in: path
        required: true
        schema:
          type: string
        example: '500123'
      - name: versionNumber
        in: path
        required: true
        schema:
          type: integer
        example: 10
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Version'
              examples:
                Getversion200Example:
                  summary: Default getVersion 200 response
                  x-microcks-default: true
                  value:
                    versionNumber: 10
                    description: A sample description.
                    createTime: '2026-01-15T10:30:00Z'
                    scriptId: '500123'
      tags:
      - Projects
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
components:
  schemas:
    Version:
      type: object
      properties:
        versionNumber:
          type: integer
          example: 10
        description:
          type: string
          example: A sample description.
        createTime:
          type: string
          format: date-time
          example: '2026-01-15T10:30:00Z'
        scriptId:
          type: string
          example: '500123'
    UpdateDeploymentRequest:
      type: object
      properties:
        deploymentConfig:
          $ref: '#/components/schemas/DeploymentConfig'
    Content:
      type: object
      properties:
        scriptId:
          type: string
          example: '500123'
        files:
          type: array
          items:
            $ref: '#/components/schemas/File'
          example: []
    File:
      type: object
      properties:
        name:
          type: string
          example: Example Title
        type:
          type: string
          enum:
          - ENUM_TYPE_UNSPECIFIED
          - SERVER_JS
          - HTML
          - JSON
          example: ENUM_TYPE_UNSPECIFIED
        source:
          type: string
          example: example_value
        createTime:
          type: string
          format: date-time
          example: '2026-01-15T10:30:00Z'
        updateTime:
          type: string
          format: date-time
          example: '2026-01-15T10:30:00Z'
    DeploymentConfig:
      type: object
      properties:
        scriptId:
          type: string
          example: '500123'
        versionNumber:
          type: integer
          example: 10
        manifestFileName:
          type: string
          example: example_value
        description:
          type: string
          example: A sample description.
    CreateProjectRequest:
      type: object
      properties:
        title:
          type: string
          example: Example Title
        parentId:
          type: string
          example: '500123'
    Deployment:
      type: object
      properties:
        deploymentId:
          type: string
          example: '500123'
        deploymentConfig:
          $ref: '#/components/schemas/DeploymentConfig'
        updateTime:
          type: string
          format: date-time
          example: '2026-01-15T10:30:00Z'
    Project:
      type: object
      properties:
        scriptId:
          type: string
          example: '500123'
        title:
          type: string
          example: Example Title
        parentId:
          type: string
          example: '500123'
        createTime:
          type: string
          format: date-time
          example: '2026-01-15T10:30:00Z'
        updateTime:
          type: string
          format: date-time
          example: '2026-01-15T10:30:00Z'
        creator:
          type: object
          properties:
            email:
              type: string
            name:
              type: string
          example: example_value
    ListVersionsResponse:
      type: object
      properties:
        versions:
          type: array
          items:
            $ref: '#/components/schemas/Version'
          example: []
        nextPageToken:
          type: string
          example: example_value
    ListDeploymentsResponse:
      type: object
      properties:
        deployments:
          type: array
          items:
            $ref: '#/components/schemas/Deployment'
          example: []
        nextPageToken:
          type: string
          example: example_value
    Metrics:
      type: object
      properties:
        activeUsers:
          type: array
          items:
            type: object
          example: []
        totalExecutions:
          type: array
          items:
            type: object
          example: []
        failedExecutions:
          type: array
          items:
            type: object
          example: []