This DTO has been removed as part of the Relativity Services API (RSAPI) Deprecation and is no longer supported. For more information and alternative APIs, see RSAPI deprecation process.

RelativityApplication

You can develop applications that use Relativity Dynamic Objects (RDOs), custom pages, event handlers, and other platform components. For more information, see Build Relativity Applications.

The Services API supports all read and query operations on a RelativityApplication DTO.

Note: You can also read Relativity applications using the common DTO ReadSingle method. For more information, see Single-artifact access.

Note that you cannot install and export applications using the RelativityApplication DTO. However, the Services API provides a set of advanced operations for interacting with Relativity applications. For more information, see Using the Application deployment System through the Services API.

This page contains the following information:

See this related page:

Read a RelativityApplication

To read Field values on RelativityApplication object, you can use the Read() method on the RelativityApplication repository as illustrated in this code sample.

public static bool ReadRelativityApplicationUsingRepository(kCura.Relativity.Client.IRSAPIClient proxy)
{
      // STEP 1: Create a RelativityApplication DTO for the application that you want to read.
      kCura.Relativity.Client.DTOs.RelativityApplication relativityApplication = new kCura.Relativity.Client.DTOs.RelativityApplication(1037631);
      relativityApplication.Fields.Add(new kCura.Relativity.Client.DTOs.FieldValue(kCura.Relativity.Client.DTOs.RelativityApplicationFieldNames.Name));
      relativityApplication.Fields.Add(new kCura.Relativity.Client.DTOs.FieldValue(kCura.Relativity.Client.DTOs.RelativityApplicationFieldNames.Version));
      relativityApplication.Fields.Add(new kCura.Relativity.Client.DTOs.FieldValue(kCura.Relativity.Client.DTOs.RelativityApplicationFieldNames.UserFriendlyURL));

      kCura.Relativity.Client.DTOs.ResultSet<kCura.Relativity.Client.DTOs.RelativityApplication> readResultSet = null;

      // STEP 2: Try to read the RelativityApplication object.
      try
      {
            readResultSet = proxy.Repositories.RelativityApplication.Read(relativityApplication);
      }
      catch (Exception ex)
      {
            Console.WriteLine("An error occurred: {0}", ex.Message);
            return false;
      }

      // STEP 3: Check for success.
      if (!readResultSet.Success)
      {
            Console.WriteLine("An error occurred reading the Relativity Application: {0}", readResultSet.Message);

            foreach (kCura.Relativity.Client.DTOs.Result<kCura.Relativity.Client.DTOs.RelativityApplication> readResult in readResultSet.Results)
            {
                  if (!readResult.Success)
                  {
                        Console.WriteLine("   An error occurred in the read result: {0}", readResult.Message);
                  }
            }
            return false;
      }
      kCura.Relativity.Client.DTOs.RelativityApplication readApplication = readResultSet.Results[0].Artifact;

      // STEP 4: Display the name and version of the Relativity application.
      Console.WriteLine("Relativity Application Name: {0}{1}Relativity Application Version: {2}",
             readApplication.Name, Environment.NewLine, readApplication.Version);

      return true;
}

Delete a RelativityApplication

You can call the Delete() method on the RelativityApplication repository to delete an application. The Application Deployment System (ADS) also provides functionality for deleting and uninstalling applications through the Relativity UI. For more information, see Uninstalling and deleting applications on the Relativity 9.6 Documentation site.

public static bool DeleteRelativityApplicationUsingRepository(IRSAPIClient proxy)
{
     // STEP 1: Create a RelativityApplication DTO for the application that you want to delete.
     RelativityApplication relativityApplication = new RelativityApplication(1037639);
     WriteResultSet<RelativityApplication> writeResultSet = null;
      
     // STEP 2: Try to delete the Relativity Application.
     try
     {
          writeResultSet = proxy.Repositories.RelativityApplication.Delete(relativityApplication);
     }
     catch (Exception ex)
     {
          Console.WriteLine("An error occurred: {0}", ex.Message);
          return false;
     }
      
     //STEP 3: Check for success.
     if (!writeResultSet.Success)
     {
          Console.WriteLine("An error occurred deleting the Relativity Application: {0}", writeResultSet.Message);
           
          foreach (Result<RelativityApplication> writeResult in writeResultSet.Results)
          {
               if (!writeResult.Success)
               {
                    Console.WriteLine("   An error occurred in the delete result: {0}", writeResult.Message);
               }
          }
          return false;
     }
     return true;
}
        

Query for a RelativityApplication

To query for a RelativityApplication object, you can use the fields listed in the following table. For more information, see Search Relativity.

Fields for Application queries
Guid Name
ID Version

This code sample illustrates how to set query conditions, call the Query() method on the RelativityApplication repository, and iterate through the result set.

public static bool QueryRelativityApplicationUsingRepository(kCura.Relativity.Client.IRSAPIClient proxy)
{
      // STEP 1: Create a Relativity Application DTO for the application to query.
      kCura.Relativity.Client.DTOs.Query<kCura.Relativity.Client.DTOs.RelativityApplication> query = new kCura.Relativity.Client.DTOs.Query<kCura.Relativity.Client.DTOs.RelativityApplication>();

      query.Fields.Add(new kCura.Relativity.Client.DTOs.FieldValue(kCura.Relativity.Client.DTOs.ArtifactQueryFieldNames.ArtifactID));
      query.Fields.Add(new kCura.Relativity.Client.DTOs.FieldValue(kCura.Relativity.Client.DTOs.RelativityApplicationFieldNames.Name));
      query.Fields.Add(new kCura.Relativity.Client.DTOs.FieldValue(kCura.Relativity.Client.DTOs.RelativityApplicationFieldNames.Version));
      query.Fields.Add(new kCura.Relativity.Client.DTOs.FieldValue(kCura.Relativity.Client.DTOs.RelativityApplicationFieldNames.UserFriendlyURL));

      query.Condition =
             new kCura.Relativity.Client.WholeNumberCondition(kCura.Relativity.Client.DTOs.ArtifactQueryFieldNames.ArtifactID, kCura.Relativity.Client.NumericConditionEnum.EqualTo, 1037631);
      kCura.Relativity.Client.DTOs.ResultSet<kCura.Relativity.Client.DTOs.RelativityApplication> readResultSet = null;

      //STEP 2: Attempt to query the Relativity Application.
      try
      {
            readResultSet = proxy.Repositories.RelativityApplication.Query(query);
      }
      catch (Exception ex)
      {
            Console.WriteLine("An error occurred: {0}", ex.Message);
            return false;
      }

      //STEP 3: Check for success.
      if (!readResultSet.Success)
      {
            Console.WriteLine("An error occurred reading the Relativity Application: {0}", readResultSet.Message);

            foreach (kCura.Relativity.Client.DTOs.Result<kCura.Relativity.Client.DTOs.RelativityApplication> readResult in readResultSet.Results)
            {
                  if (!readResult.Success)
                  {
                        Console.WriteLine("   An error occurred in the read result: {0}", readResult.Message);
                  }
            }
            return false;
      }
      kCura.Relativity.Client.DTOs.RelativityApplication readApplication = readResultSet.Results[0].Artifact;

      //STEP 4: Display the name and version of the Relativity application.
      Console.WriteLine("Relativity Application Name: {0}{1}Relativity Application Version: {2}",
             readApplication.Name, Environment.NewLine, readApplication.Version);

      return true;
}

Additional Resources

DevHelp Community GitHub Release Notes NuGet

Share knowledge with the Relativity developer community.

Access tools and resources to build an application.

Review the most recent product release notes.

Create .NET Apps faster with NuGet.