openapi: 3.2.0 info: description: Marketo Engage Rest API version: '1.0' title: Marketo Engage Rest Bulk Export Activities API termsOfService: https://www.adobe.com/legal.html contact: name: Adobe Developer Relations url: https://experienceleague.adobe.com/en/docs/marketo-developer/marketo/home email: '' license: name: API License Agreement url: https://experienceleague.adobe.com/en/docs/marketo-developer/marketo/api-license servers: - url: https://localhost:8080/ tags: - name: Bulk Export Activities description: Bulk Export Activities Controller paths: /bulk/v1/activities/export.json: get: tags: - Bulk Export Activities summary: Get Export Activity Jobs description: 'Returns a list of export jobs that were created in the past 7 days. Required Permissions: Read-Only Activity' operationId: getExportActivitiesUsingGET parameters: - name: status in: query description: Comma separated list of statuses to filter on. required: false style: form explode: true schema: type: array items: type: string enum: - created - queued - processing - cancelled - completed - failed - name: batchSize in: query description: The batch size to return. The max and default value is 300. required: false schema: type: integer format: int32 - name: nextPageToken in: query description: A token will be returned by this endpoint if the result set is greater than the batch size and can be passed in a subsequent call through this parameter. See Paging Tokens for more info. required: false schema: type: string responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/ResponseOfExportResponseWithToken' /bulk/v1/activities/export/create.json: post: tags: - Bulk Export Activities summary: Create Export Activity Job description: 'Create export job for search criteria defined via "filter" parameter. Request returns the "exportId" which is passed as a parameter in subsequent calls to Bulk Export Activities endpoints. Use Enqueue Export Activity Job endpoint to queue the export job for processing. Use Get Export Activity Job Status endpoint to retrieve status of export job. Required Permissions: Read-Only Activity' operationId: createExportActivitiesUsingPOST responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/ResponseOfExportResponse' requestBody: content: application/json: schema: $ref: '#/components/schemas/ExportActivityRequest' description: 'exportActivityRequest

ColumnHeaderNames: A JSON object containing key-value pairs of field and column header names.

Example:
"columnHeaderNames":{
"primaryAttributeValueId":"Attribute ID",
"primaryAttributeValue":"Attribute Value",
"attributes":"Secondary Attributes"
}

' /bulk/v1/activities/export/{exportId}/cancel.json: post: tags: - Bulk Export Activities summary: Cancel Export Activity Job description: 'Cancel export job. Required Permissions: Read-Only Activity' operationId: cancelExportActivitiesUsingPOST parameters: - name: exportId in: path description: Id of export batch job. required: true schema: type: string responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/ResponseOfExportResponse' /bulk/v1/activities/export/{exportId}/enqueue.json: post: tags: - Bulk Export Activities summary: Enqueue Export Activity Job description: 'Enqueue export job. This will place export job in queue, and will start the job when computing resources become available. The export job must be in "Created" state. Use Get Export Activity Job Status endpoint to retrieve status of export job. Required Permissions: Read-Only Activity' operationId: enqueueExportActivitiesUsingPOST parameters: - name: exportId in: path description: Id of export batch job. required: true schema: type: string responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/ResponseOfExportResponse' /bulk/v1/activities/export/{exportId}/file.json: get: tags: - Bulk Export Activities summary: Get Export Activity File description: 'Returns the file content of an export job. The export job must be in "Completed" state. Use Get Export Activity Job Status endpoint to retrieve status of export job. Required Permissions: Read-Only Activity

The file format is specified by calling the Create Export Activity Job endpoint. The following is an example of the default file format ("CSV"). Note that the "attributes" field is formatted as JSON.

marketoGUID,leadId,activityDate,activityTypeId,campaignId,primaryAttributeValueId,primaryAttributeValue, attributes
122323,6,2013-09-26T06:56:35+0000,12,11,6,Owyliphys Iledil,[{"name":"Source Type","value":"Web page visit"}]' operationId: getExportActivitiesFileUsingGET parameters: - name: exportId in: path description: Id of export batch job. required: true schema: type: string - name: Range in: header description: To support partial retrieval of extracted data, the HTTP header "Range" of type "bytes" may be specified. See RFC 2616 "Range Retrieval Requests" for more information. If the header is not set, the entire contents will be returned. required: false schema: type: string responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/ObservableOfInputStreamRangeContent' /bulk/v1/activities/export/{exportId}/status.json: get: tags: - Bulk Export Activities summary: Get Export Activity Job Status description: 'Returns status of an export job. Job status is available for 30 days after Completed or Failed status was reached. Required Permissions: Read-Only Activity' operationId: getExportActivitiesStatusUsingGET parameters: - name: exportId in: path description: Id of export batch job. required: true schema: type: string responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/ResponseOfExportResponse' components: schemas: Error: type: object required: - code - message properties: code: type: string description: Error code of the error. See full list of error codes here message: type: string description: Message describing the cause of the error ResponseOfExportResponseWithToken: type: object required: - errors - requestId - result - success - warnings properties: errors: type: array description: Array of errors that occurred if the request was unsuccessful items: $ref: '#/components/schemas/Error' nextPageToken: type: string description: Paging token given if the result set exceeded the allowed batch size requestId: type: string description: Id of the request made result: type: array description: Array of results for individual records in the operation, may be empty items: $ref: '#/components/schemas/ExportResponse' success: type: boolean example: false description: Whether the request succeeded warnings: type: array description: Array of warnings given for the operation items: $ref: '#/components/schemas/Warning' ExportResponse: type: object required: - exportId - status properties: createdAt: type: string format: date-time description: Date when the export request was created errorMsg: type: string description: Error message in case of "Failed" status exportId: type: string description: Unique id of the export job fileSize: type: integer format: int64 description: Size of exported file in bytes. This will have a value only when status is "Completed", otherwise null fileChecksum: type: string description: SHA-256 hash of exported file. This will have a value only when status is "Completed", otherwise null finishedAt: type: string format: date-time description: Finish time of export job. This will have value only when status is "Completed" or "Failed", otherwise null format: type: string description: Format of file as given in the request ("CSV", "TSV", "SSV") numberOfRecords: type: integer format: int64 description: Number of records in the export file. This will have value only when status is "Completed", otherwise null queuedAt: type: string format: date-time description: Queue time of export job. This will have value when "Queued" status is reached, before that null startedAt: type: string format: date-time description: Start time of export job. This will have value when "Processing" status is reached, before that null status: type: string description: Status of the export job ("Created","Queued","Processing","Canceled","Completed","Failed") description: Response containing export job status information Warning: type: object required: - code - message properties: code: type: integer format: int32 description: Integer code of the warning message: type: string description: Message describing the warning ResponseOfExportResponse: type: object required: - errors - requestId - result - success - warnings properties: errors: type: array description: Array of errors that occurred if the request was unsuccessful items: $ref: '#/components/schemas/Error' requestId: type: string description: Id of the request made result: type: array description: Array of results for individual records in the operation, may be empty items: $ref: '#/components/schemas/ExportResponse' success: type: boolean example: false description: Whether the request succeeded warnings: type: array description: Array of warnings given for the operation items: $ref: '#/components/schemas/Warning' ObservableOfInputStreamRangeContent: type: object ColumnHeaderNames: type: object required: - name - value properties: name: type: string description: REST API name for header field value: type: string description: Value for header field DateRange: type: object properties: endAt: type: string description: End of date range filter (ISO 8601-format) startAt: type: string description: Start of date range filter (ISO-8601 format) ExportActivityRequest: type: object required: - fields - filter properties: columnHeaderNames: description: File header field names override (corresponds with REST API name) $ref: '#/components/schemas/ColumnHeaderNames' fields: type: array description: 'Array of strings containing field values. Used to reduce the number of fields contained in export file. Select one or more of: marketoGUID, leadId, activityDate, activityTypeId, campaignId, primaryAttributeValueId, primaryAttributeValue, actionResult' items: type: string filter: description: Record selection criteria. "createdAt" is required, "activityTypeIds", "primaryAttributeValueIds", and "primaryAttributeValues" are optional $ref: '#/components/schemas/ExportActivityFilter' format: type: string description: File format to create("CSV", "TSV", "SSV"). Default is "CSV" ExportActivityFilter: type: object required: - createdAt properties: activityTypeIds: type: array description: List of activity type ids to filter on items: type: integer format: int32 primaryAttributeValueIds: type: array description: List of primary attribute ids to filter on items: type: integer format: int32 primaryAttributeValues: type: array description: List of primary attribute values to filter on items: type: string createdAt: description: Date range to filter new activities on $ref: '#/components/schemas/DateRange'