## List Cross-Service Edges

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.

### API Endpoint

`GET /v0/experimental/edges`

List cross-service edges.

### Example cURL Request

```bash
curl --request GET \
  --url https://demo-api.gable.ai/v0/experimental/edges \
  --header 'X-API-KEY: <api-key>'
```

### Example Python Request

```python
import requests

url = "https://demo-api.gable.ai/v0/experimental/edges"

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

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

print(response.text)
```

### Example JavaScript Fetch Request

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

fetch('https://demo-api.gable.ai/v0/experimental/edges', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
```

### Example PHP Request

```php
$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => "https://demo-api.gable.ai/v0/experimental/edges",
  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;
}
```

### Example Go Request

```go
package main

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

func main() {

url := "https://demo-api.gable.ai/v0/experimental/edges"

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))
}
```

### Example Unirest Request

```java
HttpResponse<String> response = Unirest.get("https://demo-api.gable.ai/v0/experimental/edges")
  .header("X-API-KEY", "<api-key>")
  .asString();
```

### Example Ruby Request

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

url = URI("https://demo-api.gable.ai/v0/experimental/edges")

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

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

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

### Response Codes

- **200** – Successful operation
- **400** – Bad Request
- **500** – Internal Server Error

### Response Schema

```json
{
  "edges": [
    {
      "source": {
        "component_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "component_name": "<string>",
        "payload_name": "<string>",
        "kind": "<string>",
        "xgress_id": "<string>"
      },
      "destination": {
        "component_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "component_name": "<string>",
        "payload_name": "<string>",
        "kind": "<string>",
        "xgress_id": "<string>"
      },
      "field_mappings": [
        {
          "source_field": "<string>",
          "destination_field": "<string>",
          "notes": "<string>"
        }
      ],
      "id": "<string>",
      "kind": "cross_service",
      "namespace": "<string>"
    }
  ]
}
```

### Authorization

- **X-API-KEY**: Required header for authorization.

### Query Parameters

- **namespace**: Optional string to scope returned edges.
- **source**: Optional string to filter edges by source component name (case-insensitive substring match).
- **sink**: Optional string to filter edges by destination component name (case-insensitive substring match).
