

Last date modified: July 07 2025
The Imaging API supports programmatically interacting with imaging profiles, sets, jobs, and other related components:
Sample use cases for the imaging services include:
You can also use the Imaging API through REST. For more information, see Imaging API (REST).
The Imaging API is now versioned in the Osier release. The content on this page illustrates how to use this new versioned API. However, you can continue to use the legacy Imaging API with the Osier release although you should consider implementing any new functionality with the versioned Imaging API. For legacy documentation, see Imaging API on the Relativity Server 2021 Developers site.
The Imaging API contains the methods, classes, and enumerations required to run imaging jobs and perform other related tasks.
The Imaging API includes the following interfaces available in the Relativity.Imaging.Services.Interfaces.<VersionNumber> namespace:
The Imaging API includes multiple classes and enumerations. The following list highlights some key classes in the Relativity.Imaging.Services.Interfaces.<VersionNumber>.Models namespace:
The Imaging API is released as a NuGet package that you can reference in your Visual Studio projects. For more information, see Download the SDKs and NuGet packages.
An imaging profile defines a set of options that you can use when imaging a group of documents. It may include options for controlling how spreadsheets, emails, or other document types are imaged, such as page orientation, or other specialized settings. For general information, see
The Imaging Profile Manager API supports create, read, update, and delete operations on imaging profiles.
Use the CreateBasicImagingProfileAsync() method to create a basic imaging profile that uses options available on basic imaging engine. Pass the following arguments to this method:
You specify only the properties for the basic profile on the BasicImagingProfileCreateRequest object. Like the Relativity UI, the options for the native profile are set to default values.
The method returns the Artifact ID of the new profile.
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
public async Task CreateBasicImagingProfileAsync(Interfaces.V1.IImagingProfileManager profileManager, int workspaceID, List<NativeTypeRef> nativeTypes)
{
var basicProfileRequest = new BasicImagingProfileCreateRequest()
{
BasicOptions = new BasicImagingEngineOptions()
{
BasicImageFormat = ImageFormat.Jpeg,
ImageOutputDpi = 300,
ImageSize = ImageSize.OriginalSetting,
MaximumImageHeight = null,
MaximumImageWidth = null
},
Keywords = "",
Name = "Basic Imaging Profile",
Notes = "",
NativeTypes = nativeTypes
};
try
{
await profileManager.CreateBasicImagingProfileAsync(workspaceID, basicProfileRequest).ConfigureAwait(false);
}
catch (Exception ex)
{
string exception = $"An error occurred when creating basic Imaging Profile: {ex.Message}";
Console.WriteLine(exception);
throw;
}
}
Use the CreateNativeImagingProfileAsync() method to create a native imaging profile that uses options available on the native imaging engine. Pass the following arguments to this method:
The method returns the Artifact ID of the new profile.
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
public async Task CreateNativeImagingProfileAsync(Interfaces.V1.IImagingProfileManager profileManager, int workspaceID, List<NativeTypeRef> nativeTypes, List<ApplicationFieldCodeRef> applicationFieldCodes)
{
var nativeProfileRequest = new NativeImagingProfileCreateRequest()
{
NativeOptions = new NativeImagingEngineOptions()
{
DitheringAlgorithm = DitheringAlgorithm.Clustered16X16,
DitheringThreshold = 128,
ImageOutputDpi = 300,
MaxPagesPerDoc = null,
NativeImageFormat = ImageFormat.Tiff,
RenderColorPagesToJpeg = false,
TimeZoneFieldOnDocument = null,
LastModifiedDateOnDocument = null
},
BasicOptions = new BasicImagingEngineOptions()
{
BasicImageFormat = ImageFormat.Jpeg,
ImageOutputDpi = 300,
ImageSize = ImageSize.OriginalSetting,
MaximumImageHeight = null,
MaximumImageWidth = null
},
Name = "Native Imaging Profile",
Keywords = "",
Notes = "",
NativeTypes = nativeTypes,
ApplicationFieldCodes = applicationFieldCodes,
EmailOptions = new EmailOptions()
{
ClearIndentations = true,
DetectCharacterEncoding = true,
DisplaySmtpAddresses = true,
DownloadImagesFromInternet = true,
Orientation = Orientation.Landscape,
ResizeImagesToFitPage = true,
ResizeTablesToFitPage = true,
ShowMessageTypeInHeader = true,
SplitTablesToFitPageWidth = true
},
HtmlOptions = new HtmlOptions()
{
RemoveNonBreakingSpaceCodes = true
},
PresentationOptions = new PresentationOptions()
{
ShowSpeakerNotes = true,
SlideOrientation = SlideOrientation.OriginalSetting
},
SpreadsheetOptions = new SpreadsheetOptions()
{
FitToPagesTall = null,
FitToPagesWide = null,
Formatting = new HashSet<Formatting>()
{
Formatting.AutoFitColumns,
Formatting.AutoFitRows,
Formatting.ClearFormattingInEmptyColumns,
Formatting.ClearFormattingInEmptyRows
},
HideAndPageBreakAfterConsecutiveBlankRowCol = 10,
IncludeBorders = true,
IncludeComments = true,
IncludeGridlines = IncludeGridlines.OriginalSetting,
IncludeHeadersAndFooters = IncludeHeadersAndFooters.OriginalSetting,
IncludeRowAndColumnHeadings = IncludeRowAndColumnHeadings.OriginalSetting,
LimitToPages = null,
PageOrder = PageOrder.OriginalSetting,
PaperSizeOrientation = PaperSizeOrientation.OriginalSetting,
PrintArea = PrintArea.OriginalSetting,
ShowTrackChanges = true,
TextVisibility = new HashSet<TextVisibility>()
{
TextVisibility.RemoveBackgroundFillColors,
TextVisibility.SetTextColorToBlack
},
UnhideHiddenWorksheets = true,
ZoomLevelPercentage = null,
},
WordProcessingOptions = new WordProcessingOptions()
{
Include = new HashSet<Include>()
{
Include.Comments,
Include.FieldCodes,
Include.HiddenText
},
PageOrientation = PageOrientation.OriginalSetting,
ShowTrackChanges = true
}
};
try
{
await profileManager.CreateNativeImagingProfileAsync(workspaceID, nativeProfileRequest).ConfigureAwait(false);
}
catch (Exception ex)
{
string exception = $"An error occurred when creating Native Imaging Profile: {ex.Message}";
Console.WriteLine(exception);
throw;
}
}
Use the ReadAsync() method to retrieve an imaging profile. Pass the following arguments to this method:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
public async Task<Interfaces.V1.Models.ImagingProfile> ImagingProfileReadAsync(Interfaces.V1.IImagingProfileManager imagingProfileManager, int workspaceID, int imagingProfileID)
{
Interfaces.V1.Models.ImagingProfile imagingProfile;
try
{
return await imagingProfileManager.ReadAsync(workspaceID, imagingProfileID).ConfigureAwait(false);
}
catch(Exception ex)
{
string exception = $"An error occurred when reading an Imaging Profile: {ex.Message}";
Console.WriteLine(exception);
throw;
}
}
Use the UpdateAsync() method to modify an imaging profile. Pass the following arguments to this method:
The method returns the Artifact ID of the updated profile.
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
public async Task<int> ImagingProfileUpdateAsync(Interfaces.V1.IImagingProfileManager imagingProfileManager, int workspaceID, int imagingProfileID, List<NativeTypeRef> nativeTypes, List<ApplicationFieldCodeRef> applicationFieldCodes)
{
var request = new ImagingProfileUpdateRequest()
{
ApplicationFieldCodes = applicationFieldCodes,
NativeTypes = nativeTypes,
BasicOptions = new BasicImagingEngineOptions()
{
BasicImageFormat = ImageFormat.Jpeg,
ImageOutputDpi = 300,
ImageSize = ImageSize.OriginalSetting,
MaximumImageHeight = null,
MaximumImageWidth = null
},
Name = "Imaging Profile Update",
Keywords = "",
Notes = "",
NativeOptions = new NativeImagingEngineOptions()
{
DitheringAlgorithm = DitheringAlgorithm.Clustered16X16,
DitheringThreshold = 128,
ImageOutputDpi = 300,
MaxPagesPerDoc = null,
NativeImageFormat = ImageFormat.Tiff,
RenderColorPagesToJpeg = false,
TimeZoneFieldOnDocument = null,
LastModifiedDateOnDocument = null
},
EmailOptions = new EmailOptions()
{
ClearIndentations = true,
DetectCharacterEncoding = true,
DisplaySmtpAddresses = true,
DownloadImagesFromInternet = true,
Orientation = Orientation.Landscape,
ResizeImagesToFitPage = true,
ResizeTablesToFitPage = true,
ShowMessageTypeInHeader = true,
SplitTablesToFitPageWidth = true
},
HtmlOptions = new HtmlOptions()
{
RemoveNonBreakingSpaceCodes = true
},
PresentationOptions = new PresentationOptions()
{
ShowSpeakerNotes = true,
SlideOrientation = SlideOrientation.OriginalSetting
},
SpreadsheetOptions = new SpreadsheetOptions()
{
FitToPagesTall = null,
FitToPagesWide = null,
Formatting = new HashSet<Formatting>()
{
Formatting.AutoFitColumns,
Formatting.AutoFitRows,
Formatting.ClearFormattingInEmptyColumns,
Formatting.ClearFormattingInEmptyRows
},
HideAndPageBreakAfterConsecutiveBlankRowCol = 10,
IncludeBorders = true,
IncludeComments = true,
IncludeGridlines = IncludeGridlines.OriginalSetting,
IncludeHeadersAndFooters = IncludeHeadersAndFooters.OriginalSetting,
IncludeRowAndColumnHeadings = IncludeRowAndColumnHeadings.OriginalSetting,
LimitToPages = null,
PageOrder = PageOrder.OriginalSetting,
PaperSizeOrientation = PaperSizeOrientation.OriginalSetting,
PrintArea = PrintArea.OriginalSetting,
ShowTrackChanges = true,
TextVisibility = new HashSet<TextVisibility>()
{
TextVisibility.RemoveBackgroundFillColors,
TextVisibility.SetTextColorToBlack
},
UnhideHiddenWorksheets = true,
ZoomLevelPercentage = null,
},
WordProcessingOptions = new WordProcessingOptions()
{
Include = new HashSet<Include>()
{
Include.Comments,
Include.FieldCodes,
Include.HiddenText
},
PageOrientation = PageOrientation.OriginalSetting,
ShowTrackChanges = true
},
ImagingMethod = ImagingMethod.Native
};
try
{
return await imagingProfileManager.UpdateAsync(workspaceID, imagingProfileID, request).ConfigureAwait(false);
}
catch (Exception ex)
{
string exception = $"An error occurred when updating an Imaging Profile: {ex.Message}";
Console.WriteLine(exception);
throw;
}
}
Use the DeleteAsync() method to remove an imaging profile from Relativity. Pass the following arguments to this method:
1
2
3
4
5
6
7
8
9
10
11
12
13
public async Task ImagingProfileDeleteAsync(Interfaces.V1.IImagingProfileManager imagingProfileManager, int workspaceID, int imagingProfileID)
{
try
{
await imagingProfileManager.DeleteAsync(workspaceID, imagingProfileID).ConfigureAwait(false);
}
catch(Exception ex)
{
string exception = $"An error occurred when deleting an Imaging Profile: {ex.Message}";
Console.WriteLine(exception);
throw;
}
}
To running an imaging job, you need to create an imaging set, which consists of an imaging profile and a search containing the documents to image. The Imaging Set Manager API provides supports create, read, update, and delete operations on imaging sets. It also supports the hide and release operations used for a QC Review of imaged documents. For general information, see
Use the CreateAsync() method to add a new imaging set to Relativity. Pass the following arguments to this method:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
public async Task<int> ImagingSetCreateAsync(Interfaces.V1.IImagingSetManager imagingSetManager, int workspaceID, int datasourceID, int imagingProfileID)
{
try
{
var request = new ImagingSetCreateRequest
{
Name = "All documents",
DataSourceID = datasourceID,
EmailNotificationRecipients = "some_person@test.com;some_other_person@test.com",
ImagingProfileID = imagingProfileID
};
return await imagingSetManager.CreateAsync(workspaceID, request).ConfigureAwait(false);
}
catch (Exception ex)
{
string exception = $"An error occurred when creating imaging set: {ex.Message}";
Console.WriteLine(exception);
throw;
}
}
Use the ReadAsync() method to retrieve an imaging set. Pass the following arguments to this method:
1
2
3
4
5
6
7
8
9
10
11
12
13
public async Task<Interfaces.V1.Models.ImagingSet> ImagingSetReadAsync(Interfaces.V1.IImagingSetManager imagingSetManager, int workspaceID, int imagingSetID)
{
try
{
return await imagingSetManager.ReadAsync(workspaceID, imagingSetID).ConfigureAwait(false);
}
catch (Exception ex)
{
string exception = $"An error occurred when retrieving imaging set: {ex.Message}";
Console.WriteLine(exception);
throw;
}
}
Use the UpdateAsync() method to modify an imaging set. Pass the following arguments to this method:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
public async Task<int> ImagingSetUpdateAsync(Interfaces.V1.IImagingSetManager imagingSetManager, int workspaceID, int imagingSetID, int datasourceID, int imagingProfileID)
{
try
{
var request = new ImagingSetUpdateRequest
{
Name = "All documents",
DataSourceID = datasourceID,
EmailNotificationRecipients = "some_person@test.com;some_other_person@test.com",
ImagingProfileID = imagingProfileID
};
return await imagingSetManager.UpdateAsync(workspaceID, imagingSetID, request).ConfigureAwait(false);
}
catch (Exception ex)
{
string exception = $"An error occurred when updating imaging set: {ex.Message}";
Console.WriteLine(exception);
throw;
}
}
Use the DeleteAsync() to remove an imaging set from Relativity. Pass the following arguments to this method:
1
2
3
4
5
6
7
8
9
10
11
12
13
public async Task ImagingSetDeleteAsync(Interfaces.V1.IImagingSetManager imagingSetManager, int workspaceID, int imagingSetID)
{
try
{
await imagingSetManager.DeleteAsync(workspaceID, imagingSetID).ConfigureAwait(false);
}
catch (Exception ex)
{
string exception = $"An error occurred when deleting imaging set: {ex.Message}";
Console.WriteLine(exception);
throw;
}
}
You can hide images that need to prevent users from viewing images that need to undergo a quality control review. For more information, see
Call the HideImagingSetAsync() method by passing the following arguments to it:
1
2
3
4
5
6
7
8
9
10
11
12
13
public async Task ImagingSetHideImagingSetAsync(Interfaces.V1.IImagingSetManager imagingSetManager, int workspaceID, int imagingSetID)
{
try
{
await imagingSetManager.HideImagingSetAsync(workspaceID, imagingSetID).ConfigureAwait(false);
}
catch (Exception ex)
{
string exception = $"An error occurred when hiding imaging set: {ex.Message}";
Console.WriteLine(exception);
throw;
}
}
After a quality control review has been completed on hidden images, you can make them available to reviewers by releasing them.
Call the ReleaseImagingSetAsync() method by passing the following arguments to it:
1
2
3
4
5
6
7
8
9
10
11
12
13
public async Task ImagingSetReleaseImagingSetAsync(Interfaces.V1.IImagingSetManager imagingSetManager, int workspaceID, int imagingSetID)
{
try
{
await imagingSetManager.ReleaseImagingSetAsync(workspaceID, imagingSetID).ConfigureAwait(false);
}
catch (Exception ex)
{
string exception = $"An error occurred when releasing imaging set: {ex.Message}";
Console.WriteLine(exception);
throw;
}
}
Use the GetStatusAsync() method to retrieve the status of an imaging set. Pass the following arguments to this method:
When you read an imaging set, its status is also returned. See Retrieve an imaging set.
1
2
3
4
5
6
7
8
9
10
11
12
13
public async Task<Interfaces.V1.DTOs.ImagingSetStatusResponse> ImagingSetGetStatusAsync(Interfaces.V1.IImagingSetManager imagingSetManager, int workspaceID, int imagingSetID)
{
try
{
return await imagingSetManager.GetStatusAsync(workspaceID, imagingSetID).ConfigureAwait(false);
}
catch (Exception ex)
{
string exception = $"An error occurred when getting imaging set status: {ex.Message}";
Console.WriteLine(exception);
throw;
}
}
You can retrieve native file types supported by Relativity for imaging. For general information, see
Use the ReadAsync() method to retrieve a native type. Pass the following arguments to this method:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
public async Task<Interfaces.V1.Models.NativeType> ReadAsyncNativeType(Interfaces.V1.INativeTypeManager nativeTypeManager, int workspaceID, int nativeTypeID)
{
Interfaces.V1.Models.NativeType nativeType;
try
{
nativeType = await nativeTypeManager.ReadAsync(workspaceID, nativeTypeID).ConfigureAwait(false);
return nativeType;
}
catch(Exception ex)
{
string exception = $"An error occurred when reading Native Type: {ex.Message}";
Console.WriteLine(exception);
}
}
Microsoft applications use fields codes as placeholders for data that may be updated or used for other specialized purposes in their documents, such as those created in Word, Excel, or others. In Relativity, application field codes indicate how to handle field codes used in Microsoft documents during imaging. For general information, see
Use the Application Field Code Manager API to create, read, update, or delete application field codes.
Use the CreateAsync() method to add a new application field code to Relativity. Pass the following arguments to this method:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
public async Task<int> ApplicationFieldCodeCreateAsync(Interfaces.V1.IApplicationFieldCodeManager applicationFieldCodeManager, int workspaceID)
{
var request = new ApplicationFieldCodeRequest()
{
Application = ApplicationType.MicrosoftExcel,
FieldCode = "Author",
ImagingProfiles = null,
Option = ApplicationFieldCodeOption.DocumentDefault,
RelativityField = null
};
try
{
return await applicationFieldCodeManager.CreateAsync(workspaceID, request).ConfigureAwait(false);
}
catch (Exception ex)
{
string exception = $"An error occurred when creating an Application Field Code: {ex.Message}";
Console.WriteLine(exception);
throw;
}
}
Use the ReadAsync() method to retrieve an application field code. Pass the following arguments to this method:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
public async Task<Interfaces.V1.Models.ApplicationFieldCode> ApplicationFieldCodeReadAsync(Interfaces.V1.IApplicationFieldCodeManager applicationFieldCodeManager, int workspaceID, int applicationFieldCodeID)
{
Interfaces.V1.Models.ApplicationFieldCode applicationFieldCode;
try
{
applicationFieldCode = await applicationFieldCodeManager.ReadAsync(workspaceID, applicationFieldCodeID).ConfigureAwait(false);
return applicationFieldCode;
}
catch (Exception ex)
{
string exception = $"An error occurred when reading an Application Field Code: {ex.Message}";
Console.WriteLine(exception);
throw;
}
}
Use the UpdateAsync() method to modify an application field code. Pass the following arguments to this method:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
public async Task<int> ApplicationFieldCodeUpdateAsync(Interfaces.V1.IApplicationFieldCodeManager applicationFieldCodeManager, int workspaceID, int applicationFieldCodeID)
{
var request = new ApplicationFieldCodeRequest()
{
Application = ApplicationType.MicrosoftExcel,
FieldCode = "Author",
ImagingProfiles = null,
Option = ApplicationFieldCodeOption.DocumentDefault,
RelativityField =null
};
try
{
return await applicationFieldCodeManager.UpdateAsync(workspaceID, applicationFieldCodeID, request).ConfigureAwait(false);
}
catch (Exception ex)
{
string exception = $"An error occurred when updating an Application Field Code: {ex.Message}";
Console.WriteLine(exception);
throw;
}
}
Use the DeleteAsync() method to remove an application field code from Relativity. Pass the following arguments to this method:
1
2
3
4
5
6
7
8
9
10
11
12
13
public async Task ApplicationFieldCodeDeleteAsync(Interfaces.V1.IApplicationFieldCodeManager applicationFieldCodeManager, int workspaceID, int applicationFieldCodeID)
{
try
{
await applicationFieldCodeManager.DeleteAsync(workspaceID, applicationFieldCodeID).ConfigureAwait(false);
}
catch (Exception ex)
{
string exception = $"An error occurred when deleting an Application Field Code: {ex.Message}";
Console.WriteLine(exception);
throw;
}
}
Use the Imaging Job Manager API to run jobs to image documents, cancel a job currently executing on an imaging set, or retry errors that occurred during a job. For general information, see
Use the RunImagingSetAsync() method to schedule an imaging set job. Pass the following arguments to this method:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
public async Task<Interfaces.V1.DTOs.ImagingSetResponse> ImagingJobRunImagingSetAsync(Interfaces.V1.IImagingJobManager imagingJobManager, int workspaceID, int imagingSetID)
{
try
{
var request = new ImagingSetRequest
{
OriginationID = Guid.NewGuid(),
QcEnabled = false
};
return await imagingJobManager.RunImagingSetAsync(workspaceID, imagingSetID, request).ConfigureAwait(false);
}
catch (Exception ex)
{
string exception = $"An error occurred when running imaging set: {ex.Message}";
Console.WriteLine(exception);
throw;
}
}
Use the ImageDocumentAsync() method to submit an imaging job for a single document, specified by an image on the fly request. Pass the following arguments to this method:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
public async Task<Interfaces.V1.DTOs.ImageOnTheFlyResponse> ImagingJobImageDocumentAsync(Interfaces.V1.IImagingJobManager imagingJobManager, int workspaceID, int documentArtifactID, int imagingProfileID)
{
try
{
var request = new Interfaces.V1.DTOs.ImageOnTheFlyRequest
{
OriginationID = Guid.NewGuid(),
AlternateNativeLocation = null,
ProfileID = imagingProfileID,
RemoveAlternateNativeAfterImaging = false
};
return await imagingJobManager.ImageDocumentAsync(workspaceID, documentArtifactID, request).ConfigureAwait(false);
}
catch (Exception ex)
{
string exception = $"An error occurred when imaging a document: {ex.Message}";
Console.WriteLine(exception);
throw;
}
}
Use the MassImageDocumentsByMassProcessIdAsync() method to submit a mass imaging job. Pass the following arguments to this method:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
public async Task<Interfaces.V1.DTOs.MassImagingResponse> ImagingJobMassImageAsync(Interfaces.V1.IImagingJobManager imagingJobManager, int workspaceID, string massProcessID, int imagingProfileID)
{
try
{
var request = new Interfaces.V1.DTOs.MassImageRequest
{
OriginationID = Guid.NewGuid(),
MassProcessID = massProcessID,
ProfileID = imagingProfileID,
SourceType = SourceType.Native
};
return await imagingJobManager.MassImageDocumentsByMassProcessIdAsync(workspaceID, request).ConfigureAwait(false);
}
catch (Exception ex)
{
string exception = $"An error occurred when mass image: {ex.Message}";
Console.WriteLine(exception);
throw;
}
}
Use the StopImagingJobAsync() method to stop in-progress imaging jobs, including jobs for imaging sets and image on the fly. Pass the following arguments to this method:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
public async Task<Interfaces.V1.DTOs.StopImagingJobResponse> ImagingJobStopImagingJobAsync(Interfaces.V1.IImagingJobManager imagingJobManager, int workspaceID, int imagingJobID)
{
try
{
var request = new Interfaces.V1.DTOs.StopImagingJobRequest();
return await imagingJobManager.StopImagingJobAsync(workspaceID, imagingJobID, request).ConfigureAwait(false);
}
catch (Exception ex)
{
string exception = $"An error occurred when stopping imaging job: {ex.Message}";
Console.WriteLine(exception);
throw;
}
}
Use the RetryImagingSetErrorsAsync() method to retry imaging set errors. Pass the following arguments to this method:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
public async Task<Interfaces.V1.DTOs.ImagingSetResponse> ImagingJobRetryImagingSetErrorsAsync(Interfaces.V1.IImagingJobManager imagingJobManager, int workspaceID, int imagingSetID)
{
try
{
var request = new ImagingSetRequest
{
OriginationID = Guid.NewGuid(),
QcEnabled = false
};
return await imagingJobManager.RetryImagingSetErrorsAsync(workspaceID, imagingSetID, request).ConfigureAwait(false);
}
catch (Exception ex)
{
string exception = $"An error occurred when retrying imaging set: {ex.Message}";
Console.WriteLine(exception);
throw;
}
}
Use the UpdateJobPriorityAsync() method to update an imaging job priority. Pass the following arguments to this method:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
public async Task<Interfaces.V1.DTOs.UpdateJobPriorityResponse> ImagingJobUpdateJobPriorityAsync(Interfaces.V1.IImagingJobManager imagingJobManager, int workspaceID, int imagingJobID)
{
try
{
var request = new Interfaces.V1.DTOs.UpdateJobPriorityRequest
{
OriginationID = Guid.NewGuid(),
Priority = 99
};
return await imagingJobManager.UpdateJobPriorityAsync(workspaceID, imagingJobID, request).ConfigureAwait(false);
}
catch (Exception ex)
{
string exception = $"An error occurred when updating imaging job priority: {ex.Message}";
Console.WriteLine(exception);
throw;
}
}
Use the method on the Document Status Manager API to obtain status information about the imaging job for a document.
Use the GetStatusAsync() method to retrieve the imaging status of a document. Pass the Artifact ID of the workspace and document to this method. It returns information about whether the document has images, the number of images, and errors or warnings associated with the document.
1
2
3
4
5
6
7
8
9
10
11
12
13
public async Task<DocumentStatusResponse> DocumentGetStatusAsync(Interfaces.V1.IDocumentStatusManager statusManager, int workspaceID, int documentID)
{
try
{
return await statusManager.GetStatusAsync(workspaceID, documentID).ConfigureAwait(false);
}
catch (Exception ex)
{
string exception = $"An error occurred when getting document Image status: {ex.Message}";
Console.WriteLine(exception);
throw;
}
}
Use the methods on the Imaging Environment Manager API to remove inactive jobs and to obtain the size of mass imaging jobs.
Use the CleanupInactiveJobsAsync() method to cleans up inactive imaging jobs.
1
2
3
4
5
6
7
8
9
10
11
12
13
public async Task CleanUpInactiveJobAsync(Interfaces.V1.IImagingEnvironmentManager imagingEnvironmentManager)
{
try
{
await imagingEnvironmentManager.CleanupInactiveJobsAsync().ConfigureAwait(false);
}
catch (Exception ex)
{
string exception = $"An error occurred when cleaning up inactive Imaging jobs: {ex.Message}";
Console.WriteLine(exception);
throw;
}
}
Use the GetMaxMassImagingJobSizeAsync() to retrieve the size of a mass imaging job. It returns an integer indicating the number of documents in the imaging job.
1
2
3
4
5
6
7
8
9
10
11
12
13
public async Task<int> RetrieveMassImagingMaxJobSize(Interfaces.V1.IImagingEnvironmentManager imagingEnvironmentManager)
{
try
{
return await imagingEnvironmentManager.GetMaxMassImagingJobSizeAsync().ConfigureAwait(false);
}
catch (Exception ex)
{
string exception = $"An error occurred when retrieving Mass Imaging max job size: {ex.Message}";
Console.WriteLine(exception);
throw;
}
}
Why was this not helpful?
Check one that applies.
Thank you for your feedback.
Want to tell us more?
Great!
Additional Resources |
|||
DevHelp Community | GitHub | Release Notes | NuGet |