layer-farm-batches-post-many¶
Source¶
Repository:
jef-systems/jef-layer-farm-backendSource Run ID:
24916443201Source SHA:
04fc05c78cba84982ce19870a690a0b7b6a02d48Module:
layer-farmDocumentation Scope:
asyncLambda:
jef-layer-farm-post-2
Endpoint¶
API Name:
jef-layer-farmAction Name:
postMethod:
POSTScope Label:
AsyncResource Path:
/layer-farm-batches-post-manyComplete Endpoint:
https://vx9egxavaa.execute-api.ap-southeast-1.amazonaws.com/prod/layer-farm-batches-post-manyLambda ARN:
arn:aws:lambda:ap-southeast-1:246715082475:function:jef-layer-farm-post-2curl payload mode:
json_body
API Gateway Description¶
Function: jef-layer-farm-post-2
API Name: jef-layer-farm
Action: post
Method: POST
Resource Path: /layer-farm-batches-post-many
Payload:
- items: [{"entity_number":"string-4-digits-nonzerostart","batch_id":"string-{batch-slug}","batch":"string","start_date":"string-yyyy-mm-dd","end_date":"string-yyyy-mm-dd-optional","is_active":"boolean","notes":"string","is_deleted":"boolean-optional"}]
Response:
- exists: boolean
- message: string
- source: string when operation reaches DynamoDB
- items: array of created items
- count: number
- created_count: number
- failed_count: number
- errors: array
Request Payload¶
{
"items": "[{\"entity_number\":\"string-4-digits-nonzerostart\",\"batch_id\":\"string-{batch-slug}\",\"batch\":\"string\",\"start_date\":\"string-yyyy-mm-dd\",\"end_date\":\"string-yyyy-mm-dd-optional\",\"is_active\":\"boolean\",\"notes\":\"string\",\"is_deleted\":\"boolean-optional\"}]"
}
Response¶
{
"exists": "boolean",
"message": "string",
"source": "string when operation reaches DynamoDB",
"items": "array of created items",
"count": "number",
"created_count": "number",
"failed_count": "number",
"errors": "array"
}
CMD curl¶
curl -X POST "https://vx9egxavaa.execute-api.ap-southeast-1.amazonaws.com/prod/layer-farm-batches-post-many" -H "Content-Type: application/json" --data-raw "{\"items\": \"[{\\\"entity_number\\\":\\\"string-4-digits-nonzerostart\\\",\\\"batch_id\\\":\\\"string-{batch-slug}\\\",\\\"batch\\\":\\\"string\\\",\\\"start_date\\\":\\\"string-yyyy-mm-dd\\\",\\\"end_date\\\":\\\"string-yyyy-mm-dd-optional\\\",\\\"is_active\\\":\\\"boolean\\\",\\\"notes\\\":\\\"string\\\",\\\"is_deleted\\\":\\\"boolean-optional\\\"}]\"}"
PowerShell curl¶
curl.exe -X POST "https://vx9egxavaa.execute-api.ap-southeast-1.amazonaws.com/prod/layer-farm-batches-post-many" -H "Content-Type: application/json" --data-raw '{"items": "[{\"entity_number\":\"string-4-digits-nonzerostart\",\"batch_id\":\"string-{batch-slug}\",\"batch\":\"string\",\"start_date\":\"string-yyyy-mm-dd\",\"end_date\":\"string-yyyy-mm-dd-optional\",\"is_active\":\"boolean\",\"notes\":\"string\",\"is_deleted\":\"boolean-optional\"}]"}'