4. Examples
Example 1. List Cases
$ curl https://api.access.redhat.com/rs/cases
Example 2. Filter by last update date
$ curl https://api.access.redhat.com/rs/cases?startDate=2010-01-01&endDate=2010-12-31
Example 3. List Case Comments
0000000 with the number of a case to which you have access.
$ curl https://api.access.redhat.com/rs/cases/0000000/comments
Example 4. Create a Case
RHEL 6 product using the default group, severity level, and type.
$ curl -X POST -H 'Content-Type: application/xml' --data
'<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<case xmlns="http://www.redhat.com/gss/strata">
<summary>Example Case</summary>
<description>Example created with cURL</description>
<product>Red Hat Enterprise Linux</product><version>6.0</version>
</case>'
https://api.access.redhat.com/rs/cases
Example 5. Update a Case
$ curl -X PUT -H 'Content-Type: application/xml' --data
'<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<case xmlns="http://www.redhat.com/gss/strata">
<product>GFS</product><version>6.0</version>
</case>'
https://api.access.redhat.com/rs/cases/0000000
Example 6. Escalate a Case for Management Attention
This will escalate a case for management attention:
$ curl -X PUT -H 'Content-Type: application/xml' --data
'<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<case xmlns="http://www.redhat.com/gss/strata">
<escalated>true</escalated>
</case>'
https://api.access.redhat.com/rs/cases/0000000
Example 7. Add a New Case Comment
$ curl -X POST -H 'Content-Type: application/xml' --data
'<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<comment xmlns="http://www.redhat.com/gss/strata">
<text>Test comment! This can contain lots of information, etc.</text>
</comment>'
https://api.access.redhat.com/rs/cases/0000000/comments
Example 8. Add a File Attachment to a Case
test.txt to case 0000000.
$ curl -X POST -F 'file=@test.txt' https://api.access.redhat.com/rs/cases/0000000/attachments

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.