turbot/steampipe-plugin-net

Add example to extra data from a JSON response field

Open

#59 opened on Mar 24, 2023

View on GitHub
 (0 comments) (0 reactions) (0 assignees)Go (5 forks)auto 404
documentationenhancementgood first issue

Repository metrics

Stars
 (26 stars)
PR merge metrics
 (PR metrics pending)

Description

From this thread, an example like this would be good on the net_http_request table:

The trick is to cast the response into JSONB . For example:

> select response_body::jsonb ->> 'number' as num_people_in_space from net_http_request where url = 'http://api.open-notify.org/astros.json'

+---------------------+
| num_people_in_space |
+---------------------+
| 10                  |
+---------------------+

Contributor guide