The service information can be fetched using the following endpoint. This endpoint doesn’t provide filter parameters.
GET /dataServiceRest/serviceInformation HTTP/1.1
{
"serverName": "PiWeb Server",
"version": "5.6.2.0",
"securityEnabled": false,
"edition": "PiWebDB",
"versionWsdlMajor": "2",
"versionWsdlMinor": "9",
"partCount": 4,
"characteristicCount": 125,
"measurementCount": 20,
"valueCount": 900,
"featureList":
[
"MeasurementAggregation",
"DistinctMeasurementSearch"
],
"inspectionPlanTimestamp": "2014-11-24T16:08:58.812964+01:00",
"measurementTimestamp": "2014-11-03T10:27:28.3461853+01:00",
"configurationTimestamp": "2014-11-03T10:27:27.5245116+01:00"
}
Service information requests always have the smallest response time and are therefore well suited for checking the connection. Fetching the service information doesn’t require authentication.
The returned ServiceInformation object has the following properties:
Property | Description |
---|---|
string serverName |
The name of the PiWeb server as specified in the server settings |
string version |
The version number of the PiWeb server |
bool securityEnabled |
Indicates whether authentication is required by the server |
string edition |
The database edition. Usually this is “PiWebDB” |
string versionWsdlMajor |
The major version number of the interface |
string versionWsdlMinor |
The minor version number of the interface |
int partCount |
The estimated number of parts stored on the server |
int characteristicCount |
The estimated number of characteristics stored on the server |
int measurementCount |
The estimated number of measurements stored on the server |
int valueCount |
The estimated number of measured values stored on the server |
Features featureList |
A list of features supported by the server. This can be MeasurementAggregation or DistinctMeasurementSearch |
DateTime inspectionPlanTimestamp |
Timestamp of the last inspection plan modification |
DateTime measurementTimestamp |
Timestamp of the last measurement modification |
DateTime configurationTimestamp |
Timestamp of the last configuration modification |
The configuration can be fetched, created, updated and deleted using the following endpoints. These endpoints do not provide filter parameters.
GET /dataServiceRest/configuration HTTP/1.1
{
"partAttributes":
[
[
"key":1001,
"description":"partNumber",
"length":30,
"type":"AlphaNumeric",
"definitionType":"AttributeDefinition"
],
...
],
"characteristicAttributes":
[
[
"key":2001,
"description":"characteristicNumber",
"length":20,
"type":"AlphaNumeric",
"definitionType":"AttributeDefinition"
],
...
],
"measurementAttributes":
[
"key": 8,
"description": "inspector",
"catalog": "8c376bee-ffe3-4ee4-abb9-a55b492e69ad",
"definitionType": "CatalogAttributeDefinition"
...
],
"valueAttributes":
[
...
],
"catalogAttributes":
[
...
]
}
Creates the attribute definitions transfered within the body of the request for the given :pluralizedEntityType
which must be part of the uri
POST /dataServiceRest/configuration/parts HTTP/1.1
[
{
"key":1001,
"description":"partNumber",
"length":30,
"type":"AlphaNumeric",
"definitionType":"AttributeDefinition"
}
]
HTTP/1.1 201 Created
Updates the attribute definitions transfered within the body of the request for the given :pluralizedEntityType
which must be part of the uri
PUT /dataServiceRest/configuration/parts HTTP/1.1
[
{
"key":1001,
"description":"partNumber",
"length":50,
"type":"AlphaNumeric",
"definitionType":"AttributeDefinition"
}
]
HTTP/1.1 200 Ok
DELETE /dataServiceRest/configuration HTTP/1.1
HTTP/1.1 200 Ok
Deletes all attribute definitions of which the id is in the :attributeIdList
for the specified :pluralizedEntityType
. If :attributeIdList
is not specified, the request deletes all attributes of the :pluralizedEntityType
.
DELETE /dataServiceRest/configuration/part/{1001, 1002} HTTP/1.1
HTTP/1.1 200 Ok
The PiWeb configuration consists of a list of attributes for each entity type. The different entity types are:
The attributes are either AttributeDefinition
or CatalogAttributeDefinition
.
Property | Description |
---|---|
ushort key |
The attribute’s key, which serves as a unique id |
string description |
The attribute’s name or a short description |
AttributeType type |
The attribute’s type. AlphaNumeric, Integer, Float or DateTime |
ushort length |
The attribute’s maximum length. Only set if the type is AlphaNumeric |
string definitionType |
Always has the value ‘AttributeDefinition’ and is used to differentiate between AttributeDefinition and CatalogAttributeDefinition |
Property | Description |
---|---|
ushort key |
The attribute’s key, which serves as a unique id |
string description |
The attribute’s name or a short description |
Guid catalog |
The id of the catalog that contains the possible attribute values |
string definitionType |
Always has the value ‘CatalogAttributeDefinition’ and is used to differentiate between AttributeDefinition and CatalogAttributeDefinition |
Catalogs and catalog entries can be fetched, created, updated and deleted using the following endpoints.
GET /dataServiceRest/catalogs HTTP/1.1
[
{
"uuid": "d7291afb-0a67-4c1e-8bcc-6fc455bcc0e5",
"name": "direction catalog",
"validAttributes": [ 2009 ],
"catalogEntries":
[
{
"key": 0,
"attributes": { "2009": "undefined" }
},
{
"key": 1,
"attributes": { "2009": "right" }
},
{
"key": 2,
"attributes": { "2009": "left" }
}
]
},
{
"uuid": "8c376bee-ffe3-4ee4-abb9-a55b492e69ad",
"name": "InspectorCatalog",
"validAttributes": [ 4092, 4093 ],
"catalogEntries":
[
{
"key": 0,
"attributes": { "4092": "n.def.", "4093": "n.def." }
},
{
"key": 1,
"attributes": { "4092": "21", "4093": "Smith" }
},
{
"key": 2,
"attributes": { "4092": "20", "4093": "Miller" }
},
{
"key": 3,
"attributes": { "4092": "23", "4093": "Williams" }
}
]
},
...
]
GET /dataServiceRest/catalogs/8c376bee-ffe3-4ee4-abb9-a55b492e69ad HTTP/1.1
[
{
"uuid": "8c376bee-ffe3-4ee4-abb9-a55b492e69ad",
"name": "InspectorCatalog",
"validAttributes": [ 4092, 4093 ],
"catalogEntries":
[
{
"key": 0,
"attributes": { "4092": "n.def.", "4093": "n.def." }
},
{
"key": 1,
"attributes": { "4092": "21", "4093": "Smith" }
},
{
"key": 2,
"attributes": { "4092": "20", "4093": "Miller" }
},
{
"key": 3,
"attributes": { "4092": "23", "4093": "Williams" }
}
]
}
]
To create a new catalog, the catalog object must be transmitted in the request’s body. A valid request contains a unique identifier, the catalog name and the valid attributes. Catalog entries are optional. All valid attributes must be added as catalog attributes beforehand (see Configuration).
If no catalog entries are specified, an empty catalog entry with key ‘0’ and attribute value(s) ‘not defined’ ( in case of alphanumeric attributes ) is created by default.
POST /dataServiceRest/catalogs HTTP/1.1
[
{
"uuid": "8c376bee-ffe3-4ee4-abb9-a55b492e69ad",
"name": "InspectorCatalog",
"validAttributes": [ 4092, 4093 ],
"catalogEntries":
[
{
"key": 0,
"attributes": { "4092": "n.def.", "4093": "n.def." }
},
{
"key": 1,
"attributes": { "4092": "21", "4093": "Smith" }
},
{
"key": 2,
"attributes": { "4092": "20", "4093": "Miller" }
},
{
"key": 3,
"attributes": { "4092": "23", "4093": "Williams" }
}
]
}
]
HTTP/1.1 201 Created
To add entries to an existing catalog they need to be specified in the request body. Each new entry must consist of a unique key. Each entry attribute must be listed as a valid attribute in the catalog definition.
POST /dataServiceRest/catalogs/8c376bee-ffe3-4ee4-abb9-a55b492e69ad HTTP/1.1
[
{
"key": 4,
"attributes": { "4092": "22", "4093": "Clarks" }
}
]
HTTP/1.1 201 Created
Update a catalog when you want to:
To update a catalog, the whole object, excluding the valid attributes, needs to be transmitted in the body of the HTTP request. Updating a catalog essentially replaces the current catalog entries with the new one (delete followed by an add) in a single transaction.
To change the valid attributes, the catalog needs to be deleted an re-created again.
PUT /dataServiceRest/catalogs HTTP/1.1
[
{
"uuid": "8c376bee-ffe3-4ee4-abb9-a55b492e69ad",
"name": "Inspectors",
"catalogEntries":
[
{
"key": 0,
"attributes": { "4092": "n.def.", "4093": "n.def." }
},
{
"key": 1,
"attributes": { "4092": "21", "4093": "Clarks" }
},
{
"key": 2,
"attributes": { "4092": "20", "4093": "Miller" }
},
{
"key": 3,
"attributes": { "4092": "23", "4093": "Williams" }
}
]
}
]
HTTP/1.1 200 Ok
DELETE /dataServiceRest/catalogs HTTP/1.1
HTTP/1.1 200 Ok
DELETE /dataServiceRest/catalogs/8c376bee-ffe3-4ee4-abb9-a55b492e69ad HTTP/1.1
HTTP/1.1 200 Ok
DELETE /dataServiceRest/catalogs/8c376bee-ffe3-4ee4-abb9-a55b492e69ad/ HTTP/1.1
HTTP/1.1 200 Ok
DELETE /dataServiceRest/catalogs/8c376bee-ffe3-4ee4-abb9-a55b492e69ad/{1,3} HTTP/1.1
HTTP/1.1 200 Ok
Each catalog describes a list of entries. All entries have the same defined set of attributes, called valid attributes.
All valid attributes must be created as catalog attributes beforehand. Catalog
and CatalogEntry
have the following structures:
Property | Description |
---|---|
Guid uuid |
Identifies the catalog uniquely |
string name |
The name of the catalog |
ushort[] validAttributes |
A list of attribute keys that are valid for this catalog |
CatalogEntry catalogEntries |
A list of catalog entries |
Property | Description |
---|---|
short key |
Specifies the entry’s order within the catalog |
Attribute[] attributes |
A list of attributes which consists of key and value. The keys must be in the validAttributes list. |
You can fetch, create, update and delete parts and characteristics using the following endpoints:
You can fetch all parts or certain parts. Possible filter uri parameters are:
Parameter name | Description |
---|---|
Guid list partUuids |
Restricts the query to the parts with these uuids. |
Path partPath |
Restricts the query to the part with this path. |
ushort depthdefault: 1 |
Determines how many levels of the inspection plan tree hierarchy should be fetched. Setting depth=0 means that only the entity itself should be fetched, depth=1 means the entity and its direct children should be fetched. Please note that depth is treated relative of the path depth of the provided part. |
bool withHistorydefault: false |
Determines whether the version history should be fetched or not. This only effects the query if versioning is activated on the server side. |
All, None, ID list requestedPartAttributesdefault: All |
Restricts the query to the attributes that should be returned for parts, for example requestedPartAttributes={1001, 1008} . |
/metal part
without child parts and only get the values for attributes 1001
and 1003
GET /dataServiceRest/parts?partPath=/metal%20part&depth=0&requestedPartAttributes={1001,1003} HTTP/1.1
[
{
"path": "P:/metal part/",
"charChangeDate": "2014-11-19T10:48:32.917Z",
"attributes": { "1001": "4466", "1003": "mp" },
"uuid": "05040c4c-f0af-46b8-810e-30c0c00a379e",
"version": 0,
"timestamp": "2012-11-19T10:48:32.887Z"
}
]
You can fetch a certain part by its :partUuid. The result can be restricted by the following uri parameters:
Parameter name | Description |
---|---|
bool withHistorydefault: false |
Determines whether the version history should be fetched or not. This only effects the query if versioning is activated on the server side. |
All, None, ID list requestedPartAttributesdefault: All |
Restricts the query to the attributes that should be returned for parts, for example requestedPartAttributes={1001, 1008} . |
GET /dataServiceRest/parts/05040c4c-f0af-46b8-810e-30c0c00a379e HTTP/1.1
[
{
"path": "P:/metal part/",
"charChangeDate": "2014-11-19T10:48:32.917Z",
"attributes": {},
"uuid": "05040c4c-f0af-46b8-810e-30c0c00a379e",
"version": 0,
"timestamp": "2012-11-19T10:48:32.887Z"
}
]
To create a new part, you must send its JSON representation in the request body. Values for uuid
and path
are required, attributes
and comment
are optional. The attribute keys must be valid part attributes as specified in the Configuration.
The comment is only added if versioning is enabled in the server settings.
POST /dataServiceRest/parts HTTP/1.1
[
{
"uuid": "05040c4c-f0af-46b8-810e-30c0c00a379e",
"path": "/metal part",
"attributes": { "1001": "4466", "1003": "mp" }
}
]
HTTP/1.1 201 Created
If you update a part you might want to:
If versioning is activated on the server side, every update creates a new version entry. If versioning is set to ‘Controlled by the client’ on server side it can be contolled by the following parameter:
Parameter name | Description |
---|---|
bool versioningEnableddefault: false |
Determines whether a version entry should be created or not. This only effects the query if versioning is set to ‘Controlled by the client’ on server side. |
PUT /dataServiceRest/parts HTTP/1.1
[
{
"path": "/metal part",
"attributes": { "1001": "4469", "1003": "metalpart" }
"uuid": "05040c4c-f0af-46b8-810e-30c0c00a379e",
}
]
HTTP/1.1 200 Ok
There are two ways to delete parts, either by their path or by their uuids. This means that either the filter parameter partPath
or partUuids
has to be set:
Parameter name | Description |
---|---|
Guid list partUuids |
Restricts the query to the parts with these uuids. |
Path partPath |
Restricts the query to the part with this path. |
In both cases the request deletes the part itself as well as all its child parts and child characteristics. If both parameters are set only the partUuids
parameter will be considered.
DELETE /dataServiceRest/parts?partPath=/metal%20part HTTP/1.1
HTTP/1.1 200 Ok
Deleting a part also deletes all its children.
DELETE /dataServiceRest/parts/05040c4c-f0af-46b8-810e-30c0c00a379e HTTP/1.1
HTTP/1.1 200 Ok
You can fetch all characteristics or only the characteristics described by the uri parameters. Possible filter uri parameters are:
Parameter name | Description |
---|---|
Guid list partUuids |
Restricts the query to the parts with these uuids. |
Path partPath |
Restricts the query to the part with this path. |
ushort depthdefault: 65.536 |
Determines how many levels of the inspection plan tree hierarchy should be fetched. Setting depth=0 means that only the entity itself should be fetched, depth=1 means the entity and its direct children should be fetched. Please note that depth is treated relative of the path depth of the provided part or characteristic. |
bool withHistorydefault: false |
Determines whether the version history should be fetched or not. This only effects the query if versioning is activated on the server side. |
All, None, ID list requestedCharacteristicAttributesdefault: All |
Restricts the query to the attributes that should be returned for characteristics, for example requestedCharacteristicAttributes={2001, 2101} |
You can only request direct characteristics of the part, characteristics of child parts will be ignored.
GET /dataServiceRest/characteristics?partPath=/metal%20part&depth=2 HTTP/1.1
[
{
"path": "PC:/metal part/deviation_3/",
"attributes": { ... },
"uuid": "27e23a7c-dbe7-4863-8461-6abf7b03ddd7",
"version": 0,
"timestamp": "2012-11-19T10:48:32.887Z"
},
{
"path": "PCC:/metal part/deviation_3/.X/",
"attributes": { ... },
"uuid": "51c8568a-9410-465a-a8ed-33063db41dac",
"version": 0,
"timestamp": "2015-03-24T08:17:28.03Z"
},
{
"path": "PCC:/metal part/deviation_3/.Y/",
"attributes": { ... },
"uuid": "b7a30736-6e89-4dd5-9bc0-e6cb9eb5e2da",
"version": 0,
"timestamp": "2015-03-24T08:17:34.61Z"
},
{
"path": "PCC:/metal part/deviation_3/.Z/",
"attributes": { ... },
"uuid": "1175919c-5c59-487e-a0fb-deac04510046",
"version": 0,
"timestamp": "2015-03-24T08:17:38.423Z"
}
]
The result of fetching a certain characteristic by its :charUuid can be restricted by the following uri parameters:
Parameter name | Description |
---|---|
bool withHistorydefault: false |
Determines whether the version history should be fetched or not. This only effects the query if versioning is activated on the server side. |
All, None, ID list requestedCharacteristicAttributesdefault: All |
Restricts the query to the attributes that should be returned for characteristics, for example requestedCharacteristicAttributes={2001, 2101} |
GET /dataServiceRest/characteristics/27e23a7c-dbe7-4863-8461-6abf7b03ddd7 HTTP/1.1
[
{
"path": "PC:/metal part/deviation_3/",
"attributes": { ... },
"uuid": "27e23a7c-dbe7-4863-8461-6abf7b03ddd7",
"version": 0,
"timestamp": "2012-11-19T10:48:32.887Z"
}
]
To create characteristics, you must send a JSON representation of the characteristics in the request body. Values for uuid
and path
are required, attributes
and comment
are optional. The attribute keys must be valid characteristic attributes as specified in the Configuration.
The comment is only added if versioning is enabled in the server settings.
POST /dataServiceRest/characteristics HTTP/1.1
[
{
"path": "PC:/metal part/deviation_3/",
"attributes":
{
"2004": "3",
"2101": "0",
"2110": "-0.5",
"2111": "0.5"
},
"uuid": "27e23a7c-dbe7-4863-8461-6abf7b03ddd7"
}
]
HTTP/1.1 201 Created
If you update characteristics you want to:
If versioning is activated on server side, every update of one or more characteristics creates a new version entry. If versioning is set to ‘Controlled by the client’ on server side it can be contolled by the following parameter:
Parameter name | Description |
---|---|
bool versioningEnableddefault: false |
Determines whether a version entry should be created or not. This only effects the query if versioning is set to ‘Controlled by the client’ on server side. |
PUT /dataServiceRest/characteristics HTTP/1.1
[
{
"path": "/metal part/deviation_3",
"attributes": { "2110": "-1.0", "2111": "1.0" }
"uuid": "05040c4c-f0af-46b8-810e-30c0c00a379e",
}
]
HTTP/1.1 200 Ok
You have two options to delete characteristics, either by their paths or by their uuids. This means that either the filter parameter charPath
or charUuids
has to be set:
Parameter name | Description |
---|---|
Guid list charUuids |
Restricts the query to characteristics with these uuids. |
Path charPath |
Restricts the query to the part with this characteristics. |
In both cases the request deletes the characteristic itself as well as all its children. If both parameters are set only the charUuids
parameter will be considered.
DELETE /dataServiceRest/parts?charPath=/metal%20part/deviation_3 HTTP/1.1
HTTP/1.1 200 Ok
Deleting a characteristic also deletes all its children.
DELETE /dataServiceRest/characteristics/27e23a7c-dbe7-4863-8461-6abf7b03ddd7 HTTP/1.1
HTTP/1.1 200 Ok
Both parts and characteristics are PiWeb inspection plan entities. They have the following properties:
Property | Description |
---|---|
Guid uuid |
Identifies this inspection plan entity uniquely. |
string path |
The path of this entity. It consists of the path’s hierarchical structure followed by the path itself, e.g. PCC:/metal part/deviation_3/.X/ . P stands for part and C for characteristic. |
Attribute attributes |
A set of attributes which describe the entity. |
string comment |
A comment which describes the last inspection plan change. The comment is only returned in case versioning is enabled in the server settings. |
int version |
Contains the entity´s revision number. The revision number starts with 0 and is incremented by 1 each time changes are applied to the inspection plan. |
dateTime timeStamp |
Contains the date and time of when the entity was last updated. |
dateTime charChangeDate |
(Parts only) The timestamp for the most recent characteristic change on any characteristic that belongs to this part |
You can fetch, create, update and delete measurements and values using the following endpoints:
You can fetch all measurements or certain measurements only. Possible filter uri parameters are:
Type Parameter |
Description Example |
---|---|
Guid list measurementUuids |
Restricts the query to these measurements measurementUuids={5b59cac7-9ecd-403c-aa26-56dd25892421} |
Guid list partUuids |
Restricts the query to these parts partUuids={e42c5327-6258-4c4c-b3e9-6d22c30938b2} |
Path partPath |
Restricts the query to this part partPath=/metal%20part |
bool deep default: false |
Determines whether the query should affect all levels of the inspection plan. deep=true |
OrderCriteria order default: 4 desc |
Determines which attribute keys and which direction the keys should be ordered by order:4 asc, 10 desc |
Condition searchCondition |
The query will only return items matching all conditions. Possible operators are: >, <, >=, <=, =, <>, In, NotIn, Like. You can combine multiple conditions with ‘+’. The format for date/time has to be “yyyy-mm-ddThh:mm:ssZ”. All values need to be surrounded by [ and ]. searchCondition=4>[2012-11-13T00:00:00Z] |
DateTime fromModificationDate |
Specifies a date to select all measurements that where modified after that date. Please note that the system modification date (lastModified property) is used and not the time attribute (creation date). |
DateTime toModificationDate |
Specifies a date to select all measurements that where modified before that date. Please note that the system modification date (lastModified property) is used and not the time attribute (creation date). |
int limitResult |
Restricts the number of result items. limitResult=100 |
All, None, Id list requestedMeasurementAttributes default: All |
Restricts the query to the attributes that should be returned for measurements. requestedMeasurementAttributes={4,8} |
None, Simple, Detailed statistics default: None |
Indicates how statistical informtaion should be returned: None = Return no informationSimple = Return statistical information including numvber of characteristics out of warning limit, number of characteristics out of tolerance and number of characteristics in warning limit and toleranceDetailed = Return statistical information the same way as Simple plus the guid for each characteristic statistics=Simple |
Measurements, AggregationMeasurements, All aggregation default: Measurements |
Specifies which types of measurements will be fetched. aggregation=All |
GET /dataServiceRest/measurements?partUuids={e42c5327-6258-4c4c-b3e9-6d22c30938b2}&searchCondition=4>[2015-01-01T00:00:00Z] HTTP/1.1
[
{
"uuid": "5b59cac7-9ecd-403c-aa26-56dd25892421",
"partUuid": "e42c5327-6258-4c4c-b3e9-6d22c30938b2",
"lastModified": "2015-03-09T09:19:38.653Z",
"attributes":
{
"4": "2015-03-09T19:12:00Z",
"6": "3",
"7": "0"
}
},
...
]
The request can be restricted by the following filter uri parameters:
Type Parameter |
Description Example |
---|---|
All, None, Id list requestedMeasurementAttributes default: All |
Restricts the query to the attributes that should be returned for measurements. requestedMeasurementAttributes={4,8} |
None, Simple, Detailed statistics default: None |
Indicates how statistical informtaion should be returned: None = Return no informationSimple = Return statistical information including numvber of characteristics out of warning limit, number of characteristics out of tolerance and number of characteristics in warning limit and toleranceDetailed = Return statistical information the same way as Simple plus the guid for each characteristic statistics=Simple |
Measurements, AggregationMeasurements, All aggregation default: Measurements |
Specifies which types of measurements will be fetched. aggregation=All |
GET /dataServiceRest/measurements/5b59cac7-9ecd-403c-aa26-56dd25892421 HTTP/1.1
[
{
"uuid": "5b59cac7-9ecd-403c-aa26-56dd25892421",
"partUuid": "e42c5327-6258-4c4c-b3e9-6d22c30938b2",
"lastModified": "2015-03-09T09:19:38.653Z",
"attributes":
{
"4": "2015-03-09T19:12:00Z",
"6": "3",
"7": "0"
}
}
]
To create a new measurement, you must send its JSON representation in the request body. Values for uuid
and path
are required, attributes
and comment
are optional. The attribute keys must be valid measurement attributes as specified in the Configuration.
The comment is only added if versioning is enabled in server settings.
POST /dataServiceRest/measurements HTTP/1.1
[
{
"uuid": "4b59cac7-9ecd-403c-aa26-56dd25892421",
"partUuid": "e42c5327-6258-4c4c-b3e9-6d22c30938b2",
"attributes": {
"4": "2015-03-09T19:12:00Z",
"6": "3",
"7": "0"
}
}
]
HTTP/1.1 201 Created
Updating a measurement is about changing measurement attributes. Pass the whole measurement including all attributes in the request body. The server then deletes all attributes and creates the new one in a single transaction.
PUT /dataServiceRest/measurements HTTP/1.1
[
{
"uuid": "4b59cac7-9ecd-403c-aa26-56dd25892421",
"partUuid": "e42c5327-6258-4c4c-b3e9-6d22c30938b2",
"attributes": {
"4": "2015-03-09T19:12:00Z",
"6": "2",
"7": "0",
"8": "1"
}
}
]
HTTP/1.1 200 OK
You have multiple options for deleting measurements measurements:
Delete condition for deleting measurements from a single or multiple parts may be further restricted by the filter uri parameter searchCondition
.
Type Parameter |
Description Example |
---|---|
Guid list measurementUuids |
Restricts the query to these measurements measurementUuids={5b59cac7-9ecd-403c-aa26-56dd25892421} |
Guid list partUuids |
Restricts the query to these parts partUuids={e42c5327-6258-4c4c-b3e9-6d22c30938b2} |
Path partPath |
Restricts the query to this part partPath=/metal%20part |
Condition searchCondition |
The query will only return items matching all conditions. Possible operators are: >, <, >=, <=, =, <>, In, NotIn, Like. You can combine multiple conditions with ‘+’. The format for date/time has to be “yyyy-mm-ddThh:mm:ssZ”. All values need to be surrounded by [ and ]. searchCondition=4>[2012-11-13T00:00:00Z] |
Measurements, AggregationMeasurements, All aggregation default: Measurements |
Specifies which types of measurements will be deleted. aggregation=All |
DELETE /dataServiceRest/measurements?partUuids={4b59cac7-9ecd-403c-aa26-56dd25892421}&searchCondition=4>[2015-01-01T00:00:00Z]+4<[2015-03-31T23:59:59Z] HTTP/1.1
HTTP/1.1 200 OK
DELETE /dataServiceRest/measurements/5b59cac7-9ecd-403c-aa26-56dd25892421 HTTP/1.1
HTTP/1.1 200 OK
You can fetch all measurements with values or only certain measurements with values. Possible filter uri parameters are:
Type Parameter |
Description Example |
---|---|
Guid list measurementUuids |
Restricts the query to these measurements measurementUuids={5b59cac7-9ecd-403c-aa26-56dd25892421} |
Guid list partUuids |
Restricts the query to these parts partUuids={e42c5327-6258-4c4c-b3e9-6d22c30938b2} |
Path partPath |
Restricts the query to this part partPath=/metal%20part |
bool deep default: false |
Determines whether the query should affect all levels of the inspection plan. deep=true |
OrderCriteria order default: 4 desc |
Determines which attribute keys and which direction the keys should be ordered by order:4 asc, 10 desc |
Condition searchCondition |
The query will only return items matching all conditions. Possible operators are: >, <, >=, <=, =, <>, In, NotIn, Like. You can combine multiple conditions with ‘+’. The format for date/time has to be “yyyy-mm-ddThh:mm:ssZ”. All values need to be surrounded by [ and ]. searchCondition=4>[2012-11-13T00:00:00Z] |
DateTime fromModificationDate |
Specifies a date to select all measurements that where modified after that date. Please note that the system modification date (lastModified property) is used and not the time attribute (creation date). |
DateTime toModificationDate |
Specifies a date to select all measurements that where modified before that date. Please note that the system modification date (lastModified property) is used and not the time attribute (creation date). |
int limitResult |
Restricts the number of result items. limitResult=100 |
All, None, Id list requestedMeasurementAttributes default: All |
Restricts the query to the attributes that should be returned for measurements. requestedMeasurementAttributes={4,8} |
All, None, Id list requestedValueAttributes default: All |
List of attributes that should be returned for values. requestedValueAttributes={1,8} |
Guid list characteristicUuids |
Restricts the query to the characteristics for which values should be returned. characteristicsUuids={525d15c6-dc70-4ab4-bd3c-8ab2b5780e6b, 8faae7a0-d1e1-4ee2-b3a5-d4526f6ba822} |
Measurements, AggregationMeasurements, All aggregation default: Measurements |
Specifies which types of measurements will be fetched. aggregation=All |
GET /dataservicerest/values?partUuids={05040c4c-f0af-46b8-810e-30c0c00a379e}&searchCondition=4>[2010-11-04T00:00:00Z]&characteristicUuids={b587d548-8aa6-42b7-b292-0f3e13452c3f} HTTP/1.1
[
{
"characteristics":
{
"b587d548-8aa6-42b7-b292-0f3e13452c3f":
{
"1": "-0.073420455529934786"
}
},
"uuid": "88974561-a449-4a94-8b3e-970822b84406",
"partUuid": "05040c4c-f0af-46b8-810e-30c0c00a379e",
"lastModified": "2015-01-19T10:48:34.157Z",
"attributes":
{
"4": "2010-11-05T20:30:57.6Z",
"6": "5",
"7": "4",
"8": "7",
"12": "4"
}
},
...
]
The request can be restricted by the following uri filter parameters: Possible filters are:
Type Parameter |
Description Example |
---|---|
All, None, Id list requestedMeasurementAttributes default: All |
Restricts the query to the attributes that should be returned for measurements. requestedMeasurementAttributes={4,8} |
All, None, Id list requestedValueAttributes default: All |
List of attributes that should be returned for values. requestedValueAttributes={1,8} |
Guid list characteristicUuids |
Restricts the query to the characteristics for which values should be returned. characteristicsUuidList={525d15c6-dc70-4ab4-bd3c-8ab2b5780e6b, 8faae7a0-d1e1-4ee2-b3a5-d4526f6ba822} |
Measurements, AggregationMeasurements, All aggregation default: Measurements |
Specifies which types of measurements will be fetched. aggregation=All |
GET /dataServiceRest/values/5b59cac7-9ecd-403c-aa26-56dd25892421 HTTP/1.1
[
{
"characteristics":
{
"b587d548-8aa6-42b7-b292-0f3e13452c3f":
{
"1": "-0.073420455529934786"
},
...
},
"uuid": "5b59cac7-9ecd-403c-aa26-56dd25892421",
"partUuid": "e42c5327-6258-4c4c-b3e9-6d22c30938b2",
"lastModified": "2015-03-09T09:19:38.653Z",
"attributes":
{
"4": "2015-03-09T19:12:00Z",
"6": "3",
"7": "0"
}
},
...
]
To create a measurement with values, you must send its JSON representation in the request body. Values for uuid
and path
are required, attributes
and comment
are optional. The attribute keys must be valid measurement attributes as specified in the Configuration.
The comment is only added if versioning is enabled in server settings.
POST /dataServiceRest/values HTTP/1.1
[
{
"uuid": "4b59cac7-9ecd-403c-aa26-56dd25892421",
"partUuid": "e42c5327-6258-4c4c-b3e9-6d22c30938b2",
"attributes": {
"4": "2015-03-09T19:12:00Z",
"6": "3",
"7": "0"
},
"characteristics":
{
"360f55e5-77c3-49f9-9a5e-80d0a9040e2d":
{
"1": "0.24966522"
},
"b5c98235-c75c-41a4-aced-2a38c70a3866":
{
"1": "0.4457339"
},
"85bbb406-810e-4062-8a9f-c7b636cb61bd":
{
"1": "0.24981162"
}
}
}
]
HTTP/1.1 201 Created
Updating a measurement does always affect the whole measurement. This means that you must send the whole measurement, including attributes and values, in the request body. The server then deletes the old measurement and creates the new one in a single transaction.
PUT /dataServiceRest/measurements HTTP/1.1
[
{
"uuid": "4b59cac7-9ecd-403c-aa26-56dd25892421",
"partUuid": "e42c5327-6258-4c4c-b3e9-6d22c30938b2",
"attributes": {
"4": "2015-03-09T19:12:00Z",
"6": "2",
"7": "0",
"8": "1"
}
"characteristics":
{
"360f55e5-77c3-49f9-9a5e-80d0a9040e2d":
{
"1": "0.24966522"
},
"b5c98235-c75c-41a4-aced-2a38c70a3866":
{
"1": "0.4467339"
},
"85bbb406-810e-4062-8a9f-c7b636cb61bd":
{
"1": "0.25981162"
}
}
}
]
HTTP/1.1 200 OK
Measurements do always belong to a single inspection plan part. Depending on the purpose, the measured values are included within a measurement or not. Each measurement has the following properties:
Property | Description |
---|---|
Guid uuid |
Identifies the measurement uniquely. |
Guid partUuid |
The uuid of the part the measurement belongs to. |
Attribute[] attributes |
A set of attributes which specifies this measurement. |
DateTime lastModified |
Contains the date and time of the last update applied to this measurement. |
DataCharacteristic[] characteristics |
An array of the characteristics which has been measured within the measurement. Each characteristic within this array consits of the uuid it is identified by and an array of attributes which include at least the measured value attribute. |