## Documentation Index

Fetch the complete documentation index at: [/llms.txt](https://docs.gable.ai/llms.txt)

Use this file to discover all available pages before exploring further.

GET
/v0/component/merge-history/{id}

### Try it
Get component merge history

#### cURL
```bash
curl --request GET \
  --url 'https://demo-api.gable.ai/v0/component/merge-history/{id}?limit=20' \
  --header 'X-API-KEY: <api-key>'
```

#### Python
```python
import requests

url = "https://demo-api.gable.ai/v0/component/merge-history/{id}?limit=20"

headers = {"X-API-KEY": "<api-key>"}

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

print(response.text)
```

#### JavaScript
```javascript
const options = {method: 'GET', headers: {'X-API-KEY': '<api-key>'}};

fetch('https://demo-api.gable.ai/v0/component/merge-history/{id}?limit=20', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
```

#### PHP
```php
$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => "https://demo-api.gable.ai/v0/component/merge-history/{id}?limit=20",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => [
    "X-API-KEY: <api-key>"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
```

#### Go
```go
package main

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

func main() {

url := "https://demo-api.gable.ai/v0/component/merge-history/{id}?limit=20"

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

req.Header.Add("X-API-KEY", "<api-key>")

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

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

fmt.Println(string(body))
}
```

#### Response

##### Status Codes
- 200
- 400
- 404
- 500

```json
{
  "componentId": "<string>",
  "entries": [
    {
      "versionId": "<string>",
      "baseVersionId": "<string>",
      "commitTimestamp": "<string>",
      "createdAt": "2023-11-07T05:31:56Z",
      "jobTrigger": "<string>",
      "isLatestVersion": true,
      "metrics": {
        "totalAdded": 123,
        "totalRemoved": 123,
        "totalModified": 123,
        "totalUnchanged": 123
      },
      "breakage": {
        "downstreamBreakingCount": 123,
        "affectedComponentCount": 123,
        "isBreaking": true
      },
      "commitSha": "<string>",
      "eventRepo": "<string>"
    }
  ],
  "componentName": "<string>"
}
```

### Authorizations

**X-API-KEY**  
- Type: string  
- Location: header  
- Required

### Path Parameters
- **id**: string<uuid> - UUID of the component (required)

### Query Parameters
- **limit**: integer - Maximum number of merged versions to return, default: 20, required range: `1 <= x <= 100`
