Skip to content

Records Find References

Stevan Freeborn edited this page Oct 7, 2024 · 4 revisions

This command is intended to help Onspring customers locate all content records in their instance that reference a particular record in a particular app. This command will produce a report in the form of a .csv file that contains information about each reference.

General Usage

When executing the command you will need to provide it with a Source API Key, an App Id, and a list of Record Ids for which you want to find references to.

These pieces of information need to be provided as command-line arguments.

onspringcli.exe records find references -sk 000000ffffff000000ffffff/00000000-ffff-0000-ffff-000000000000 -a 100 -r 1,2

Notes:

  • Source Api Key can be obtained as outlined in this repository's README.md API Key section.
  • App Id can be obtained...
    • by using the Onspring API's /Apps endpoint
    • by looking at the URL of the app in your browser. i.e. https://instance.onspring.com/Admin/App/134
  • Record Ids can be obtained
    • by using the by using the Onspring API
    • by looking at the URL of the record in your browser. i.e. https://instance.onspring.com/Content/759/3

Options

This command currently has a number of options that can be passed as command-line arguments to alter the behavior of the command. These can be viewed by passing the -h or --help option to the command.

  • App Id: --app-id or -a
    • Allows you to specify an App Id in which the records are located
    • Example usage: onspringcli.exe records find references -a 100
  • Record Ids: --record-ids or -r
    • Allows you to specify which records you want to find references for
    • Example usage: onspringcli.exe records find references -r 1,2,3
  • Output Directory: --output-directory or -o
    • Allows you to specify the name of the folder the report should be written in.
    • Example usage: onspringcli.exe records find references -o report_folder

Note: These are in addition to the Global Options detailed in this repository's README.md.

Output

Each time this command is executed it will generate a folder that is named according to the output directory name specified or if not specified it will be named by default output. All files generated by the command during the run will be saved into this folder.

Example Output Folder Name:

output

Report

The command will generate a report that contains information about the references found. This report will be saved to the output folder as a .csv file. The report will contain the following information:

  • Target App Id: The id of the app in which the target record is held.
  • Target Record Id: The id of the target record.
  • Source App Id: The id of the app that holds the record that references the target.
  • Source App Name: The name of the app that holds the record that references the target.
  • Source Field Id: The id of the field that holds the record that references the target.
  • Source Field Name: The name of the field that holds the record that references the target.
  • Source Record Id: The id of the record that references the target.
Clone this wiki locally