Repository navigation
Expand file tree
/
Copy patheventingIngest.json
More file actions
45 lines (45 loc) · 2.03 KB
/
Copy patheventingIngest.json
File metadata and controls
45 lines (45 loc) · 2.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
[
{
"appcode": "function OnUpdate(doc, meta) {\n if (doc.hasOwnProperty('embedding')) {\n log(\"Embedding exists in the document, skipping API call.\");\n return;\n }\n\n // Prepare the data to send to API Gateway\n let payload = {\n ...doc,\n id: meta.id,\n };\n\n try {\n // Make the HTTP POST request to API Gateway\n let response = curl(\"POST\", apiUrl,\n {\n body: JSON.stringify(payload),\n headers: {\n \"Content-Type\": \"application/json\",\n }\n }\n );\n\n // Log the response\n log(\"API Gateway response: \");\n log(response)\n } catch (e) {\n // Log any errors\n log(\"Error calling API Gateway: \");\n log(e)\n }\n}",
"depcfg": {
"curl": [
{
"hostname": "https://zki5cn8mqc.execute-api.ap-south-1.amazonaws.com/prod/send",
"value": "apiUrl",
"auth_type": "no-auth",
"username": "",
"password": "*****",
"bearer_key": "*****",
"allow_cookies": true,
"validate_ssl_certificate": false
}
],
"source_bucket": "pdf-docs",
"source_scope": "shared",
"source_collection": "docs",
"metadata_bucket": "pdf-docs",
"metadata_scope": "_default",
"metadata_collection": "_default"
},
"version": "evt-7.6.2-3721-ee",
"enforce_schema": false,
"handleruuid": 2741494485,
"function_instance_id": "vacQT",
"appname": "AWS",
"settings": {
"dcp_stream_boundary": "everything",
"deadline_timeout": 62,
"deployment_status": false,
"description": "",
"execution_timeout": 60,
"language_compatibility": "7.2.0",
"log_level": "INFO",
"n1ql_consistency": "none",
"processing_status": false,
"timer_context_size": 1024,
"user_prefix": "eventing",
"worker_count": 4
},
"function_scope": { "bucket": "*", "scope": "*" }
}
]