# Apps Script API . projects . versions

## Instance Methods

Creates a new immutable version using the current code, with a unique

Gets a version of a script project.

List the versions of a script project.

Retrieves the next page of results.

### Method Details

`create(scriptId, body=None, x__xgafv=None)`

    Creates a new immutable version using the current code, with a unique
    version number.

    Args:
      scriptId: string, The script project's Drive ID. (required)
      body: object, The request body.
        The object takes the form of:

    { # A resource representing a script project version. A version is a "snapshot"
        # of a script project and is similar to a read-only branched release. When
        # creating deployments, the version to use must be specified.
      "createTime": "A String", # When the version was created.
      "versionNumber": 42, # The incremental ID that is created by Apps Script when a version is
          # created. This is system assigned number and is immutable once created.
      "description": "A String", # The description for this version.
      "scriptId": "A String", # The script project's Drive ID.
    }

      x__xgafv: string, V1 error format.
        Allowed values
          1 - v1 error format
          2 - v2 error format

    Returns:
      An object of the form:

        { # A resource representing a script project version. A version is a "snapshot"
          # of a script project and is similar to a read-only branched release. When
          # creating deployments, the version to use must be specified.
        "createTime": "A String", # When the version was created.
        "versionNumber": 42, # The incremental ID that is created by Apps Script when a version is
            # created. This is system assigned number and is immutable once created.
        "description": "A String", # The description for this version.
        "scriptId": "A String", # The script project's Drive ID.
      }

`get(scriptId, versionNumber, x__xgafv=None)`

    Gets a version of a script project.

    Args:
      scriptId: string, The script project's Drive ID. (required)
      versionNumber: integer, The version number. (required)
      x__xgafv: string, V1 error format.
        Allowed values
          1 - v1 error format
          2 - v2 error format

    Returns:
      An object of the form:

        { # A resource representing a script project version. A version is a "snapshot"
          # of a script project and is similar to a read-only branched release. When
          # creating deployments, the version to use must be specified.
        "createTime": "A String", # When the version was created.
        "versionNumber": 42, # The incremental ID that is created by Apps Script when a version is
            # created. This is system assigned number and is immutable once created.
        "description": "A String", # The description for this version.
        "scriptId": "A String", # The script project's Drive ID.
      }

`list(scriptId, pageToken=None, pageSize=None, x__xgafv=None)`

    List the versions of a script project.

    Args:
      scriptId: string, The script project's Drive ID. (required)
      pageToken: string, The token for continuing a previous list request on the next page. This
    should be set to the value of `nextPageToken` from a previous response.
      pageSize: integer, The maximum number of versions on each returned page. Defaults to 50.
      x__xgafv: string, V1 error format.
        Allowed values
          1 - v1 error format
          2 - v2 error format

    Returns:
      An object of the form:

        { # Response with the list of the versions for the specified script project.
        "versions": [ # The list of versions.
          { # A resource representing a script project version. A version is a "snapshot"
              # of a script project and is similar to a read-only branched release. When
              # creating deployments, the version to use must be specified.
            "createTime": "A String", # When the version was created.
            "versionNumber": 42, # The incremental ID that is created by Apps Script when a version is
                # created. This is system assigned number and is immutable once created.
            "description": "A String", # The description for this version.
            "scriptId": "A String", # The script project's Drive ID.
          },
        ],
        "nextPageToken": "A String", # The token use to fetch the next page of records. if not exist in the
            # response, that means no more versions to list.
      }

`list_next(previous_request, previous_response)`

    Retrieves the next page of results.

    Args:
      previous_request: The request for the previous page. (required)
      previous_response: The response from the request for the previous page. (required)

    Returns:
      A request object that you can call 'execute()' on to request the next
      page. Returns None if there are no more items in the collection.