Quick Start

Set up your environment and start creating and managing your Marketplace listings using the Oracle Cloud Marketplace Publisher API, by performing the following tasks.

  • Meet prerequisites

  • Set up authentication

  • Install cURL

  • Create your first request

Meet Prerequisites

Your organization should be signed up as Marketplace Publisher. If not already signed up, see How do I become a Marketplace Publisher?

Set Up Authentication

The Marketlpace Publisher REST API uses oAuth for authentication and authorization. Request an oAuth client ID/secret key from the Marketplace Administrator.

Use a REST API to generate an Auth token:

  • Method: POST

  • URL: https:/host:port/oam/oauth2/tokens

Pass the following headers to the Auth call.

Header Name Header Value Description
Authorization Basic Base64 encoded string

Base64 encoded string of the clientID:secretKey

Content-Type application/x-www-form-urlencoded; charset=UTF-8

Content type

X-USER-IDENTITY-DOMAIN-NAME usoracle30650

Identity domain of the Marketplace tenant in the Oracle Cloud

Here is an example of a cURL command to get a token:

curl -X POST -H "Content-Type: application/x-www-form-urlencoded; charset=UTF-8" -H "X-USER-IDENTITY-DOMAIN-NAME: usoracle30650" -H "Authorization: Basic ababaxcxcxcxcxcxcxcxcxcxccx"  "https://host:port/oam/oauth2/tokens" -k

Install cURL

The examples use the cURL command-line tool to demonstrate how to access the Oracle Marketplace Publisher REST API. To connect securely to the REST server, you must install a version of cURL that supports SSL.

To install cURL on your system:

  1. In your browser, navigate to the cURL home page at https://curl.haxx.se and click Download in the 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 extract the executable to the desired folder.

When running cURL from a Windows command shell only, you must provide an SSL certificate authority (CA) file or bundle to authenticate against the Verisign CS certificate.

  1. Navigate to the cURL CA Extract page at https://curl.haxx.se/docs/caextract.html and download the cacert.pem SSL CA certificate file into the folder where you installed cURL.

  2. 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 the SSL CA certificate file. For example, on a Windows system you would enter:

    C:\curl> set CURL_CA_BUNDLE=cacert.pem

Create Your First Request

The following example is a request you can use to try out the APIs. This request returns a list of regions in the response:

curl -X GET -H "Authorization: Access-token" ?H "X-Oracle-User-Id: partner.user@email.com" "https://ocm-apis-cloud.oracle.com/appstore/publisher/v1/regions"

Example

GET: https://ocm-apis-cloud.oracle.com/appstore/publisher/v1/regions?limit=3

Header:

  1. X-Oracle-UserId ???partner.user@email.com

    This should be an email address of a valid Partner user configured within the Partner account.

  2. Authorization ??? Access-token

Request Body: None

Response:

{
        "items": [
         {
               "code": "AFRICA",
               "name": "Africa"
         },
         {
               "code": "APAC",
               "name": "Asia Pacific"
          },
          {
                "code": "EUROPE",
                "name": "Europe"
           }
  ],
  "hasMore": true,
  "totalResults": 3,
  "totalAvailableRecords": 7,
  "links": [
    {
            "rel": "CANONICAL",
            "href": https://ocm-apis-cloud.oracle.com/appstore/publisher/v1/regions
    },
    {
            "rel": "SELF",
            "href": https://ocm-apis-cloud.oracle.com/appstore/publisher/v1/regions?limit=3
    },
    {
             "rel": "NEXT",
             "href": https://ocm-apis-cloud.oracle.com/appstore/publisher/v1/regions?offset=3&limit=3
    }
  ]
}