Jump to: navigation, search

Difference between revisions of "UBIK Content Web Service"


m
 
(10 intermediate revisions by 2 users not shown)
Line 1: Line 1:
===IIS Configuration===
+
[[File:IC_Content_Service_01.png|thumb|220px|Content Service]]
* In the Application Pool that runs the service, set the Advanced Setting "Load User Profile" to true
+
== Web Service Interface ==
 +
The following list of members is supported, where more detailed information and a comprehensive list of all members and data types are located in the {{UBIK}} class documentation.{{Version/ServerSince|3.0}}
  
===WebService methods===
+
<syntaxhighlight lang="csharp">
*ContextDefinitions[] GetContexts (applicationID)
+
/// <summary>
Delivers a list of all useable Context objects for the given ApplicationID.
+
/// Uploads the given stream and saves it as a file
*DataShipment[] GetInfraStructure(deviceID, applicationID, contextID)
+
/// </summary>
Delivers a list of basic content objects needed to be updated for the given application and given context on the given device (e.g. a list of all TAG objects incl. properties that changed since the last infrastructure update).
+
/// <param name="stream">The stream.</param>
*DataShipment[] GetDefaultInfraStructure(deviceID, applicationID)
+
/// <returns></returns>
Delivers a list of basic content objects needed to be updated for the given application and its default context on the given device (e.g. a list of all TAG objects incl. properties that changed since the last infrastructure update).
+
UBIK.Service.BCDataShipment UploadFile(Stream stream);
*DataShipment GetContent (id, context, lock)
+
 
Delivers a content object with the given primary key (id). The scope defines the collection of properties that are delivered together with the content object. If the lock parameter is false, only read access is granted, if the lock parameter is true, the system grants write access for the given content object (all properties for the given context are marked as locked on the server side).
+
/// <summary>
*ids[] GetNextContentLevelIds (contextID, ownerID)
+
/// Provides a stream to the document referenced by the contentId.
Delivers a list of the ids for the next viewLevel for the given owner object.  
+
/// </summary>
*DataShipment[] GetNextContentLevel (contextID, ownerID)
+
/// <param name="appName">Name of the application</param>
Delivers a list of content objects for the next content level in the given context (uses the view of the context) for the given owner object. The context defines scope the collection of properties that are delivered together with the content object. Only read access is granted.
+
/// <param name="contextName">Name of the context</param>
*UpdateContentClass(ContractID, ID, dataobject)
+
/// <param name="documentId">ID of the document content object</param>
Updates the content with the given ID. To perform an update a valid contractID is necessary. After a successful update the contractID looses its validity.
+
/// <param name="authentication">authentication (tokenid) for the user/device to access this service</param>
*DataShipment CreateNewContent(contextID, contentID)
+
/// <param name="version">Version of the data contract</param>
Creates a new updateable (incl. valid data contract) content record. This record is sent back to the client and can be updated via UpdateContentClass.
+
/// <returns>A stream to the document</returns>
 +
Stream DownloadDocumentV212(string appName, string contextName, string documentId, string authentication, string version);
 +
 
 +
/// <summary>
 +
/// Delivers a list of all defined MetaClass Objects for the given Application and the given DeviceID
 +
/// </summary>
 +
/// <param name="appName">Name of the Application</param>
 +
/// <param name="contextName">Name of the Context</param>
 +
/// <param name="authentication">authentication (tokenid) for the user/device to access this service</param>
 +
/// <param name="version">Version of the data contract</param>
 +
/// <returns>a list of MetaDefinitions</returns>
 +
UBIK.Service.BCMetaDefinitions GetMetaDefinitionsV212(String appName, String contextName, string authentication, string version);
 +
 
 +
/// <summary>
 +
/// Gets the hierarchy deltas
 +
/// </summary>
 +
/// <param name="appName">Name of the application.</param>
 +
/// <param name="contextName">Name of the context.</param>
 +
/// <param name="args">The arguments.</param>
 +
/// <param name="authentication">The authentication.</param>
 +
/// <param name="version">The version of the data contract.</param>
 +
/// <returns></returns>
 +
UBIK.Service.DTO.V211.BCHierarchyDeltaShipments GetHierarchyDeltasV212(string appName, string contextName, HierarchyDeltaArguments args, String authentication, string version);
 +
 
 +
/// <summary>
 +
/// Updates the content list.
 +
/// </summary>
 +
/// <param name="appName">Name of the application.</param>
 +
/// <param name="contextName">Name of the context.</param>
 +
/// <param name="authentication">The authentication.</param>
 +
/// <param name="dataShipments">The data shipments.</param>
 +
/// <param name="version">The version of the data contract.</param>
 +
/// <returns></returns>
 +
UBIK.Service.BCDataShipments UpdateContentListV212(string appName, string contextName, string authentication, UbikContent[] dataShipments, string version);
 +
 
 +
/// <summary>
 +
/// Creates the single content V212.
 +
/// </summary>
 +
/// <param name="appName">Name of the application.</param>
 +
/// <param name="contextName">Name of the context.</param>
 +
/// <param name="ownerID">The owner identifier.</param>
 +
/// <param name="authentication">The authentication.</param>
 +
/// <param name="dataShipment">The data shipment.</param>
 +
/// <param name="version">The version of the data contract.</param>
 +
/// <returns></returns>
 +
UBIK.Service.BCDataShipment CreateSingleContentV212(string appName, string contextName, string ownerID, string authentication, UbikContent dataShipment, string version);
 +
 
 +
/// <summary>
 +
/// Provides a Testaccess to GetHierarchyDeltas.
 +
/// args must be either ("root", "infra" or a valid UID of the start object)
 +
/// </summary>
 +
/// <param name="appName">Name of the application.</param>
 +
/// <param name="contextName">Name of the context.</param>
 +
/// <param name="args">The arguments as string parameter.</param>
 +
/// <param name="childDepth">child depth as string</param>
 +
/// <param name="parentDepth">parent depth as string</param>
 +
/// <param name="authentication">The authentication.</param>
 +
/// <param name="version">The version of the data contract.</param>
 +
/// <returns></returns>
 +
UBIK.Service.DTO.V211.BCHierarchyDeltaShipments DebugHierarchyDeltas(string appName, string contextName, string args, string childDepth, string parentDepth, string authentication, string version);
 +
 
 +
/// <summary>
 +
/// Gets the live values.
 +
/// </summary>
 +
/// <param name="appName">Name of the application.</param>
 +
/// <param name="contextName">Name of the context.</param>
 +
/// <param name="args">The arguments.</param>
 +
/// <param name="authentication">The authentication.</param>
 +
/// <param name="version">The version.</param>
 +
/// <returns></returns>
 +
UBIK.Service.DTO.V244.BCLiveValues GetLiveValues(string appName, string contextName, PropertyKey[] args, string authentication, string version);
 +
 
 +
/// <summary>
 +
/// Delivers info about the current status of the Live Value Server.
 +
/// </summary>
 +
/// <param name="token">authentication token</param>
 +
string GetLiveValueServerStatus(string token);
 +
 
 +
/// <summary>
 +
/// Starts a diagnosis of the web service infrastructure and delivers the result as SystemDiagnosisResult object.
 +
/// </summary>
 +
/// <param name="authentication">The authentication.</param>
 +
/// <param name="version">The version.</param>
 +
/// <returns></returns>
 +
UBIK.Service.DTO.V243.SystemDiagnosisResult SystemDiagnosis(string authentication, string version);
 +
 
 +
/// <summary>
 +
/// Uploads a document for diagnosis issues
 +
/// </summary>
 +
/// <param name="stream">The stream.</param>
 +
/// <returns></returns>
 +
UBIK.Service.BroadcastEnvelope UploadDocumentDiagnosis(Stream stream);
 +
 
 +
/// <summary>
 +
/// Downloads a document for diagnosis issues
 +
/// </summary>
 +
/// <param name="fileExtension">The file extension.</param>
 +
/// <param name="authentication">The authentication.</param>
 +
/// <param name="version">The version.</param>
 +
/// <returns></returns>
 +
Stream DownloadDocumentDiagnosis(string fileExtension, string authentication, string version);
 +
 
 +
/// <summary>
 +
/// Delivers a collection of all configured service urls for diagnosis issues
 +
/// </summary>
 +
/// <param name="authentication">The authentication.</param>
 +
/// <param name="version">The version.</param>
 +
/// <returns></returns>
 +
UBIK.Service.DTO.V243.ServiceURLInformation[] ServiceURLDiagnosis( string authentication, string version);
 +
 
 +
/// <summary>
 +
/// Gets information abut the state of view cache.
 +
/// </summary>
 +
/// <param name="appName">Name of the application.</param>
 +
/// <param name="contextName">Name of the context.</param>
 +
/// <param name="authentication">The authentication.</param>
 +
/// <returns>Information about the state of the view cache as human readable string</returns>
 +
string GetViewStateInformation(string appName, string contextName, string authentication);
 +
 
 +
/// <summary>
 +
/// Triggers a refresh of the view cache.
 +
/// The current cache stays valid until the new cache was fully built.
 +
/// </summary>
 +
/// <param name="appName">Name of the application.</param>
 +
/// <param name="contextName">Name of the context.</param>
 +
/// <param name="authentication">The authentication.</param>
 +
/// <returns>true as the refresh was triggered successfully, false otherwise</returns>
 +
bool TriggerViewStateRefresh(string appName, string contextName, string authentication);
 +
 
 +
/// <summary>
 +
/// Test member for testing the View Cache.
 +
/// </summary>
 +
/// <param name="appName">Name of the application.</param>
 +
/// <param name="contextName">Name of the context.</param>
 +
/// <param name="ownerUID">UID of the object the test should be executed for (e.g. root object). All data below this object will be delivered.</param>
 +
/// <param name="authentication">The authentication.</param>
 +
/// <returns>data stored in the view cache as BCHierarchyDeltaShipments</returns>
 +
UBIK.Service.DTO.V211.BCHierarchyDeltaShipments TestViewState(string appName, string contextName, string ownerUID, string authentication);
 +
 
 +
/// <summary>
 +
/// Downloads the custom images.
 +
/// </summary>
 +
/// <param name="appName">Name of the application.</param>
 +
/// <param name="contextName">Name of the context.</param>
 +
/// <param name="authentication">The authentication.</param>
 +
/// <param name="deviceID">The device identifier.</param>
 +
/// <returns></returns>
 +
Stream DownloadCustomImages(string appName, string contextName, string authentication, string deviceID);
 +
 
 +
</syntaxhighlight>
 +
 
 +
[[Category:Web service|Setup UBIK WebServices]]

Latest revision as of 15:16, 2 May 2016

Content Service

Web Service Interface

The following list of members is supported, where more detailed information and a comprehensive list of all members and data types are located in the UBIK® class documentation.

/// <summary>
/// Uploads the given stream and saves it as a file
/// </summary>
/// <param name="stream">The stream.</param>
/// <returns></returns>
UBIK.Service.BCDataShipment UploadFile(Stream stream);

/// <summary>
/// Provides a stream to the document referenced by the contentId.
/// </summary>
/// <param name="appName">Name of the application</param>
/// <param name="contextName">Name of the context</param>
/// <param name="documentId">ID of the document content object</param>
/// <param name="authentication">authentication (tokenid) for the user/device to access this service</param>
/// <param name="version">Version of the data contract</param>
/// <returns>A stream to the document</returns>
Stream DownloadDocumentV212(string appName, string contextName, string documentId, string authentication, string version);

/// <summary>
/// Delivers a list of all defined MetaClass Objects for the given Application and the given DeviceID
/// </summary>
/// <param name="appName">Name of the Application</param>
/// <param name="contextName">Name of the Context</param>
/// <param name="authentication">authentication (tokenid) for the user/device to access this service</param>
/// <param name="version">Version of the data contract</param>
/// <returns>a list of MetaDefinitions</returns>
UBIK.Service.BCMetaDefinitions GetMetaDefinitionsV212(String appName, String contextName, string authentication, string version);

/// <summary>
/// Gets the hierarchy deltas
/// </summary>
/// <param name="appName">Name of the application.</param>
/// <param name="contextName">Name of the context.</param>
/// <param name="args">The arguments.</param>
/// <param name="authentication">The authentication.</param>
/// <param name="version">The version of the data contract.</param>
/// <returns></returns>
UBIK.Service.DTO.V211.BCHierarchyDeltaShipments GetHierarchyDeltasV212(string appName, string contextName, HierarchyDeltaArguments args, String authentication, string version);

/// <summary>
/// Updates the content list.
/// </summary>
/// <param name="appName">Name of the application.</param>
/// <param name="contextName">Name of the context.</param>
/// <param name="authentication">The authentication.</param>
/// <param name="dataShipments">The data shipments.</param>
/// <param name="version">The version of the data contract.</param>
/// <returns></returns>
UBIK.Service.BCDataShipments UpdateContentListV212(string appName, string contextName, string authentication, UbikContent[] dataShipments, string version);

/// <summary>
/// Creates the single content V212.
/// </summary>
/// <param name="appName">Name of the application.</param>
/// <param name="contextName">Name of the context.</param>
/// <param name="ownerID">The owner identifier.</param>
/// <param name="authentication">The authentication.</param>
/// <param name="dataShipment">The data shipment.</param>
/// <param name="version">The version of the data contract.</param>
/// <returns></returns>
UBIK.Service.BCDataShipment CreateSingleContentV212(string appName, string contextName, string ownerID, string authentication, UbikContent dataShipment, string version);

/// <summary>
/// Provides a Testaccess to GetHierarchyDeltas.
/// args must be either ("root", "infra" or a valid UID of the start object)
/// </summary>
/// <param name="appName">Name of the application.</param>
/// <param name="contextName">Name of the context.</param>
/// <param name="args">The arguments as string parameter.</param>
/// <param name="childDepth">child depth as string</param>
/// <param name="parentDepth">parent depth as string</param>
/// <param name="authentication">The authentication.</param>
/// <param name="version">The version of the data contract.</param>
/// <returns></returns>
UBIK.Service.DTO.V211.BCHierarchyDeltaShipments DebugHierarchyDeltas(string appName, string contextName, string args, string childDepth, string parentDepth, string authentication, string version);

/// <summary>
/// Gets the live values.
/// </summary>
/// <param name="appName">Name of the application.</param>
/// <param name="contextName">Name of the context.</param>
/// <param name="args">The arguments.</param>
/// <param name="authentication">The authentication.</param>
/// <param name="version">The version.</param>
/// <returns></returns>
UBIK.Service.DTO.V244.BCLiveValues GetLiveValues(string appName, string contextName, PropertyKey[] args, string authentication, string version);

/// <summary>
/// Delivers info about the current status of the Live Value Server.
/// </summary>
/// <param name="token">authentication token</param>
string GetLiveValueServerStatus(string token);         

/// <summary>
/// Starts a diagnosis of the web service infrastructure and delivers the result as SystemDiagnosisResult object.
/// </summary>
/// <param name="authentication">The authentication.</param>
/// <param name="version">The version.</param>
/// <returns></returns>
UBIK.Service.DTO.V243.SystemDiagnosisResult SystemDiagnosis(string authentication, string version);            

/// <summary>
/// Uploads a document for diagnosis issues
/// </summary>
/// <param name="stream">The stream.</param>
/// <returns></returns>
UBIK.Service.BroadcastEnvelope UploadDocumentDiagnosis(Stream stream);         

/// <summary>
/// Downloads a document for diagnosis issues
/// </summary>
/// <param name="fileExtension">The file extension.</param>
/// <param name="authentication">The authentication.</param>
/// <param name="version">The version.</param>
/// <returns></returns>
Stream DownloadDocumentDiagnosis(string fileExtension, string authentication, string version);         

/// <summary>
/// Delivers a collection of all configured service urls for diagnosis issues
/// </summary>
/// <param name="authentication">The authentication.</param>
/// <param name="version">The version.</param>
/// <returns></returns>
UBIK.Service.DTO.V243.ServiceURLInformation[] ServiceURLDiagnosis( string authentication, string version);             

/// <summary>
/// Gets information abut the state of view cache.
/// </summary>
/// <param name="appName">Name of the application.</param>
/// <param name="contextName">Name of the context.</param>
/// <param name="authentication">The authentication.</param>
/// <returns>Information about the state of the view cache as human readable string</returns>
string GetViewStateInformation(string appName, string contextName, string authentication);             

/// <summary>
/// Triggers a refresh of the view cache.
/// The current cache stays valid until the new cache was fully built.
/// </summary>
/// <param name="appName">Name of the application.</param>
/// <param name="contextName">Name of the context.</param>
/// <param name="authentication">The authentication.</param>
/// <returns>true as the refresh was triggered successfully, false otherwise</returns>
bool TriggerViewStateRefresh(string appName, string contextName, string authentication);               

/// <summary>
/// Test member for testing the View Cache.
/// </summary>
/// <param name="appName">Name of the application.</param>
/// <param name="contextName">Name of the context.</param>
/// <param name="ownerUID">UID of the object the test should be executed for (e.g. root object). All data below this object will be delivered.</param>
/// <param name="authentication">The authentication.</param>
/// <returns>data stored in the view cache as BCHierarchyDeltaShipments</returns>
UBIK.Service.DTO.V211.BCHierarchyDeltaShipments TestViewState(string appName, string contextName, string ownerUID, string authentication);             

/// <summary>
/// Downloads the custom images.
/// </summary>
/// <param name="appName">Name of the application.</param>
/// <param name="contextName">Name of the context.</param>
/// <param name="authentication">The authentication.</param>
/// <param name="deviceID">The device identifier.</param>
/// <returns></returns>
Stream DownloadCustomImages(string appName, string contextName, string authentication, string deviceID);