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
- multipart/form-data
Path Parameters
-
listingVersionId: integer(int64)
Unique identifier of the application whose package is to be updated.
-
packageVersionId: integer(int64)
Unique identifier of the package to update.
Provide required information.
Root Schema : PackageVersion
Type:
Show Source
object
-
accessURLs(optional):
array accessURLs
-
actions(optional):
array actions
-
code(optional):
string
-
dependentServices(optional):
array dependentServices
-
deploymentMode(optional):
string
-
description(optional):
string
-
displayName(optional):
string
-
downloadablePackageResource(optional):
object Resource
-
links(optional):
array link
-
listingImageURL(optional):
string
-
listingVersionId(optional):
integer(int64)
-
name(optional):
string
-
namespacePrefix(optional):
string
-
operations(optional):
array operations
-
owner(optional):
string
-
partnerName(optional):
string
-
resources(optional):
array resources
-
version(optional):
string
Nested Schema : InputStream
Type:
object
Nested Schema : Link
Type:
Show Source
object
-
href(optional):
string
-
rel(optional):
string
Allowed Values:
[ "SELF", "CANONICAL", "NEXT", "TEMPLATE", "PREV" ]
Response
Supported Media Types
- application/json;qs=1
- application/xml;qs=.5
200 Response
Successful Operation
400 Response
Invalid Parameter Value
401 Response
Not Authorized
404 Response
Entity Not Found
500 Response
System Error
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