7 Replies Latest reply on Jun 26, 2012 3:06 PM by David_HDR

    MBSDK Documentation. Where?

    Apprentice

      Hello all,

       

      I am in search of some MBSDK documentation. for example, here is a description of the GetMachineData method exposed by the SDK.

       

      I have no idea what format ColumsDefXML should be in, nor can I find the documentation the message refers to.

       

      Does someone know or can you point me in the right direction? I've looked through the LDMS help doc and all other documents I can find.

       

      Thanks.

       

      GetMachineData

      GetMachineData returns data for the machine specified by the GUID. The ColumsDefXML parameter specifies the columns to return in a XML format. Refer to the documentation for the syntax.

        • 1. Re: MBSDK Documentation. Where?
          zman Master

          This came up in a discussion recently and there really is no up to date docs. there are however, some people here using the MBSDK that can probably help. My belief that the lack of docs will be taken care, however, I have no ETA.

          1 of 1 people found this helpful
          • 2. Re: MBSDK Documentation. Where?
            Apprentice

            Boo! Thanks Zman.

             

            Well, then, has anyone called the specific method I am referencing?

            • 3. Re: MBSDK Documentation. Where?
              zman Master

              Well I did some digging and found and old PDF from 8.6 - maybe this will help.

               

              Get Machine Data

              The Get Machine Data command returns data for the specified machine.

              USING THE MESSAGE-BASED SDK TO DRIVE LDMS FUNCTIONALITY

              Command: To write the Get Machine Data command to the queue, use the following tags:

              • Command: Identifies the message as a command.

              • InstanceId: An identifier for the message. This identifier can be up to 255 characters.

              • cmd: The case-sensitive command. In this case, GetMachineData.

              • cmddata: The argument for the function. In this case, it contains the GUID and

              ColumnDefXML tags.

              • GUID: Specifies the machine.

              • ColumnDefXML: Specifies the columns to return in XML format. This can be from one of

              two sources. You can either specify a saved column set name from the LDMS console,

              such as MyColumnSet, or you can embed XML that defines columns.

              Here is an example that uses a column set:

              <Command>

              <InstanceId>instid</InstanceId>

              <cmd>GetMachineData</cmd>

              <cmddata>

              <GUID>{CCC0C681-3B85-2743-9849-4B3EB08C8607}</GUID>

              <ColumnDefXML>MyColumnSet</ColumnDefXML>

              </cmddata>

              </Command>

              Here is an example that has embedded column definitions:

              <Command>

              <InstanceId>instid</InstanceId>

              <cmd>GetMachineData</cmd>

              <cmddata>

              <GUID>{CCC0C681-3B85-2743-9849-4B3EB08C8607}</GUID>

              <ColumnDefXML>

              <Columns>

              <Column>Computer."Device Name"</Column>

              <Column>Computer.ID</Column></Columns>

              </ColumnDefXML>

              </cmddata>

              </Command>

              Reply: Get Machine Data returns the value you passed in for InstanceId and the column names

              and values. For example:

              <?xml version="1.0" encoding="utf-8" ?>

              <DeviceDataList xmlns:xsd="http://www.w3.org/2001/XMLSchema"

              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

              xmlns="http://landesk.com/MBSDKService/MBSDK/">

              <InstanceId>instid</InstanceId>

              <count>3</count>

              <MachineData>

              <ValuePair>

              <Column>Computer."Device ID"</Column>

              <Value>{CCC0C681-3B85-2743-9849-4B3EB08C8607}</Value>

              </ValuePair>

              <ValuePair>

              <Column>Computer."Device Name"</Column>

              <Value>LSMAMTDEV</Value>

              </ValuePair>

              <ValuePair>

              <Column>Computer.Network.TCPIP.Address</Column>

              <Value>010.016.244.249</Value>

              </ValuePair>

              </MachineData>

              </DeviceDataList>

              LANDesk recommends that you use a unique identifier for each message in order to guarantee

              your ability to determine which message corresponds with which request.

               

               

               

              • 4. Re: MBSDK Documentation. Where?
                Apprentice

                Cool. That gives me something to try at least. I'll update when I have some news.

                • 5. Re: MBSDK Documentation. Where?
                  Apprentice

                  That looks like a winner, zMan

                   

                  for others, if you're using powershell to interact with the MBSDK, something like this will work

                   

                    $landeskService = New-WebServiceProxy -Uri $LANDesk_URI -UseDefaultCredential

                    $info = $landeskService.GetMachineData($GUID,'<Columns><Column>Computer."Device Name"</Column><Column>Computer.Description</Column></Columns>')

                   

                  $info will have a member called MachineData which is an array of the data you asked for. If $info.count is 0, you didn't get any data. There are no other return codes I can see from this member that would indicate why, but the most likely cause is a bad GUID or your column XML is broken

                  • 6. Re: MBSDK Documentation. Where?
                    zman Master

                    Glad it worked. Here is a doc on powershell and MBSDK http://community.landesk.com/support/docs/DOC-23776 just in case people find this post before the doc.

                    • 7. Re: MBSDK Documentation. Where?
                      Apprentice

                      Zman,

                       

                      Do you still have that 8.6 PDF around? I am looking for similar syntax information for the ListMachines call. Specifically WTF a BNF string looks like..