Update Application Package

put

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

Update the specified package. If the package was validated it will need to be validated again after the update.Packages of an already published listing cannot be updated.

Request

Supported Media Types
Path Parameters
Body ()
Provide required information.
Root Schema : PackageVersion
Type: object
Show Source
Nested Schema : accessURLs
Type: array
Show Source
Nested Schema : actions
Type: array
Show Source
Nested Schema : dependentServices
Type: array
Show Source
Nested Schema : Resource
Type: object
Show Source
Nested Schema : operations
Type: array
Show Source
Nested Schema : resources
Type: array
Show Source
Nested Schema : AccessURL
Type: object
Show Source
Nested Schema : parameters
Type: array
Show Source
Nested Schema : AccessURLParam
Type: object
Show Source
Nested Schema : Action
Type: object
Show Source
Nested Schema : Authentication
Type: object
Show Source
Nested Schema : requestProperties
Type: array
Show Source
Nested Schema : ResourceMap
Type: object
Show Source
Nested Schema : ActionProperty
Type: object
Show Source
Nested Schema : parameters
Type: array
Show Source
Nested Schema : values
Type: array
Show Source
Nested Schema : PackageParam
Type: object
Show Source
Nested Schema : Service
Type: object
Show Source
Nested Schema : customProperties
Type: array
Show Source
Nested Schema : InputStream
Type: object
Nested Schema : standardProperties
Type: array
Show Source
Nested Schema : Operation
Type: object
Show Source
Nested Schema : actionExecutionSequence
Type: array
Show Source
Nested Schema : OperationAction
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

Invalid Parameter Value

401 Response

Not Authorized

404 Response

Entity Not Found

500 Response

System Error
Back to Top

Examples

The following example updates an existing package for an application, by submitting a PUT request on the REST resource using cURL.

cURL Example

curl -X PUT -H "X-Oracle-UserId: partner-email" -H "Authorization: Bearer Access-token" -H "Content-Type: application/json" -F "json=data in JSON format: as shown in examples of POST package" -F "file=@marketplaceUi.war" "https://ocm-apis.cloud.oracle.com/appstore/publisher/v1/applications/2133526/packages/2133523"

Request Header

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

Request Body

{
  "id": 2133523,
  "name":"Add credential package : soude - 2016-01-29 [try #1]",
  "description":"Rest Package Snippet [PUT request success - soude]",
  "version":"1.0",
  "namespacePrefix":"Rest Package Snippet",
  "deploymentMode":"ASYNC",
  "type":"UNMANAGED",

  "partnerName":"TestPartner1",
  "status":"new",
  "dependentServices":[
    {
      "tag":"Java Service",
      "serviceName":"JAVA",
      "minVersion":"1",
      "maxVersion":"10",
      "isDedicatedToAppFlag":true,
      "minSize":"1275",
      "maxSize":"1311"
    }
  ],
  "actions":[
    {
      "tag":"Add credential",
      "dependentServiceTag":"Java Service",
      "actionName":"addcredential",
      "type":"OUT_OF_THE_BOX_ACTION",
      "requestProperties":[
        {
          "name":"CREDENTIAL_MAP_NAME",
          "source":"BLUEPRINT_STATIC",
          "value":"user.custom.map"
        },
        {
          "name":"DESCRIPTION",
          "source":"BLUEPRINT_STATIC",
          "value":"Test action for addcredential - soude"
        },
        {
          "name":"KEY",
          "source":"BLUEPRINT_STATIC",
          "value":"ADD_CRED_TEST"
        },
        {
          "name":"KEY_USER",
          "source":"BLUEPRINT_STATIC",
          "value":"ADD_CRED_TEST_SOUDE"
        },
        {
          "name":"KEY_PASSWORD",
          "source":"BLUEPRINT_STATIC",
          "value":"Welcome1"
        }
      ]
    },
    {
      "tag":"Delete credential",
      "dependentServiceTag":"Java Service",
      "actionName":"deletecredential",
      "type":"OUT_OF_THE_BOX_ACTION",
      "requestProperties":[
        {
          "name":"CREDENTIAL_MAP_NAME",
          "source":"BLUEPRINT_STATIC",
          "value":"user.custom.map"
        },
        {
          "name":"KEY",
          "source":"BLUEPRINT_STATIC",
          "value":"ADD_CRED_TEST"
        }
      ]
    }
  ],
  "operations":[
    {
      "type":"INSTALL",
      "actionExecutionSequence":[
        {
          "sequenceNumber":1,
          "actionTag":"Add credential"
        }
      ]
    },
    {
      "type":"UNINSTALL",
      "actionExecutionSequence":[
        {
          "sequenceNumber":1,
          "actionTag":"Delete credential"
        }
      ]
    }
  ],
  "accessURLs":[
    {
      "name":"static",
      "type":"STATIC",
      "description":"Test URL",
      "staticURL":"https://www.oracle.co.in/?gws_rd=ssl"
    }
  ]
}

HTTP Status Code:

200 OK

JSON Response:

{  
   "message":"Listing Package saved with package version = REST API Test App14.04-LTS (20160222 amd64)-mod and packageVersionId = 3570025",
   "entityId":"3569978",
   "uri":"3569978"
}
Back to Top