Git

Compare source commits

Compare one source commit with another source commit. The first parent is the default base. Set maxPatchBytes to limit the total patch text.

get/v1/spaces/{spaceId}/source/commit-diff

Request

  • Base URL: https://api.spacefast.com
  • URL: https://api.spacefast.com/v1/spaces/{spaceId}/source/commit-diff
  • Auth: one of:
    • HTTP bearer
    • OAuth 2 (authorization code, authorization URL https://api.spacefast.com/v1/auth/oauth2/authorize, token URL https://api.spacefast.com/v1/auth/oauth2/token; client credentials, token URL https://api.spacefast.com/v1/auth/oauth2/token, scopes: spaces:read)

Path parameters

spaceIdstring required

Query parameters

connectionType'connected' | 'hosted'

Which of the space's repository connections to act on: connected for the repository you linked from a provider, hosted for the one Spacefast hosts and you push to.

shastring required

Commit to compare. This commit is the new side of the comparison.

baseShastring

Base commit to compare. The first parent is the default.

string
OR
string[]
patchstring

Include each file's unified-diff patch text.

savedOnlystring

Require each commit to exist in the saved history of branch.

branchstring

Branch whose saved history contains the commits. The production branch is the default.

maxPatchBytesinteger

Maximum total UTF-8 bytes for patch text. The response marks truncated patches.

Response

Response for status 200

$schemastring uri

Canonical JSON Schema URL for this response body. The server also sends it in the Link: rel="describedby" response header.

Changes

No recorded changes to this operation across all 1 revision of this API.