OCIリソース・マネージャのリストを公開するためのクックブック

パブリッシャAPIを使用して、OCI Terraformリストをマーケットプレイスに公開します。

マーケットプレイス・パートナは、マーケットプレイス・パートナ・ポータル(UIアプリケーション)またはパブリッシャREST APIのいずれかを使用して、OCI Terraformリストをマーケットプレイスに公開できます。このドキュメントでは、Publisher APIを使用するプロセスについて説明します。Marketplace Publisher APIを参照してください。

パブリッシャーAPIクックブック

この項では、1つ以上のパッケージ・バージョンを含むリストをMarketplaceに公開するためのAPIサンプルを示します。

Publisher API資格証明

Publisher API資格証明については、Oracleサポートに連絡してください。

次の項の{endpoint-URL}を、ターゲット環境の次のエンドポイントURLに置き換えます。

環境 パブリッシャAPIエンドポイントURL
本番 https://ocm-apis-cloud.oracle.com/appstore/publisher

次のステップでは、{user_id}をパートナ・ユーザーの電子メールIDに置き換えます。

Oauthトークン生成

Request:
curl -X GET \
{endpoint-url}/appstore/publisher/v1/authenticate \
-H 'authorization: Basic Y2IxZjJkZjUtY2U3Yi00YWNjLWIxZDgtOThiZDIyZDY5NGZlOnN3aFZBakNSVUdLVHRjUE5lcWww' \
-H 'cache-control: no-cache'
Response:
{
"oracle_client_assertion_type": "urn:ietf:params:oauth:client-assertion-type:jwt-bearer",
"expires_in": 604800,
"oracle_tk_context": "client_assertion",
"access_token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsIng1dCI6Im9KWTEtVHhTTW5HZUFiYlZzdGhPY3U1cW5QayIsImtpZCI6Im9jbWNvbXB1dGUuY2VydCJ9.eyJzdWIiOiJjYjFmMmRmNS1jZTdiLTRhY2MtYjFkOC05OGJkMjJkNjk0ZmUiLCJpc3MiOiJvY21jb21wdXRlIiwib3JhY2xlLm9hdXRoLnN2Y19wX24iOiJvY21jb21wdXRlU2VydmljZVByb2ZpbGUiLCJpYXQiOjE1MzkwMDEzODYsIm9yYWNsZS5vYXV0aC5wcm4uaWRfdHlwZSI6IkNsaWVudElEIiwiZXhwIjoxNTM5NjA2MTg2LCJvcmFjbGUub2F1dGgudGtfY29udGV4dCI6ImNsaWVudF9hc3NlcnRpb24iLCJhdWQiOlsiaHR0cHM6Ly9ybm8yMTQwMDUudXMub3JhY2xlLmNvbS9hcHBzdG9yZS9tYXJrZXRwbGFjZSIsImh0dHBzOi8vcm5vMjE0MDA1LnVzLm9yYWNsZS5jb20vYXBwc3RvcmUvcHVibGlzaGVyIl0sInBybiI6ImNiMWYyZGY1LWNlN2ItNGFjYy1iMWQ4LTk4YmQyMmQ2OTRmZSIsIm9yYWNsZS5vYXV0aC5zdWIuaWRfdHlwZSI6IkNsaWVudElEIiwianRpIjoiMzhiNTVmNzctMDJmZS00MWM4LWJkODQtNjljYjFhMmE4NTU1IiwidXNlci50ZW5hbnQubmFtZSI6Im9jbWNvbXB1dGUiLCJvcmFjbGUub2F1dGguaWRfZF9pZCI6IjQxNzk0ODIxNjYwMDk4MTgzIn0.BmE2MUlkIzMOwK4skM1dzjJf3ebLODXv_tecWGYwcq5Y79KvG8_ouxGsfmlL1KvZsNAiXXlb9IUT4d5spEHroACmj_vV49ox9w-NjQXn_SKcNkvQ8wfVd12pEcerFEcqjt-MPw7rm0U4FLbGQXLJ0GlF50d0ccPYCx23Q5SBY4wvlpHYvwbaQTUAjQj6KODDFWnTe8Tldp_Vl3mGsplSn7hw6xhaERX5v0xikhj7R46bkRIcqblpVIawMo2nhc9Gy0g6GneCmUOXDGLbJjE6t2udBWwQviaHZrgiY2di1fwGR9kuDo9vGUJAYFjSMJU1sVIiSn4l9tksDuzplz8FUw",
4 WHITE PAPER / Cookbook to Publish OCI Resource Manager Listings
"token_type": "Bearer"
}
承認ヘッダーを生成するには、
  1. Client Idからの連結文字列、シークレットを<ClientID>:<Secret>として形成します。たとえば、Client Idが"cb1f2df5-ce7b-4acc-b1d8-98bd22d694fe"で、Secretが"swhVAjCRUGKTtcPNeql0"の場合、文字列を"cb1f2df5-ce7b-4acc-b1d8-98bd22d694fe:swhVAjCRUGKTtcPNeql0"として形成します。

  2. Base64は、連結された文字列をエンコードします。たとえば、Base64エンコーディングの後の前述の文字列は"Y2IxZjJkZjUtY2U3Yi00YWNjLWIxZDgtOThiZDIyZDY5NGZlOnN3aFZBakNSVUdLVHRjUE5lcWww"です。

  3. access_tokenを取得するには、このBase64エンコード値を'authorization'ヘッダーとして使用します。

access_tokenの使用方法:

/authenticateのコールに成功すると、レスポンスに"access_token"プロパティが表示されます。このプロパティの値は、次に示すAPIコールで"authorization"ヘッダー値として使用する必要があります。"authorization"ヘッダー値を作成するには、文字列を"Bearer <access_token_header_value>"として形成します。

たとえば、この値は、前述のレスポンスで受信したaccess_tokenを使用して形成されます。

"Bearer
eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsIng1dCI6Im9KWTEtVHhTTW5HZUFiYlZzdGhPY3U1cW5QayIsImtpZCI6Im9jbWNvbXB1dGUuY2VydCJ9.eyJzdWIiOiJjYjFmMmRmNS1jZTdiLTRhY2MtYjFkOC05OGJkMjJkNjk0ZmUiLCJpc3MiOiJvY21jb21wdXRlIiwib3JhY2xlLm9hdXRoLnN2Y19wX24iOiJvY21jb21wdXRlU2VydmljZVByb2ZpbGUiLCJpYXQiOjE1MzkwMDEzODYsIm9yYWNsZS5vYXV0aC5wcm4uaWRfdHlwZSI6IkNsaWVudElEIiwiZXhwIjoxNTM5NjA2MTg2LCJvcmFjbGUub2F1dGgudGtfY29udGV4dCI6ImNsaWVudF9hc3NlcnRpb24iLCJhdWQiOlsiaHR0cHM6Ly9ybm8yMTQwMDUudXMub3JhY2xlLmNvbS9hcHBzdG9yZS9tYXJrZXRwbGFjZSIsImh0dHBzOi8vcm5vMjE0MDA1LnVzLm9yYWNsZS5jb20vYXBwc3RvcmUvcHVibGlzaGVyIl0sInBybiI6ImNiMWYyZGY1LWNlN2ItNGFjYy1iMWQ4LTk4YmQyMmQ2OTRmZSIsIm9yYWNsZS5vYXV0aC5zdWIuaWRfdHlwZSI6IkNsaWVudElEIiwianRpIjoiMzhiNTVmNzctMDJmZS00MWM4LWJkODQtNjljYjFhMmE4NTU1IiwidXNlci50ZW5hbnQubmFtZSI6Im9jbWNvbXB1dGUiLCJvcmFjbGUub2F1dGguaWRfZF9pZCI6IjQxNzk0ODIxNjYwMDk4MTgzIn0.BmE2MUlkIzMOwK4skM1dzjJf3ebLODXv_tecWGYwcq5Y79KvG8_ouxGsfmlL1KvZsNAiXXlb9IUT4d5spEHroACmj_vV49ox9w-NjQXn_SKcNkvQ8wfVd12pEcerFEcqjt-MPw7rm0U4FLbGQXLJ0GlF50d0ccPYCx23Q5SBY4wvlpHYvwbaQTUAjQj6KODDFWnTe8Tldp_Vl3mGsplSn7hw6xhaERX5v0xikhj7R46bkRIcqblpVIawMo2nhc9Gy0g6GneCmUOXDGLbJjE6t2udBWwQviaHZrgiY2di1fwGR9kuDo9vGUJAYFjSMJU1sVIiSn4l9tksDuzplz8FUw"

アプリケーションへのアイコンの追加

Request:
curl -X POST \
{endpoint_url}/appstore/publisher/v1/applications/16034919/icon \
-H 'Authorization: Bearer {{access_token}}' \
-H 'X-Oracle-UserId: {user_id}' \
-H 'cache-control: no-cache' \
-H 'content-type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW' \
-F 'image=@content.png'
Response:
{
"message": "Icon upload was successful",
"entityId": "16034935"
}

アプリケーション・リストの新規バージョンの作成

Request:
curl -X POST \
{endpoint_url}/appstore/publisher/v1/applications/16034919/version \
-H 'Authorization: Bearer {{access_token}}' \
-H 'cache-control: no-cache' \
-H 'content-type: application/json' \
-H 'x-oracle-userid: {user_id}'
Response:
{
"message": "A new version was created.",
"entityId": "16034994"
}

既存のパッケージからパッケージバージョンを作成する

ノート

パブリッシャ・アプリケーション・バージョンV2で使用可能なOCIパッケージ操作。

URL: /appstore/publisher/v2/applications/16034994/packages/16034937/version

ここで、16034994listingVersionId16034937は新しくバージョニングされたパッケージのpackageIdです。

Request:
curl -X PATCH \
{endpoint_url}/appstore/publisher/v2/applications/16034994/packages/16034937/version \
-H 'Authorization: Bearer {{access_token}}' \
-H 'cache-control: no-cache' \
-H 'content-type: application/json' \
-H 'x-oracle-userid: {user_id}'
Response:
{
"message": "Listing Template created with Template Id 16035011 for Listing Version Id 16034994",
"entityId": "16035011"
}

Terraformアーティファクトの作成

開始する前に、ファイル"Terraform.zip"がディレクトリに存在することを確認してください。
Request:
curl -X POST \
{endpoint_url}/appstore/publisher/v1/artifacts \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {{access_token}}' \
-H 'X-Oracle-UserId: {user_id}' \
-H 'cache-control: no-cache' \
-H 'content-type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW' \
-F 'json={ "name": "APSREST_AF_02132019", "artifactType": "TERRAFORM_TEMPLATE" }' \
-F 'file=@Terraform.zip' \
5 WHITE PAPER / Cookbook to Publish OCI Resource Manager Listings
-F accept=application/json
Response:
{
"message": "OK",
"entityId": "15990161"
}

アプリケーション・リストの作成

Request:
curl -X POST \
{endpoint_url}/appstore/publisher/v1/applications/ \
-H 'Authorization: Bearer {{access_token}}' \
-H 'Content-Type: application/json' \
-H 'X-Oracle-UserId: {user_id}' \
-H 'cache-control: no-cache' \
-d '{
"name":"Jenkins",
"products": [
{
"code": "oci",
"categories": [
{
"code": "APPLICATION_STACKS"
}
]
}
],
"deviceType":{
"code":"BROWSER"
},
"pricing":{
"type":"FREE",
"description":""
},
"listingContentLanguage":{
"code":"en_US"
},
"shortDescription": "Short description",
"longDescription": "Long description",
"usageInformation": "Usage Information",
"tags": "Jenkins",
"tagLine": "Continuous Integration and Continuous Delivery",
"listingContentLanguage": {
"code": "en_US",
"name": "English"
},
"versionDetails":{
"versionNumber": "4.0.0-0 on OL 7.5",
"releaseDate": "2018-07-10T00:00:00.000Z"
},
"systemRequirements":"System Requirements",
"support":{
"contacts":null,
"links": [
{
"name": "Support Page",
"url": "https://example.com/support/oci"
}, {
"name": "Community",
"url": "https://community.example.com/"
}
]
},
"availableInAllRegions":true,
"languages":[
{
"code":"en_US"
}
]
}'
Response:
{
"message": "Listing was created successfully.",
"entityId": "16034919",
"name": "Jenkins"
}

リスト・パッケージの作成

ノート

Publisherアプリケーション・バージョンV2で使用可能なOCIパッケージ操作。
Request:
curl -X POST \
{endpoint_url}/appstore/publisher/v2/applications/16034919/packages \
-H 'Authorization: Bearer {{access_token}}' \
-H 'X-Oracle-UserId: {user_id}' \
-H 'cache-control: no-cache' \
-H 'content-type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW' \
-F 'json={
"version":"1.0.1",
"description":"Jenkins",
"serviceType": "OCIOrchestration",
"resources": [{
"serviceType": "OCIOrchestration",
"type": "terraform",
"properties": [{
"name": "artifact",
"value": "15990161",
"valueProperties": [{
"name": "name",
"value": "APSREST_AF_02132019"
}]
},
{
"name": "compartmentId",
"source": "end_user",
"displayName": "Compartment ID",
"dataType": "string",
"mandatory": true,
"custom": false,
"cardinality": "SINGLE_VALUE"
}
]
}]
}'
Response:
{
"message": "Listing Template created with Template Id 16034937 for Listing Version Id 16034919",
"entityId": "16034937"
}

すべてのアーティファクトの取得

Request:
curl -X GET \
{endpoint-url}/appstore/publisher/v1/artifacts?artifactType=TERRAFORM_TEMPLATE \
-H 'Authorization: Bearer {{access_token}}' \
-H 'Content-Type: application/json' \
-H 'X-Oracle-UserId: {user_id}' \
-H 'cache-control: no-cache'
Response:
{
"items": [
{
"Artifact": {
"artifactId": 16034835,
"artifactType": "Terraform Template",
"name": "APSREST_AF_02132019",
"status": "Unavailable",
"processingStatusNote": "Artifact creation failed",
"lastModifiedBy": "Solis Doe",
"lastModifiedDate": "2019-02-13T00:40:58.000Z",
"createdBy": "Jane Wilson",
"creationDate": "2019-02-13T00:40:55.000Z"
}
},
{
"Artifact": {
"artifactId": 16028295,
"artifactType": "Terraform Template",
"name": "APS1941 AF_feb9",
"status": "Unavailable",
"processingStatusNote": "Artifact creation failed",
"lastModifiedBy": "Solis Doe",
"lastModifiedDate": "2019-02-11T10:28:16.000Z",
"createdBy": "Jane Wilson",
"creationDate": "2019-02-11T10:28:13.000Z"
}
},
{
"Artifact": {
"artifactId": 15997307,
"artifactType": "Terraform Template",
"name": "testing",
"status": "Unavailable",
"processingStatusNote": "Artifact creation failed",
"lastModifiedBy": "Solis Doe",
"lastModifiedDate": "2019-01-23T07:30:54.000Z",
"createdBy": "Jone Hail",
"creationDate": "2019-01-23T07:30:50.000Z"
}
},
{
"Artifact": {
"artifactId": 15997300,
"artifactType": "Terraform Template",
"name": "APS1942 AF_0121194",
"status": "Unavailable",
"processingStatusNote": "Artifact creation failed",
"lastModifiedBy": "Solis Doe",
"lastModifiedDate": "2019-01-23T06:57:22.000Z",
"createdBy": "Jane Wilson",
"creationDate": "2019-01-23T06:56:57.000Z"
}
},
{
"Artifact": {
"artifactId": 15995924,
"artifactType": "Terraform Template",
"name": "aps19.1.4",
"status": "Unavailable",
"processingStatusNote": "Artifact creation failed",
"lastModifiedBy": "Solis Doe",
"lastModifiedDate": "2019-01-21T15:05:08.000Z",
"createdBy": "John Doe",
"creationDate": "2019-01-21T15:05:06.000Z"
}
},
{
"Artifact": {
"artifactId": 15995917,
"artifactType": "Terraform Template",
"name": "APS1846 AF_0121194",
"status": "Unavailable",
"processingStatusNote": "Artifact creation failed",
"lastModifiedBy": "Solis Doe",
"lastModifiedDate": "2019-01-21T15:03:05.000Z",
"createdBy": "Jane Wilson",
"creationDate": "2019-01-21T15:03:01.000Z"
}
},
{
"Artifact": {
"artifactId": 15990161,
"artifactType": "Terraform Template",
"name": "testerewrewr",
"status": "Unavailable",
"processingStatusNote": "Artifact creation failed",
"lastModifiedBy": "Solis Doe",
"lastModifiedDate": "2019-01-18T10:07:01.000Z",
"createdBy": "John Doe",
"creationDate": "2019-01-18T10:07:00.000Z"
}
},
{
"Artifact": {
"artifactId": 15917942,
"artifactType": "Terraform Template",
"name": "fort",
"status": "Available",
"processingStatusNote": "The artifact has been successfully created",
"lastModifiedBy": "Solis Doe",
"lastModifiedDate": "2018-12-17T07:38:47.000Z",
"createdBy": "Jone Hail",
"creationDate": "2018-12-17T07:38:23.000Z"
}
},
{
"Artifact": {
"artifactId": 15904854,
"artifactType": "Terraform Template",
"name": "test",
"status": "Available",
"processingStatusNote": "The artifact has been successfully created",
"lastModifiedBy": "Solis Doe",
"lastModifiedDate": "2018-12-12T13:04:21.000Z",
"createdBy": "John Doe",
"creationDate": "2018-12-12T13:04:18.000Z"
}
},
{
"Artifact": {
"artifactId": 15897854,
"artifactType": "Terraform Template",
"name": "t1_test",
"status": "Unavailable",
"processingStatusNote": "Artifact creation failed",
"lastModifiedBy": "Solis Doe",
"lastModifiedDate": "2018-12-10T06:37:47.000Z",
"createdBy": "John Doe",
"creationDate": "2018-12-10T06:37:05.000Z"
}
},
{
"Artifact": {
"artifactId": 15849717,
"artifactType": "Terraform Template",
"name": "TFArtifact_110118-1051",
"status": "Available",
"processingStatusNote": "The artifact has been successfully created",
"lastModifiedBy": "Solis Doe",
"lastModifiedDate": "2018-11-01T05:22:11.000Z",
"createdBy": "Jane Wilson",
"creationDate": "2018-11-01T05:21:45.000Z"
}
},
{
"Artifact": {
"artifactId": 15848729,
"artifactType": "Terraform Template",
"name": "TFArtifact_110118",
"status": "Available",
"processingStatusNote": "The artifact has been successfully created",
"lastModifiedBy": "Solis Doe",
"lastModifiedDate": "2018-11-01T04:44:47.000Z",
"createdBy": "Jane Wilson",
"creationDate": "2018-11-01T04:44:19.000Z"
}
}
],
"hasMore": false,
"count": 12,
"totalResults": 12,
"links": [
{
"rel": "CANONICAL",
"href": "https://ocm-apis-cloud.oracle.com/appstore/publisher/v1/artifacts"
},
{
"rel": "SELF",
"href": "https://ocm-apis-cloud.oracle.com/appstore/publisher/v1/artifacts?artifactType=TERRAFORM_TEMPLATE"
}
]
}

アプリケーション・リスト詳細の取得

Request:
curl -X GET \
{endpoint_url}/appstore/publisher/v1/applications/16034919 \
-H 'Authorization: Bearer {{access_token}}' \
-H 'Content-Type: application/json' \
-H 'X-Oracle-UserId: {user_id}' \
-H 'cache-control: no-cache'
Response:
{
"name": "Jenkins",
"listingId": 16034918,
"listingVersionId": 16034919,
"products": [
{
"code": "oci",
"name": "Oracle Cloud Infrastructure",
"categories": [
{
"code": "APPLICATION_STACKS",
"name": "Project Management"
}
]
}
],
"deviceType": {
"code": "BROWSER",
"name": "Browser"
},
"pricing": {
"type": "FREE",
"name": "Free",
"description": null
},
"isPrivate": false,
"shortDescription": "Short description",
"longDescription": "Long description",
"usageInformation": "Usage Information",
"tags": "Jenkins",
"tagLine": "Continuous Integration and Continuous Delivery",
"listingContentLanguage": {
"code": "en_US",
"name": "English"
},
"versionDetails": {
"versionNumber": "4.0.0-0 on OL 7.5",
"releaseDate": "2018-07-10T00:00:00.000Z"
},
"systemRequirements": "System Requirements",
"hasTemplate": true,
"languages": [
{
"code": "en_US",
"name": "English"
}
],
"status": "APPROVED",
"support": {
"contacts": null,
"links": [
{
"name": "Support Page",
"url": "https://example.com/support/oci"
},
{
"name": "Community",
"url": "https://community.example.com/"
}
]
},
"icon": {
"name": "content.png",
"contentURL": "https://ocm-apis-cloud.oracle.com/partner/content?contentId=16034935",
"resourceURL": "https://ocm-apis-cloud.oracle.com/appstore/publisher/v1/applications/16034919/icon/16034935",
"mimeType": "image/png",
"fileExtension": "png"
},
"availableInAllRegions": true,
"regions": [],
"packageAvailable": true,
"versionedListing": false,
"lastUpdateDate": "2019-02-13T04:40:39.003Z",
"partnerId": 7972187,
"links": [
{
"rel": "CANONICAL",
"href": "https://ocm-apis-cloud.oracle.com/appstore/publisher/v1/applications/16034919"
}
]
}

IDによるアーティファクトの取得

Request:
curl -X GET \
{endpoint-url}/appstore/publisher/v1/artifacts/15990161 \
-H 'accept: application/json' \
-H 'authorization: Bearer {{access_token}}' \
-H 'cache-control: no-cache' \
-H 'content-type: application/json' \
-H 'x-oracle-userid: {user_id}'
Response:
{
"artifactId": 15990161,
"artifactType": "Terraform Template",
"name": "APSREST_AF_02132019",
"status": "Available",
"processingStatusNote": "The artifact has been successfully created",
"lastModifiedBy": "Solis Doe",
"lastModifiedDate": "2018-12-12T13:04:21.000Z",
"createdBy": "John Doe",
"creationDate": "2018-12-12T13:04:18.000Z",
"uploadRequest": {
"artifactUploadRequestId": 15904856,
"numberOfMultiparts": 1,
"status": "Completed",
"fileName": "Terraform.zip",
"uploadParts": [
{
"partNumber": 1,
"partFileName": "Terraform.zip",
"sizeInBytes": 191133
}
]
}
}

パッケージ・バージョンIDの取得

ノート

パブリッシャ・アプリケーション・バージョンV2で使用可能なOCIパッケージ操作。
Request:
curl -X GET \
{endpoint-url}/appstore/publisher/v2/applications/16034994/packages \
-H 'authorization: Bearer {{access_token}}' \
-H 'cache-control: no-cache' \
-H 'content-type: application/json' \
-H 'x-oracle-userid: {user_id}'
Response:
{
"items": [
{
"Package": {
"id": 16034937,
"serviceType": "OCIOrchestration",
"description": "Jenkins",
"version": "1.0.1",
"status": {
"code": "published",
"displayName": "Published"
},
"referredByOtherListings": true,
"resources": [
{
"id": 16034938,
"type": "terraform",
"serviceType": "OCIOrchestration",
"properties": [
{
"name": "artifact",
"source": "publisher",
"value": "15990161",
"displayName": "Artifact",
"dataType": "artifact",
"mandatory": true,
"custom": false,
"supportedFiles": "TERRAFORM_TEMPLATE",
"cardinality": "SINGLE_VALUE",
"valueProperties": [
{
"name": "name",
"value": "APSREST_AF_02132019"
},
{
"name": "CreationDate",
"value": "Sep 17, 2018 02:41 AM"
}
]
},
{
"name": "displayName",
"source": "publisher",
"value": "terraform-oci-jenkins",
"displayName": "Display Name",
"dataType": "string",
"mandatory": false,
"custom": false,
"cardinality": "SINGLE_VALUE"
}
]
}
],
"default": true
}
}
],
"hasMore": false,
"count": 1,
"totalResults": 1,
"links": [
{
"rel": "CANONICAL",
"href": "https://ocm-apis-cloud.oracle.com/appstore/publisher/v2/applications/16034919/packages"
},
{
"rel": "SELF",
"href": "https://ocm-apis-cloud.oracle.com/appstore/publisher/v2/applications/16034919/packages"
}
]
}

アプリケーション・リストの公開

Request:
curl -X PATCH \
{endpoint_url}/appstore/publisher/v1/applications/16034919 \
-H 'Authorization: Bearer {{access_token}}' \
-H 'Content-Type: application/json' \
-H 'X-Oracle-UserId: {user_id}' \
-H 'cache-control: no-cache' \
-d '{"action":"publish"}'
Response:
{
"message": "publish operation successful on listing. Earlier version, if any, would be withdrawn.",
"entityId": "16034919"
}

未公開パッケージの再公開

ノート

パブリッシャ・アプリケーション・バージョンV2で使用可能なOCIパッケージ操作。
Request:
curl -X PATCH \
{endpoint-url}/appstore/publisher/v2/applications/16034994/packages/16034937 \
-H 'authorization: Bearer {{access_token}}' \
-H 'cache-control: no-cache' \
-H 'content-type: application/json' \
-H 'x-oracle-userid: {user_id}' \
-d '{"action":"publish"}'
Response:
{
"message": "Request for unpublish has been removed successfully.",
"entityId": "16034994"
}
ノート

正当な証明書がない環境では、-kを追加して、証明書のカール検証をオフにします。

パッケージ・バージョンをデフォルトに設定- デフォルトとしてマーク

ノート

Publisherアプリケーション・バージョンV2で使用可能なOCIパッケージ操作。
Request:
curl -X PATCH \
{endpoint-url}/appstore/publisher/v2/applications/16034994/packages/16035011 \
-H 'authorization: Bearer {{access_token}}' \
-H 'cache-control: no-cache' \
-H 'content-type: application/json' \
-H 'x-oracle-userid: {user_id}' \
-d '{"action":"default"}'
Response:
{
"message": "ListingPackage default was successful.",
"entityId": "16034994"
}

応募リストの承認のための送信

ノート

このパートナでは、「このパートナがOracle承認を必要とせずに新規リストを承認できるようにする」オプションが有効になっています。
Request:
curl -X PATCH \
{endpoint_url}/appstore/publisher/v1/applications/16034919 \
-H 'Authorization: Bearer {{access_token}}' \
-H 'Content-Type: application/json' \
-H 'X-Oracle-UserId: {user_id}' \
-H 'cache-control: no-cache' \
-d '{"action":"submit",
"note":"Submitting the Appllication"}'
Response:
{
"message": "submit operation successful on listing.",
"entityId": "16034919"
}

既存のパッケージの公開取消

ノート

  • Publisherアプリケーション・バージョンV2で使用可能なOCIパッケージ操作。
  • デフォルト・パッケージを非公開にすることはできません。

  • リストのパッケージが1つのみ存在する場合、非公開にできません。

Request:
curl -X PATCH \
{endpoint-url}/appstore/publisher/v2/applications/16034994/packages/16034937 \
-H 'authorization: Bearer {{access_token}}' \
-H 'cache-control: no-cache' \
-H 'content-type: application/json' \
-H 'x-oracle-userid: {user_id}' \
-d '{"action":"unpublish"}'
Response:
{
"message": "Request for unpublish has been created successfully. The package will be unpublished when the listing is published.",
"entityId": "16034994"
}

バージョン管理されたリスト詳細の更新 – 更新フィールドの説明

curl -X PATCH \
{endpoint-url}/appstore/publisher/v1/applications/16034994 \
-H 'authorization: Bearer {{access_token}}' \
-H 'cache-control: no-cache' \
-H 'content-type: application/json' \
-H 'x-oracle-userid: {user_id}'\
-d '{
"longDescription": "Modified Listing long description",
"shortDescription": "Modified Listing short description "
}'
Response:
{
"message": "Listing was updated successfully.",
"entityId": "16034998",
"name": "Jenkins"
}

バージョン管理されたパッケージの詳細の更新- 新しく作成されたアーティファクトの関連付け

ノート

Publisherアプリケーション・バージョンV2で使用可能なOCIパッケージ操作。
Request:
curl -X PUT \
{endpoint-url}/appstore/publisher/v2/applications/16034994/packages/16035011 \
-H 'authorization: Bearer {{access_token}}' \
-H 'cache-control: no-cache' \
-H 'content-type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW' \
-H 'x-oracle-userid: {user_id}' \
-F 'json={
"resources":[
{
"serviceType":"OCIOrchestration",
"type":"terraform",
"properties":[
{
"name":"artifact",
"value":"15849717",
"valueProperties":[
{
"name":"name",
"value":"TFArtifact_110118-1051"
}
]
},
{
"name": "compartmentId",
"source": "end_user",
"displayName": "Compartment ID",
"dataType": "string",
"mandatory": true,
"custom": false,
"cardinality": "SINGLE_VALUE"
}
]
}
]
}'
Response:
{
"message": "Successfully saved Template Resource for Template Id 16035011 ",
"entityId": "1603501 "
}