@celigo/api-specs 0.2.16 → 0.2.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1003,6 +1003,202 @@ paths:
1003
1003
  - Test network connectivity
1004
1004
  - Verify permissions for basic operations
1005
1005
  - Return connection status and any error details
1006
+ /v1/connections/{_id}/proxy:
1007
+ post:
1008
+ x-internal: false
1009
+ summary: Send a request through a connection (proxy)
1010
+ description: |-
1011
+ Sends one HTTP request to the system behind a saved connection, using that connection's
1012
+ base URI and stored authentication, and returns the target's response as-is. Use it to call
1013
+ an endpoint the connection's exports and imports do not expose — a metadata or describe call,
1014
+ an ad-hoc read, a one-off write — without copying credentials out of integrator.io.
1015
+
1016
+ The proxy call is always `POST`; the request to the target is shaped by headers:
1017
+
1018
+ - `Integrator-Method` (required) is the HTTP method used against the target. One of `HEAD`,
1019
+ `GET`, `PUT`, `PATCH`, `POST`, `DELETE`; any other value is rejected with
1020
+ `405 method_not_allowed`, and omitting the header returns `400 missing_header`.
1021
+ - `Integrator-Relative-URI` (optional) is appended to the connection's base URI, query string
1022
+ included. Omitted, the request goes to the base URI itself.
1023
+ - The proxy request body is forwarded to the target as its body. Send an empty JSON object
1024
+ when the target expects no body.
1025
+
1026
+ Only these headers are read. Any other header on the proxy request — a custom
1027
+ `X-Correlation-Id`, an `Authorization` meant for the target — is dropped, not forwarded; the
1028
+ target receives the connection's authentication plus the standard request headers
1029
+ (`Accept`, `Content-Type`, `Content-Length`).
1030
+
1031
+ The response is the target's response: its status code, body, and headers come back
1032
+ unchanged, so a `404` or `422` here is the target's answer, not the proxy's. Non-JSON bodies
1033
+ (XML, text) pass through with their own `Content-Type`. Only two statuses are the proxy's
1034
+ own: `400 missing_header` and `404 invalid_ref` when `_id` is not a connection in the account.
1035
+
1036
+ NetSuite connections route to a RESTlet instead of a relative URI: send
1037
+ `Integrator-NetSuite-ScriptId` and `Integrator-NetSuite-DeployId` with the script and
1038
+ deployment ids of the RESTlet to call. See
1039
+ [Connect to custom NetSuite RESTlets](https://docs.celigo.com/hc/en-us/articles/360059639272-Connect-to-custom-NetSuite-RESTlets)
1040
+ and
1041
+ [Connect to Salesforce REST relative URIs via proxy](https://docs.celigo.com/hc/en-us/articles/19906581226779-Connect-to-Salesforce-REST-relative-URIs-via-proxy)
1042
+ for the flow-step form of the same call (an integrator.io export or import whose relative URI
1043
+ is this path).
1044
+ operationId: proxyConnectionRequest
1045
+ tags:
1046
+ - Connections
1047
+ parameters:
1048
+ - in: path
1049
+ name: _id
1050
+ required: true
1051
+ schema:
1052
+ type: string
1053
+ format: objectId
1054
+ x-celigo-refModel: connections
1055
+ description: Connection whose base URI and authentication the request is sent with.
1056
+ - in: header
1057
+ name: Integrator-Method
1058
+ required: true
1059
+ description: HTTP method to use against the target. Header names are case-insensitive.
1060
+ schema:
1061
+ type: string
1062
+ enum:
1063
+ - HEAD
1064
+ - GET
1065
+ - PUT
1066
+ - PATCH
1067
+ - POST
1068
+ - DELETE
1069
+ x-enumDescriptions:
1070
+ HEAD: Headers only; the body returned to the caller is empty.
1071
+ GET: Read from the target.
1072
+ PUT: Replace a target resource with the forwarded body.
1073
+ PATCH: Partially update a target resource with the forwarded body.
1074
+ POST: Create or invoke on the target with the forwarded body.
1075
+ DELETE: Delete a target resource.
1076
+ examples:
1077
+ - GET
1078
+ - in: header
1079
+ name: Integrator-Relative-URI
1080
+ required: false
1081
+ description: |-
1082
+ Path and query string appended to the connection's base URI, for example
1083
+ `/v1/flows?limit=1`. Omit to send the request to the base URI. Not used by NetSuite
1084
+ connections, which route by RESTlet script and deployment id instead.
1085
+ schema:
1086
+ type: string
1087
+ examples:
1088
+ - /services/data/v58.0/sobjects/account/describe
1089
+ - in: header
1090
+ name: Integrator-NetSuite-ScriptId
1091
+ required: false
1092
+ description: |-
1093
+ NetSuite connections only — the script id of the RESTlet to call
1094
+ (`customscript_…`). Send together with `Integrator-NetSuite-DeployId`.
1095
+ schema:
1096
+ type: string
1097
+ examples:
1098
+ - customscript_celigo_myrestlet
1099
+ - in: header
1100
+ name: Integrator-NetSuite-DeployId
1101
+ required: false
1102
+ description: |-
1103
+ NetSuite connections only — the deployment id of the RESTlet to call
1104
+ (`customdeploy_…`). Send together with `Integrator-NetSuite-ScriptId`.
1105
+ schema:
1106
+ type: string
1107
+ examples:
1108
+ - customdeploy_celigo_myrestlet
1109
+ requestBody:
1110
+ required: true
1111
+ content:
1112
+ application/json:
1113
+ schema:
1114
+ type: object
1115
+ description: |-
1116
+ Forwarded to the target as the request body. Send `{}` when the target method takes
1117
+ no body (`GET`, `HEAD`, `DELETE`).
1118
+ additionalProperties: true
1119
+ examples:
1120
+ read:
1121
+ summary: GET through an HTTP connection — no body
1122
+ value: {}
1123
+ write:
1124
+ summary: POST a record to the target
1125
+ value:
1126
+ name: Acme Corp
1127
+ status: active
1128
+ responses:
1129
+ '200':
1130
+ description: |-
1131
+ The target's response, passed through. The status is whatever the target returned —
1132
+ a `2xx` here, or the target's own `4xx`/`5xx` — with its body and headers unchanged.
1133
+ content:
1134
+ application/json:
1135
+ schema:
1136
+ description: The target's response body, as returned by the target.
1137
+ examples:
1138
+ list:
1139
+ summary: Target returned a JSON array
1140
+ value:
1141
+ - _id: 69f4b2cb95ec28be9ca1a88d
1142
+ name: Shopify orders
1143
+ application/xml:
1144
+ schema:
1145
+ type: string
1146
+ description: Non-JSON target bodies pass through with the target's `Content-Type`.
1147
+ '400':
1148
+ description: '`missing_header` — `Integrator-Method` was not sent.'
1149
+ content:
1150
+ application/json:
1151
+ schema:
1152
+ $ref: '#/components/schemas/Error'
1153
+ examples:
1154
+ missingMethod:
1155
+ value:
1156
+ errors:
1157
+ - code: missing_header
1158
+ message: Integrator-Method header missing in the Request
1159
+ source: resource
1160
+ '401':
1161
+ $ref: '#/components/responses/401-unauthorized'
1162
+ '404':
1163
+ description: |-
1164
+ `invalid_ref` — `_id` is not a connection in this account. A `404` with any other body
1165
+ is the target's response to the forwarded request.
1166
+ content:
1167
+ application/json:
1168
+ schema:
1169
+ $ref: '#/components/schemas/Error'
1170
+ examples:
1171
+ unknownConnection:
1172
+ value:
1173
+ errors:
1174
+ - code: invalid_ref
1175
+ message: Connection not found for the given id.
1176
+ '405':
1177
+ description: '`method_not_allowed` — `Integrator-Method` is not one of the allowed values.'
1178
+ content:
1179
+ application/json:
1180
+ schema:
1181
+ $ref: '#/components/schemas/Error'
1182
+ examples:
1183
+ badMethod:
1184
+ value:
1185
+ errors:
1186
+ - code: method_not_allowed
1187
+ message: HTTP Method 'FETCH' not allowed. Allowed methods are HEAD, GET, PUT, PATCH, POST, DELETE
1188
+ source: resource
1189
+ default:
1190
+ description: |-
1191
+ Any other status is the target's response to the forwarded request, returned unchanged
1192
+ with its body and headers.
1193
+ x-celigo-ai-guidance:
1194
+ - |-
1195
+ Custom headers are not forwarded to the target: only Integrator-Method,
1196
+ Integrator-Relative-URI, and the NetSuite RESTlet id headers are read, and the target
1197
+ receives the connection's own authentication. If the target needs a header the connection
1198
+ does not send, the proxy cannot supply it.
1199
+ - |-
1200
+ Read the status as the target's, not the proxy's: a 422 or 404 with a non-invalid_ref
1201
+ body is the downstream system's validation result for the forwarded request.
1006
1202
  /v1/connections/{_id}/debug:
1007
1203
  get:
1008
1204
  x-internal: false
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@celigo/api-specs",
3
- "version": "0.2.16",
3
+ "version": "0.2.17",
4
4
  "private": false,
5
5
  "description": "Public OpenAPI bundles (dist/) and the celigo-cli lint schema pack (schemas.json).",
6
6
  "keywords": [
package/schemas.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "provenance": {
3
3
  "repo": "celigo/integrator-api-specs",
4
- "iasCommit": "aad3947",
4
+ "iasCommit": "c3e34bb",
5
5
  "generatedAt": "2026-09-13"
6
6
  },
7
7
  "roots": {