HTTP
HTTP lookup queries an HTTP endpoint.
users-topology.yamlapiVersion: 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.
Field | Description | Scheme |
---|---|---|
display* | Expression to change the formatting of the display | |
url* | HTTP URL |
|
body | Request Body Contents |
|
headers | Header fields | |
method | HTTP Request method. Defaults to |
|
templateBody | If true body will be templated |
|
transform | Transform data from a check into multiple individual checks | |
connection | The connection url to use, mutually exclusive with | |
username | ||
password |