Update tenancy

put

/appstore/publisher/v1/ocitenancies/{tenancyId}

Update the tenancy (partner) details.

Request

Supported Media Types
Path Parameters
Query Parameters
Back to Top

Response

Supported Media Types

200 Response

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

400 Response

Invalid Parameter Value/Bad Request

401 Response

Not Authorized

500 Response

System Error
Back to Top

Examples

1. Update an OCI Tenancy Configuration

The following example updates the OCI tenancy configuration, by submitting a PUT request on the REST resource using cURL.

cURL Example

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

Request Header

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

Request Body

{  
   "tenancyName":"marketplace_dev",
   "tenancyOCID":"ocid1.tenancy.oc1..aaaaaaaavdytn45iavk7xwhirfjydmffne3zxae2kwlprhsm4aioi7c7pntq",
   "homeRegion":"IAD",
   "appCatalogSetting":{  
      "compartmentOCID":"ocid1.compartment.region1..aaaaaaaaelzb6xjh2zsebgziqnbsdva7sk4ngmfq3m3r2vcgwkss4efum7gq"
   }
}

HTTP Status Code:

200 OK

JSON Response:

{
    "message":"Tenancy details successfully updated."
}

2. Test an OCI Tenancy Configuration

The following example tests the OCI tenancy configuration, by submitting a PUT request on the REST resource using cURL.

cURL Example

curl -X PUT -H "X-Oracle-UserId: partner-email" -H "Content-Type: application/json" -H "Authorization: Bearer Access-token" -d JSON-data-as-shown-in-following-example "https://ocm-apis.cloud.oracle.com/appstore/publisher/v1/ocitenancies/15813902?action=test"

Request Header

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

Request Body

{  
   "tenancyName":"marketplace_dev",
   "tenancyOCID":"ocid1.tenancy.oc1..aaaaaaaavdytn45iavk7xwhirfjydmffne3zxae2kwlprhsm4aioi7c7pntq",
   "homeRegion":"IAD",
   "appCatalogSetting":{  
      "compartmentOCID":"ocid1.compartment.region1..aaaaaaaaelzb6xjh2zsebgziqnbsdva7sk4ngmfq3m3r2vcgwkss4efum7gq"
   }
}

HTTP Status Code:

200 OK

JSON Response:

{
    "serviceTestResults":[
        { "actionOnResource":"read tenant", 
          "servicePolicy": "ALLOW SERVICE marketplace to read tenant IN TENANCY", 
          "result": "success" 
        },
        { "actionOnResource": "read compartments", 
          "servicePolicy": "ALLOW SERVICE marketplace to read compartments IN TENANCY", 
          "result": "success"
        },
        { "actionOnResource": "inspect instance-images", 
          "servicePolicy": "ALLOW SERVICE marketplace to inspect instance-images IN TENANCY", 
          "result": "success" 
        },
        { "actionOnResource": "inspect instances", 
          "servicePolicy": "ALLOW SERVICE marketplace to inspect instances IN TENANCY", 
          "result": "success" 
        },
        { "actionOnResource": "manage App-catalog-publisher-listing",
          "servicePolicy": "ALLOW SERVICE marketplace to manage App-catalog-publisher-listing IN TENANCY",
          "result": "fail",
          "message": "Invalid Compartment OCID or Service Policy",
          "error": "Authorization failed or requested resource not found."
        }
    ]
}
Back to Top