Update Application Package - V2
put
/appstore/publisher/v2/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.
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/v2/applications/{listingVersionId}/packages/{packageVersionId}"
Request Header
X-Oracle-UserId: fname.lname@oracle.com Authorization: Bearer Access-token Content-Type: application/json
Request Body for JAVA to update header, Data Source and Application archive resources
Note : You can add multiple resources of type datasourcealias but can add only one resource of type applicationarchive.
{ "description": "Acme is a pre-configured, ready to run image for running Acme on Oracle Cloud. ", "version": "1.2", "namespacePrefix": "Rest Package Snippet", "tncId": "2528849", "serviceType" : "JAVA", "resources": [{ "type": "datasourcealias", "properties": [{ "name": "ALIAS_NAME", "value": "datasource_alias_soude-1" }] },{ "type": "datasourcealias", "properties": [{ "name": "ALIAS_NAME", "value": "datasource_alias_soude-2" }] }, { "type": "applicationarchive", "properties": [{ "name": "APPLICATION_NAME", "value": "marketplaceUi.war" }] }] }
Request Body for JAVA to update header only.
Note : When header only is updated the existing resources will not be deleted.
{ "description": "Acme is a pre-configured, ready to run image for running Acme on Oracle Cloud. ", "version": "1.2", "namespacePrefix": "Rest Package Snippet", "tncId": "2528849" }
Request Body for JAVA to update a resource of type datasourcealias.
Note : The given resource only will be updated and other existing resources will not be deleted. If Id is not provided new datasource will be created.
{ "resources": [{ "id:: 20160222, "type": "datasourcealias", "properties": [{ "name": "ALIAS_NAME", "value": "datasource_alias_soude-1" }] }] }
Request Body for JAVA to update a resource of type applicationarchive.
Note : The given resource only will be updated and other existing resources will not be deleted. If Id is not provided new datasource will be created.
{ "resources": [{ "id:: 20160223, "serviceType" : "JAVA", "type": "applicationarchive", "properties": [{ "name": "APPLICATION_NAME", "value": "marketplaceUi.war" }] }] }
HTTP Status Code:
200 OK
JSON Response:
{ "message":"Listing Package saved with package version = REST API Test App14.04-LTS (20160222 amd64)-mod", "entityId":"3569978", "uri":"3569978" }Back to Top