Editing Atom collections using a web client
Use a web client that can make HTTP GET, POST, PUT, and DELETE requests to read, create, edit, and delete entries in your Atom collection.
Before you begin
CICS® provides a sample Atom collection supported by a mashup web page that lets you make web client requests for the collection, and view the requests and responses. To see how web clients can edit Atom collections in CICS, set up and use the sample Atom collection following the instructions in Atom feed sample programs
About this task
Many free or commercially available web client applications can make HTTP GET requests to obtain and display Atom feeds or collections. However, not all these web clients can also make HTTP POST, PUT, and DELETE requests to edit the Atom entries. Check that the application is specifically described as supporting the Atom Publishing Protocol, not just the Atom format. If you have a web client with this capability, consult the documentation for the client to read about the process for making the requests and viewing the responses. The web client can interact with CICS as it does with any server that supports the Atom Publishing Protocol, with the exception of certain functions listed in Administering Atom feeds and Atom collections.
If you do not have a web client application that specifically supports POST, PUT, and DELETE requests for Atom entries, you can use a web client application that lets you compose and send your own HTTP requests and view the responses. You can also write your own web client applications to make POST, PUT, and DELETE requests to Atom collections. For instructions to make web client requests from a CICS application, see Providing credentials for basic authentication.
If you are writing your own web client application to edit an Atom collection, or if you are composing your own HTTP requests in a suitable web client, make the requests following the steps described here. For details of the protocol for interacting with Atom entries in a collection, see RFC 5023 The Atom Publishing Protocol. For details of the protocol for making HTTP requests, see RFC 2616 Hypertext Transfer Protocol -- HTTP/1.1.
Your collection should have security measures in place to control web client access. These instructions assume that the web client that you are using has full access to read and modify the Atom entries. For Atom feeds and collections served from CICS, you can allow some web clients to have read-only access to the items so that they can make only HTTP GET requests, but other web clients can have UPDATE access so that they can also make HTTP POST, PUT, and DELETE requests. If your web client does not have the correct access to carry out an action on the collection, CICS returns an HTTP error response with the status code 403 (Forbidden). For more information about security for Atom feeds and collections, see Security for Atom feeds.
Procedure
- If you do not know the URL of the collection that you want
to edit, or you are writing an application that can handle multiple
collections, first make an HTTP GET request for the Atom service document
that you set up in Creating an Atom service document.
The Atom service document lists the URLs of the collections that are available on the server.You can also check the possible categories for entries in the collection, which are listed either in the service document or in a separate category document.
- To obtain a list of the existing Atom entries in the collection,
make an HTTP GET request to the URL of the collection, following the
instructions in Making GET requests to Atom feeds or collections.
These instructions also apply to GET requests to an Atom feed that is not defined as a collection.
- To obtain an individual Atom entry from the collection,
make an HTTP GET request to the URL of the Atom entry, following the
instructions in Making GET requests to Atom feeds or collections.
These instructions also apply to GET requests to an Atom feed that is not defined as a collection.
- To create a new Atom entry in the collection, make an HTTP POST request to the URL of the collection, following the instructions in Making POST requests to Atom collections.
- To edit an existing Atom entry in the collection, make an HTTP PUT request to the URL of the Atom entry, following the instructions in Making PUT requests to Atom collections.
- To delete an existing Atom entry from the collection, make an HTTP DELETE request to the URL of the Atom entry, following the instructions in Making DELETE requests to Atom collections