Customer Portal Integration Guide
Guidance for integrating your application with the Red Hat Customer Portal
Abstract
1. Introduction
2. Clients
|
Client
|
Platform/Environment
|
Comments
|
|---|---|---|
|
cURL [a]
|
Command Line (Linux, UNIX, Mac OS X, Microsoft Windows)
|
Easy and transparent way to test commands and do simple integration
|
|
Apache HTTP Client [b]
|
Java
|
Most common Java library with which to talk HTTP; offers little semantic value beyond simple HTTP; no intrinsic binding of XML
|
|
RESTeasy Client [c]
|
Java
|
Full Java model integration; no need to think about HTTP or XML; uses Apache HTTP Client underneath
|
3. Common Usage
man curl.
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
A. Revision History
| Revision History | |||
|---|---|---|---|
| Revision 2.0-1.400 | 2013-12-18 | ||
| |||
| Revision 2.0-1 | Fri Nov 1 2013 | ||
| |||
| Revision 0.0-0 | Tue Sep 24 2013 | ||
| |||
