Loading...
Area: Episerver Service API
Applies to versions: 1 and higher

Bulk operations

Recommendations [hide]

This section describes how to work with bulk operations when using the Episerver Service API, a service layer used for integration of Episerver with external systems, such as PIM, DAM and ERPs.

How it works

Integrations with for example PIM systems often involve transfer of large data volumes. The Service API allows for bulk operations that can take a long time to complete. To facilitate this, a bulk operation returns a task identifier that you can use to get the task's status and associated messages. 

Example model

using System;

public enum MessageType
  {
    Progress = 0,
    Debug = 1,
    Info = 2,
    Warning = 3,
    Success = 4,
    Error = 5
  }

public class JobMessage
  {
    public DateTime TimestampUtc { get; set; }
    public MessageType MessageType { get; set; }
    public string Message { get; set; }
    public string StageName { get; set; }
    public int StageIndex { get; set; }
    public int StageCount { get; set; }
    public int StageProgress { get; set; }
    public int StageTotalProgress { get; set; }
    public string ExceptionMessage { get; set; }
    public string ExceptionStackTrace { get; set; }
  }

Note: Only consider a task completed if the message type is number 4 or 5.

Get task status

episerverapi/commerce/task/{taskId:guid}/status
This method gets the last status message of the associated task identifier.

Get Task Log

episerverapi/commerce/task/{taskId:guid}/log
This method gets the the status messages of the associated task identifier.

Do you find this information helpful? Please log in to provide feedback.

Last updated: Oct 20, 2016

Recommendations [hide]