Guía de publicación de listados de OCI Resource Manager
Publique listas de Terraform de OCI en Marketplace mediante API de editor.
Los partners de Marketplace pueden publicar listas de Terraform de OCI en Marketplace mediante el portal de partners de Marketplace (aplicación de IU) o las API de REST de Publisher. En este documento se describe el proceso mediante API de Publisher. Consulte API de editor de Marketplace.
Manual de API del editor
En esta sección se muestran los ejemplos de API para publicar un listado con una o más versiones de paquete en Marketplace.
Credenciales de API de editor
Para obtener las credenciales de API de Publisher, póngase en contacto con los Servicios de Soporte Oracle.
Sustituya {endpoint-URL} en las siguientes secciones por la siguiente URL de punto final para el entorno de destino.
| Entorno | URL de punto final de API de editor |
|---|---|
| Producción | https://ocm-apis-cloud.oracle.com/appstore/publisher |
Sustituya {user_id} por el ID de correo electrónico de usuario de partner en los siguientes pasos.
Generación de token de 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"
}-
Forme la cadena concatenada de
Client Id, Secreto como "<ClientID>:<Secret>". Por ejemplo, siClient Ides "cb1f2df5-ce7b-4acc-b1d8-98bd22d694fe" ySecretes "swhVAjCRUGKTtcPNeql0", forme la cadena como "cb1f2df5-ce7b-4acc-b1d8-98bd22d694fe:swhVAjCRUGKTtcPNeql0". -
Base64 codifica la cadena concatenada, por ejemplo, la cadena anterior después de la codificación Base64 es: "
Y2IxZjJkZjUtY2U3Yi00YWNjLWIxZDgtOThiZDIyZDY5NGZlOnN3aFZBakNSVUdLVHRjUE5lcWww" -
Utilice este valor codificado Base64 como cabecera '
authorization' para obtener access_token.
Uso de access_token:
Una llamada correcta a /authenticate encontrará la propiedad "access_token" como respuesta. Debe utilizar el valor de esta propiedad como valor de cabecera de "autorización" en las llamadas de API que se muestran a continuación. Para crear el valor de cabecera "authorization", forme la cadena como "Bearer <access_token_header_value>".
Por ejemplo, este valor se forma mediante el valor access_token recibido en la respuesta anterior.
"Bearer
eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsIng1dCI6Im9KWTEtVHhTTW5HZUFiYlZzdGhPY3U1cW5QayIsImtpZCI6Im9jbWNvbXB1dGUuY2VydCJ9.eyJzdWIiOiJjYjFmMmRmNS1jZTdiLTRhY2MtYjFkOC05OGJkMjJkNjk0ZmUiLCJpc3MiOiJvY21jb21wdXRlIiwib3JhY2xlLm9hdXRoLnN2Y19wX24iOiJvY21jb21wdXRlU2VydmljZVByb2ZpbGUiLCJpYXQiOjE1MzkwMDEzODYsIm9yYWNsZS5vYXV0aC5wcm4uaWRfdHlwZSI6IkNsaWVudElEIiwiZXhwIjoxNTM5NjA2MTg2LCJvcmFjbGUub2F1dGgudGtfY29udGV4dCI6ImNsaWVudF9hc3NlcnRpb24iLCJhdWQiOlsiaHR0cHM6Ly9ybm8yMTQwMDUudXMub3JhY2xlLmNvbS9hcHBzdG9yZS9tYXJrZXRwbGFjZSIsImh0dHBzOi8vcm5vMjE0MDA1LnVzLm9yYWNsZS5jb20vYXBwc3RvcmUvcHVibGlzaGVyIl0sInBybiI6ImNiMWYyZGY1LWNlN2ItNGFjYy1iMWQ4LTk4YmQyMmQ2OTRmZSIsIm9yYWNsZS5vYXV0aC5zdWIuaWRfdHlwZSI6IkNsaWVudElEIiwianRpIjoiMzhiNTVmNzctMDJmZS00MWM4LWJkODQtNjljYjFhMmE4NTU1IiwidXNlci50ZW5hbnQubmFtZSI6Im9jbWNvbXB1dGUiLCJvcmFjbGUub2F1dGguaWRfZF9pZCI6IjQxNzk0ODIxNjYwMDk4MTgzIn0.BmE2MUlkIzMOwK4skM1dzjJf3ebLODXv_tecWGYwcq5Y79KvG8_ouxGsfmlL1KvZsNAiXXlb9IUT4d5spEHroACmj_vV49ox9w-NjQXn_SKcNkvQ8wfVd12pEcerFEcqjt-MPw7rm0U4FLbGQXLJ0GlF50d0ccPYCx23Q5SBY4wvlpHYvwbaQTUAjQj6KODDFWnTe8Tldp_Vl3mGsplSn7hw6xhaERX5v0xikhj7R46bkRIcqblpVIawMo2nhc9Gy0g6GneCmUOXDGLbJjE6t2udBWwQviaHZrgiY2di1fwGR9kuDo9vGUJAYFjSMJU1sVIiSn4l9tksDuzplz8FUw"Icono Agregar a una Aplicación
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"
}Crear una nueva versión de la lista de aplicaciones
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"
}Creación de una versión de paquete a partir de un paquete existente
Las operaciones de paquete de OCI están disponibles con la versión V2 de la aplicación Publisher.
En URL: /appstore/publisher/v2/applications/16034994/packages/16034937/version
Aquí, 16034994 es listingVersionId y 16034937 es packageId del paquete recién versionado.
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"
}Creación de un artefacto de Terraform
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"
}Crear listado de aplicaciones
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"
}Crear Paquete de Lista
Las operaciones de paquete de OCI están disponibles con la versión V2 de la aplicación Publisher.
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"
}Obtener todos los artefactos
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"
}
]
}Obtener detalles de lista de aplicaciones
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"
}
]
}Obtener artefacto por 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
}
]
}
}Obtener ID de versión de paquete
Las operaciones de paquete de OCI están disponibles con la versión V2 de la aplicación Publisher.
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"
}
]
}Publicación de un listado de aplicaciones
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"
}Volver a publicar el paquete no publicado
Las operaciones de paquete de OCI están disponibles con la versión V2 de la aplicación Publisher.
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"
}En entornos que no tienen certificados legítimos, agregue -k para desactivar la verificación de rizos de los certificados.
Definición de una versión de paquete como por defecto - Marca como por defecto
Las operaciones de paquete de OCI están disponibles con la versión V2 de la aplicación Publisher.
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"
}Envío de un listado de solicitudes para su aprobación
Aquí, la opción Activar a este partner para aprobar una nueva lista sin necesidad de aprobación de Oracle" está activada para este partner.
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"
}Anular publicación de paquete existente
- Operaciones de paquetes de OCI disponibles con la versión V2 de la aplicación Publisher.
-
No se puede anular la publicación del paquete por defecto.
-
No se puede anular la publicación cuando solo existe un paquete para una lista.
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"
}Actualizar detalles de lista con versiones - Actualizar descripción de campo
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"
}Actualizar detalles de paquete con versiones - Asociar artefacto recién creado
Las operaciones de paquete de OCI están disponibles con la versión V2 de la aplicación Publisher.
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 "
}