Jump to: navigation, search

Difference between revisions of "UBIK Web Service"


Line 742: Line 742:
 
                   BodyStyle = WebMessageBodyStyle.Bare,
 
                   BodyStyle = WebMessageBodyStyle.Bare,
 
                   ResponseFormat = WebMessageFormat.Json)]
 
                   ResponseFormat = WebMessageFormat.Json)]
 +
 
         BCDataShipments CheckOut(
 
         BCDataShipments CheckOut(
 
                             string appName,
 
                             string appName,
Line 776: Line 777:
 
string version = "362";
 
string version = "362";
  
         UbikContent updateContent = new UbikContent()
+
         UbikContent content = new UbikContent()
 
         {
 
         {
 
                 // reference to the MetaDefinition
 
                 // reference to the MetaDefinition
Line 787: Line 788:
 
 
 
BCDataShipments result = target.CheckOut(
 
BCDataShipments result = target.CheckOut(
appName,  
+
                              appName,  
contextName,  
+
                              contextName,  
authToken,  
+
                              authToken,  
                                                                        new UbikContent[] { updateContent },
+
                              new UbikContent[] { content },
version);
+
                              version);
 
</source>
 
</source>
  
Line 803: Line 804:
 
                   BodyStyle = WebMessageBodyStyle.Bare,
 
                   BodyStyle = WebMessageBodyStyle.Bare,
 
                   ResponseFormat = WebMessageFormat.Json)]
 
                   ResponseFormat = WebMessageFormat.Json)]
 +
 
         BCDataShipments Release(
 
         BCDataShipments Release(
 
                             string appName,
 
                             string appName,
Line 837: Line 839:
 
string version = "362";
 
string version = "362";
  
         UbikContent updateContent = new UbikContent()
+
         UbikContent content = new UbikContent()
 
         {
 
         {
 
                 // reference to the MetaDefinition
 
                 // reference to the MetaDefinition
Line 848: Line 850:
 
 
 
BCDataShipments result = target.Release(
 
BCDataShipments result = target.Release(
appName,  
+
                              appName,  
contextName,  
+
                              contextName,  
authToken,  
+
                              authToken,  
                                                                        new UbikContent[] { updateContent },
+
                              new UbikContent[] { content },
version);
+
                              version);
 
</source>
 
</source>
  

Revision as of 16:29, 4 April 2022

The following section describes the most important UBIK Webservice Methods used for

  • Fetching information about the Datamodell (Fetch MetaDefinitions)
  • Downloading Content objects (Download Content)
  • Downloading Content File Documents (Download Document)
  • Creating a single Content object (Create Content)
  • Updating Content objects (Update Contents)
  • Uploading a file Document (Upload Document )


[edit]

Fetch MetaDefinitions

Fetch MetaDefinitions

Provides the configured ACM (see Application Context Management) data model to the client.

        /// <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>
        /// <returns>a list of MetaDefinitions</returns>
        [OperationContract]
        [WebInvoke(UriTemplate = "GetMetaDefinitionsV212/{appName}/{contextName}/{authentication}/{version}", Method = "GET",
                   RequestFormat = WebMessageFormat.Json,
                   ResponseFormat = WebMessageFormat.Json)]
                                   
        BCMetaDefinitions GetMetaDefinitionsV212(
                                                        String appName,
                                                        String contextName,
                                                        String authentication,
                                                        String version);


List of Parameters

Name Type Description
appName String Name of the Application
contextName String Name of the Context
authentication String Valid auth token
version String Indicator of the expected data format version


Code Example (C#)

        string appName = "APP_TEST";
        string contextName = "CTX_TEST";
        string authToken = FetchValidAuthToken();
        string version = "263";

        UBIKContentClient target = new UBIKContentClient(WEBSERVER_NAME);
       
        BCMetaDefinitions metaDefintions = target.GetMetaDefinitionsV212(
                                                                        appName,
                                                                        contextName,
                                                                        authToken,
                                                                        version);