Before attempting to write a program that makes calls to the IBM® Connections Atom APIs, test the syntax you are using to specify the resources and parameters in your requests. You can do this using one of the following tools:
Enables you to send GET requests and perform searches.
HTTP request generation tool
Enables you to create and edit content in addition to performing searches and sending GET requests.
Use one or both of these tools to save time by testing your syntax before you tackle the added complications of programming an application.
Retrieve information from the IBM Connections applications in Atom format. To do so, complete the following steps:
- Open a standard web browser.
- Access the IBM Connections application from which you want to retrieve information.
- Authenticate with the application by providing a user name and password. If you are not asked to authenticate with the application immediately, perform an operation that forces you to authenticate. For example, do the following actions:
- Blogs: Click the My Blog tab.
- Bookmarks: Click the My Bookmarks tab.
- Communities: Click the My Communities tab.
- Profiles: Click the My Profile tab.
- Type a request into the browser's address or location field, and then submit it. For example, you can type one of the following requests:
5. If the server returns a readable web page and you want to see the XML source, right-click the page and select the option to view the page source.
- Activities: To search for all complete activities that you belong to, type the following URL:
- Blogs: To return all of the comments added to a blog, open the blog, and then add feed/comments/atom to the end of the blog's URL. For example:
- Bookmarks: To retrieve a list of popular bookmarks, type the following URL:
- Communities: To return a list of all your communities, type the following URL:
- Home page: To search an application, such as Forums, for content that you have access to which contains the word blue, type the following URL:
- Profiles: To search for a person's report-to chain, type the following URL:
The server returns the results. If the server returns a readable web page and you want to see the XML source, right-click the page and select the option to view the page source.
HTTP request generation tool
An example of a HTTP request generation tool is cURL. Using cURL and tools like it, you can quickly send requests and see what is returned.
There is no requirement that you install cURL. You can use whichever HTTP generation tool that you prefer. This tool is one example of the many tools available that can help new users get started with Atom. For more information about cURL, go to the following external web site:
todos?sortfields=LASTMOD&sortorder=0" -u Amy_Jones@us.example.com -k -L -v
curl POST --post301 --post302 --data "@myPost.xml" --header "Content-Type: application/atom+xml"
"https://blogs.enterprise.example.com:9443/blogs/idwriter/api/entries" -u Amy_Jones@us.example.com -k -L -v
curl -X POST --post301 --post302 --header "Content-Type: application/atom+xml" --data "@approveEntry.xml" -k -L -v
"http://enterprise.example.com/blogs/home/api/actions/approval/entries" -u email@example.com
curl "http://dogear.enterprise.example.com:9084/dogear/api/app" -L
-u Suzy_Jones@us.example.com -k -v -o bookmarksServiceDoc.xml
topicUuid=3FEG09211E190EE3AA197D8D1BABJA000001" -u Amy_Jones@us.example.com -k
-L -v -o getForumTopic.xml
curl -X DELETE "https://enterprise.example.com/communities/service/atom/community/instance?
communityUuid=f6ea747a-c82e-493a-a8dd-61ed573a09bb" -u firstname.lastname@example.org -k -v -L
curl "http://files.enterprise.example.com/files/basic/api/myuserlibrary/feed" -u email@example.com
-k -v -L -o MyFileLibrary.xml
curl "http://forums.enterprise.example.com/forums/atom/forums" -v -L -o AllForums.xml
curl "http://news.enterprise.example.ibm.com/news/atom/stories/top" -u firstname.lastname@example.org -k -v
-L -o newsTopStories.xml
-u Suzy_Jones@us.example.com -k -L -v -o
-u Amy_Jones@us.example.com -k -L -v -o getSmithProfiles.xml
curl "http://wikis.enterprise.example.com/wikis/basic/api/mywikis/feed" -u email@example.com
-k -v -L -o MyWikis.xml
Many operations, such as entry updates, require authentication by default. In addition, if the IBM
Connections administrator configures the servers to force authentication, all operations will first require you to authenticate.
Try out these sample applications to see the APIs in action.
- To search all of your to-do items, and then order the returned Atom content to display the most recently modified to-do items first and write them to a file named getOrderedTodos.xml, you could use the following cURL command:
- To create a blog post, you could define the blog post entry in a file called myPost.xml, and then use the following cURL command to post it to the edit href of the weblog entries feed for your blog:
- To approve a blog entry awaiting approval before it can be posted, define the action you want to take in a file called acceptEntry.xml, and then use the following cURL command to post it to the moderation action feed:
- To retrieve the Bookmarks service document and write it to a file called bookmarksServiceDoc.xml, you could use the following cURL command:
- To retrieve a forum topic from a community, you would retrieve the forum topics feed, and then use the following cURL command to retrieve one topic from the feed and write it to a file called getForumTopic.xml:
- To delete a community, retrieve the resource URL for the community that you want to delete by getting the service document. From the service document, determine the URL for the My Communities collection. Retrieve the My Communities feed and find the community you want to remove. Look for the URL in the href attribute of the <link rel="edit"> element and send a DELETE request to that URL. For example:
- To retrieve a feed of your files, you could use the following cURL command:
- To retrieve a feed of all forums, you could use the following cURL command:
- To retrieve a feed of the top news stories, you could use the following cURL command:
- To search IBM Connections for all content that contains the term "Red Sox" and write the content to a file named searchForRedSox.xml, you could use the following cURL command:
- To search all profiles for users with the name Smith and write the returned Atom content to a file named getSmithProfiles.xml, you could use the following cURL command:
- To retrieve a feed of your wikis, you could use the following cURL command: