Skip to content

Commit bf41220

Browse files
committed
Add batch endpoint
1 parent 93dd9e5 commit bf41220

File tree

1 file changed

+176
-22
lines changed

1 file changed

+176
-22
lines changed

spec.yaml

Lines changed: 176 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,10 @@ servers:
1313
- description: BuiltByBit
1414
url: 'https://api.builtbybit.com/'
1515
tags:
16+
- name: analytics
17+
- name: events
1618
- name: free
17-
- name: global
19+
- name: health
1820
- name: oauth2
1921
- name: resources/buyer
2022
- name: resources/creator
@@ -583,8 +585,6 @@ paths:
583585
/v2/events:
584586
get:
585587
summary: Fetch a list of pending events
586-
tags:
587-
- global
588588
responses:
589589
'200':
590590
description: OK
@@ -616,11 +616,11 @@ paths:
616616
id: 00f4ahftly4s2
617617
security:
618618
- token: []
619+
tags:
620+
- events
619621
/v2/events/complete:
620622
post:
621623
summary: Mark events as complete
622-
tags:
623-
- global
624624
responses:
625625
'200':
626626
description: OK
@@ -657,11 +657,11 @@ paths:
657657
x-stoplight:
658658
id: 9ykv6yr4xaldk
659659
type: integer
660+
tags:
661+
- events
660662
/v2/analytics:
661663
get:
662664
summary: Fetch a list of analytics definitions
663-
tags:
664-
- global
665665
responses:
666666
'200':
667667
description: OK
@@ -689,11 +689,11 @@ paths:
689689
id: au6y5fszotgtf
690690
security:
691691
- token: []
692+
tags:
693+
- analytics
692694
/v2/analytics/graph:
693695
get:
694696
summary: Fetch analytics graph data
695-
tags:
696-
- global
697697
responses:
698698
'200':
699699
description: OK
@@ -741,11 +741,11 @@ paths:
741741
description: 'Only respected when ''period'' = ''custom_range'', in the format ''YYYY-MM-DD''.'
742742
security:
743743
- token: []
744+
tags:
745+
- analytics
744746
/v2/analytics/single:
745747
get:
746748
summary: Fetch a single analytics value
747-
tags:
748-
- global
749749
responses:
750750
'200':
751751
description: OK
@@ -826,6 +826,8 @@ paths:
826826
description: 'Only respected when ''period'' = ''custom_range'', in the format ''YYYY-MM-DD''.'
827827
security:
828828
- token: []
829+
tags:
830+
- analytics
829831
/v2/resources/creator/update:
830832
post:
831833
summary: Post a resource update
@@ -1354,7 +1356,8 @@ paths:
13541356
/v2/resources/creator/coupons:
13551357
get:
13561358
summary: Fetch a list of your coupons
1357-
tags: []
1359+
tags:
1360+
- resources/creator
13581361
responses:
13591362
'200':
13601363
description: OK
@@ -1389,7 +1392,6 @@ paths:
13891392
/v2/health:
13901393
get:
13911394
summary: Retrieve a health status
1392-
tags: []
13931395
responses:
13941396
'200':
13951397
description: OK
@@ -1413,10 +1415,13 @@ paths:
14131415
id: t839xv25nj4y1
14141416
security:
14151417
- token: []
1418+
tags:
1419+
- health
14161420
/v2/resources/creator/stores:
14171421
get:
14181422
summary: Fetch a list of your stores
1419-
tags: []
1423+
tags:
1424+
- resources/creator
14201425
responses:
14211426
'200':
14221427
description: OK
@@ -1448,6 +1453,125 @@ paths:
14481453
id: z941xq9jbm1ki
14491454
security:
14501455
- token: []
1456+
/v2/resources/creator/batch:
1457+
get:
1458+
summary: Fetch a list of your batches edits
1459+
tags: []
1460+
responses:
1461+
'200':
1462+
description: OK
1463+
content:
1464+
application/json:
1465+
schema:
1466+
type: object
1467+
properties:
1468+
result:
1469+
x-stoplight:
1470+
id: vdj5lttfalg23
1471+
enum:
1472+
- success
1473+
data:
1474+
type: object
1475+
x-stoplight:
1476+
id: 4gavk9909u5jv
1477+
properties:
1478+
batches:
1479+
type: array
1480+
x-stoplight:
1481+
id: snlln6bye6o3v
1482+
items:
1483+
$ref: '#/components/schemas/Batch'
1484+
stats:
1485+
$ref: '#/components/schemas/ListStats'
1486+
operationId: get-v2-resources-creator-batch
1487+
x-stoplight:
1488+
id: icz9ioupc63pq
1489+
security:
1490+
- token: []
1491+
parameters:
1492+
- schema:
1493+
type: array
1494+
in: query
1495+
name: batch_ids
1496+
explode: false
1497+
style: form
1498+
description: A comma-separated list of batch IDs to filter on. No filter is applied if empty.
1499+
post:
1500+
summary: Submit a new batch edit
1501+
tags: []
1502+
responses:
1503+
'200':
1504+
description: OK
1505+
content:
1506+
application/json:
1507+
schema:
1508+
type: object
1509+
properties:
1510+
result:
1511+
x-stoplight:
1512+
id: 27p3h051x4t3x
1513+
enum:
1514+
- success
1515+
data:
1516+
type: object
1517+
x-stoplight:
1518+
id: txtvguoylrj8j
1519+
properties:
1520+
batch:
1521+
$ref: '#/components/schemas/Batch'
1522+
operationId: post-v2-resources-creator-batch
1523+
x-stoplight:
1524+
id: qa9wz2n2gcuzh
1525+
security: []
1526+
description: Batch edits will be processed in the background meaning a successful call to this endpoint does not guarantee that the edits have been completed. You will instead receive an identifier to a batch edit which you can then use to fetch the status of via the below endpoint. This is not an atomic operation meaning some resources may be edited successfully and others may not be due to an error. You may only batch edit resources you own currently.
1527+
requestBody:
1528+
content:
1529+
application/json:
1530+
schema:
1531+
type: object
1532+
required:
1533+
- resources
1534+
- changes
1535+
properties:
1536+
resources:
1537+
type: array
1538+
x-stoplight:
1539+
id: ir2feygtqs9js
1540+
description: A list of resource IDs to edit.
1541+
items: {}
1542+
changes:
1543+
type: array
1544+
x-stoplight:
1545+
id: dga54iqms4398
1546+
items:
1547+
x-stoplight:
1548+
id: kzylfe3aizlt7
1549+
type: object
1550+
required:
1551+
- field
1552+
- type
1553+
- value
1554+
properties:
1555+
field:
1556+
type: string
1557+
x-stoplight:
1558+
id: 7wxtfkz0jnfof
1559+
type:
1560+
type: string
1561+
x-stoplight:
1562+
id: t39muepw3xzgc
1563+
search:
1564+
type: string
1565+
x-stoplight:
1566+
id: ojc6jmztfj3y9
1567+
value:
1568+
x-stoplight:
1569+
id: dup4famp2x8jh
1570+
type:
1571+
- number
1572+
- string
1573+
- array
1574+
items: {}
14511575
externalDocs:
14521576
description: Find out more about Swagger
14531577
url: 'http://swagger.io'
@@ -2287,14 +2411,6 @@ components:
22872411
x-stoplight:
22882412
id: irm0618am9i2d
22892413
type: number
2290-
averages:
2291-
type: object
2292-
x-stoplight:
2293-
id: eyh6ty5q9nwvy
2294-
additionalProperties:
2295-
x-stoplight:
2296-
id: oud9zl7csn7r6
2297-
type: number
22982414
Purchase:
22992415
title: Purchase
23002416
x-stoplight:
@@ -2533,6 +2649,44 @@ components:
25332649
type: integer
25342650
x-stoplight:
25352651
id: xqf66r1k7quwk
2652+
Batch:
2653+
title: Batch
2654+
x-stoplight:
2655+
id: t08rlhuya7u4f
2656+
type: object
2657+
properties:
2658+
batch_id:
2659+
type: integer
2660+
x-stoplight:
2661+
id: rywmsoga1fe0d
2662+
user_id:
2663+
type: integer
2664+
x-stoplight:
2665+
id: 7xll9btyrfgot
2666+
errors:
2667+
x-stoplight:
2668+
id: xub0zolvnre7u
2669+
type: object
2670+
additionalProperties:
2671+
x-stoplight:
2672+
id: gt82q11gqjh88
2673+
type: array
2674+
items:
2675+
x-stoplight:
2676+
id: 0aer42sweluen
2677+
type: string
2678+
data:
2679+
type: string
2680+
x-stoplight:
2681+
id: q2mzi5v7ih9mx
2682+
created_at:
2683+
type: integer
2684+
x-stoplight:
2685+
id: vgtzd40pnfj4f
2686+
completed_at:
2687+
type: integer
2688+
x-stoplight:
2689+
id: y3phpy9xiq90a
25362690
requestBodies: {}
25372691
securitySchemes:
25382692
token:

0 commit comments

Comments
 (0)