IProductionManagerReadSingleAsync Method

Returns an instance of Production object.

Namespace:  Relativity.Productions.Services
Assembly:  Relativity.Productions.Services.Interfaces (in Relativity.Productions.Services.Interfaces.dll) Version: 9c084404c128f715df772c7792aa49f21535523c

Task<Production> ReadSingleAsync(
	int workspaceArtifactID,
	int productionArtifactID,
	DataSourceReadMode dataSourceReadMode = DataSourceReadMode.OnlyDataSources


Type: SystemInt32
Workspace artifact ID.
Type: SystemInt32
Production artifact ID.
dataSourceReadMode (Optional)
Type: Relativity.Productions.ServicesDataSourceReadMode
Retrieve Data sources and placeholders mode. Placeholders will only be returned for productions in the Produced state.

Return Value

Type: TaskProduction
An instance of Production object.

Read production example
using Relativity.Productions.Services;
using Relativity.Services.ServiceProxy;
using Relativity.Services.Exceptions;

public partial class Example
    public async Task ReadProduction_Example()
        int workspaceId  = 12345;            // Workspace Production exists in
        int productionId = 11111;            // Production's ArtifactID

        var userEmail    = "user@test.com";  // User's login
        var password     = "abc123456!";     // User's password

        var relativityServicesUri = "http://localhost/relativity.services";
        var relativityRestUri     = "http://localhost/relativity.rest/api";

        var usernamePasswordCredentials = new UsernamePasswordCredentials(userEmail, password);
        ServiceFactorySettings settings = new ServiceFactorySettings(new Uri(relativityServicesUri), new Uri(relativityRestUri), usernamePasswordCredentials);
        ServiceFactory serviceFactory   = new ServiceFactory(settings);

        using (IProductionManager productionManager = serviceFactory.CreateProxy<IProductionManager>())
                Production production = await productionManager.ReadSingleAsync(workspaceId, productionId);

                var productionStatus = production.ProductionMetadata.Status;
                if (productionStatus == ProductionStatus.New)
                    // Do something, like stage this production
            catch (ValidationException e)
                // Log validation exception details
                Console.WriteLine("There were validation errors: {0}", e.Message);
            catch (ServiceException es)
                // Log service exception details
                Console.WriteLine("There were errors: {0}", es.Message);
See Also