It is possible to fetch current supported interface version by calling service root uri.
Interface Information
Endpoints
Information about supported interface version can be fetched calling the root endpoint of DataService:
Get
/
Returns supported interface version for Raw Data Service
Example: Get interface version for Raw Data Service
Request
Response
Object Structure
Interface information returns the highest available minor version of each major version. This lets the user decide which features can be used.
As a minor version is backwards compatible to all previous minor versions, there is no point in enumerating them all. An user want to know which revision of each major version is available as that means they can work around possible bugs of older revisions.
Service Information
Endpoints
The service information can be fetched via the following endpoint. This endpoint doesn’t provide filter parameters.
Get
/serviceInformation
Returns general information about the raw data service
Example: Get service information for a given connection
Request
Response
Raw Data Information
Endpoints
You can can fetch information about raw data objects by using the following endpoints.
Get
/rawData/:entity
Returns a list of information entries for entities with type :entity
Returns a list of raw data file information entries for all entities with type :entity. You further have to and restrict the request to the entities’ uuids by adding the following uri parameter:
Parameter name
Description Example
uuids
Restricts the query to the entities identified by the given uuids. Entites of type ‘Value’ are identified by a compound key, which consists of the uuid of the measurement, ‘|’ and the characteristics uuid
Example: Get the information entries for several parts
Request
Response
Get
/rawData/:entity/:uuid
Returns a list of information entries for the entity with type :entity and guid :uuid
Example: Get the information entries for a certain part
Request
Response
Object Structure
The returned objects contains the following properties:
Property
Description
TargetEntity target
Specifies a concrete entity for a raw data object and consits of the entity’s type (Part, Characteristic, Measurement, Value) and guid. If raw data is attached to an entity of type Value, the uuid contains a compound key in the following format: {MeasurementUuid}|{CharacteristicUuid}
int key
This is a unique key that identifies this specific raw data object for a corresponding entity. An entity can have multiple raw data object that are distinct by this key.
string fileName
The filename of the raw data object. Please note that this filename is not unique (unlike filenames in traditional file systems).
string mimeType
The file’s mime type.
DateTime lastModified
The timestamp of the last modification of the corresponding raw data object
DateTime created
The timestamp of the creation of the corresponding raw data object
int size
The size of the raw data object in bytes
string md5
The MD5-Hash of the raw data object
Raw Data Objects
Endpoints
You can can fetch, create, update and delete raw data objects by using the following endpoints.
Get
/rawData/:entity/:uuid/:key
Returns the one specific file identified by :entity, :uuid and :key
The server caches raw data fetch requests. When you request a raw data file for the first time the response will contain the file itself and several HTTP headers. One of these headers is the ETag header. An ETag is a unique hash value to identify the file. It is a combination of the file’s MD5 checksum and the last modification date. If you send the ETag value in the If-None-Match header, the server can respond two different ways, depending in whether the file has been modified since the last request:
Not modified: The server will return a 304 - Not modified HTTP status code and the response body will be emtpy.
Modified: The server will return the file.
Example: Fetch raw data with key 0 for a part with the uuid b8f5d3fe-5bd5-406b-8053-67f647f09dc7
Request
Without Caching
With caching
Response
Modified
The requested raw data file
Not modified
Get
/rawData/:entity/:uuid/:key/thumbnail
Returns a preview image for the file identified by :entity, :uuid and :key.
Example: Fetch the thumbnail for the raw data object with key 1 which is attached to the part with the uuid b8f5d3fe-5bd5-406b-8053-67f647f09dc7
Request
Response
The requested thumbnail
Post
/rawData/:entity/:uuid/:key
Adds the transmitted file to the entity with type :entity and id :uuid
You can attach files to all entity types: parts, characteristics, measurements and measured values.
An add request consists of 3 mandatory parts:
The URL specifies which entity the file will be added to.
The request body contains the file itself.
The HTTP headers must provide meta information about the file, see below for details.
HTTP header variable
Description
Example Value
Content-Disposition
Includes the file name
“MetalPart.meshModel”
Content-Length
Includes the length in bytes
2090682
Content-MD5
Includes file’s MD5 hash sum
“bdf6b06ab301a80ae55021085b820393”
Content-Type
Includes file’s MIME type
“application/x-zeiss-piweb-meshmodel”
When adding a file, you can pass the desired file key as part of the uri. If you pass -1 or no key, the next available key will automatically assigned by the server. (recommended)
If you pass a key which is already assigned to another file, this file will be replaced.
Example: Add a raw data object to a part with the uuid b8f5d3fe-5bd5-406b-8053-67f647f09dc7
Request
Response
Put
/rawData/:entity/:uuid/:key
Replaces the file identified by :entity, :uuid and :key with the transmitted one
An update request consists of 3 mandatory parts:
The URL specifies the file to be replaced identified by :entity, :uuid and :key.
The request body contains the file itself.
The HTTP headers must provide meta information about the file, see below for details.
HTTP header variable
Description
Example Value
Content-Disposition
Includes the file name
“MetalPart.meshModel”
Content-Length
Includes the length in bytes
2090682
Content-MD5
Includes file’s MD5 hash sum
“bdf6b06ab301a80ae55021085b820393”
Content-Type
Includes file’s MIME type
“application/x-zeiss-piweb-meshmodel”
Example: Replace the raw data object with key 1 of the part with the uuid b8f5d3fe-5bd5-406b-8053-67f647f09dc7
Request
Response
Delete
/rawData/:entity/:uuid
Deletes all files for the entity identified by :entity and :uuid.
Example: Delete all raw data objects from the part with the uuid b8f5d3fe-5bd5-406b-8053-67f647f09dc7
Request
Response
Delete
/rawData/:entity/:uuid/:key
Deletes the file identified by :entity, :uuid and :key.
Example: Delete the raw data object with key 1 from the part with the uuid b8f5d3fe-5bd5-406b-8053-67f647f09dc7