Sample Java REST client for Relativity
This client demonstrates the use of the java.net.HttpURLConnection
class to talk to Relativity's REST endpoints. It was written using
Java 8 and no external packages or libraries. As a consequence, it doesn't parse or construct JSON--I've put the JSON payloads in their
own separate files from which the client reads at run time.
- Samples#queryIdentifier - queries for the Document identifier
- Samples#queryAllFieldsOnDoc - queries for all fields on the Document object
- Samples#createField - creates a fixed-length text field on the Document object
- JDK/JRE 8
After cloning the repository and pointing your shell to the downloaded directory, run
>> javac Main.java
>> java Main 'https://my-instance' 'admin.user@example.com' 'SecretPassword!000' '1234567'
where 1234567
refers to your workspace artifact ID.