Skip to content

Instantly share code, notes, and snippets.

@4bars
Last active December 1, 2020 04:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 4bars/698a92e421caefd7babcd0e27b1fc789 to your computer and use it in GitHub Desktop.
Save 4bars/698a92e421caefd7babcd0e27b1fc789 to your computer and use it in GitHub Desktop.
cURLy Testing README
I had limited time to create this project so there are multiple things which are not yet supported.
Supported HTTP Methods: GET, POST
Supported HTTP Responses: JSON. XML not supported currently.
Supported Column Types: numeric, text, long-text, dropdown
Supported JSON Path: The result of the JSON Path must be a String, Number, or Array of Numbers/Strings. If the Result is an Array of Numbers/Strings the Integration will join the result (i.e. [a,b,c,d] becomes "a,b,c,d"
JSON Paths that result to objects or arrays are not supported.
JSONPath reference: https://github.com/dchester/jsonpath#readme
Mapping reference:
[{
"<column_id_1>": "<JSON Path>",
...
"<column_id_2>": "<JSON Path>"
}]
example:
{
"text": "$.Results[0].Make",
"text5": "$.Results[0].Model",
"text0": "$.Results[0].Manufacturer"
}
Additional Notes:
(1) For Posting url-encoded data please change "--data-urlencode" to "--data"
example:
curl --location --request POST 'https://vpic.nhtsa.dot.gov/api/vehicles/DecodeVINValuesBatch' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'data=${text0}' \
--data-urlencode 'format=json'
should be
curl --location --request POST 'https://vpic.nhtsa.dot.gov/api/vehicles/DecodeVINValuesBatch' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data 'data=${text0}' \
--data 'format=json'
(2) The title of a item must be referenced by ${itemName}
(3) cURLy does not save any of the cURL requests. If a customer wants to use cURLy but doesn't want to send their data to the same
lambda instance as everyone else; then cURLy has to be installed as a private integration and the customer would pay for their own lambda instance.
Would be nice to get feed back on this...
(4) column ids can be found using the api explorer using a graph ql query
(5) The Integration will always return 200 even if an error happens. I did this because Im not sure if Monday framework will keep trying
indefinitely if a failure occurs.
(6) Network latency is a thing.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment