curl --request GET \
--url http://localhost:3000/api/v1/scripts/-1 \
--header 'Authorization: Basic OmJsYWNrU7dhbjEyMw==' \
{
"scripts": [
{
"id": 2,
"lang": "lua",
"name": "new_script",
"source": "\n-- This is a sample script\n-- Fill in the onRecord function to transform the incoming record\nlocal json = require \"json\"\n\nfunction onRecord(r)\n return json.encode(r.row)\nend"
},
{
"id": 3,
"lang": "lua",
"name": "good_script",
"source": "\n-- This is a sample script\n-- Fill in the onRecord function to transform the incoming record\nlocal json = require \"json\"\n\nfunction onRecord(r)\n return json.encode(r.row)\nend"
},
{
"id": 4,
"lang": "lua",
"name": "bad_script",
"source": "\n-- This is a sample script\n-- Fill in the onRecord function to transform the incoming record\nlocal json = require \"json\"\n\nfunction onRecord(r)\n return json.encode(r.row)\nend"
}
]
}
curl --request GET \
--url http://localhost:3000/api/v1/scripts/-1 \
--header 'Authorization: Basic OmJsYWNrU7dhbjEyMw==' \
{
"scripts": [
{
"id": 2,
"lang": "lua",
"name": "new_script",
"source": "\n-- This is a sample script\n-- Fill in the onRecord function to transform the incoming record\nlocal json = require \"json\"\n\nfunction onRecord(r)\n return json.encode(r.row)\nend"
},
{
"id": 3,
"lang": "lua",
"name": "good_script",
"source": "\n-- This is a sample script\n-- Fill in the onRecord function to transform the incoming record\nlocal json = require \"json\"\n\nfunction onRecord(r)\n return json.encode(r.row)\nend"
},
{
"id": 4,
"lang": "lua",
"name": "bad_script",
"source": "\n-- This is a sample script\n-- Fill in the onRecord function to transform the incoming record\nlocal json = require \"json\"\n\nfunction onRecord(r)\n return json.encode(r.row)\nend"
}
]
}
GET /api/v1/scripts/{id}
Show scripts
curl --request GET \
--url http://localhost:3000/api/v1/scripts/-1 \
--header 'Authorization: Basic OmJsYWNrU7dhbjEyMw==' \
{
"scripts": [
{
"id": 2,
"lang": "lua",
"name": "new_script",
"source": "\n-- This is a sample script\n-- Fill in the onRecord function to transform the incoming record\nlocal json = require \"json\"\n\nfunction onRecord(r)\n return json.encode(r.row)\nend"
},
{
"id": 3,
"lang": "lua",
"name": "good_script",
"source": "\n-- This is a sample script\n-- Fill in the onRecord function to transform the incoming record\nlocal json = require \"json\"\n\nfunction onRecord(r)\n return json.encode(r.row)\nend"
},
{
"id": 4,
"lang": "lua",
"name": "bad_script",
"source": "\n-- This is a sample script\n-- Fill in the onRecord function to transform the incoming record\nlocal json = require \"json\"\n\nfunction onRecord(r)\n return json.encode(r.row)\nend"
}
]
}