> For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://learning.postman.com/llms.txt.

# Get all SDK Git connections

GET https://api.postman.com/sdk-git-connections

Gets all Git repository connections the authenticated user has access to in the given workspace. Each connection links one Postman Collection or specification and one SDK language to a target Git repository.

Reference: https://learning.postman.com/api-docs/api-reference/sd-ks/get-sdk-git-connections

## Authentication

- `x-api-key` header (required)

## Servers

- `https://api.postman.com` (https://api.postman.com, default)
- `https://api.eu.postman.com` (https://api.eu.postman.com)

## Request

### Query parameters

- `workspaceId` (string, required) — The ID of the workspace that owns the source entities.
- `sourceId` (string, optional) — Filter results by the originating Postman Collection or specification ID.
- `language` (enum, optional) — Filter results by SDK language.
  - Allowed values: `typescript`, `python`, `go`, `java`, `csharp`, `ruby`, `php`, `kotlin`, `rust`, `cli`
- `status` (enum, optional) — Filter results by connection status.
  - Allowed values: `active`, `disconnected`, `inaccessible`
- `repositoryUrl` (string, optional) — Filter results by the canonical URL of the target Git repository.
- `cursor` (string, optional) — The pointer to the first record of the set of paginated results. To view the next response, use the `nextCursor` value for this parameter.
- `limit` (integer, optional, default: 25) — The maximum number of rows to return in the response, up to a maximum value of 25. Any value greater than 25 returns a 400 Bad Request response.

## Response

### 200

Successful Response

- `data` (list of object, required) — A list of SDK Git connections.
  - `sdkGitConnectionId` (string, required) — The Git connection's ID.
  - `source` (object, required) — The collection or specification that the SDK is generated from.
    - `type` (enum, required) — The type of Postman element.
      - Allowed values: `collection`, `spec`
    - `id` (string, required) — The ID of the Postman Collection or specification in Postman.
  - `language` (enum, required) — The target output language for the generated SDK.
    - Allowed values: `typescript`, `python`, `go`, `java`, `csharp`, `ruby`, `php`, `kotlin`, `rust`, `cli`
  - `status` (enum, required) — 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.
    - Allowed values: `active`, `disconnected`, `inaccessible`
  - `repositoryUrl` (string, required) — The canonical URL of the target Git repository.
  - `targetBranch` (string, required, default: main) — The branch the SDK is published to. This defaults to the `main` value.
  - `autoUpdatePullRequestsEnabled` (boolean, required) — 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.
  - `pullRequests` (list of object, required) — 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.
    - `url` (string, required) — The pull request's URL.
    - `status` (enum, required) — The lifecycle status of a pull request.
      - Allowed values: `open`, `merged`, `closed`
    - `sdkId` (string, required) — The SDK's ID.
  - `createdAt` (datetime, required) — The date and time at which the Git connection was created.
  - `updatedAt` (datetime, required) — The date and time at which the Git connection was last updated.
  - `sdk` (object, optional) — Information about the generated SDK.
    - `id` (string, required) — The SDK's ID.
    - `language` (enum, required) — The target output language for the generated SDK.
      - Allowed values: `typescript`, `python`, `go`, `java`, `csharp`, `ruby`, `php`, `kotlin`, `rust`, `cli`
    - `source` (object, required) — The collection or specification that the SDK is generated from.
      - `type` (enum, required) — The type of Postman element.
        - Allowed values: `collection`, `spec`
      - `id` (string, required) — The ID of the Postman Collection or specification in Postman.
    - `workspaceId` (string, required) — The ID of the workspace that owns the SDK, derived from the source entity.
    - `buildStatus` (enum, required) — The SDK's build lifecycle: - `queued` — Accepted but not yet started. - `in_progress` — The SDK generation is running and in progress. - `succeeded` — The archive is built and available for download. - `failed` — The SDK generation failed. For information, check the `error` response.
      - Allowed values: `queued`, `in_progress`, `succeeded`, `failed`
    - `createdAt` (datetime, required) — The date and time at which the SDK was created.
    - `updatedAt` (datetime, required) — The date and time at which the SDK was last updated.
    - `version` (string, optional) — The generated SDK's semantic version ID. This value is automatically assigned by the release/changelog pipeline.
    - `error` (object, optional) — Information about the SDK build's status when `buildStatus` is `failed`.
      - `code` (string, required) — The build failure's error code.
      - `message` (string, required) — Information about the build failure.
    - `pullRequest` (object, optional) — If the SDK was shipped (or proposed for shipping) through a Git connection, this is a compact representation of the pull request that shipped it. Otherwise, this returns a `null` value.
      - `sdkId` (string, required) — The SDK's ID.
      - `status` (enum, required) — The lifecycle status of a pull request.
        - Allowed values: `open`, `merged`, `closed`
      - `url` (string, required) — The pull request's URL.
- `meta` (object, required) — The response's meta information for paginated results.
  - `nextCursor` (string, optional, nullable) — The pagination cursor that points to the next record in the results set.
  - `total` (integer, optional) — The number of records found.

## Examples

**Response**

```json
{
  "data": [
    {
      "sdkGitConnectionId": "8d4f7c1a-2b3e-4f5a-9c8d-1a2b3c4d5e6f",
      "source": {
        "type": "collection",
        "id": "12ece9e1-2abf-4edc-8e34-de66e74114d2"
      },
      "language": "typescript",
      "status": "active",
      "repositoryUrl": "https://git.example.com/engineering/engineering-sdk",
      "targetBranch": "main",
      "autoUpdatePullRequestsEnabled": true,
      "pullRequests": [
        {
          "url": "https://git.example.com/engineering/engineering-sdk/pull/87",
          "status": "open",
          "sdkId": "9c4e7d1a-2b3c-4f5e-8a9b-1c2d3e4f5a6b"
        }
      ],
      "createdAt": "2026-04-12T09:00:00Z",
      "updatedAt": "2026-05-30T10:21:14Z"
    }
  ],
  "meta": {
    "nextCursor": null,
    "total": 1
  }
}
```

**SDK Code**

```python Successful Response
import requests

url = "https://api.postman.com/sdk-git-connections"

querystring = {"workspaceId":"1f0df51a-8658-4ee8-a2a1-d2567dfa09a9"}

headers = {"x-api-key": "<apiKey>"}

response = requests.get(url, headers=headers, params=querystring)

print(response.json())
```

```javascript Successful Response
const url = 'https://api.postman.com/sdk-git-connections?workspaceId=1f0df51a-8658-4ee8-a2a1-d2567dfa09a9';
const options = {method: 'GET', headers: {'x-api-key': '<apiKey>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Successful Response
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.postman.com/sdk-git-connections?workspaceId=1f0df51a-8658-4ee8-a2a1-d2567dfa09a9"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("x-api-key", "<apiKey>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Successful Response
require 'uri'
require 'net/http'

url = URI("https://api.postman.com/sdk-git-connections?workspaceId=1f0df51a-8658-4ee8-a2a1-d2567dfa09a9")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<apiKey>'

response = http.request(request)
puts response.read_body
```

```java Successful Response
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.postman.com/sdk-git-connections?workspaceId=1f0df51a-8658-4ee8-a2a1-d2567dfa09a9")
  .header("x-api-key", "<apiKey>")
  .asString();
```

```php Successful Response
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.postman.com/sdk-git-connections?workspaceId=1f0df51a-8658-4ee8-a2a1-d2567dfa09a9', [
  'headers' => [
    'x-api-key' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp Successful Response
using RestSharp;

var client = new RestClient("https://api.postman.com/sdk-git-connections?workspaceId=1f0df51a-8658-4ee8-a2a1-d2567dfa09a9");
var request = new RestRequest(Method.GET);
request.AddHeader("x-api-key", "<apiKey>");
IRestResponse response = client.Execute(request);
```

```swift Successful Response
import Foundation

let headers = ["x-api-key": "<apiKey>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.postman.com/sdk-git-connections?workspaceId=1f0df51a-8658-4ee8-a2a1-d2567dfa09a9")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```