Skip to content

Commit fccb5ad

Browse files
author
Muhammad Murtaza
committed
Add docs related to reporting data export
1 parent f6aa883 commit fccb5ad

File tree

1 file changed

+299
-0
lines changed

1 file changed

+299
-0
lines changed

descriptions/2.13/api.intercom.io.yaml

Lines changed: 299 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -358,6 +358,305 @@ paths:
358358
message: Access Token Invalid
359359
schema:
360360
"$ref": "#/components/schemas/error"
361+
"/export/reporting_data/enqueue":
362+
post:
363+
summary: Enqueue a new reporting data export job
364+
tags: [Export]
365+
parameters:
366+
- name: Intercom-Version
367+
in: header
368+
schema:
369+
"$ref": "#/components/schemas/intercom_version"
370+
requestBody:
371+
required: true
372+
content:
373+
application/json:
374+
schema:
375+
type: object
376+
required: [dataset_id, attribute_ids, start_time, end_time]
377+
properties:
378+
dataset_id:
379+
type: string
380+
example: conversation
381+
attribute_ids:
382+
type: array
383+
items:
384+
type: string
385+
example: [conversation.id, conversation.first_user_conversation_part_created_at]
386+
start_time:
387+
type: integer
388+
format: int64
389+
example: 1717490000
390+
end_time:
391+
type: integer
392+
format: int64
393+
example: 1717510000
394+
responses:
395+
'200':
396+
description: Job enqueued successfully
397+
content:
398+
application/json:
399+
schema:
400+
type: object
401+
properties:
402+
job_identifier:
403+
type: string
404+
example: job1
405+
status:
406+
type: string
407+
example: pending
408+
download_url:
409+
type: string
410+
download_expires_at:
411+
type: string
412+
'400':
413+
description: Bad request (e.g. validation errors)
414+
content:
415+
application/json:
416+
examples:
417+
No dataset_id:
418+
value:
419+
type: error.list
420+
request_id: b68959ea-6328-4f70-83cb-e7913dba1542
421+
errors:
422+
- code: bad_request
423+
message: "'dataset_id' is a required parameter"
424+
Invalid dataset_id:
425+
value:
426+
type: error.list
427+
request_id: b68959ea-6328-4f70-83cb-e7913dba1542
428+
errors:
429+
- code: bad_request
430+
message: imaginary is not a valid dataset_id
431+
No attribute_ids:
432+
value:
433+
type: error.list
434+
request_id: b68959ea-6328-4f70-83cb-e7913dba1542
435+
errors:
436+
- code: bad_request
437+
message: "'attribute_ids' is a required parameter"
438+
Empty attribute_ids:
439+
value:
440+
type: error.list
441+
request_id: b68959ea-6328-4f70-83cb-e7913dba1542
442+
errors:
443+
- code: bad_request
444+
message: attribute_ids must contain at least one attribute_id
445+
Non array attribute_ids:
446+
value:
447+
type: error.list
448+
request_id: b68959ea-6328-4f70-83cb-e7913dba1542
449+
errors:
450+
- code: bad_request
451+
message: "'attribute_ids' not an array must be of type Array"
452+
Invalid attribute_ids:
453+
value:
454+
type: error.list
455+
request_id: b68959ea-6328-4f70-83cb-e7913dba1542
456+
errors:
457+
- code: bad_request
458+
message: "attribute_ids invalid for conversation dataset: non_existent"
459+
schema:
460+
"$ref": "#/components/schemas/error"
461+
'401':
462+
description: Unauthorized
463+
content:
464+
application/json:
465+
examples:
466+
Unauthorized:
467+
value:
468+
type: error.list
469+
request_id: b68959ea-6328-4f70-83cb-e7913dba1542
470+
errors:
471+
- code: unauthorized
472+
message: Access Token Invalid
473+
schema:
474+
"$ref": "#/components/schemas/error"
475+
'429':
476+
description: Too many jobs in progress
477+
content:
478+
application/json:
479+
examples:
480+
Unauthorized:
481+
value:
482+
type: error.list
483+
request_id: b68959ea-6328-4f70-83cb-e7913dba1542
484+
errors:
485+
- code: rate_limit_exceeded
486+
message: Exceeded rate limit of 5 pending reporting dataset export jobs
487+
schema:
488+
"$ref": "#/components/schemas/error"
489+
"/export/reporting_data/{job_identifier}":
490+
get:
491+
summary: Get export job status
492+
tags: [Export]
493+
parameters:
494+
- name: Intercom-Version
495+
in: header
496+
schema:
497+
"$ref": "#/components/schemas/intercom_version"
498+
- name: app_id
499+
in: query
500+
description: The Intercom defined code of the workspace the company is associated
501+
to.
502+
required: true
503+
schema:
504+
type: string
505+
- name: client_id
506+
in: query
507+
required: true
508+
schema:
509+
type: string
510+
- name: job_identifier
511+
description: Unique identifier of the job.
512+
in: query
513+
required: true
514+
schema:
515+
type: string
516+
responses:
517+
'200':
518+
description: Job status returned successfully
519+
content:
520+
application/json:
521+
schema:
522+
type: object
523+
properties:
524+
job_identifier:
525+
type: string
526+
example: 'job1'
527+
status:
528+
type: string
529+
example: 'complete'
530+
download_url:
531+
type: string
532+
download_expires_at:
533+
type: string
534+
'404':
535+
description: When job not found
536+
content:
537+
application/json:
538+
examples:
539+
Not found:
540+
value:
541+
type: error.list
542+
request_id: b68959ea-6328-4f70-83cb-e7913dba1542
543+
errors:
544+
- code: not_found
545+
message: "Export job not found for identifier: job1"
546+
schema:
547+
"$ref": "#/components/schemas/error"
548+
'504':
549+
description: When job has failed
550+
content:
551+
application/json:
552+
schema:
553+
type: object
554+
properties:
555+
job_identifier:
556+
type: string
557+
example: 'job1'
558+
status:
559+
type: string
560+
example: 'failed'
561+
download_url:
562+
type: string
563+
example: ''
564+
download_expires_at:
565+
type: string
566+
example: ''
567+
568+
"/export/reporting_data/get_datasets":
569+
get:
570+
summary: List available datasets and attributes
571+
parameters:
572+
- name: Intercom-Version
573+
in: header
574+
schema:
575+
"$ref": "#/components/schemas/intercom_version"
576+
tags: [Export]
577+
responses:
578+
'200':
579+
description: List of datasets
580+
content:
581+
application/json:
582+
schema:
583+
type: object
584+
properties:
585+
type:
586+
type: string
587+
example: list
588+
data:
589+
type: array
590+
items:
591+
type: object
592+
properties:
593+
id:
594+
type: string
595+
example: conversation
596+
name:
597+
type: string
598+
example: Conversation
599+
description:
600+
type: string
601+
example: "Conversation-level details: status, channel, assignee."
602+
default_time_attribute_id:
603+
type: string
604+
example: conversation.first_user_conversation_part_created_at
605+
attributes:
606+
type: array
607+
items:
608+
type: object
609+
properties:
610+
id:
611+
type: string
612+
example: conversation.id
613+
name:
614+
type: string
615+
example: Conversation ID
616+
617+
"/export/reporting_data/download":
618+
get:
619+
summary: Download completed export job data
620+
tags: [Export]
621+
parameters:
622+
- name: Intercom-Version
623+
in: header
624+
schema:
625+
"$ref": "#/components/schemas/intercom_version"
626+
- name: app_id
627+
in: query
628+
required: true
629+
schema:
630+
type: string
631+
- name: job_identifier
632+
in: query
633+
required: true
634+
schema:
635+
type: string
636+
responses:
637+
'200':
638+
description: Export file downloaded
639+
content:
640+
application/octet-stream:
641+
schema:
642+
type: string
643+
format: binary
644+
'404':
645+
description: When job not found
646+
content:
647+
application/json:
648+
examples:
649+
Not found:
650+
value:
651+
type: error.list
652+
request_id: b68959ea-6328-4f70-83cb-e7913dba1542
653+
errors:
654+
- code: not_found
655+
message: "Export job not found for identifier: job1"
656+
schema:
657+
"$ref": "#/components/schemas/error"
658+
security:
659+
- bearerAuth: []
361660
"/ai/content_import_sources":
362661
get:
363662
summary: List content import sources

0 commit comments

Comments
 (0)