Access Oracle Sales Automation Data Using RESTful Services

Oracle Sales Automation provides several RESTful APIs that you can use to access standard and custom object data and integrate with external applications. RESTful direct method calls are made using a properly structured URL via the HTTP protocol.

Each API contains standard Oracle Sales Automation objects and each object is associated with a REST Resource or Resource Collection. For instance, in the RESTful API the Opportunities resource endpoint is used to track information about a potential sale. However, before using Oracle Sales Automation RESTful web services you must take into account the security requirements for gaining access, and also identify which web services to use, along with their corresponding supported methods and expected payload structures.

About Resources in Oracle Sales Automation RESTful APIs

Oracle Sales Automation provides a collection of REST resources for standard and custom objects.

An important concept in any RESTful API is the resource. A resource is an object with a type (for example, Opportunities), associated data, relationships to other resources, and a set of methods that operate on it. These resources are organized in a hierarchical fashion that includes:

  • Root resource: Corresponds to a logical object, like an Opportunity or Lead.

  • Sub-resource(s): These are resources that belong to a parent resource; for example a contact for an opportunity.

  • List of Values resource: A list of valid values that can be used when setting a value for a field. There are two types: Lookup (static list) or Dynamic (based on context).

Within the Oracle Sales Automation RESTful API, there are two types of resources: A single resource or a collection resource. A single resource can represent a single entity like an employee or a purchase order, while a collection resource can be more comprehensive like a list of employees or a list of purchase orders that can be paged.

About REST Support for Custom Objects

Oracle Sales Automation includes standard objects which account for many business needs and scenarios. However, in addition to standard objects, you can use the Application Composer tool to create both top-level custom objects and child custom objects if you have a unique business need.

Application Composer is a browser-based tool that business analysts and administrators (not just developers) can use to customize Oracle Sales Automation. By using this tool, you can make the types of data model changes which in the past were made only by developers. In the Application Composer tool you can make changes on the fly and they become immediately available for usage without having to sign back into the application, this includes the creation of Custom Objects which can be added to the Oracle Sales Automation RESTful API.

Performance Tips

To get the best performance out of Oracle Fusion Sales Cloud REST APIs, follow these tips.

Query only the data you need. For example if you query the opportunity REST service, the payload will be quite large and you will experience lengthy response time. You can shorten this response time if you:
  • Query just the data that you need.
  • Query just the data, not the metadata.
For example, entering the query
salesApi/resources/latest/opportunities
will return a large payload, whereas entering the query
salesApi/resources/latest/opportunities?fields=Name,OptyNum&onlyData=true
will, because you've narrowed the query criteria, return a smaller payload.

Search for RESTful Resources Using “Describe” Endpoints

You can obtain specific details about the different Oracle Sales Automation RESTful APIs by sending an HTTP GET request that returns a JSON object containing resource information and complementary metadata.

To get information about a particular version of the API:
  1. Sign in to Oracle Sales Automation as Sales Administrator.
  2. The URL that is displayed after you sign in shows the server name and port number for your Oracle Sales Automation instance:
    For example, if the URL is http://˂crm_server:PortNumber˃/customer/faces/CrmFusionHome, then the server name is crm_server, and the port number is PortNumber.

    Make a note of the server name and port number, which you use in the remaining steps.

  3. Point your web browser to the API resource URL to obtain the API metadata of your Oracle Sales Automation instance:

    https://˂crm_server:PortNumber˃/salesApi/resources/

    Where salesAPI is the API name for the application container. The server response will return a JSON object containing an array of object items, where each item represents a particular version of the API; for example, below is a portion of the array of results with information about one item:

    {
        "version" : "11.1.10",
        "isLatest" : true,
        "links" : [ {
          "rel" : "self",
          "href" : " https://˂crm_server:PortNumber˃/salesApi/resources/11.1.10",
          "name" : "self",
          "kind" : "item"
        }, {
          "rel" : "canonical",
          "href" : " https://˂crm_server:PortNumber˃/salesApi/resources/11.1.10",
          "name" : "canonical",
          "kind" : "item"
        }, {
          "rel" : "predecessor-version",
          "href" : " https://˂crm_server:PortNumber˃/salesApi/resources/11.1.9",
          "name" : "predecessor-version",
          "kind" : "item"
        }, {
          "rel" : "describe",
          "href" : " https://˂crm_server:PortNumber˃/salesApi/resources/11.1.10/describe",
          "name" : "describe",
          "kind" : "describe"
        } ]
      }
  4. If you want to see all the objects exposed by a particular API version, you can access its “describe” endpoint, specifying the desired version in the URL:

    https://˂crm_server:PortNumber˃/salesApi/resources/11.1.10/describe

    Or you can also get information about the “latest” API version:

    https://˂crm_server:PortNumber˃/salesApi/resources/latest/describe

    This will return a long JSON object containing the latest version of the Oracle Sales Automation objects supported in the API, their child objects, a comprehensive description of all supported methods, parameters, return values, as well as the object resource URIs.

Search for RESTful Resources Associated with Custom Objects

To find the resource URIs for Oracle Sales Automation custom objects, follow these steps:

  1. Navigate to Application Composer (you must be logged as Sales Administrator, CRM Application Administrator or Application Implementation Consultant).
  2. Click Custom Objects to view the list of custom objects in the Objects table.
  3. To view the URI for a specific object, in the REST Resource column, click the Service link that corresponds to that object.

    Tip:

    You can cut and paste the URI from the address bar of the browser.

  4. (Optional) To view the description for a specific custom object, in the REST Resource column, click the Describe link that corresponds to that object.

    Note:

    You can append /describe to the end of the URI to get a description of a Custom Object.

Get the Service Endpoints for RESTful Web Services

You can infer the name of an Oracle Sales Automation RESTful Web Service endpoint by specifying the service name instead of the keyword “describe” in the API URL.

To begin, follow these steps:
  1. Open your browser and access the endpoint URL. If it is the first time you open it, you’ll be prompted for your Oracle Sales Automation user credentials.
    For example, in the REST API for Oracle Sales Automation Release 12, to access the Opportunities service endpoint for the latest API version, the URL is:

    https://˂crm_server:PortNumber˃/salesApi/resources/latest/opportunities

  2. (Optional) If you want to obtain additional information about a specific resource, you can use the resource’s describe URL to obtain additional metadata containing fields, actions that can be taken, child objects and a list of value resources.
    For example, in the REST API for Oracle Sales Automation Release 12, in the Opportunities service endpoint, the describe URL is:

    https://˂crm_server:PortNumber˃/salesApi/resources/latest/opportunities/describe

    The Oracle Sales Automation REST API includes the following RESTful web service endpoints, note that some endpoint URLs have changed from R12 to R13:
    Release 12 Release 13
     /crmCommonApi/resources/latest/accounts /crmRestApi/resources/latest/accounts
    /salesApi/resources/latest/activities /crmRestApi/resources/latest/activities
    /serviceApi/resources/latest/categories /crmRestApi/resources/latest/assets
    /incentiveCompensationApi/resources/latest/compensationPlans /crmRestApi/resources/latest/businessPlans
    /salesApi/resources/latest/competitors  /crmRestApi/resources/latest/categories
    /crmCommonApi/resources/latest/contacts /crmRestApi/resources/latest/channels
    /incentiveCompensationApi/resources/latest/creditCategories /fscmRestApi/resources/latest/compensationPlans
    /salesApi/resources/latest/deals /crmRestApi/resources/latest/competitors
    /salesApi/resources/latest/territoryForecasts /crmRestApi/resources/latest/contacts
    /crmCommonApi/resources/latest/households /fscmRestApi/resources/latest/creditCategories
    /crmCommonApi/resources/latest/lightboxDocuments /crmRestApi/resources/latest/deals
    /salesApi/resources/latest/opportunities /crmRestApi/resources/latest/territoryForecasts
    /incentiveCompensationApi/resources/latest/incentiveCompensationParticipants /crmRestApi/resources/latest/households
     /salesApi/resources/latest/partnerPrograms /crmRestApi/resources/latest/inboundMsgFilters
    /salesApi/resources/latest/partnerTiers /crmRestApi/resources/latest/inboundMessages
    /salesApi/resources/latest/partners /crmRestApi/resources/latest/interactions
    /incentiveCompensationApi/resources/latest/paymentBatches /crmRestApi/resources/latest/lightboxDocuments
     /incentiveCompensationApi/resources/latest/paymentTransactions  /crmRestApi/resources/latest/presentationSessionFeedback
    /incentiveCompensationApi/resources/latest/paysheets  /crmRestApi/resources/latest/presentationSessions
    /incentiveCompensationApi/resources/latest/incentiveCompensationPerformanceMeasures  /crmRestApi/resources/latest/mySelfServiceRoles
    /incentiveCompensationApi/resources/latest/planComponents /crmRestApi/resources/latest/salesObjectives
    /salesApi/resources/latest/priceBookHeaders /crmRestApi/resources/latest/opportunities
    /salesApi/resources/latest/setupSalesCatalogs /fscmRestApi/resources/latest/incentiveCompensationParticipants
    /salesApi/resources/latest/products /crmRestApi/resources/latest/partnerPrograms
     /salesApi/resources/latest/partnerProgramBenefits /crmRestApi/resources/latest/partnerTiers
     /salesApi/resources/latest/programEnrollments  /crmRestApi/resources/latest/partners
    /serviceApi/resources/latest/queues /fscmRestApi/resources/latest/paymentBatches
     /incentiveCompensationApi/resources/latest/rateDimensions /fscmRestApi/resources/latest/paymentTransactions
    /incentiveCompensationApi/resources/latest/rateTables /fscmRestApi/resources/latest/paysheets
    /crmCommonApi/resources/latest/resources /fscmRestApi/resources/latest/incentiveCompensationPerformanceMeasures
     /incentiveCompensationApi/resources/latest/incentiveCompensationRoles /fscmRestApi/resources/latest/planComponents
    /salesApi/resources/latest/leads /crmRestApi/resources/latest/priceBookHeaders
    /crmCommonApi/resources/latest/salesOrders /crmRestApi/resources/latest/setupSalesCatalogs
    /salesApi/resources/latest/salesPromotions /crmRestApi/resources/latest/products
    /crmPerformanceApi/resources/latest/territories /crmRestApi/resources/latest/partnerProgramBenefits
     /serviceApi/resources/latest/serviceRequests /crmRestApi/resources/latest/programEnrollments
    /salesApi/resources/latest/sourcecodes /crmRestApi/resources/latest/queues
    - /fscmRestApi/resources/latest/rateDimensions
    - /fscmRestApi/resources/latest/rateTables
    - /crmRestApi/resources/latest/resources
    - /fscmRestApi/resources/latest/incentiveCompensationRoles
    - /crmRestApi/resources/latest/leads
    - /crmRestApi/resources/latest/salesOrders
    - /crmRestApi/resources/latest/salesPromotions
    - /crmRestApi/resources/latest/territories
    - /crmRestApi/resources/latest/proposals
    - /crmRestApi/resources/latest/screenPopPages
    - /crmRestApi/resources/latest/screenPopTokens
    - /crmRestApi/resources/latest/selfRegistrations
    - /crmRestApi/resources/latest/selfServiceRoles
    - /crmRestApi/resources/latest/selfServiceUsers
    - /crmRestApi/resources/latest/serviceDetails
    - /crmRestApi/resources/latest/serviceProviders
    - /crmRestApi/resources/latest/serviceRequests
    - /crmRestApi/resources/latest/socialPosts
    - /crmRestApi/resources/latest/sourcecodes
    - /crmRestApi/resources/latest/wrapUps

    Note:

    The API names change depending on the Oracle Sales Automation application container to which the resource object belongs.

About REST Operations and Payload Structures

The RESTful web service for each standard Oracle Sales Automation object provides several create, read, update and delete (CRUD) operations.

You can execute the following standard methods for interacting with either a singular resource or a resource collection through their URLs:

Method Available for a Singular Resource Available for a Resource Collection
Get Y N
Post N Y
Patch Y N
Delete Y N

About the Get Method

Use this method to query and retrieve information. However, the parameters used in the query to refine the search or narrow down the results in a singular resource are different from those used in a resource collection.

Parameters for both Singular and Collection Resources

The following parameters are used in the method for querying a singular resource as well as a collection resource:

Parameter Format Description
expand

expand=<childResource1>,<childResource2>...

or

expand=all

Returns the parent resource including its children. By default it doesn’t return any child.
fields fields=<FieldName1>,<FieldName2>... Select only certain field(s) for which the information is required.
onlyData

onlyData=true

or

onlyData=false

Retrieve only data and not any resource URLs. By default all resource children URLs are returned.

Parameters for Collection Resources

A GET method for collection resource uses the parameters discussed above as well as the following parameters:

Parameter Format Description
limit

limit=<Integer>

An integer greater than 0 that specifies the maximum number of items returned by the server. If no limit value is specified, the server will use a default limit value.
offset offset=<Integer> An integer value that specifies the index of the first item to be returned. The offset index begins at 0.
q

q=<condition1>;<condition2>;…

Specify a filter condition to restrict the items returned in the collection. The value of this query parameter contains one or more expressions separated by “;”. For example q=deptno>=10 and <=30;loc!=NY

Supported operators:

>

<

>=

<=

!=

AND

OR

=

LIKE

Special characters:

  • Double or single quotes for literals, i.e : “literal value 1” or ‘literal value2’

  • Back slash to escape characters: \

  • Asterisk for wildcard: *

totalResults

totalResults=true

or

totalResults=false

A Boolean value that specifies whether to return the total number of items that match the “q” query parameter.
orderBy

orderBy=<field1:asc>,<field2:desc>.

Specifies the order of items returned in the response payload. The query parameter value is a comma separated string of field names, each optionally followed by a colon and the keyword asc or desc.

If not specified, the server returns items in ascending order.

finder

finder=FinderName;<attr1>=<val1>,<attr2>=<value2>

Uses a predefined “query” which has its own special parameters.

For example, the Opportunities resource has a finder function called MyOpportunitiesFinder, this function has a Name parameter which value can be set as Auto. This call will retrieve all the opportunities the current user owns whose name starts with “Auto”.

dependency

dependency=<attr1>=<val1>

Used for cascading List of Values resources. For example if a Location resource has a State field, those values will be derived from another States resource that returns a list of States for a specific Country (location). If for example Location is: US and State is CA. The States resource contains a list of all US States, but if user in the web page changes the locale to be Brazil, the way to retrieve all brazilian states would be with a call like this:

States?dependency=Country=BR

About the Post Method

Use this method to create a new item. The request media type header is:

application/vnd.oracle.adf.resourceitem+json

For example, to create a new opportunity under Opportunities resource , the request passes the new Opportunity name parameter in a JSON object:

{
"Name" : "New Opportunity Name"
}

The response body of the JSON object returned by the POST request would be something like this:


{
BudgetAvailableDate: null
BudgetedFlag: false
PrimaryOrganizationId: 204
ChampionFlag: false
CreatedBy: "SALES_ADMIN"
CreationDate: "2015-06-04T03:08:27-07:00"
CurrencyCode: "USD"
SalesMethodId: 100000012430001
SalesStageId: 100000012430007
Name: "New Opportunity Name"
OptyId: 300100111705686
OptyNumber: "CDRM_332708"
OwnerResourcePartyId: 3807
StatusCode: "OPEN"
PrimaryRevenueId: 300100111705687
SalesMethod: "Standard Sales Process"
SalesStage: "01 - Qualification"
DescriptionText: "Looking for the Right Contacts, Characteristics,
Determining the Need, Budget and Sponsor"
AverageDaysAtStage: 30
MaximumDaysInStage: 800
PhaseCd: "QUALIFICATION-DISCOVERY"
QuotaFactor: 3
RcmndWinProb: 0
StageStatusCd: "OPEN"
StgOrder: 1
EffectiveDate: "2015-06-24"
Revenue: 0
WinProb: 0
PartyName1: "Charles Taylor"
DownsideAmount: 0
UpsideAmount: 0
EmailAddress: "firstname lastname@orcl.com"
ExpectAmount: 0
ForecastOverrideCode: "CRITERIA"
SalesChannelCd: "ZPM_DIRECT_CHANNEL_TYPES"
…
}

About the Patch Method

Use this method for making partial updates to a resource. Only the fields contained in the request body will be updated.

The request media type is:

application/vnd.oracle.adf.resourceitem+json

For example, to update an existing Opportunity from Oppurtunities resource, the HTTP PATCH request passes the following JSON object as the request body:

{
"Name": "Opportunity Name Updated"
}

The response from this request is a JSON object similar to this:


{
BudgetAvailableDate: null
BudgetedFlag: false
PrimaryOrganizationId: 204
ChampionFlag: false
CreatedBy: "SALES_ADMIN"
CreationDate: "2015-06-04T03:08:27-07:00"
CurrencyCode: "USD"
SalesMethodId: 100000012430001
SalesStageId: 100000012430007
Name: "Opportunity Name Updated"
OptyId: 300100111705686
OptyNumber: "CDRM_332708"
OwnerResourcePartyId: 3807
StatusCode: "OPEN"
PrimaryRevenueId: 300100111705687,
SalesMethod: "Standard Sales Process"
SalesStage: "01 - Qualification"
DescriptionText: "Looking for the Right Contacts, Characteristics,
Determining the Need, Budget and Sponsor"
AverageDaysAtStage: 30
MaximumDaysInStage: 800
PhaseCd: "QUALIFICATION-DISCOVERY"
QuotaFactor: 3
RcmndWinProb: 0
StageStatusCd: "OPEN"
StgOrder: 1
EffectiveDate: "2015-06-24"
Revenue: 0
WinProb: 0
PartyName1: "Charles Taylor"
DownsideAmount: 0
UpsideAmount: 0
EmailAddress: "firstname_lastname@orcl.com"
ExpectAmount: 0
ForecastOverrideCode: "CRITERIA"
SalesChannelCd: "ZPM_DIRECT_CHANNEL_TYPES"
…
}

About the Delete Method

Use this method to delete a resource. It doesn’t require a request body.

For example, to delete an Opportunity object from the Opportunities resource, the DELETE request needs to be made directly to the URI of the child Opportunity resource to be deleted, without passing any parameter to it:

https://<crm_server:PortNumber>/salesApi/resources/latest/opportunities/<OpportunityNumber>

About the Custom Action Methods

Sometimes, a resource exposes a custom action that does not fit into the CRUD standard. A custom action is always invoked with POST (for both singular and resource collections) and its request media type is:

application/vnd.oracle.adf.action+json

The response media type is:

application/vnd.oracle.adf.actionresult+json

For example, in Oracle Sales Automation, the leads resource under https://<crm_server:portNumber>/salesApi/resources/latest/describe/leads/ has a custom action to convert a lead to an opportunity called: convertLeadToOpty.

{
          "name" : "convertLeadToOpty",
          "parameters" : [ {
            "name" : "leadId",
            "type" : "number",
            "mandatory" : false
          } ],
          "resultType" : "string",
          "method" : "POST",
          "requestType" : [ "application/vnd.oracle.adf.action+json" ],
          "responseType" : [ "application/json", "application/vnd.oracle.adf.actionresult+json" ]
        },

Think of a custom action as a series of steps, a process, or a combination of different CRUD operations to achieve a specific goal. In the example above the request body of a Custom Action has to pass the “name” that is going to be that custom action name (i.e. convertLeadToOpty), and optionally an array of input parameters for the custom action (i.e. leadId).

Usually the JSON body of the POST request contains:

{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"title": "Action execution representation.",
"description": "Represents the action execution and its
parameters.",
"properties": {
"name": {
"type": "string",
"description": "Action name."
},
"parameters": {
"type": "array",
"description": "Parameter name/value pair.",
}
},
"required": [
"name"
]
}

The JSON response object holds the result of the custom action method in the “results” field.

About Batch Support

To improve performance, multiple operations can be combined into a single HTTP request by sending a JSON object containing a field named: “parts” as an array of objects. Each object within the array contains a unique id, a relative path to the resource, an operation, and optionally a payload.

The JSON schema of the HTTP request is:


{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"title": "Batch execution",
"description": "Group multiple requests together ('part').",
"definitions": {
"Part": {
"type": "object",
"allOf": [
{
"properties": {
"id": {
"type": "string",
"description": "An identification
provided by the client to distinguish each part provided in the
batch request."
},
"path": {
"type": "string",
"description": "Resource's location."
},
"operation": {
"type": "string",
"enum": [
"get",
"create",
"update",
"replace",
"delete"
],
"description": "The operation that will
be performed."
},
"preconditionSucceeded": {
"type": "boolean",
"description": "This attribute is set in
the batch response only when ifMatch or ifNoneMatch are provided in
the request. It will be 'true' if the precondition
(ifMatch/ifNoneMatch) was satisfied, otherwise 'false'."
},
"payload": {
"oneOf": [
{
"$ref": "resource-item.json",
"description": "The payload that
will be used in the operation. Example: a resource instance should
be provided in order to execute a 'create'."
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"path",
"operation"
]
}
],
"anyOf": [
{
"properties": {
"ifMatch": {
"type": "string",
"description": "This attribute is
analogous to the If-Match header. It represents a precondition to
execute this operation. The value can be null (same effect of 'If-
Match: *') or an array of resource versions."
}
}
},
{
"properties": {
"ifNoneMatch": {
"type": "string",
"description": "This attribute is
analogous to the If-None-Match header. It represents a precondition
to execute this operation. The value can be null (same effect of
'If-None-Match: *') or an array of resource versions."
}
}
}
],
"description": "Represents a request."
}
},
"properties": {
"parts": {
"type": "array",
"items": {
"$ref": "#/definitions/Part"
},
"description": "Array that represents multiple
requests."
}
},
"required": [
"parts"
]
}

For example, the following request will fetch an existing employee and update another employee:


POST /myapi/resources/latest/hremployees HTTP/1.1
Host: example.oracle.com
Content-type:application/vnd.oracle.adf.batch+json
{
"parts": [
{
"id": "part1",
"path": "/latest/hremployees/101",
"operation": "get"
},
{
"id": "part2",
"path": "/latest/hremployees/102",
"operation": "update",
"payload": {
"Salary": 18000
}
}
]
}

The response of the previous request uses the same media type as the request and returns a JSON object such as:

{"parts":[
{
"id":"part1",
"path":"/latest/hremployees/101",
"operation":"get",
"payload" : {
"EmployeeId" : 101
…
},
{
"id" : "part2",
"path" : "/latest/hremployees/102",
"operation" : "update",
"payload" : {
"EmployeeId" : 102,
} ]}

Test an Oracle Sales Automation RESTful Web Service Request

To test a RESTful API and get the required data, you can use the cURL command line tool to transfer data from or to a server using one of the supported protocols such as HTTP or HTTPS.

In this example we’re going to use cURL tool to access a RESTful API:
  1. Make sure you have a valid REST URL (endpoint), for example in Oracle Sales Automation release 12, the endpoint for theaccounts resource is:

    https://<crm_server:PortNumber>/crmCommonApi/resources/latest/accounts

  2. Have your security credentials handy.
  3. Make sure you have the cURL tool installed, otherwise:
    1. In your browser, navigate to the cURL home page at http://curl.haxx.se/download.html and click Download in the left navigation menu.
    2. On the cURL Releases and Downloads page, locate the SSL-enabled version of the cURL software that corresponds to your operating system, click the link to download the ZIP file, and install the software.
    3. Navigate to the cURL CA Certs page at http://curl.haxx.se/docs/caextract.html and download the ca-bundle.crt SSL CA certificate bundle in the folder where you installed cURL.
    4. Open a command window, navigate to the directory where you installed cURL, and set the cURL environment variable, CURL_CA_BUNDLE, to the location of an SSL certificate authority *CA certificate bundle. For example:
      C:\curl> set CURL_CA_BUNDLE=ca-bundle.crt

      You are ready now to use cURL.

  4. Using the cURL tool, issue an HTTP request on the resource:
    $ curl –k –u <userName> https://<crm_server:PortNumber>/crmCommonApi/resources/latest/accounts
  5. You can expect a response similar to what is shown below:
    {
    "items" : [ {
    "PartyId" : 300100010648746,
    "PartyNumber" : "CDRM_2260",
    "SourceSystem" : null,
    "SourceSystemReferenceValue" : null,
    "OrganizationName" : "DLAKWRVBBU",
    "UniqueNameSuffix" : "US)",
    "PartyUniqueName" : "DLAKWRVBBU US)",
    "Type" : "ZCA_CUSTOMER",
    "OwnerPartyId" : 100010025532672,
    "OwnerPartyNumber" : "100010025532672",
    "OwnerEmailAddress" : "sendmail-test-discard@oracle.com",
    ...
    },
    {
    ...
    } ],
    "count" : 25,
    "hasMore" : true,
    "limit" : 25,
    "offset" : 0,
    "links" : [ {
    "rel" : "self",
    "href" :
    "https://host:port/crmCommonApi/resources/latest/accounts",
    "name" : "accounts",
    "kind" : "collection"
    } ]
    }
  6. In the response body, you can see the links to each resource containing the actions that can be performed on them.
  7. (Optional) You can use the /describe URI to get the metadata of a resource such as:
    $ curl –k –u <userName> https://<crm_server:PortNumber>/crmCommonApi/resources/latest/accounts/describe

    It returns something like this:

    
    {
    "Resources" : {
    "accounts" : {
    "discrColumnType" : false,
    "title" : "Sales Cloud Account SDO",
    "attributes" : [ {
    "name" : "PartyId",
    "type" : "integer",
    "updatable" : false,
    "mandatory" : true,
    "queryable" : true,
    "precision" : 18,
    "properties" : {
    "fnd:GLOBALLY_UNIQUE" : "true"
    }
    }, {
    "name" : "PartyNumber",
    "type" : "string",
    "updatable" : true,
    "mandatory" : true,
    "queryable" : true,
    "precision" : 30,
    "maxLength" : "30",
    "properties" : {
    "DISPLAYWIDTH" : "40"
    }
    }, {
    "name" : "SourceSystem",
    "type" : "string",
    "updatable" : true,
    "mandatory" : false,
    "queryable" : true
    }, {
    ...],
    "links" : [ {
    "rel" : "self",
    "href" :
    "https://host:port/crmCommonApi/latest/latest/accounts",
    "name" : "self",
    "kind" : "collection"
    } ],
    "actions" : [ {
    "name" : "get",
    "method" : "GET",
    "responseType" : [ "application/json",
    "application/vnd.oracle.adf.resourcecollection+json" ]
    }, {
    "name" : "create",
    "method" : "POST",
    "requestType" : [
    "application/vnd.oracle.adf.resourceitem+json" ],
    "responseType" : [ "application/json",
    "application/vnd.oracle.adf.resourceitem+json" ]
    } ]
    }
    ...

    From the metadata you can observe that you can issue a POST command on the /accounts resource to create a resource.