Quick Start

Let's get started with REST APIs by making a simple REST call.

Prerequisites

Complete the following prerequisites before you start working with Oracle Service Cloud REST APIs:

Prerequisite More Information

Install cURL

Use cURL

Enable a Secure Sockets Layer (SSL) endpoint in your application server

Enable a Secure Sockets Layer (SSL) endpoint in your application server in order to access REST APIs. For more information, see Use cURL.

Identify REST URLs

Use the Request section to understand the parameters and the Examples section to review an example request.

Step 1: Obtain Your Account Information

You must obtain the account information and sign-in credentials to access Oracle Service Cloud REST APIs. You must have the following information to access the REST APIs:

  • REST Server URL
  • User name and password: Make sure that the user name provided has authorization for the services that you would work on.

You can get the sign-in credentials and REST server URL from the account creation email that you receive from Oracle. If you do not have this information, contact your Oracle Cloud Account administrator.

Step 2: Make a Test REST Call

After you obtain your account information, you can send a sample request through REST Client to ensure that your connection works. For more information about testing, see Test. For example, suppose you want to get all the information about the Accounts resource, you can use the following request:

$ curl -u service_cloud_user -X GET -H "OSvC-CREST-Application-Context:Accounts metadata" -H "Accept:application/schema+json" https://mysite.example.com/services/rest/connect/v1.4/metadata-catalog/accounts

If the request is successful, then you get a 200 response with a body such as the following:


{
   "description" : "Schema representing a typed resource",
   "$schema" : "https://mysite.example.com/services/rest/connect/v1.4/schemas/ConnectOracleRESTStandard#",
   "definitions" : {
      "singularResource" : {
         "description" : "An account generated for a staff member in the system. Staff accounts are used by CSRs, sales agents, site adminis                                            trators, etc.",
         "isMenu" : false,
         "type" : "object",
         "properties" : {
            "attributes" : {
               "type" : "object",
               "isDeprecated" : false,
               "usedAsName" : false,
               "$ref" : "https://mysite.example.com/services/rest/connect/v1.4/metadata-catalog/accounts/attributes",
               "label" : "Attributes",
               "isAvailableForPOST" : true,
               "releaseIntroduced" : "15.5",
               "isEnumerable" : false,
               "isAvailableForPATCH" : true,
               "description" : "Group of flags which enable certain features or special behaviors",
               "nullable" : false,
               "isAvailableForGET" : true
            },
            "serviceSettings" : {
               "isAvailableForPOST" : true,
               "releaseIntroduced" : "15.5",
               "label" : "ServiceSettings",
               "$ref" : "https://mysite.example.com/services/rest/connect/v1.4/metadata-catalog/accounts/serviceSettings",
               "usedAsName" : false,
               "isDeprecated" : false,
               "type" : "object",
               "isAvailableForGET" : true,
               "isAvailableForPATCH" : true,
               "nullable" : false,
               "description" : "Service module specific settings",
               "isEnumerable" : false
            },
            "staffGroup" : {
               "isAvailableForGET" : true,
               "nullable" : false,
               "isAvailableForPATCH" : true,
               "description" : "Group to which the staff member is assigned",
               "isEnumerable" : true,
               "isAvailableForPOST" : true,
               "releaseIntroduced" : "15.5",
               "label" : "StaffGroup",
               "$ref" : "https://mysite.example.com/services/rest/connect/v1.4/metadata-catalog/namedIDs/accounts/staffGroup",
               "usedAsName" : false,
               "type" : "object",
               "isDeprecated" : false
            },
            "name" : {
               "isAvailableForGET" : true,
               "isEnumerable" : false,
               "description" : "Staff member's name",
               "isAvailableForPATCH" : true,
               "nullable" : false,
               "isAvailableForPOST" : true,
               "releaseIntroduced" : "15.5",
               "isDeprecated" : false,
               "type" : "object",
               "label" : "Name",
               "usedAsName" : true,
               "$ref" : "https://mysite.example.com/services/rest/connect/v1.4/metadata-catalog/accounts/name"
            },
            "accountHierarchy" : {
               "isAvailableForPATCH" : false,
               "description" : "Hierarchy of managers for the staff member.  Read-only",
               "nullable" : false,
               "isEnumerable" : true,
               "maxItems" : 11,
               "items" : {
                  "$ref" : "https://mysite.example.com/services/rest/connect/v1.4/metadata-catalog/accounts",
                  "type" : "object"
               },
               "maxDepth" : 11,
               "isAvailableForGET" : true,
               "usedAsName" : false,
               "label" : "AccountHierarchy",
               "type" : "array",
               "isDeprecated" : false,
               "isAvailableForPOST" : false,
               "releaseIntroduced" : "15.5"
            },	
...

Congratulations! Now you're ready to send requests and start working with Oracle Service Cloud REST APIs.