Update an SDK Git connection

View as Markdown
Updates the Git connection's lifecycle status: - `active` — Connects or reconnects the repository. All auto-update pull requests resume. - `disconnected` — Disconnects the repository, and no further auto-update pull requests are opened. The historical pull request record is preserved and remains queryable. **Note:** - The `autoUpdatePullRequestsEnabled` property is is only available to **Enterprise** plan users and defaults to `true`. If the user is on a **Team** plan, this value is always `false`. - This action is idempotent. Setting the fields to their current values is a no-op and still returns the connection. - The `inaccessible` status is system-determined and can't be set with this endpoint.

Authentication

x-api-keystring
API Key authentication via header
OR
Authorizationstring
A valid [SCIM API key](https://learning.postman.com/docs/administration/scim-provisioning/scim-provisioning-overview/#generating-scim-api-key) for calls to SCIM endpoints.
OR
AuthorizationBasic

Basic authentication of the form Basic <base64(username:password)>.

Path parameters

sdkGitConnectionIdstringRequired
The Git connection's ID.

Request

This endpoint expects an object.
statusenumRequired
The updated SDK Git connection lifecycle state.
autoUpdatePullRequestsEnabledbooleanOptional

If true, pull requests are opened automatically whenever the source changes or a new version of the SDK generator is released. If false, pull requests are opened automatically, but only for manually-triggered SDK regeneration. If autoUpdatePullRequestsEnabled isn’t set, the default behavior depends on the user’s Postman plan:

  • Enterprise plan users — Defaults to the true value.
  • Team plan users and read only — Defaults to the false value.

Response

Successful Response
sdkGitConnectionIdstring
The Git connection's ID.
sourceobject
The collection or specification that the SDK is generated from.
languageenum
The target output language for the generated SDK.
statusenum

The lifecycle status of the Git connection:

  • active — The connection is live and all opened pull requests ship SDK updates into the repository.
  • disconnected — The connection was explicitly disconnected by the owner, and no pull requests can be opened. The historical record is preserved.
  • inaccessible — Access to the repository was revoked or its no longer reachable.
repositoryUrlstringformat: "uri"
The canonical URL of the target Git repository.
targetBranchstringDefaults to main

The branch the SDK is published to. This defaults to the main value.

autoUpdatePullRequestsEnabledboolean

If true, pull requests are opened automatically whenever the source changes or a new version of the SDK generator is released. If false, pull requests are opened automatically, but only for manually-triggered SDK regeneration. If autoUpdatePullRequestsEnabled isn’t set, the default behavior depends on the user’s Postman plan:

  • Enterprise plan users — Defaults to the true value.
  • Team plan users and read only — Defaults to the false value.
pullRequestslist of objects

A list of SDK update pull requests on the Git connection, in order of newest first by its updatedAt property. This returns an empty value if no pull requests have been opened yet. For full pull request details, use the GET /sdk-git-connections/{sdkGitConnectionId}/pull-requests endpoint.

createdAtdatetime
The date and time at which the Git connection was created.
updatedAtdatetime
The date and time at which the Git connection was last updated.
sdkobject
Information about the generated SDK.

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
422
Unprocessable Entity Error
429
Too Many Requests Error
500
Internal Server Error