Skip to main content
GET
/
components
List Components
curl --request GET \
  --url http://localhost/api/components
import requests

url = "http://localhost/api/components"

response = requests.get(url)

print(response.text)
const options = {method: 'GET'};

fetch('http://localhost/api/components', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "http://localhost/api/components",
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;
}
package main

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

func main() {

url := "http://localhost/api/components"

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

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

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

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("http://localhost/api/components")
.asString();
require 'uri'
require 'net/http'

url = URI("http://localhost/api/components")

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

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

response = http.request(request)
puts response.read_body
{
  "data": [
    {
      "id": "<string>",
      "type": "components",
      "attributes": {
        "id": 123,
        "name": "<string>",
        "description": "<string>",
        "link": "<string>",
        "order": 123,
        "status": {
          "human": "<string>",
          "value": "<string>"
        },
        "enabled": true,
        "meta": [
          "<unknown>"
        ],
        "created": {
          "human": "<string>",
          "string": "<string>"
        },
        "updated": {
          "human": "<string>",
          "string": "<string>"
        },
        "pivot": {
          "component_status": {
            "human": "<string>",
            "value": "<string>"
          }
        }
      },
      "relationships": {
        "group": {
          "data": {
            "type": "componentGroups",
            "id": "<string>"
          }
        },
        "incidents": {
          "data": [
            {
              "type": "incidents",
              "id": "<string>"
            }
          ]
        }
      }
    }
  ],
  "links": {
    "first": "<string>",
    "last": "<string>",
    "prev": "<string>",
    "next": "<string>"
  },
  "meta": {
    "current_page": 123,
    "from": 123,
    "path": "<string>",
    "per_page": 123,
    "to": 123
  },
  "included": [
    {
      "id": "<string>",
      "type": "componentGroups",
      "attributes": {
        "id": 123,
        "name": "<string>",
        "order": 123,
        "created": {
          "human": "<string>",
          "string": "<string>"
        },
        "updated": {
          "human": "<string>",
          "string": "<string>"
        }
      },
      "relationships": {
        "components": {
          "data": [
            {
              "type": "components",
              "id": "<string>"
            }
          ]
        }
      }
    }
  ]
}

Query Parameters

sort
string

Available sorts are name, order, id. You can sort by multiple options by separating them with a comma. To sort in descending order, use - sign in front of the sort, for example: -name.

include
string

Available includes are group, groupCount, groupExists, incidents, incidentsCount, incidentsExists. You can include multiple options by separating them with a comma.

per_page
integer
default:15

How many items to show per page.

page
integer

Which page to show.

filter[status]
enum<integer>

Filter by status

Available options:
1,
2,
3,
4,
5,
6
filter[name]
string

Filter by name.

filter[enabled]
boolean

Filter by enabled status.

Response

200 - application/vnd.api+json

Paginated set of Component

data
Component · object[]
required
meta
object
required
included
(ComponentGroup · object | Incident · object)[]