PropertySync CLI

The psync CLI application provides a convenient, easy-to-use entry point to gain access to the PropertySync API without the need for development. You can use it for simple queries against your plant, to maintain documents, autocompletes and land validations or to assist in your outside keying operations by importing batches into the PropertySync indexing system. This is an early version of the CLI with only the most basic access commands but our intention is to continue to develop these tools to provide the best integration experience for our clients and partners.

If you have a suggested addition or improvement for the CLI or just want to let us know how you use it in your environment, please reach out to support@propertysync.com.

Getting Started

Getting started with the PropertySync CLIopen in new window

Download and uncompress a copy of the psync application that matches your particular system architecure. The CLI application runs on Windows, MacOS and Linux and is compiled for various system architecutures. Once the archive is uncompressed, copy the contents to a folder on your system where you will perform your work. There are no special runtime requirements for the application, so any location within your user space should work.

The psync application accepts and executes a variety of commands and is intended to be run from your terminal. Each command subset provides a limited amount of help to assist you with requirements to use that command. When you first run the psync command with no arguments, you should be presented with output similar to below:

CLI to interact with various PropertySync services.
  
Configure your PropertySync connection using psync config command. Once 
you configure your email, password and document_group_id, make sure to 
run psync login to get and save a token from the api. From that point 
you can run searches or use the other commands to interact with the 
PropertySync backend.

Usage:
  psync [command]

Available Commands:
  autocompletes   Work with autocompletes
  batch           Manage baches
  config          Manage psync configuration
  convert         Convert to or from various plant formats
  document        Get information about a document
  help            Help about any command
  info            Get info about a document group from PropertySync
  landvalidations Work with autocompletes
  login           Login to PS API and retrieve token
  search          Search PropertySync document group
  version         Get current version info

Flags:
      --config-file string         Config settings file (default is $HOME/.psync.yaml)
      --document_group_id string   Document Group ID
  -h, --help                       help for psync

Download

Download the archive below that matches your operating system and system architecture. Simply unzip and run within your terminal

Note: We do our best to maintain compatibility with previous versions of the CLI tool. However, we do not guarantee that older versions will continue to work with future versions of the API. If you are using an older version of the CLI, we recommend upgrading to the latest version to ensure your integrations continue to work. We also recommend that you thouroughly test your workflows after upgrading to ensure that they continue to work as expected.

You can check the current version of the CLI and the latest published version by running psync version check from your terminal.

Current Version: v0.0.29

Release Notes

Windows

MacOS

Linux

Configuration

Before you can connect to the PropertySync system with the psync tool, you must provide basic configuration details for it to connect. At minimum, this will be a PropertySync user name and password along with the UUID of the document group (plant) you wish to connect to. If you do not have this information, please reach out to support@propertysync.com for assistance.

To begin configuration, run psync config for a basic outline of the config command, shown below:

Before you can run the psync commands, you must set a few required configuration values. 
These include:

* email - Your PropertySync account email address
* password - Your PropertySync account password
* document_group_id - The document group UUID (plant) you wish to work against
* company_id - The company UUID you belong to

You can set these values using the 'config set' command as follows:

'psync config set --email=my@email.com --password=pass1234 --document_group_id=5555-5555-5555-5555 --company_id=4444-4444-4444-4444'

Once you set your configuration values, make sure to run 'psync login' to retrieve and store an API token.

**NOTE**: You can always pass in the --document_group_id flag for any command to temporarily switch to that document group
for one command, without changing your default config.

Configuration values are stored in a config file. You can specify the location of the config file by using the 
--config-file=<SOMEFILE> flag. The default location on Darwin / Linux systems will be ~/.psync.yaml. On Windows 
systems the default location will be .psync.yaml within the application directory where psync is stored. You can 
also use environment variables to specify the required config values. This allows ease of changing values with 
macros. 

Environment variables needed are as follows:

* PROPERTYSYNC_API_EMAIL
* PROPERTYSYNC_API_PASSWORD
* PROPERTYSYNC_DOCUMENT_GROUP_ID
* PROPERTYSYNC_COMPANY_ID

Usage:
  psync config [command]

Available Commands:
  set         Set configuration values
  show        Show current configurationn

Flags:
  -h, --help   help for config

Global Flags:
      --config-file string         Config settings file (default is $HOME/.psync.yaml)
      --document_group_id string   Document Group ID

Use "psync config [command] --help" for more information about a command.

To use the config file option of config storage, symply pass in your config arguments in to the config set command, as follows:

psync config set --email=(your email) --password=(your password) --document_group_id=(your document group) --company_id=(your company id)

Altenatively, you can use the following enviroment variables on your system to apply these settings.

PROPERTYSYNC_API_EMAIL
PROPERTYSYNC_API_PASSWORD
PROPERTYSYNC_DOCUMENT_GROUP_ID
PROPERTYSYNC_COMPANY_ID

You can always check the status of your current config by running psync config show which will return the currently loaded config

Note Although your default document group ID is set, you can always pass in an alternate document_group_id variable using the--document_group_id=(document group id) flag for any command to switch plants for that command. This is useful if you have access to multiple plants and wish to script against the system using the command line utility.

Commands

Login

Since the psync CLI application works directly against the PropertySync API, you must always retrieve a fresh token for the utility to use at the beginning of your work session. To do this, you can simply issue a psync login command which should return a success message if your credentials are correct. Note at some near-term point, will intend to enhance the CLI to automatically generate and refresh tokens as needed to simplify this workflow.

psync login

Response:

Login success.

Info

To retrieve info about the current document group you are connected to, run the info command

psync info

Response:

{
    "id": "328fd05b-ef80-469b-aaf9-c61facb41b88",
    "createdAt": "2022-03-21T21:37:09.000000Z",
    "updatedAt": "2022-03-21T21:37:09.000000Z",
    "plantEffectiveDate": "2022-04-20",
    "autoCompletesSource": "Indexing",
    "landValidationsSource": "Indexing",
    "name": "Spokane, WA",
    "platInstrumentTypes":
    [
        "PLT",
        "PLT - PLAT"
    ],
    "importComplete": false
}

Auto Completes

psync autocompletes

Response:

Work with autocompletes

Usage:
  psync autocompletes [command]

Available Commands:
  add         Add a new autocomplete 
  delete      Delete an existing autocomplete 
  export      Export autocompletes 
  import      Import autocompletes from file 
  list        List autocompletes 

Flags:
  -h, --help   help for autocompletes

Global Flags:
      --config-file string         Config settings file (default is $HOME/.psync.yaml)
      --document_group_id string   Document Group ID

Use "psync autocompletes [command] --help" for more information about a command.


Add Auto Completes

Usage:
  psync autocompletes add [type] [value] [flags]

Flags:
  -h, --help   help for add

Global Flags:
      --config-file string         Config settings file (default is $HOME/.psync.yaml)
      --document_group_id string   Document Group ID

Delete Auto Completes

Usage:
  psync autocompletes delete [autocomplete id] [flags]

Flags:
  -h, --help   help for delete

Global Flags:
      --config-file string         Config settings file (default is $HOME/.psync.yaml)
      --document_group_id string   Document Group ID

Export Auto Completes

Usage:
  psync autocompletes export [type | all] [filename] [flags]

Flags:
  -h, --help   help for export

Global Flags:
      --config-file string         Config settings file (default is $HOME/.psync.yaml)
      --document_group_id string   Document Group ID

Import Auto Completes

Usage:
  psync autocompletes import [filename] [flags]

Flags:
  -h, --help   help for import

Global Flags:
      --config-file string         Config settings file (default is $HOME/.psync.yaml)
      --document_group_id string   Document Group ID

List Auto Completes

psync autocompletes list

Response:

Usage:
  psync autocompletes list [type | all] [search] [flags]

Flags:
  -h, --help   help for list

Global Flags:
      --config-file string         Config settings file (default is $HOME/.psync.yaml)
      --document_group_id string   Document Group ID

requires at least 1 arg(s), only received 0

Land Validations

psync landvalidations

Response:

Usage:
  psync landvalidations [command]

Available Commands:
  list        List landvalidations 

Flags:
  -h, --help   help for landvalidations

Global Flags:
      --config-file string         Config settings file (default is $HOME/.psync.yaml)
      --document_group_id string   Document Group ID

Use "psync landvalidations [command] --help" for more information about a command.

Searches

Use the search command to work with searches within your document group.

psync search

Response:

Search PropertySync document group

Usage:
  psync search [command]

Available Commands:
  create      Search your document group
  documents   Return documents from an existing search ID

Flags:
  -h, --help   help for search

Global Flags:
      --config-file string         Config settings file (default is $HOME/.psync.yaml)
      --document_group_id string   Document Group ID

To run a new search in the PropertySync system, use the search create command. This command can take a variety of arguments and even allows for multiple values. Currently, we provide a sub-set of the available values within the core PropertySync user portal, but the goal is to make this command fully compatible with all searches available from within PropertySync. By default, the search create command will return the ID of the search created. You can modify this behavior by using the --batch flag, to pass in an optional batch command and all results will be populated into that batch and the batch ID returned, or by using the --docids flag to return a list of all document IDs contained within the search result. Alternatively, you can use the --debug command to display the API payload generated to create the search, without actually creating the search record which is useful if you are working on an API implementation.

psync search create

Response:

Search document group. See -h for available flags.
Multiple values can be separated by comma, or pass the flag in a second time.

Usage:
  psync search create [flags]

Flags:
      --addition strings           Search by addition (allows multiple)
      --address strings            Search by address (allows multiple)
      --batch string               Set a batch name for a batch to push the results to. Populate the batch with the results of the search
      --book strings               Search by book (allows multiple)
      --bookType strings           Search by book type (allows multiple)
      --caseNumber strings         Search by to case number (allows multiple)
      --city strings               Search by city (allows multiple)
      --dateFrom strings           Search by from date (allows multiple)
      --dateTo strings             Search by to date (allows multiple)
      --debug                      Debug mode. Returns search query, but does not run the search.
      --docids                     Return document IDs instead of the search ID
      --fileNumber strings         Search by to file number (allows multiple)
      --grantee strings            Search by grantee (allows multiple)
      --grantor strings            Search by grantor (allows multiple)
  -h, --help                       help for create
      --instrumentNumber strings   Search by instrument number (allows multiple)
      --instrumentType strings     Search by instrument type (allows multiple)
      --page strings               Search by page (allows multiple)
      --state strings              Search by state (allows multiple)
      --tag strings                Search by tag (allows multiple)
      --zip strings                Search by zip (allows multiple)

Global Flags:
      --config-file string         Config settings file (default is $HOME/.psync.yaml)
      --document_group_id string   Document Group ID

Retrieving documents from an existing search id

psync search documents

Response:

Usage:
  psync search documents [searchid] [flags]

Flags:
  -h, --help   help for documents

Global Flags:
      --config-file string         Config settings file (default is $HOME/.psync.yaml)
      --document_group_id string   Document Group ID

Documents

psync document

Response:

Usage:
  psync document [command]

Available Commands:
  asset       Get asset from a known document by ID
  assets      List available assets for a given document
  json        Return the JSON body of a given document ID
  pdf         Return the PDF asset for a given document ID
  related     Get all document ids related to a given parent doc id
  versions    List versions for a given document

Flags:
  -h, --help   help for document

Global Flags:
      --config-file string         Config settings file (default is $HOME/.psync.yaml)
      --document_group_id string   Document Group ID

Retrieve document JSON for a known document ID

psync document json

Response:

Usage:
  psync document json [docid] [flags]

Flags:
  -h, --help   help for json

Global Flags:
      --config-file string         Config settings file (default is $HOME/.psync.yaml)
      --document_group_id string   Document Group ID

Retrieve document PDF for a known document ID

This is a quick simple method for retrieving the PDF copy of document images for a document. This will download the PDF (if it exists) and save to a temp file on the local machine and return the saved path. By specifying the --open flag, it will attempt to open the file automatically after it is retrieved in the default viewer assigned to PDFs on the machine.

psync document pdf

Response:

Usage:
  psync document pdf [docid] [flags]

Flags:
  -h, --help   help for pdf
      --open   Open the PDF in default viewer

Global Flags:
      --config-file string         Config settings file (default is $HOME/.psync.yaml)
      --document_group_id string   Document Group ID

List document assets for a known document ID

psync document assets

Response:

Usage:
  psync document assets [docid] [flags]

Flags:
  -h, --help   help for assets

Global Flags:
      --config-file string         Config settings file (default is $HOME/.psync.yaml)
      --document_group_id string   Document Group ID

Retrieve a specific asset from a known document ID

psync document assets

Response:

Usage:
  psync document asset [docid] [assetid] [flags]

Flags:
      --base64        Output in base64 format (default true)
      --binary        Output in binary format (default true)
      --file string   Output to file
  -h, --help          help for asset

Global Flags:
      --config-file string         Config settings file (default is $HOME/.psync.yaml)
      --document_group_id string   Document Group ID

Retrieve document history (versions) for a known document ID

psync document versions

Response:

Usage:
  psync document versions [docid] [flags]

Flags:
  -h, --help   help for versions

Global Flags:
      --config-file string         Config settings file (default is $HOME/.psync.yaml)
      --document_group_id string   Document Group ID
psync document related

Response:

Usage:
  psync document related [docid] [flags]

Flags:
  -h, --help   help for related

Global Flags:
      --config-file string         Config settings file (default is $HOME/.psync.yaml)
      --document_group_id string   Document Group ID

Batches

A batch is a collection of documents grouped together in the PropertySync indexing system for the purpose of import, editing or validation. If you are pushing new documents into your plant, verifying or validating documents in your plant, or editing documents in your plant, you will do this from a batch. Batches can be created dynamically from within the PropertySync user interface for new workflows, or they can be created automatically from searches or via imports. Batches are inexpensive and can be safely created, edited and deleted without concern for losing any underlying data. Because PropertySync stores all versions of a document through history including the original import and all of the edits by users within the system or via API or CLI calls, documents may exist in more than one batch.

psync batch

Response:

Usage:
  psync batch [command]

Available Commands:
  create        Create a batch
  createfromtag Create a batch from a tag or tags
  delete        Delete a batch
  export        Export a batch
  import        Import to a specific batch
  info          Get information about a batch
  list          List batches
  savetosearch  Save a batch to search

Flags:
  -h, --help   help for batch

Global Flags:
      --config-file string         Config settings file (default is $HOME/.psync.yaml)
      --document_group_id string   Document Group ID

Create a new batch

This command creates a new empty batch by name, or alternatively creates a new batch and populates the batch with documents from a known search ID. You can use this in combination with the search command to create batches of documents to edit or verify within your workflow.

psync batch create

Response:

Usage:
  psync batch create [batch name] [searchid] [flags]

Flags:
  -h, --help   help for create

Global Flags:
      --config-file string         Config settings file (default is $HOME/.psync.yaml)
      --document_group_id string   Document Group ID

Delete a batch

This command will delete a batch within the document group by ID. Batch deletion is generally safe and non-destructive. That is, underlying documents in a batch are not removed from the plant when a batch is deleted. If a batch that contains unsaved documents is deleted, those documents will no longer be referenced anywhere unless you saved a copy of the document IDs before deleting the batch.

psync batch delete

Response:

Usage:
  psync batch delete [batchid] [flags]

Flags:
  -h, --help   help for delete

Global Flags:
      --config-file string         Config settings file (default is $HOME/.psync.yaml)
      --document_group_id string   Document Group ID

List batches

This command will list all batches within the document group that have not been archived or deleted.

psync batch list

Response:

[
  {
    "id": "a7ccd803-d527-4842-b734-c1b7f41f2f88",
    "documentGroupId": "328fd05b-ef80-469b-aaf9-8888888888",
    "createdAt": "2022-05-02T19:47:57.000000Z",
    "updatedAt": "2022-05-02T19:47:57.000000Z",
    "name": "My Test Batch",
    "createdBy": "Rob Martinson",
    "lastModifiedBy": "Rob Martinson",
    "lastModifiedAt": "2022-05-02 19:49:42",
    "numOfDocs": `9`,
    "numOfCompletedDocs": 0,
    "recordedDate": null,
    "rawFileGroupType": "9388501a-1ac4-4dd7-8a97-888888888888"
  }
]

Batch imports

The batch import commands allow you to create new documents within the document group, or to edit existing documents using outside systems. 3rd party title plant keying companies or internal teams can use these facilities to process go-forward postings for the plant, or maintain the plant with new documents from outside systems.

psync batch import

Response:

Import to a specific batch

Usage:
  psync batch import [command]

Available Commands:
  document    Import a single document into an existing batch by ID
  file        Import a batch file from local system
  url         Import a batch file from an HTTPS endpoint

Flags:
  -h, --help   help for import

Global Flags:
      --config-file string         Config settings file (default is $HOME/.psync.yaml)
      --document_group_id string   Document Group ID

Import a single document to a batch

This command allows you to import a single document file to a known batch by ID.

Note: The format of the document json file, should follow the document structure specific to your plant. This is explained under Document Structure

psync batch import document

Response:

Usage:
  psync batch import document [batchid] [document json file] [flags]

Flags:
  -h, --help   help for document

Global Flags:
      --config-file string         Config settings file (default is $HOME/.psync.yaml)
      --document_group_id string   Document Group ID

Import a local batch file to a batch

This process allows you to import a batchfile with new documents or containing edits for existing known documents to the system. This is the primary entry point for getting data into the document group from 3rd parties or internal teams. This allows simple external workflows for importing or editing data.

Note: The format of the batch json file, should follow the batch structure specific to your plant. This is explained under Batch Structure. If the batch file contains a valid "id" key at the root of the document for an existing batch ID within the same document group you are connected to, it will modify the batch with the batch file contents. Modification will consist of document updates or additions only, documents will not be removed from the batch regardless of the contents of your modified batch file.

psync batch import batchfile

Response:

Usage:
  psync batch import batchfile [batch json file] [flags]

Flags:
  -h, --help   help for batchfile

Global Flags:
      --config-file string         Config settings file (default is $HOME/.psync.yaml)
      --document_group_id string   Document Group ID

Import a remote batch file to a batch using a URL

If your batch file is larger than the default 1000 record limit for local batches, you can import batches of any size using the batch import url command. The URL of the file must be publicly accessible or otherwise accessible by the PropertySync import service. You can use Dropbox, Google Drive, pre-signed S3 URLs or other publicly accessible URLs to store your batch file.

psync batch import url

Response:

Usage:
  psync batch import url [url to batch file] [batch id] [flags]

Flags:
  -h, --help   help for url

Global Flags:
      --config-file string         Config settings file (default is $HOME/.psync.yaml)
      --document_group_id string   Document Group ID

Export a batch

This process allows you to export the details of a batch including all documents and their details to the standard batch file format. You can use this to create workflows for editing batch information in external systems or creating mass-edits. The format of the batch json file, will follow the batch structure specific to your plant. This is explained under Batch Structure.

Windows Note: If you are redirecting your output to a file such as with psync.exe batch export [batchid] > ./somefile.json note that earlier versions of Windows Powershell default to adding a binary header to the file. This creates issues during later import and could make your file fail. You can read more about this issue hereopen in new window. Instead of redirecting your output, you should use the --file flag to specify a place to save your export.

psync batch export

Response:

Usage:
  psync batch export [batch id] [batch file] [flags]

Flags:
      --complete     Only return completed documents (those sent to search)
  -h, --help         help for export
      --incomplete   Only return incomplete documents (those not sent to search)

Global Flags:
      --config-file string         Config settings file (default is $HOME/.psync.yaml)
      --document_group_id string   Document Group ID


Examples

Configuration and login

Set initial configuration information:

./psync config set --email=my@email.com --password=pass1234 --document_group_id=5555-5555-5555-5555 --company_id=4444-4444-4444-4444

Login and set the API token (must happen after items above are configured):

./psync login

Plant information

Get information about the configured document group:

./psync info

Searching

Search for all documents with an instrument type of "DEED" and return a list of document IDs:

./psync search create --instrumentType DEED --docids

Search for all documents with an instrument type of "DEED" and return the ID of the search:

./psync search create --instrumentType DEED

Search for all documents with an instrument type of "DEED" where grantors contain "MARTINSON" or "SMITH"

./psync search create --instrumentType DEED --debug --grantor MARTINSON --grantor SMITH

Search for all documents with an instrument type of "STARTER" and return the ID of the search:

./psync search create --instrumentType STARTER

Search for all documents with an instrument type of "STARTER" and and create a batch called "My Starter Documents" containing the results:

./psync search create --instrumentType STARTER --batch "My Starter Documents"

Get all documents for a previously run search by the search ID and return an array of JSON:

./psync search documents 830786ea-25e9-4c17-b24e-f0b1e2025eb6 --json

Retrieve the JSON of a single document by document ID

./psync document json 2645a79a-66aa-11ea-9894-0a9fe85b6c0e

Auto completes

List all auto completes:

./psync autocompletes list all

List all additions:

./psync autocompletes list addition

List all additions containing the word 'MILLER':

./psync autocompletes list addition MILLER

List all instrument types:

./psync autocompletes list instrumentType

List all instrument types containing the word 'DEED':

./psync autocompletes list instrumentType DEED

Land validations

List all land validations:

./psync landvalidations list all

List all land validations of type 'subdivisionLegal':

./psync landvalidations list subdivisionLegal

Batches

List all batches:

./psync batch list

Create a new empty batch named 'My Batch'

./psync batch create "My Batch"

Create a new batch named 'My Search Batch' and populate it with all documents contained with a specific search:

./psync batch create "My Search Batch" 32329d4a-ec57-4bd1-9ad1-bf5d84622c6c

Export an existing batch to my local system in a batchfile named "my-batch.json":

./psync batch export 32329d4a-ec57-4bd1-9ad1-bf5d84622c6c > ./my-batch.json

Delete a batch by ID:

./psync batch delete a42ae722-86ad-4bef-bc80-68b6feabb6cc

Videos

Getting Started

Last Updated: