-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdemandbase-data-export-openapi.yml
More file actions
353 lines (353 loc) · 10.2 KB
/
demandbase-data-export-openapi.yml
File metadata and controls
353 lines (353 loc) · 10.2 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
openapi: 3.1.0
info:
title: Demandbase Data Export API
description: >-
Enables bulk, asynchronous, programmatic data exports from Demandbase One,
supporting extraction of records for accounts, people, opportunities,
activities, campaigns, and Buying Groups with full granularity, delivered
as downloadable CSVs up to 10GB per day.
version: '1.0'
contact:
name: Demandbase Support
url: https://support.demandbase.com/
termsOfService: https://www.demandbase.com/terms-of-service/
externalDocs:
description: Demandbase Data Export API Documentation
url: https://support.demandbase.com/hc/en-us/articles/26668967193627-Understanding-the-Demandbase-API-Suite-and-MCP
servers:
- url: https://api.demandbase.com
description: Demandbase Data Export API Production
tags:
- name: Downloads
description: Download exported data files
- name: Export Jobs
description: Create and manage data export jobs
security:
- bearerAuth: []
paths:
/export/v1/jobs:
get:
operationId: listExportJobs
summary: Demandbase List export jobs
description: >-
Retrieve a list of data export jobs with their current status and
metadata.
tags:
- Export Jobs
parameters:
- name: status
in: query
required: false
description: Filter by job status
schema:
type: string
enum:
- pending
- processing
- completed
- failed
- cancelled
- name: limit
in: query
required: false
schema:
type: integer
default: 25
- name: offset
in: query
required: false
schema:
type: integer
default: 0
responses:
'200':
description: List of export jobs
content:
application/json:
schema:
type: object
properties:
jobs:
type: array
items:
$ref: '#/components/schemas/ExportJob'
total:
type: integer
'401':
description: Unauthorized
post:
operationId: createExportJob
summary: Demandbase Create an export job
description: >-
Create a new asynchronous data export job. Specify the entity type,
fields to export, filters, and date range. Exported data is delivered
as downloadable CSV files.
tags:
- Export Jobs
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/CreateExportJobRequest'
responses:
'202':
description: Export job created and queued for processing
content:
application/json:
schema:
$ref: '#/components/schemas/ExportJob'
'400':
description: Invalid request - check entity type and field names
'401':
description: Unauthorized
'429':
description: Daily export quota exceeded (10GB per day limit)
/export/v1/jobs/{jobId}:
get:
operationId: getExportJob
summary: Demandbase Get export job status
description: >-
Retrieve the current status and details of a specific export job,
including progress information and download URLs when complete.
tags:
- Export Jobs
parameters:
- $ref: '#/components/parameters/jobId'
responses:
'200':
description: Export job details
content:
application/json:
schema:
$ref: '#/components/schemas/ExportJob'
'401':
description: Unauthorized
'404':
description: Export job not found
delete:
operationId: cancelExportJob
summary: Demandbase Cancel an export job
description: Cancel a pending or processing export job.
tags:
- Export Jobs
parameters:
- $ref: '#/components/parameters/jobId'
responses:
'200':
description: Export job cancelled
content:
application/json:
schema:
$ref: '#/components/schemas/ExportJob'
'401':
description: Unauthorized
'404':
description: Export job not found
'409':
description: Job cannot be cancelled (already completed or failed)
/export/v1/jobs/{jobId}/download:
get:
operationId: downloadExportFile
summary: Demandbase Download export file
description: >-
Download the exported CSV file for a completed export job. Returns
a redirect to a pre-signed download URL.
tags:
- Downloads
parameters:
- $ref: '#/components/parameters/jobId'
- name: part
in: query
required: false
description: Part number for multi-part exports (starts at 1)
schema:
type: integer
default: 1
responses:
'200':
description: CSV file download
content:
text/csv:
schema:
type: string
format: binary
'302':
description: Redirect to pre-signed download URL
'401':
description: Unauthorized
'404':
description: Export job not found or not yet completed
/export/v1/entities:
get:
operationId: listExportableEntities
summary: Demandbase List exportable entities
description: >-
Retrieve the list of entity types available for export and their
supported fields.
tags:
- Export Jobs
responses:
'200':
description: List of exportable entities
content:
application/json:
schema:
type: object
properties:
entities:
type: array
items:
$ref: '#/components/schemas/ExportableEntity'
'401':
description: Unauthorized
components:
securitySchemes:
bearerAuth:
type: http
scheme: bearer
bearerFormat: JWT
description: OAuth 2.0 bearer token for API access
parameters:
jobId:
name: jobId
in: path
required: true
description: Export job unique identifier
schema:
type: string
schemas:
ExportJob:
type: object
properties:
id:
type: string
description: Export job unique identifier
entity_type:
type: string
enum:
- accounts
- people
- opportunities
- activities
- campaigns
- buying_groups
description: Type of entity being exported
status:
type: string
enum:
- pending
- processing
- completed
- failed
- cancelled
description: Current job status
fields:
type: array
items:
type: string
description: Fields included in the export
filters:
type: object
description: Applied filters
record_count:
type: integer
description: Total number of records exported
file_size_bytes:
type: integer
description: Size of the exported file in bytes
file_parts:
type: integer
description: Number of file parts for large exports
download_url:
type: string
format: uri
description: URL to download the exported file (when completed)
created_at:
type: string
format: date-time
description: Job creation timestamp
completed_at:
type: string
format: date-time
description: Job completion timestamp
expires_at:
type: string
format: date-time
description: When the download URL expires
error_message:
type: string
description: Error details if the job failed
CreateExportJobRequest:
type: object
required:
- entity_type
properties:
entity_type:
type: string
enum:
- accounts
- people
- opportunities
- activities
- campaigns
- buying_groups
description: Type of entity to export
fields:
type: array
items:
type: string
description: >-
Fields to include in the export. If omitted, all available fields
are exported.
filters:
type: object
description: Filter criteria to limit exported records
properties:
date_range:
type: object
properties:
field:
type: string
description: Date field to filter on
start:
type: string
format: date
description: Start date
end:
type: string
format: date
description: End date
account_list_id:
type: string
description: Limit export to a specific account list
format:
type: string
enum:
- csv
default: csv
description: Export file format
ExportableEntity:
type: object
properties:
name:
type: string
description: Entity type name
description:
type: string
description: Entity description
fields:
type: array
items:
type: object
properties:
name:
type: string
description: Field name
type:
type: string
description: Field data type
description:
type: string
description: Field description
description: Available fields for export