Siebel Application Integration for Oracle Fusion Middleware Guide > Working with Siebel RESTful Services >

Sample URIs for Siebel RESTful Services


Table 8 provides sample Uniform Resource Identifiers (URIs) that you can use for working with Siebel RESTful Services.

Table 8. Sample URIs
Task
HTTP
Request
Type
Sample URI

Determine REST server is up

GET

http://weblogic_server_IP:port/oracle-crm/api/rest/siebel/heartbeat

The response you want is: The REST server is alive.

To invoke query operations

GET

To query by row ID:

http://weblogic_server_IP:port/oracle-crm/api/rest/siebel/JNDI_ra_name/IO_name/ID

The response is XML output for all of the fields that are defined and active in the integration component for that particular record.

NOTE:  The query by row ID HTTP request is the same as that used for the delete operation, however, the HTTP request type for the delete operation is DELETE, not GET.

POST

To query by example:

http://weblogic_server_IP:port/oracle-crm/api/rest/siebel/JNDI_ra_name/IO_name/query

Sample request XML:

<?xml version = '1.0' encoding = 'utf-8'?>

<SiebelREST>

<ListOfAccount_EMR>

<Account>

<Name>A*</Name>

</Account>

</ListOfAccount_EMR>

</SiebelREST>

NOTE:  All requests with POST HTTP request type are either insert or upsert operations.

To invoke query operations (CONTINUED)

GET

To query by search spec:

http://weblogic_server_IP:port/oracle-crm/api/rest/siebel/JNDI_ra_name/IO_name?searchexpr=[IntCompName.IntCompFieldName] LIKE 'A*'

To invoke delete operation

DELETE

To delete by row ID:

http://weblogic_server_IP:port/oracle-crm/api/rest/siebel/JNDI_ra_name/IO_name/<ID>

Sample response XML:

<?xml version = '1.0' encoding = 'utf-8'?>

<SiebelREST>

<ErrorCode>0x0</ErrorCode>

<ListOfAccountAttOrderAtt>

<Account/>

</ListOfAccountAttOrderAtt>

</SiebelREST>

TIP:   ErrorCode 0x0 indicates that the deletion operation was successful.

NOTE:  The delete HTTP request is the same as that used for the query by row ID operation, however, the HTTP request type for the query by row ID operation is GET, not DELETE. Additionally, the XML returned by the DELETE operation is similar to that of an update-insert-upsert operation.

To invoke insert operation

POST

http://weblogic_server_IP:port/oracle-crm/api/rest/siebel/JNDI_ra_name/IO_name?updatemode=insert

Sample request XML:

<?xml version="1.0" encoding="ISO-8859-1"?>

<SiebelREST>

<ListOfAccountAttOrderAtt>

<Account>

<Name>AttachAbhishek36</Name>

<Location>HeadQuarter</Location>

<Currency_0x20_Code>BRL</Currency_0x20_Code>

<Primary_0x20_Organization>Default Organization</Primary_0x20_Organization>

</Account>

</ListOfAccountAttOrderAtt>

</SiebelREST>

After performing this insert operation, the resultant XML specifies the new row ID that was created as a result of the insert operation.

Sample response XML:

<?xml version = '1.0' encoding = 'utf-8'?>

<SiebelREST> <ErrorCode>0x0</ErrorCode>

<PrimaryRowId>42-JIMUV</PrimaryRowId>

<ListOfAccountAttOrderAtt>

<Account> <Name>AttachAbhishek36</Name>

<Location>HeadQuarter</Location>

<Currency_0x20_Code>BRL</Currency_0x20_Code>

<Primary_0x20_Organization>Default Organization</Primary_0x20_Organization>

</Account> </ListOfAccountAttOrderAtt>

</SiebelREST>

To invoke upsert operation

POST

http://weblogic_server_IP:port/oracle-crm/api/rest/siebel/JNDI_ra_name/IO_name?updatemode=upsert

Sample request XML:

<?xml version="1.0" encoding="ISO-8859-1"?>

<SiebelREST>

<ListOfAccountAttOrderAtt>

<Account>

<Name>InsertAccount1</Name>

<Location>HeadQuarter</Location>

<Currency_0x20_Code>USD</Currency_0x20_Code>

<Primary_0x20_Organization>Default Organization</Primary_0x20_Organization>

</Account>

</ListOfAccountAttOrderAtt>

</SiebelREST>

To fetch schema of a repository object

GET

http://weblogic_server_IP:port/oracle-crm/api/rest/siebel/JNDI_ra_name/IO_name/schema

To retrieve attachments

POST

http://weblogic_server_IP:port/oracle-crm/api/rest/siebel/JNDI_ra_name/IO_name?updatemode=insert

Make sure that the integration object has an attachment integration component using the following code structure:

NOTE:  The following code is part of a larger message. For the complete message structure, see Sample XML for Uploading Attachments.

<Attachments>

<Document>

<Attachment_0x20_Data>QXR0YWNobWVudHMgZm9yIFJFU1QgQVBJLg==</Attachment_0x20_Data>

<TimedOut>false</TimedOut>

<AttachmentIsTextData>false</AttachmentIsTextData>

<ContentId>1234</ContentId>

<Extension>txt</Extension>

</Document>

</Attachments>

NOTE:  When the value is set to true (<AttachmentIsTextData>false</AttachmentIsTextData>), the attachment data is not decoded. The created attachment on the Siebel Server side is the same as that provided in the <Attachment_0x20_Data> tag.

Sample XML for Uploading Attachments

The following provides sample XML for uploading attachments. For a sample URI, see the POST call for retrieving attachments in Table 8.

<?xml version="1.0" encoding="ISO-8859-1"?>

<SiebelREST>

<ListOfAccountAttOrderAtt>

<Account>

<Name>Insert_Account2</Name>

<Location>HeadQuarter</Location>

<Currency_0x20_Code>BRL</Currency_0x20_Code>

<Primary_0x20_Organization>Default Organization</Primary_0x20_Organization>

<ListOfAccount_0x20_Attachment>

<Account_0x20_Attachment>

<AccntFileSrcType>FILE</AccntFileSrcType>

<AccntFileName>att</AccntFileName>

<AccntFileExt>txt</AccntFileExt>

<Accnt_0x20_Attachment_0x20_Id>1234</Accnt_0x20_Attachment_0x20_Id>

</Account_0x20_Attachment>

</ListOfAccount_0x20_Attachment>

</Account>

</ListOfAccountAttOrderAtt>

<Attachments>

<Document>

<Attachment_0x20_Data>QXR0YWNobWVudHMgZm9yIFJFU1QgQVBJLg==</Attachment_0x20_Data>

<TimedOut>false</TimedOut>

<EndOfData>true</EndOfData>

<AttachmentIsTextData>false</AttachmentIsTextData>

<ContentId>1234</ContentId>

<Extension>txt</Extension>

</Document>

</Attachments>

</SiebelREST>

Siebel Application Integration for Oracle Fusion Middleware Guide Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Legal Notices.