Skip to content

Commit fa1ba96

Browse files
committed
chore: update swagger proxy api doc
1 parent 0cc278a commit fa1ba96

File tree

12 files changed

+375
-23
lines changed

12 files changed

+375
-23
lines changed

swagger/api.yaml

+4-2
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,10 @@ paths:
5252
$ref: './routes/bulkUpload.yaml#/~1getWarningJobs'
5353

5454
#Delivery Routes
55-
/{version}/destinations/{destination}/proxy:
56-
$ref: './routes/delivery.yaml#/~1{version}~1destinations~1{destination}~1proxy'
55+
/v0/destinations/{destination}/proxy:
56+
$ref: './routes/delivery.yaml#/~1v0~1destinations~1{destination}~1proxy'
57+
/v1/destinations/{destination}/proxy:
58+
$ref: './routes/delivery.yaml#/~1v1~1destinations~1{destination}~1proxy'
5759
/{version}/destinations/{destination}/proxyTest:
5860
$ref: './routes/delivery.yaml#/~1{version}~1destinations~1{destination}~1proxyTest'
5961

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
value:
2+
version: v1
3+
type: REST
4+
method: POST
5+
endpoint: "https://demoapp-api.bloomreach.com/data/v2/projects/{project}/catalogs/{catalog}/items/partial-update"
6+
userId: ""
7+
headers:
8+
Authorization: "Basic token"
9+
params: {}
10+
body:
11+
JSON: {}
12+
JSON_ARRAY:
13+
batch:
14+
- item_id: "222"
15+
properties: { }
16+
XML: {}
17+
FORM: {}
18+
files: {}
19+
metadata:
20+
userId: '<<>>12345<<>>12345'
21+
jobId: 1
22+
sourceId: '2ifsnRxzoONtZeIoGxgNWsr4xx'
23+
sourceCategory: ''
24+
destinationId: '2JIqVoWNvSOHa9ppKOqSxxx'
25+
attemptNum: 0
26+
receivedAt: '2024-07-17T16:45:40.114+05:30'
27+
createdAt: '2024-07-17T11:15:41.140Z'
28+
firstAttemptedAt: ''
29+
transformAt: 'router'
30+
workspaceId: '2hSS1hZ8kuCpUZAAYsQucAFdxxx'
31+
secret: null
32+
workerAssignedTime: '2024-07-17T16:45:41.264239+05:30'
33+
dontBatch: false
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
message: "[Generic Response Handler] Request failed for destination bloomreach_catalog with status: 401"
2+
status: 401
3+
destinationResponse:
4+
response: "Could not verify your access level for that URL.\nYou have to login with proper credentials using HTTP Basic Auth (public key as username and private key as password)"
5+
status: 401
6+
headers:
7+
server: "nginx"
8+
date: "Fri, 1 Jan 2029 03:03:43 GMT"
9+
content-type: "text/html; charset=utf-8"
10+
content-length: "165"
11+
www-authenticate: 'Basic realm="Login Required"'
12+
vary: "Cookie"
13+
via: "1.1 google"
14+
alt-svc: 'h3=":443"; ma=2592000,h3-29=":443"; ma=2592000'
15+
statTags:
16+
errorCategory: "network"
17+
errorType: "aborted"
18+
destType: "BLOOMREACH_CATALOG"
19+
module: "destination"
20+
implementation: "native"
21+
feature: "dataDelivery"
22+
destinationId: "2JIqVoWNvSOHa9ppKOqSxxx"
23+
workspaceId: "2hSS1hZ8kuCpUZAAYsQucAFdxxx"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
output:
2+
status: 200
3+
message: "[Generic Response Handler] Request for destination: bloomreach_catalog Processed Successfully"
4+
destinationResponse:
5+
response:
6+
- queued: true
7+
success: true
8+
status: 200
9+
headers:
10+
server: "nginx"
11+
date: "Mon, 01 Jan 2029 03:45:29 GMT"
12+
content-type: "application/json"
13+
x-ratelimit-limit: 5
14+
x-ratelimit-remaining: 4
15+
x-ratelimit-reset: 1736135140
16+
retry-after: "Mon, 06 Jan 2025 03:45:40 GMT"
17+
strict-transport-security: "max-age=31536000; includeSubDomains"
18+
via: "1.1 google"
19+
alt-svc: "h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000"
20+
transfer-encoding: "chunked"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
value:
2+
version: v1
3+
type: REST
4+
method: POST
5+
endpoint: "https://demoapp-api.bloomreach.com/data/v2/projects/{project}/catalogs/{catalog}/items/partial-update"
6+
userId: ""
7+
headers:
8+
Authorization: "Basic token"
9+
params: {}
10+
body:
11+
JSON: {}
12+
JSON_ARRAY:
13+
batch:
14+
- item_id: "222"
15+
properties: {}
16+
- item_id: "11234"
17+
properties: {}
18+
XML: {}
19+
FORM: {}
20+
files: {}
21+
metadata:
22+
- userId: '<<>>12345<<>>12345'
23+
jobId: 1
24+
sourceId: '2ifsnRxzoONtZeIoGxgNWsr4xx'
25+
sourceCategory: ''
26+
destinationId: '2JIqVoWNvSOHa9ppKOqSxxx'
27+
attemptNum: 0
28+
receivedAt: '2024-07-17T16:45:40.114+05:30'
29+
createdAt: '2024-07-17T11:15:41.140Z'
30+
firstAttemptedAt: ''
31+
transformAt: 'router'
32+
workspaceId: '2hSS1hZ8kuCpUZAAYsQucAFdxxx'
33+
secret: null
34+
workerAssignedTime: '2024-07-17T16:45:41.264239+05:30'
35+
dontBatch: false
36+
- userId: '<<>>12345<<>>12345'
37+
jobId: 2
38+
sourceId: '2ifsnRxzoONtZeIoGxgNWsr4xx'
39+
sourceCategory: ''
40+
destinationId: '2JIqVoWNvSOHa9ppKOqSxxx'
41+
attemptNum: 0
42+
receivedAt: '2024-07-17T16:45:40.114+05:30'
43+
createdAt: '2024-07-17T11:15:41.140Z'
44+
firstAttemptedAt: ''
45+
transformAt: 'router'
46+
workspaceId: '2hSS1hZ8kuCpUZAAYsQucAFdxxx'
47+
secret: null
48+
workerAssignedTime: '2024-07-17T16:45:41.264239+05:30'
49+
dontBatch: false
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
response:
2+
- error: "\"Could not verify your access level for that URL.\\nYou have to login with proper credentials using HTTP Basic Auth (public key as username and private key as password)\""
3+
statusCode: 401
4+
metadata:
5+
userId: "<<>>12345<<>>12345"
6+
jobId: 1
7+
sourceId: "2ifsnRxzoONtZeIoGxgNWsr4xx"
8+
sourceCategory: ""
9+
destinationId: "2JIqVoWNvSOHa9ppKOqSxxx"
10+
attemptNum: 0
11+
receivedAt: "2024-07-17T16:45:40.114+05:30"
12+
createdAt: "2024-07-17T11:15:41.140Z"
13+
firstAttemptedAt: ""
14+
transformAt: "router"
15+
workspaceId: "2hSS1hZ8kuCpUZAAYsQucAFdxxx"
16+
secret: null
17+
workerAssignedTime: "2024-07-17T16:45:41.264239+05:30"
18+
dontBatch: false
19+
statTags:
20+
errorCategory: "network"
21+
errorType: "aborted"
22+
destType: "BLOOMREACH_CATALOG"
23+
module: "destination"
24+
implementation: "native"
25+
feature: "dataDelivery"
26+
destinationId: "2JIqVoWNvSOHa9ppKOqSxxx"
27+
workspaceId: "2hSS1hZ8kuCpUZAAYsQucAFdxxx"
28+
message: "BLOOMREACH_CATALOG: Error encountered in transformer proxy V1"
29+
status: 401
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
output:
2+
status: 200
3+
message: "[BLOOMREACH_CATALOG Response V1 Handler] - Request Processed Successfully"
4+
destinationResponse:
5+
response:
6+
- queued: true
7+
success: true
8+
- queued: true
9+
success: true
10+
status: 200
11+
headers:
12+
server: "nginx"
13+
date: "Mon, 06 Jan 2025 03:45:29 GMT"
14+
content-type: "application/json"
15+
x-ratelimit-limit: 5
16+
x-ratelimit-remaining: 4
17+
x-ratelimit-reset: 1736135140
18+
retry-after: "Mon, 06 Jan 2025 03:45:40 GMT"
19+
strict-transport-security: "max-age=31536000; includeSubDomains"
20+
via: "1.1 google"
21+
alt-svc: "h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000"
22+
transfer-encoding: "chunked"
23+
response:
24+
- statusCode: 200
25+
error: "success"
26+
metadata:
27+
userId: "<<>>12345<<>>12345"
28+
jobId: 1
29+
sourceId: "2ifsnRxzoONtZeIoGxgNWsr4xx"
30+
sourceCategory: ""
31+
destinationId: "2JIqVoWNvSOHa9ppKOqSxxx"
32+
attemptNum: 0
33+
receivedAt: "2024-07-17T16:45:40.114+05:30"
34+
createdAt: "2024-07-17T11:15:41.140Z"
35+
firstAttemptedAt: ""
36+
transformAt: "router"
37+
workspaceId: "2hSS1hZ8kuCpUZAAYsQucAFdxxx"
38+
secret: null
39+
workerAssignedTime: "2024-07-17T16:45:41.264239+05:30"
40+
dontBatch: false
41+
- statusCode: 200
42+
error: "success"
43+
metadata:
44+
userId: "<<>>12345<<>>12345"
45+
jobId: 2
46+
sourceId: "2ifsnRxzoONtZeIoGxgNWsr4xx"
47+
sourceCategory: ""
48+
destinationId: "2JIqVoWNvSOHa9ppKOqSxxx"
49+
attemptNum: 0
50+
receivedAt: "2024-07-17T16:45:40.114+05:30"
51+
createdAt: "2024-07-17T11:15:41.140Z"
52+
firstAttemptedAt: ""
53+
transformAt: "router"
54+
workspaceId: "2hSS1hZ8kuCpUZAAYsQucAFdxxx"
55+
secret: null
56+
workerAssignedTime: "2024-07-17T16:45:41.264239+05:30"
57+
dontBatch: false
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
title: Proxy Request
2+
type: object
3+
properties:
4+
version:
5+
type: string
6+
type:
7+
type: string
8+
method:
9+
type: string
10+
endpoint:
11+
type: string
12+
userId:
13+
type: string
14+
headers:
15+
type: object
16+
params:
17+
type: object
18+
body:
19+
type: object
20+
properties:
21+
JSON:
22+
type: object
23+
JSON_ARRAY:
24+
type: object
25+
XML:
26+
type: object
27+
FORM:
28+
type: object
29+
files:
30+
type: object
31+
metadata:
32+
$ref: './metadata.yaml'

swagger/components/schemas/deliveryResponse.yaml swagger/components/schemas/v0DeliveryResponse.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,4 @@ properties:
2828
workspaceId:
2929
type: string
3030
authErrorCategory:
31-
type: string
31+
type: string
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
title: Proxy Request
2+
type: object
3+
properties:
4+
version:
5+
type: string
6+
type:
7+
type: string
8+
method:
9+
type: string
10+
endpoint:
11+
type: string
12+
userId:
13+
type: string
14+
headers:
15+
type: object
16+
params:
17+
type: object
18+
body:
19+
type: object
20+
properties:
21+
JSON:
22+
type: object
23+
JSON_ARRAY:
24+
type: object
25+
XML:
26+
type: object
27+
FORM:
28+
type: object
29+
files:
30+
type: object
31+
metadata:
32+
type: array
33+
items:
34+
$ref: './metadata.yaml'
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
title: Delivery response
2+
type: object
3+
properties:
4+
status:
5+
type: number
6+
message:
7+
type: string
8+
statTags:
9+
type: object
10+
properties:
11+
errorCategory:
12+
type: string
13+
errorType:
14+
type: string
15+
destType:
16+
type: string
17+
module:
18+
type: string
19+
implementation:
20+
type: string
21+
feature:
22+
type: string
23+
example: 'dataDelivery'
24+
destinationId:
25+
type: string
26+
workspaceId:
27+
type: string
28+
destinationResponse:
29+
type: object
30+
authErrorCategory:
31+
type: string
32+
response:
33+
type: array
34+
items:
35+
type: object
36+
properties:
37+
error:
38+
type: string
39+
statusCode:
40+
type: number
41+
metadata:
42+
$ref: './metadata.yaml'

0 commit comments

Comments
 (0)