Skip to main content

HTTP

HTTP lookup queries an HTTP endpoint.

users-topology.yaml
apiVersion: canaries.flanksource.com/v1
kind: Topology
metadata:
name: users
namespace: default
spec:
schedule: '@every 30s'
components:
- name: Users
type: Employees
icon: person
lookup:
http:
- url: https://jsonplaceholder.typicode.com/users
display:
expr: |
dyn(json).map(c, {
'name': c.name,
'type': 'person',
}).toJSON()

This topology will create a root "users" component with all the users returned by the HTTP endpoint as its child components.

FieldDescriptionScheme
display*

Expression to change the formatting of the display

Expression

url*

HTTP URL

string

body

Request Body Contents

string

headers

Header fields

[]EnvVar

method

HTTP Request method. Defaults to GET

string

templateBody

If true body will be templated

boolean

transform

Transform data from a check into multiple individual checks

Expression

connection

The connection url to use, mutually exclusive with username and password

Connection

username

EnvVar

password

EnvVar