ApiAdapter Utility
- Last UpdatedSep 09, 2024
- 2 minute read
The ApiAdapter is a command-line program that can be executed by calling the apiadapter.exe file.
Before you begin
Before you can run the ApiAdapter, make sure you have done these steps:
-
Install the ApiAdapter msi executable. This executable has a separate installer to OSM. For information on installing ApiAdapter, see the AVEVA™ Operational Safety Management Installer Guide.
-
Register an ApiAdapter client in PCS. For more information on registering clients, see the AVEVA™ Operational Safety Management Installer Guide.
Run the ApiAdapter program in Cmd window
Note: You can run the ApiAdapter program from Windows Command line or in a Windows PowerShell window.
-
In a command window, navigate to the directory where ApiAdapter is installed.
Example: C:\\Program Files\AVEVA Solutions\OSM API Adapter
-
Type the base command plus additional arguments:
apiadapter.exe sap workorder
or
apiadapter.exe sap tag

Run the ApiAdapter program in PowerShell window
-
Navigate to the location where ApiAdapter is installed, for example: Program Files\AVEVA Solutions\OSM API Adapter
-
Press Shift and right-click inside the window with no item selected.
-
On the context menu, select Open PowerShell window here.

Arguments
These are the required and optional arguments to use in the command.
|
Argument |
Usage |
Description |
Required |
|---|---|---|---|
|
--file |
--file filename.xml |
Name of the XML file that contains workorders or tags to import. File must reside in same folder as apiadapter.exe, or filename must include full path. |
Yes |
|
--authservice |
--authservice "https://pcs_server_name.company.com/IdentityManager" |
URL for connecting to AVEVA Identity Manager. |
Yes |
|
--authkey |
--authkey osmclientapiadapterprod |
The Id for the apiadapter client that was registered within PCS. |
Yes |
|
--osmweburl |
--osmweburl "https://osm_domain_name.company.com" |
The base URL for OSM web application. |
Yes |
|
--chunk |
--chunk 1000 |
Chunk size is number of work orders or tags to insert into OSM database per transaction. If not specified, the default value is 100. |
No |
|
--skipvalidation |
--skipvalidation |
If this argument is included, the adapter will skip XML syntax validation. Other validations will still run. |
No |
|
--dryrun |
--dryrun |
If this argument is included, the adapter will perform a dry run. It will parse the XML and run validations, but not insert or update any data. |
No |
|
--verbose |
--verbose |
If this argument is included, the adapter will report more information during execution. |
No |
|
--time |
--time |
If this argument is included, the adapter will report timestamps during execution. |
No |
|
--timeout |
--timeout 60 |
The number of seconds the adapter will wait for a response from OSM integration service. If not specified, the default value is 100. |
No |