The RESTPolicy defines execution and processing options for LabVantage REST Web Services.

Property Description
System Resources Determines the behavior of fundamental system-level resources that are exposed in the REST API.
Property Name Description
Root Resources Determines the behavior of resources defined at the root of the "rest" Web application.
Property Name Description
REST API (GET) Determines the behavior of the built-in REST API documentation.
Property Name Description
Enabled Determines if the built-in REST API documentation is accessible through the URL or Help link:
Yes=REST API documentation can be accessed.
No=REST API documentation cannot be accessed. This is the default.
Connection Resources Determines the behavior of resources relevant to Connections.
Property Name Description
Get a Connection (POST) Determines if a ConnectionId can be created by issuing a POST /rest/connections request:
Property Name Description
Enabled
Yes=ConnectionId can be created.
No=ConnectionId cannot be created. This is the default.
Check a Connection (GET) Determines if a ConnectionId can be checked for validity by issuing a GET /rest/connections/{connectionid} request:
Property Name Description
Enabled
Yes=ConnectionId can be checked.
No=ConnectionId cannot be checked. This is the default.
Ping a Connection (PUT) Determines if a ConnectionId can be pinged by issuing a PUT /rest/connections/{connectionid} request:
Property Name Description
Enabled
Yes=ConnectionId can be pinged.
No=ConnectionId cannot be pinged. This is the default.
Clear a Connection (DELETE) Determines if a ConnectionId can be cleared by issuing a DELETE /rest/connections/{connectionid} request:
Property Name Description
Enabled
Yes=ConnectionId can be cleared.
No=ConnectionId cannot be cleared. This is the default.
Action Resources Determines the behavior of resources relevant to Actions.
Property Name Description
Get Actions (GET) Determines if Actions that can be used in the REST API are returned by issuing a GET /rest/actions request:
Property Name Description
Enabled
Yes=A list of Actions can be returned.
No=A list of Actions cannot be returned. This is the default.
Execute Action Block (POST) Determines if an Action Block can be executed by issuing a POST /rest/actions request:
Property Name Description
Enabled
Yes=Action Block can be executed.
No=Action Block cannot be executed. This is the default.
Get Action (GET) Determines if properties for a specified Action can be returned by issuing a GET /rest/actions/{actionid} request:
Property Name Description
Enabled
Yes=Action properties can be returned.
No=Action properties cannot be returned. This is the default.
Execute Action (POST) Determines if a specified Action can be executed by issuing a POST /rest/actions/{actionid} request:
Property Name Description
Enabled
Yes=Action can be executed.
No=Action cannot be executed. This is the default.
SDC Resources Defines SDC endpoints.
Property Name Description
ResourceUnique name for the resource within the RESTPolicy.
Enabled Determines if SDC data can be accessed by issuing a request at the /rest/sdc/ level:
Yes=SDC data can be accessed.
No=SDC data cannot be accessed. This is the default.
Type Type of resource to which the SDC endpoint applies:
Type Description
Primary Resource

Sub Resource

Reverse FK Sub Resource

See LabVantage REST Web Services → Terminology.
SDC SDC (if "Type" is "Primary Resource") or foreign-key (if "Type" is "Reverse FK Sub Resource"). This is not applicable if "Type" is "Sub Resource".
Path URL segment that is used to access the resource. For example:
A Primary Resource could have a path of /rest/sdc/samples.
A Sub Resource could have a path of /rest/sdc/samples/S1/dataitems.
A Reverse FK Sub Resource could have a path of /rest/sdc/batches/B1/samples.
Dataset NameInternal dataset name (such as dataitem, dataset, sdiworkitem, etc.) that is used in the SDIRequest calls. This is applicable only if "Type" is "Sub Resource".
Resource Root Methods Defines rules used for requests made to the Resource Root.
NOTE: The properties exposed depend on the "Method" defined:
Method Properties Exposed
GET"Method" and "Enabled" only.
POSTAll except "Method Qualifier".
PUTAll.

The DELETE method is not supported in Resource Root requests.

Property Name Description
Method Method executed:
Method Resource TypeDescription
GETPrimary Resource Retrieves data from the primary table of the SDC using a standard LabVantage Query or a list of SDIs. The request returns a JSON object containing a collection/array of primary data. The columns returned are defined in the Resource Columns (GET) property below, but can be modified with the "fields" Query parameter described below. These Query parameters can be used:
Query Parameter Description
queryidDefines a standard LabVantage Query for the SDC (mutually exclusive with the use of keyid1 and filter). Example: /rest/sdc/samples?queryid=TodaysSamples.
param1..paramnDefines values for each of the parameters of the Query (used with queryid). Example: /rest/sdc/samples?queryid=ByProject&param1=ProjA.
keyid1Defines a semicolon-separated list of keyid1 values for the SDC (mutually exclusive with the use of queryid and filter). Example: /rest/sdc/samples?keyid1=S1;S2;S3.
keyid2Defines a semicolon-separated list of keyid2 values for the SDC (used with keyid1 and mutually exclusive with the use of queryid and filter). Example: /rest/sdc/specs?keyid1=SpecA&keyid2=1.
keyid3Defines a semicolon-separated list of keyid3 values for the SDC (used with keyid1 and mutually exclusive with the use of queryid and filter). Example: /rest/sdc/paramlists?keyid1=Alkali Metals&keyid2=1&keyid3=1.
queries=YReturns a list of Queries and their arguments as defined by the Policy.
fieldsDefines the set of fields to be shown in the collection of data returned. Example: /rest/sdc/samples?queryid=TodaysSamples&fields=(s_sampleid, sampledesc).
Sub Resource Retrieves data from the appropriate detail table of the SDC, which may be filtered using the "filter" Query parameter. The request returns a JSON object containing a collection/array of detail data. The columns returned are defined in the Resource Columns (GET) property below, but can be modified with the "fields" Query parameter below. These Query parameters can be used:
Query Parameter Description
filterDefines a comma-separated list of filter clauses to filter detail records returned. Example: /rest/sdc/samples/S1/tests?filter=(workitemstatus=Initial).
fieldsDefines the set of fields to be shown in the collection of data returned. Example: /rest/sdc/samples/S1/tests? fields=(workitemid, workitemstatus).
POSTAnySends data to the server to add a Primary Resource or Sub Resource, and returns a JSON object containing a collection/array of the resource data created along with a definition of the Action call made. No Query parameters can be used.
PUTAny Sends data to the server to update a Primary Resource or Sub Resource. When PUTting data to the Resource Root, the PUT data must contain a collection of keys and data values identified with the resource path for the resource that requires modification. Multiple PUT methods can be added to the Resource Root request to define a set of potential actions that can be performed on a resource. The following Query parameter can be used:
Query Parameter Description
actionMethod qualifier for the method (PUT) that defines which PUT method Action should be executed.
Method QualifierDefines the value for the action query parameter (such as "edit"). This is applicable only if "Method" is PUT. Qualifiers are generally used only where there is more than one PUT method action defined for a Resource or Sub Resource. For example, a PUT on a Sample Workitem Sub Resource could be to edit or cancel it, in which case the action could be used to differentiate between the two.
Enabled Determines if the request method can be executed:
Yes=Method can be executed.
No=Method cannot be executed. This is the default.
SDC OperationSDC Operation associated with the "Action" (below) that is executed.
ActionLabVantage Action that processes the data sent to the server.
Properties Input properties that are required to execute the "Action" (above).
Property Name Description
PropertyIdentifier of the property (as defined in the LabVantage System Action Public Interfaces).
ValueValue of the property. Depending on your requirements, this can be a value token, a default value, or it can be left blank.
MandatoryDetermines if a value must exist for the property before the Action is executed.
Allow OverrideDetermines if a default value can be overridden with a post value.
Ignore TokensDetermines if token processing should be ignored. In other words, if the actual value of the property should contain [token] values, token processing should be ignored.
Restricted Properties Determines if the set of properties defined for the Action are the only properties that may be set, regardless of what was posted:
Yes (Ignore)=Ignore properties that are not defined by the Policy.
Yes (Error)=Generate an error if any properties are not defined by the Policy.
No=Allow properties that are not defined by the Policy.
Enforce Data MaskingApplies Data Masking logic defined by the Masking Policy. See Data Masking for information regarding the Masking Policy configuration.
Resource Id Methods Defines rules used for requests made to the Resource Id.
NOTE: The properties exposed depend on the "Method" defined:
Method Properties Exposed
GET"Method" and "Enabled" only.
DELETEAll except "Method Qualifier".
PUTAll.

The POST method is not supported in Resource Id requests.

Property Name Description
Method Method executed:
Method Resource TypeDescription
GETPrimary Resource Retrieves a specific record from the primary table of the SDC using the supplied SDC keys (semicolon-separated). The request returns a JSON object containing a collection/array of primary data. The columns returned are defined in the Resource Columns (GET) section of the Policy, but can be modified with the "fields" Query parameter below. This Query parameter can be used:
Query Parameter Description
fieldsDefines the set of fields to be shown in the collection of data returned. Example: /rest/sdc/samples/S1?fields=(s_sampleid, sampledesc).
Sub Resource Retrieves data from the appropriate detail table of the SDC filtered by the supplied Sub Resource keys (semicolon-separated). The request returns a JSON object containing a collection/array of detail data. The columns returned are defined in the Resource Columns (GET) property below, but can be modified with the "fields" Query parameter below. These Query parameters can be used:
Query Parameter Description
fieldsDefines the set of fields to be shown in the collection of data returned. Example: /rest/sdc/samples/S1/tests/MoistureAnalysis? fields=(workitemid, workitemstatus).
PUTAny Sends data to the server to update a single Primary Resource record or Sub Resource detail record. The PUT data contains a single set of data values that require modification. Multiple PUT methods can be added to the Resource Id to define a set of potential actions that can be performed on a resource.
Query Parameter Description
actionMethod qualifier for the method (PUT) that defines which PUT method Action should be executed.
DELETEAnySends a request to the server to remove a Primary Resource or Sub Resource. Note that the actual effect on the record is determined by the Action defined. It returns a JSON object with status information, along with a definition of the Action call made. No Query parameters can be used.
Method QualifierDefines the value for the action query parameter (such as "edit"). This is applicable only if "Method" is PUT. Qualifiers are generally used only where there is more than one PUT method action defined for a Resource or Sub Resource. For example, a PUT on a Sample Workitem Sub Resource could be to edit or cancel it, in which case the action could be used to differentiate between the two.
EnabledDetermines if the request method can be executed:
Yes=Method can be executed.
No=Method cannot be executed. This is the default.
SDC OperationSDC Operation associated with the "Action" (below) that is executed.
ActionLabVantage Action that processes the data sent to the server.
Properties Input properties that are required to execute the "Action" (above).
Property Name Description
PropertyIdentifier of the property (as defined in the LabVantage System Action Public Interfaces).
ValueValue of the property. Depending on your requirements, this can be a value token, a default value, or it can be left blank.
MandatoryDetermines if a value must exist for the property before the Action is executed.
Allow OverrideDetermines if a default value can be overridden with a post value.
Ignore TokensDetermines if token processing should be ignored. In other words, if the actual value of the property should contain [token] values, token processing should be ignored.
Restricted PropertiesDetermines if the set of properties defined for the Action are the only properties that may be set, regardless of what was posted:
Yes (Ignore)=Ignore properties that are not defined by the Policy.
Yes (Error)=Generate an error if any properties are not defined by the Policy.
No=Allow properties that are not defined by the Policy.
Enforce Data MaskingApplies Data Masking logic defined by the Masking Policy. See Data Masking for information regarding the Masking Policy configuration.
Restrictive Where This property is exposed only if "Type" is "Primary Resource". "Restrictive Where" allows a Primary resource (SDC) to be sub-classed. This means that the Policy can restrict the types of Primary Resource that are exposed through the API. For example, adding a restrictive where clause of "sampletypeid='QC'" to the samples resource means that the resource will have access to only the Samples with a Sample Type of "QC". In this case, it might be appropriate to modify the resource path to qcsamples using a request such as /rest/sdc/qcsamples?queryid=TodaysSamples.

Note that the restrictive where clause applies to PUT and DELETE as well as GET. Therefore, a PUT method would be able to update only items that comply with the restrictive where. For example, PUT /rest/sdc/qcsamples/S1 will be successful only if S1 is a QC Sample. POSTing/creating cannot enforce this restriction, but the Action properties for the POST can force the appropriate column values into the resource record.

Resource Columns (GET) Defines the set of columns that are returned when a resource is requested.
Property Name Description
ColumnColumn returned when a resource is requested.
Summary ColumnWhen a Sub Resource is requested, only these "Summary Columns" of the parent Primary Resource will be shown.
EnabledDetermines if the column is returned when a resource is requested:
Yes=Column is returned.
No=Column is not returned.

If the default resource columns are not what is required, the "fields" query parameter can be used to explicitly define the set of columns required. The use of the "fields" query parameter is qualified by the "Restricted Columns" property below.

Restricted Columns This is used to qualify the "fields" query parameter when it is used in conjunction with the Restricted Columns property above.
Yes (Ignore)=Ignore fields that are outside of the set specified in "Resource Columns".
Yes (Error)=Generate an error if any fields are outside of the set specified in "Resource Columns".
No=Allow fields that are outside of the set specified in "Resource Columns".
Root Resource Queries

This property is exposed only if "Type" is "Primary Resource". "Root Resource Queries" defines a set of LabVantage Queries that can be used in primary root resource query requests such as /rest/sdc/samples?queryid=TodaysSamples.
Property Name Description
Show Queries These options are provided for exposing queries:
No=Does not list any Queries and prevents the use of the queryid query parameter.
All=Lists all Queries available for the Primary Resource SDC. Any query can be used.
By Category=Lists and allows only the Queries of the specified Category.
List=Lists and allows only the Queries defined in the Policy.
Queries Specifies the primary root resource query:
Property Name Description
QueryLabVantage Query to use as the primary root resource query.
CategoryCategory associated with the Query.
Sub Resources

This property is exposed only if "Type" is "Primary Resource". This defines a set of Sub Resources for the Primary Resource. Only these resources will be exposed in the REST API. A Primary Sub Resource collection simply references other resources defined in the SDC resources collection.
Property Name Description
ResourceSub Resource to expose in the REST API.

 

  

Please be aware that numeric values found to be "null" (empty) are shown as -999999999.