Home > Web Services > ‘Hello, World’ with ConnectPro Web Services

‘Hello, World’ with ConnectPro Web Services

Here’s a simple little example on how to get started using ConnectPro web services.     The purpose of this is to just get you used to the syntax of a ConnectPro web service request:

1. Creating a user

http://www.connectbyexample.com/api/xml?action=principal-update&first-name=Foo&last-name=Bar&email=foo.bar@connectbyexample.com&type=user&has-children=false

You should see the following response:

<results>
<status code=”ok”/>
<results>

2. Creating a meeting

http://www.connectbyexample.com/api/xml?action=sco-update&type=meeting&name=Hello%20World&folder-id=12345

You will have to substitute www.connectbyexample.com with the FQDN of your ConnectPro server, of course.

You should see the following response:

<results>
<status code=”ok”/>
<sco icon=”meeting” account-id=”725968704″ folder-id=”725968722″ sco-id=”931611303″ type=”meeting” lang=”en” version=”0″>
<url-path>/r10992688/</url-path>
<name>Hello World</name>
</sco>
</results>

Some things you may have noticed:

1. ConnectPro objects are very generic. SCOs (Shareable Content Objects because CP had its roots in e-learning) can be anything from a meeting to a course to a curriculum.  This is your swiss-army do-it-all XML API!   You’ll have to always pass in the type to create the type of SCO that you want.   It’s the same thing with principals, which can be groups or users.

2. ConnectPro always responds with a status code and a payload. ConnectPro includes informative status codes such as ‘ok’, ‘invalid’, ‘no-access’, etc.  You should become familiar with these status codes since it contains information that you can use to form a meaningful error message to your end users.   The payload will vary depending on whether or not your creating, updating or listing objects.

Categories: Web Services Tags:
  1. No comments yet.
  1. No trackbacks yet.