Property Name |
Description |
Resource | Unique 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:
|
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 Name | Internal 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. | POST | All except "Method Qualifier". | PUT | All. |
The DELETE method is not supported in Resource Root requests. |
Property Name |
Description | Method | Method executed:
Method |
Resource Type | Description | GET | Primary 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 | queryid | Defines a standard LabVantage Query
for the SDC (mutually exclusive with the use of
keyid1 and filter). Example: /rest/sdc/samples?queryid=TodaysSamples. | param1..paramn | Defines values for each of the parameters
of the Query (used with queryid). Example: /rest/sdc/samples?queryid=ByProject¶m1=ProjA. | keyid1 | Defines 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. | keyid2 | Defines 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. | keyid3 | Defines 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=Y | Returns a list of Queries and their
arguments as defined by the Policy. | fields | Defines 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 | filter | Defines a comma-separated list of
filter clauses to filter detail records returned.
Example: /rest/sdc/samples/S1/tests?filter=(workitemstatus=Initial). | fields | Defines the set of fields to be
shown in the collection of data returned. Example:
/rest/sdc/samples/S1/tests? fields=(workitemid,
workitemstatus). |
| POST | Any | Sends 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. | PUT | Any | 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 | action | Method qualifier for the method
(PUT) that defines which PUT method Action should
be executed. |
|
| Method Qualifier | Defines 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 Operation | SDC
Operation associated with the "Action" (below)
that is executed. | Action | LabVantage Action that processes the data sent
to the server. | Properties | Input properties that are required to execute
the "Action" (above).
Property Name |
Description | Property | Identifier of the property (as defined
in the LabVantage System
Action Public Interfaces). | Value | Value of the property. Depending on your
requirements, this can be a value token, a default value,
or it can be left blank. | Mandatory | Determines if a value must exist for the
property before the Action is executed. | Allow Override | Determines if a default value can be overridden
with a post value. | Ignore Tokens | Determines 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 Masking | Applies 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. | DELETE | All except "Method Qualifier". | PUT | All. |
The POST method is not supported in Resource Id requests. |
Property Name |
Description | Method | Method executed:
Method |
Resource Type | Description | GET | Primary 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 | fields | Defines 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 | fields | Defines the set of fields to be
shown in the collection of data returned. Example:
/rest/sdc/samples/S1/tests/MoistureAnalysis? fields=(workitemid,
workitemstatus). |
| PUT | Any | 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 | action | Method qualifier for the method
(PUT) that defines which PUT method Action should
be executed. |
| DELETE | Any | Sends 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 Qualifier | Defines 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 Operation | SDC
Operation associated with the "Action" (below)
that is executed. | Action | LabVantage Action that processes the data sent
to the server. | Properties | Input properties that are required to execute
the "Action" (above).
Property Name |
Description | Property | Identifier of the property (as defined
in the LabVantage System
Action Public Interfaces). | Value | Value of the property. Depending on your
requirements, this can be a value token, a default value,
or it can be left blank. | Mandatory | Determines if a value must exist for the
property before the Action is executed. | Allow Override | Determines if a default value can be overridden
with a post value. | Ignore Tokens | Determines 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 Masking | Applies 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 | Column | Column returned when a resource is requested. | Summary Column | When a Sub Resource is requested, only these
"Summary Columns" of the parent Primary Resource will
be shown. | Enabled | Determines 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 | Query | LabVantage Query to use as the primary
root resource query. |
| Category | Category 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 | Resource | Sub Resource to expose in the REST API. |
|