Create Artifact
post
/appstore/publisher/v1/artifacts
Create a Artifact.
Request
Supported Media Types
- application/xml
- application/json
Provide the body with required information. Mandatory only when creating artifact of OCI Compute Image type. Provide FormDataMultiPart data while creating artifact of Terraform Template type. It consumes multipart/form-data
Root Schema : Artifact
Type:
Show Source
object
-
artifactId(optional):
integer(int64)
-
artifactProperties(optional):
array artifactProperties
-
artifactType(optional):
string
-
createdBy(optional):
string
-
creationDate(optional):
string(date-time)
-
lastModifiedBy(optional):
string
-
lastModifiedDate(optional):
string(date-time)
-
name(optional):
string
-
processingStatusNote(optional):
string
-
replicatedRegions(optional):
array replicatedRegions
-
source(optional):
object ArtifactSource
-
status(optional):
string
-
triggerImageValidation(optional):
boolean
-
uploadRequest(optional):
object UploadRequest
-
username(optional):
string
Response
Supported Media Types
- application/json;qs=1
- application/xml;qs=.5
200 Response
Successful Operation
400 Response
Invalid Parameter Value/Bad Request
401 Response
Not Authorized
500 Response
System Error
Examples
The following example creates a new artifact for a partner and return the newly created artifact ID by submitting a POST request on the REST resource using cURL.
cURL Example
curl -X POST -H "X-Oracle-UserId: partner-email" -H "Content-Type: application/json" -H "Authorization: Bearer Access-token -d JSON-data-as-shown-in-below-example' "https://ocm-apis.cloud.oracle.com/appstore/publisher/v1/artifacts"
Request Header
X-Oracle-UserId: fname.lname@oracle.com Authorization: Bearer Access-token Content-Type: application/json
Request Body
{ "name":"OCI_Image_test1", "artifactType":"OCI_COMPUTE_IMAGE", "source" : { "regionCode": "us-ashburn-1", "uniqueIdentifier": "ocid1.image.oc1.iad.aaaaaaaaypp76pttzvhkmtxqhvojbczcvpw3diyozxevig3ybnig2vs4vpiq" }, "artifactProperties":[ { "artifactTypePropertyName":"compartmentOCID", "value":"ocid1.compartment.region1..aaaaaaaa3wbgnc7d4644drvokszlp6usigamqdwzofzb2qjdxfwvxf6od5jq" }, { "artifactTypePropertyName":"ociTenancyID", "value":"15786747" } ], "compatibleShapes": [ { "shape": "VM.Standard2.1", "ocpuConstraints": { "min":5, "max":6 }, "memoryConstraints": { "minInGBs":1, "maxInGBs":5 } }, { "shape": "VM.Standard2.2" } ] }
HTTP Status Code:
201 Created
JSON Response:
{ "message":"OK", "entityId":"15812945" }Back to Top