openapi: 3.2.0 info: description: Marketo Engage Rest API version: '1.0' title: Marketo Engage Rest Bulk Export Custom Objects 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 Custom Objects description: Bulk Export Custom Objects Controller paths: /bulk/v1/customobjects/{apiName}/export.json: get: tags: - Bulk Export Custom Objects summary: Get Export Custom Object Jobs description: 'Returns a list of export jobs that were created in the past 7 days. Required Permissions: Read-Only Custom Object' operationId: getExportCustomObjectsUsingGET parameters: - name: apiName in: path description: API Name of the custom object for the export batch job. required: true schema: type: string - 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/customobjects/{apiName}/export/create.json: post: tags: - Bulk Export Custom Objects summary: Create Export Custom Object 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 Custom Object endpoints. Use Enqueue Export Custom Object Job endpoint to queue the export job for processing. Use Get Export Custom Object Job Status endpoint to retrieve status of export job. Required Permissions: Read-Only Custom Object' operationId: createExportCustomObjectsUsingPOST parameters: - name: apiName in: path description: API Name of the custom object for the export batch job. required: true schema: type: string responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/ResponseOfExportResponse' requestBody: content: application/json: schema: $ref: '#/components/schemas/ExportCustomObjectRequest' description: 'exportCustomObjectRequest

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

Example:
"columnHeaderNames":{
"attrName1":"value1",
"attrName2":"value2",
"attrName3":"value3"
}

' /bulk/v1/customobjects/{apiName}/export/{exportId}/cancel.json: post: tags: - Bulk Export Custom Objects summary: Cancel Export Custom Object Job description: 'Cancel export job. Required Permissions: Read-Only Custom Object' operationId: cancelExportCustomObjectsUsingPOST parameters: - name: apiName in: path description: API Name of the custom object for the export batch job. required: true schema: type: string - 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/customobjects/{apiName}/export/{exportId}/enqueue.json: post: tags: - Bulk Export Custom Objects summary: Enqueue Export Custom Object 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 Custom Object Job Status endpoint to retrieve status of export job. Required Permissions: Read-Only Custom Object' operationId: enqueueExportCustomObjectsUsingPOST parameters: - name: apiName in: path description: API Name of the custom object for the export batch job. required: true schema: type: string - 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/customobjects/{apiName}/export/{exportId}/file.json: get: tags: - Bulk Export Custom Objects summary: Get Export Custom Object File description: 'Returns the file content of an export job. The export job must be in "Completed" state. Use Get Export Custom Object Job Status endpoint to retrieve status of export job. Required Permissions: Read-Only Custom Object

The file format is specified by calling the Create Export Custom Object Job endpoint. The following is an example of the default file format ("CSV").

leadId,marketoGUID,itemName
11,c93f0494-bbd9-44e8-9c0e-dae9b525073f,Hoka One One Mach 4' operationId: getExportCustomObjectsFileUsingGET parameters: - name: apiName in: path description: API Name of the custom object for the export batch job. required: true schema: type: string - 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/customobjects/{apiName}/export/{exportId}/status.json: get: tags: - Bulk Export Custom Objects summary: Get Export Custom Object 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 Custom Object' operationId: getExportCustomObjectsStatusUsingGET parameters: - name: apiName in: path description: API Name of the custom object for the export batch job. required: true schema: type: string - 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' 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' ExportCustomObjectRequest: 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: Comma-separated list of custom object attributes to include in the file items: type: string filter: description: 'Custom object record selection criteria. Can be one of the following: "updatedAt", "staticListName", "staticListId", "smartListName", "smartListId"' $ref: '#/components/schemas/ExportCustomObjectFilter' format: type: string description: File format to create("CSV", "TSV", "SSV"). Default is "CSV" 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) 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 ExportCustomObjectFilter: type: object properties: updatedAt: description: Date range to filter updated custom objects on $ref: '#/components/schemas/DateRange' smartListId: type: integer format: int32 description: Id of smart list to retrieve leads from smartListName: type: string description: Name of smart list to retrieve leads from staticListId: type: integer format: int32 description: Id of static list to retrieve leads from staticListName: type: string description: Name of static list to retrieve leads from