Production Data Source Manager service
Production data sources associate productions with multiple sets of document returned by Relativity saved searches. The Production Data Source Manager service supports operations on production data sources. You can use this service to create, delete, read, and update data sources. The operations are equivalent to the methods for interacting with ProductionDataSource objects in the Relativity Services API. Before programmatically interacting with production data sources, familiarize yourself with the Relativity productions user interface and review the information in the Relativity Documentation site.
This page contains the following sections:
- Client code sample
- Create a data source
- Read a data source
- Update a data source
- Delete a data source
See these related pages:
Client code sample
The following is an example of .NET code used to make REST calls for reading a production data source. You can use this code for all Production Manager service operations with different endpoint URLs and input JSON values.
//Set up the REST client. HttpClient httpClient = new HttpClient(); httpClient.BaseAddress = new Uri("http://localhost/"); //Set the required headers. httpClient.DefaultRequestHeaders.Add("X-CSRF-Header", "-"); httpClient.DefaultRequestHeaders.Add("Authorization", "Basic c2FtcGxlYWRtaW5AcmVsYXRpdml0eS5yZXN0OlMwbTNwQHNzdzByZA=="); //Call read production. string url = "/Relativity.REST/api/Relativity.Productions.Services.IProductionModule/Production%20Placeholder%20Manager/ReadSingleAsync"; StringContent content = new StringContent(CreateInputJSON, Encoding.UTF8, "application/json"); HttpResponseMessage response = httpClient.PostAsync(url, content).Result; string result = response.Content.ReadAsStringAsync().Result; bool success = HttpStatusCode.Created == response.StatusCode; //Parse the result with Json.NET. JObject resultObject = JObject.Parse(result);
Create a data source
To create a new production data source, send a request to the following Production Placeholder Manager service URL:
<host>/Relativity.REST/api/Relativity.Productions.Services.IProductionModule/Production%20Data%20Source%20Manager/CreateSingleAsync
The request must include the workspaceArtifactID, the production Artifact ID, and a data source object.
The following is sample request for creating a production data source:
{ "workspaceArtifactID": 1016278, "productionID": 1044860, "dataSource": { "ArtifactTypeID": 1000034, "ProductionType": "ImagesAndNatives", "SavedSearch": { "ArtifactID": 1044129 }, "UseImagePlaceholder": "NeverUseImagePlaceholder", "MarkupSet": { "ArtifactID": 1034197 }, "BurnRedactions": true, "Name": "Jones Case" } }
The response returns the Artifact ID of the data source.
Read a data source
To read a production, send a request to the following Production Manager service URL:
<host>/Relativity.REST/api/Relativity.Productions.Services.IProductionModule/Production%20Data%20Source%20Manager/ReadSingleAsync
The request must include the workspaceArtifactID, placeholderArtifactID, and withPlaceholderImage parameters.
- withPlaceholderImage set to true - values for the read-only placeholder image properties are populated on data source object.
- withPlaceholderImage set to false (default) - values for the read-only placeholder image properties are not populated on data source object.
{ "workspaceArtifactID": 1016278, "dataSourceArtifactID": 1047256, "withPlaceholderImage": false }
The following is a sample JSON response for a production data source.
{ "ArtifactTypeID": 1000034, "ProductionType": "ImagesAndNatives", "SavedSearch": { "ArtifactID": 1043597, "Name": "Native Production Images - Excel", "SearchType": "Keyword Search" }, "UseImagePlaceholder": "AlwaysUseImagePlaceholder", "Placeholder": { "ArtifactID": 1043661, "Name": "Custom Field" }, "MarkupSet": { "ArtifactID": 0, "Name": "" }, "BurnRedactions": false, "ArtifactID": 1047256, "Name": "Imaged Excel files" }
Update a data source
To update an existing data source for a production, send a request to the following Production Placeholder Manager service URL:
<host>/Relativity.REST/api/Relativity.Productions.Services.IProductionModule/Production%20Data%20Source%20Manager/UpdateSingleAsync
The request must include the workspaceArtifactID, the production Artifact ID, and a data source object.
The following is sample request for updating a production data source (adding a placeholder):
{ "workspaceArtifactID": 1016278, "productionID": 1044860, "dataSource": { "ArtifactTypeID": 1000034, "ProductionType": "ImagesAndNatives", "SavedSearch": { "ArtifactID": 1044129 }, "UseImagePlaceholder": "AlwaysUseImagePlaceholder", "Placeholder": { "ArtifactID": 1044888 }, "MarkupSet": { "ArtifactID": 1034197 }, "BurnRedactions": true, "ArtifactID": 1234567, "Name": "Jones Case" } }
The response does not contain any data. Success or failure is indicated by the HTTP status code. For more information, see HTTP status codes.
Delete a data source
To delete a data source, send a request to the following Production Manager service URL:
<host>/Relativity.REST/api/Relativity.Productions.Services.IProductionModule/Production%20Data%20Source%20Manager/DeleteSingleAsync
The request must include the workspaceArtifactID and placeholderArtifactID parameters.
Note: You can delete data sources that are being used by production data sources.
{ "workspaceArtifactID": 1016278, "dataSourceArtifactID": 1047256 }
The response does not contain any data. Success or failure is indicated by the HTTP status code. For more information, see HTTP status codes.