## Get Live Pages For Specified Channels

### cURL

```bash
curl --request GET \
  --url 'https://cdn.xm.fabric.inc/api/v2/pages/live?limit=20&channels=12'
```

### Python

```python
import requests

url = "https://cdn.xm.fabric.inc/api/v2/pages/live?limit=20&channels=12"

response = requests.get(url)

print(response.text)
```

### JavaScript (Fetch)

```javascript
const options = {method: 'GET'};

fetch('https://cdn.xm.fabric.inc/api/v2/pages/live?limit=20&channels=12', 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://cdn.xm.fabric.inc/api/v2/pages/live?limit=20&channels=12",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
]);

$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://cdn.xm.fabric.inc/api/v2/pages/live?limit=20&channels=12"

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

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

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

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

### Unirest (Java)

```java
HttpResponse<String> response = Unirest.get("https://cdn.xm.fabric.inc/api/v2/pages/live?limit=20&channels=12")
  .asString();
```

### Ruby

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

url = URI("https://cdn.xm.fabric.inc/api/v2/pages/live?limit=20&channels=12")

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

request = Net::HTTP::Get.new(url)

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

### Response:

**200**

**LivePagesExist**

```json
{
  "message": "List of pages with queryParams {\"channels\":\"02SZCA,00SZAU\",\"offset\":0,\"limit\":20}",
  "data": {
    "query": {
      "limit": 20,
      "offset": 0,
      "count": 1,
      "channels": [
        "02SZCA",
        "00SZAU"
      ]
    },
    "livePages": [
      {
        "_id": "613a76a1fa9449000f6c36c3",
        "isArchived": false,
        "name": "Default",
        "channel": [
          12
        ],
        "channels": [
          "00SZAU",
          "02SZCA"
        ],
        "createdAt": "2021-09-09T21:03:29.712Z",
        "updatedAt": "2021-10-14T20:31:47.369Z",
        "components": [
          {
            "_id": "61689237068cae000f12ef90",
            "id": "AboutUs",
            "params": {
              "desktopHeroImage": {
                "url": "https://imgurl.com/path/myPhoto.jpg",
                "altText": "Custom image"
              },
              "aboutUsContent": [
                {
                  "text": "About us",
                  "firstText": "Our Company",
                  "secondText": "Our mission",
                  "thirdText": "Our values",
                  "paragraph": false,
                  "dialog": false,
                  "components": []
                }
              ],
              "components": [],
              "additionalProp1": {}
            },
            "order": 1,
            "additionalProp1": {}
          }
        ],
        "endDate": "2099-12-31T00:00:00.000Z",
        "pageId": "613a76a15363f9e9575dc953",
        "status": "SCHEDULED",
        "versionId": 2446,
        "page": {
          "_id": "613a76a15363f9e9575dc953",
          "name": "Components",
          "pageUrl": "/components",
          "__v": 0,
          "channels": [
            "00SZAU",
            "02SZCA"
          ],
          "createdAt": "2021-09-09T21:03:29.617Z",
          "isActive": true,
          "isArchived": false,
          "pageId": 1377,
          "seoFields": {
            "title": "SEO",
            "description": "SEO description",
            "_id": "612e4756c4b3c60010fff859",
            "metadata": [
              {
                "_id": "612e4756c4b3c60010fff85a",
                "name": "summary",
                "content": "Types of components",
                "createdAt": "2021-08-31T15:14:30.973Z",
                "updatedAt": "2021-08-31T15:14:30.973Z"
              }
            ],
            "createdAt": "2021-08-31T15:14:30.973Z",
            "updatedAt": "2021-08-31T15:14:30.973Z"
          },
          "typeId": "61325fd059cbdbe62e888bc0",
          "updatedAt": "2021-10-14T20:31:46.794Z",
          "typeName": "Product category page",
          "typeUrl": "/category"
        }
      }
    ]
  }
}
```

### Query Parameters

- **offset**: integer, default: 0 - Number of items to omit before collecting the resulting set
- **limit**: integer, default: 20 - Total number of results
- **channels**: string, default: 12 - Comma-separated list of channel IDs

### Response

- **200** (Successful operation) - application/json  
- **message**: string - Status message
- **data**: object - Object holding the query information and the list of live page versions
