Partially Update Application

patch

/appstore/publisher/v1/applications/{listingVersionId}

This method can be used to perform a partial update operation on application attributes or perform a state change operation in the application life-cycle. In order to perform a partial update, provide any root-level attribute in the payload. The content of that specified attribute will be completely replaced, while keeping the values of the other attributes same as before. Unlike PUT method, where the API expects the mandatory attributes to be present in the payload, this operation poses no such restriction. A state change operation, on the other hand, can be performed by a special attribute called "action" , optional attribute called "note" and another optional attribute called "allowedTenancies" in the payload. If the attribute "action" is present in the payload, the API assumes that it is a state change operation. Action supports the following values: - Submit : Submits an application for review. This moves the application to a PENDING_REVIEW state for an Administrator to review. - Publish: Publishes an application to the Marketplace. This makes the application available on the public Marketplace. The application status is changed to "PUBLISHED". Only an approved application can be published. - PublishAsPrivate: Publishes an application as private. This does not make the application available on the public Marketplace. PublishAsPrivate action also provides allowedTenancies to pass comma separated list of tenancies that can limit view or launch listing access to only these tenancies. The application status is changed to "PUBLISHED". Only an approved application can be published. - UnPublish : Unpublishes an application from the Marketplace. This can be called only on a published application. - Withdraw : Withdraws an application from the Marketplace. This can be called only on a published application. - MakePrivate: Makes a published application private. A private application will not display for browsing or searching on the public Marketplace. A private URL to this application can be shared with customers to give them access to the private listing. - MakePublic: Makes a published private application public. It is available on the public Marketplace. - Validate : validates an application to check missing mandatory attributes. - Edit: Moves a submitted application (in either of the states "PENDING_REVIEW", "REVIEWING" or "APPROVED") to "NEW" state. If the application was already approved, it would need to be re-submitted for approval.

Request

Supported Media Types
Path Parameters
Body ()
Required only for submit, action, and notes. For publish, publishAsPrivate, withdraw, makePrivate or makePublic, just the "action" field is sufficient.
Root Schema : AppStatus
Type: object
Show Source
Back to Top

Response

Supported Media Types

200 Response

Successful Operation
Body ()
Root Schema : acknowledgement
Type: object
Show Source

400 Response

Bad Request/Invalid Parameter

401 Response

Not Authorized

500 Response

System Error
Back to Top

Examples

1. Submit an Application

The following example submits a partner's unpublished application for Oracle approval, by submitting a PATCH request on the REST resource using cURL. A submission note can be provided when the submit action is chosen.

cURL Example

curl -X PATCH -H "X-Oracle-UserId: partner-email" -H "Authorization: Bearer Access-token" -H "Content-Type: application/json" -d 'JSON-data-as-shown-in-following-example' "https://ocm-apis.cloud.oracle.com/appstore/publisher/v1/applications/2908689"

Request Header

X-Oracle-UserId: fname.lname@oracle.com
Authorization: Bearer Access-token
Content-Type: application/json

Request Body

{
  "action": "submit",
  "note": "any submission notes for admin"
}

HTTP Status Code:

200 OK

JSON Response:

{
  "message": "submit operation successful on listing.",
  "entityId": "8422545"
}

2. Publish an Application

The following example publishes an application by a partner after it has been approved by Oracle admin, by submitting a PATCH request on the REST resource using cURL.

cURL Example

curl -X PATCH -H "X-Oracle-UserId: partner-email" -H "Authorization: Bearer Access-token" -H "Content-Type: application/json" -d 'JSON-data-as-shown-in-following-example' "https://ocm-apis.cloud.oracle.com/appstore/publisher/v1/applications/2908689"

Request Header

X-Oracle-UserId: fname.lname@oracle.com
Authorization: Bearer Access-token
Content-Type: application/json

Request Body

{
  "action": "publish",
  "note": "any submission notes for admin"
}

HTTP Status Code:

200 OK

JSON Response:

{
  "message": "publish operation successful on listing. Earlier version, if any, would be withdrawn.",
  "entityId": "8422545"
}

3. Withdraw an Application

The following example withdraws an application published by a partner from the marketplace, by submitting a PATCH request on the REST resource using cURL.

cURL Example

curl -X PATCH -H "X-Oracle-UserId: partner-email" -H "Authorization: Bearer Access-token" -H "Content-Type: application/json" -d "JSON-data-as-shown-in-following-example" "https://ocm-apis.cloud.oracle.com/appstore/publisher/v1/applications/2908689"

Request Header

X-Oracle-UserId: fname.lname@oracle.com
Authorization: Bearer Access-token
Content-Type: application/json

Request Body

{
  "action": "withdraw"
}

HTTP Status Code:

200 OK

JSON Response:

{
  "message": "withdraw operation successful on listing.",
  "entityId": "2908689"
}

4. Make an Application Private

The following example makes a listing by a partner private, by submitting a PATCH request on the REST resource using cURL.

cURL Example

curl -X PATCH -H "X-Oracle-UserId: partner-email" -H "Authorization: Bearer Access-token" -H "Content-Type: application/json" -d "JSON-data-as-shown-in-following-example" "https://ocm-apis.cloud.oracle.com/appstore/publisher/v1/applications/2908689"

Request Header

X-Oracle-UserId: fname.lname@oracle.com
Authorization: Bearer Access-token
Content-Type: application/json

Request Body

{
  "action": "makePrivate"
}

HTTP Status Code:

200 OK

JSON Response:

{
    "message": "makePrivate operation successful on listing.",
    "entityId": "8422545"
}

5. Partially update some properties of an Application

The following example partially updates an application by submitting a PATCH request on the REST resource using cURL.

cURL Example

curl -X PATCH -H "X-Oracle-UserId: partner-email" -H "Authorization: Bearer Access-token" -H "Content-Type: application/json" -d "JSON-data-as-shown-in-following-example" "https://ocm-apis.cloud.oracle.com/appstore/publisher/v1/applications/2908689"

Request Header

X-Oracle-UserId: fname.lname@oracle.com
Authorization: Bearer Access-token
Content-Type: application/json

Request Body for updating Usage Information

{
  "usageInformation": "Usage information for the product Akeneo"
}

HTTP Status Code:

200 OK

JSON Response:

{
    "message": "Listing was updated successfully.",
    "entityId": "8422545",
    "name":"REST API Test App01"
}

6. Publish an Application as private

The following example publishes an application as private by a partner after it has been approved by Oracle admin, by submitting a PATCH request on the REST resource using cURL.

cURL Example

curl -X PATCH -H "X-Oracle-UserId: partner-email" -H "Authorization: Bearer Access-token" -H "Content-Type: application/json" -d 'JSON-data-as-shown-in-following-example' "https://ocm-apis.cloud.oracle.com/appstore/publisher/v1/applications/2908689"

Request Header

X-Oracle-UserId: fname.lname@oracle.com
Authorization: Bearer Access-token
Content-Type: application/json

Request Body

{
  "action": "PublishAsPrivate",
  "note": "any submission notes for admin",
  "allowedTenancies":"valid tenancy OCID's. You can provide multiple values as comma-separated values."
}

HTTP Status Code:

200 OK

JSON Response:

{
  "message": "publish as private operation successful on listing.",
  "entityId": "8422545"
}
Back to Top