Library Application service

Through the REST API, the Library Application API allows clients to read application metadata and RAP files from the library, upload new applications, and update or delete existing applications.

This page contains the following information:

Client code sample

To use the Library Application service, send requests by making calls with the required HTTP methods. See the following base URL for this service:

<host>/Relativity.REST/API/relativity-environment/v1/workspace/-1/libraryapplications/

Note: For the workspace identifier in the URL, use -1 to indicate the admin-level context. This value is required for all URLs in the Library Application service. For additional guidelines, see Library Application API.

CreateAsync

To create a library application, send a POST request using multi-part form data. The first part should contain the request as JSON content type application/json. The second part should contain the file as binary with content type application/octet-stream:

https://{host}/relativity.rest/api/relativity-environment/v1/workspace/-1/libraryapplications
https://{host}/relativity.rest/api/relativity-environment/v1/workspace/-1/libraryapplications/{packageGuid}

Note: The alternative version takes a GUID referring to a previously uploaded package, see UploadPackage. The body is empty.

The body of the request is empty.

The response contains the following fields for the library application:

ReadAsync

To read a library application, send a GET request for any one of the following URLs:

https://{host}/relativity.rest/api/relativity-environment/v1/workspace/-1/libraryapplications/{artifactID}
https://{host}/relativity.rest/api/relativity-environment/v1/workspace/-1/libraryapplications/{artifactID}/{includeMetadata}/{IncludeActions}
https://{host}/relativity.rest/api/relativity-environment/v1/workspace/-1/libraryapplications/{applicationGuid}
https://{host}/relativity.rest/api/relativity-environment/v1/workspace/-1/libraryapplications/{applicationGuid}/{includeMetadata}/{IncludeActions}

The body of the request is empty.

The response contains the following fields for the library application:

ReadAllAsync

To read all library applications, send a GET request for one of the following URLs:

https://{host}/relativity.rest/api/relativity-environment/v1/workspace/-1/libraryapplications
https://{host}/relativity.rest/api/relativity-environment/v1/workspace/-1/libraryapplications/{includeMetadata}/{includeActions}

The body of the request is empty.

The response contains the following fields for the library application:

ReadApplicationContentsAsync

To retrieve a library application as a RAP file, send a GET request for one of the following URLs:

https://{host}/relativity.rest/api/relativity-environment/v1/workspace/-1/libraryapplications/{artifactID}/contents
https://{host}/relativity.rest/api/relativity-environment/v1/workspace/-1/libraryapplications/{applicationGuid}/contents

The body of the request is empty.

The response will not be human-readable.

UpdateAsync

To update an application, send a PUT request using multi-part form data. The first part should contain the request as JSON content type application/json. The second part should contain the file as binary with content type application/octet-stream:

https://{host}/relativity.rest/api/relativity-environment/v1/workspace/-1/libraryapplications
https://{host}/relativity.rest/api/relativity-environment/v1/workspace/-1/libraryapplications/{{packageGUID}}

Note: The alternative version takes a GUID referring to a previously uploaded package, see UploadPackage. The body is empty.

The request includes the following fields:

DeleteAsync

To delete an application, send a DELETE request. The request URL can take either the application's ArtifactID or the Guid.

https://{host}/relativity.rest/api/relativity-environment/v1/workspace/-1/libraryapplications/{artifactId}
https://{host}/relativity.rest/api/relativity-environment/v1/workspace/-1/libraryapplications/{applicationGuid}

The body of this request should be empty.

The body of the response will also be empty. If the delete is successful it will just return a 200 status code.

GetLibraryInstallStatusAsync

To get the most recent library install status of an application, send a GET request to the following URL. The request URL can take either the application's ArtifactID or the Guid.

https://{host}/relativity.rest/api/relativity-environment/v1/workspace/-1/libraryapplications/{artifactID}/libraryinstall
https://{host}/relativity.rest/api/relativity-environment/v1/workspace/-1/libraryapplications/{artifactID}/libraryinstall/{IncludeActions}
https://{host}/relativity.rest/api/relativity-environment/v1/workspace/-1/libraryapplications/{applicationGuid}/libraryinstall
https://{host}/relativity.rest/api/relativity-environment/v1/workspace/-1/libraryapplications/{applicationGuid}/libraryinstall/{IncludeActions}

The body of this request should be empty.

The response includes the following fields:

RetryLibraryInstallAsync

To queue or retry an install of an existing application into the Application Library, send a PUT request.

https://{host}/relativity.rest/api/relativity-environment/v1/workspace/-1/libraryapplications/{artifactID}/libraryinstall
https://{host}/relativity.rest/api/relativity-environment/v1/workspace/-1/libraryapplications/{applicationGuid}/libraryinstall

The body of the request should be empty.

The response includes the following fields:

CancelLibraryInstallAsync

To cancel a library install, send a DELETE request with one of the following URLs:

https://{host}/relativity.rest/api/relativity-environment/v1/workspace/-1/libraryapplications/{artifactID}/libraryinstall
https://{host}/relativity.rest/api/relativity-environment/v1/workspace/-1/libraryapplications/{applicationGuid}/libraryinstall

If the endpoint is invoked with a single application install ID, the JSON request should be empty.

The response includes the following fields:

UploadPackageAsync

This endpoint uploads a RAP or XML file to a temporary location in Relativity and returns a unique file identifier along with the meta data for the application. If the file is not in a valid format, a validation exception is thrown. This endpoint is used in conjunction with CreateAsync and UpdateAsync to implement workflows where the application's details need to be displayed for final confirmation before installing the application. To create an application, send a POST request using multi-part form data. The first part should contain the request as JSON content type application/json. The second part should contain the file as binary with content type application/octet-stream:

https://{host}/relativity.rest/api/relativity-environment/v1/workspace/-1/libraryapplications/package

The body of the request should be empty.

DownloadPackageAsync

This endpoint downloads a RAP or XML file previously uploaded using the UploadPackageAsync endpoint. It takes the unique file identifier as an argument in the URL path and returns a stream of bytes. To create an application, send a GET request with the file's unique identifier in the URL:

https://{host}/relativity.rest/api/relativity-environment/v1/workspace/-1/libraryapplications/package/{packageIdentifier}/contents

The raw JSON response will not be human-readable.

DeletePackageAsync

This endpoint allows clients to delete an RAP file that has been uploaded to a temporary storage location. To delete a package, send a DELETE request with the package identifier in the URL:

https://{host}/relativity.rest/api/relativity-environment/v1/workspace/-1/libraryapplications/package/{packageIdentifier}

The body of this request should be empty.

The body of the response will also be empty. If the delete is successful it will just return a 200 status code.

GetApplicationHostingStatusAsync

This endpoint retrieves the hosting status of a specified application and indicates the status of the application's hosted components, such as custom pages. An example use case of this endpoint is determining if the application's custom page has been redeployed and is healthy. To retrieve the hosting status of an application, send a GET request with the one of the following URLs:

https://{host}/relativity.rest/api/relativity-environment/v1/workspace/-1/libraryapplications/{applicationGUID}/hostingStatus 
https://{host}/relativity.rest/api/relativity-environment/v1/workspace/-1/libraryapplications/{applicationID}/hostingStatus

The body of this request should be empty.

Community Updates

Aero Developer FAQ Evolving the Platform Most recent release notes
Learn more Learn more Learn more

Additional Resources

   
Access Third-Party Tools with GitHub     Create .NET Apps Faster with NuGet
Visit github     visit nuget