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.

FieldDescriptionSchemeRequired
urlHTTP URL, if a URL is specified on both the connection and check, the URL on the check takes precedence.stringYes
Connection
connectionPath of existing connection e.g. connection://http/instance/ Mutually exclusive with username, passwordConnections
usernameMutually exclusive with connectionEnvVar
passwordMutually exclusive with connectionEnvVar