Run Lambda (Admin)

Invokes a lambda through the authenticated admin route. The endpoint accepts any HTTP method.

Authentication

Requires X-Glue-Authentication.

Path Parameters

Parameter Type Description
lambda_id string Lambda identifier

Request Body

Send any payload you want the lambda to receive as req.body.

HTTP Request

1POST /api/v0/run/f1a2b3c4-d5e6-7890-abcd-ef0123456789 HTTP/1.1
2Host: api.hola.cloud
3X-Glue-Authentication: YOUR_TOKEN
4Content-Type: application/json
5
6{
7  "name": "Alice"
8}

Example

1curl -X POST "https://api.hola.cloud/api/v0/run/f1a2b3c4-d5e6-7890-abcd-ef0123456789" \
2  -H "X-Glue-Authentication: YOUR_TOKEN" \
3  -H "Content-Type: application/json" \
4  -d '{
5    "name": "Alice"
6  }'

Response

The response is whatever the lambda handler returns.

1{
2  "body": {
3    "message": "Hello, Alice!"
4  }
5}

Error Codes

Code Description
400 Invalid request body
401 Missing or invalid authentication
404 Lambda not found
500 Lambda execution error

Comments

Leave a comment