IProductionManagerGetAllAsync Method

Retrieves all productions a user has access to in a workspace

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

Task<List<Production>> GetAllAsync(
	int workspaceArtifactID,
	DataSourceReadMode mode = DataSourceReadMode.OnlyDataSources


Type: SystemInt32
Workspace Artifact ID.
mode (Optional)
Type: Relativity.Productions.ServicesDataSourceReadMode
Retrieve Data sources and placeholders mode

Return Value

Type: TaskListProduction

Get all productions example
using Relativity.Productions.Services;
using Relativity.Services.ServiceProxy;
using Relativity.Services.Exceptions;

public partial class Example
    public async Task GetAllProductions_Example()

        int workspaceId = 12345;            // Workspace Production(s) exist in

        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>())
                // Capture list of all productions in workspace for which the user has permissions.
                // List can be iterated over to inspect productions, see which are ready to be produced, etc.
                var productionList = await productionManager.GetAllAsync(workspaceId);

                foreach (var production in productionList)
                    Console.WriteLine("Production Name: {0}", production.Name);
            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