Create Artifact

post

/appstore/publisher/v1/artifacts

Create a Artifact.

Request

Supported Media Types
Body ()
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: object
Show Source
Nested Schema : artifactProperties
Type: array
Show Source
Nested Schema : replicatedRegions
Type: array
Show Source
Nested Schema : ArtifactSource
Type: object
Show Source
Nested Schema : UploadRequest
Type: object
Show Source
Nested Schema : ArtifactProperty
Type: object
Show Source
Nested Schema : ArtifactRegion
Type: object
Show Source
Nested Schema : uploadParts
Type: array
Show Source
Nested Schema : UploadPart
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/Bad Request

401 Response

Not Authorized

500 Response

System Error
Back to Top

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