Set metadata and content for the given custom page

put

/developers/services/v1/portal/customization/pages/{pageId}

Add a new custom page to the Developer Portal based on the provided JSON and content. The upload is performed by using a multipart form, with two form parameters: 'metadata' (JSON metadata) and 'content' (zipped file stream).

Request

Supported Media Types
Path Parameters
Form Parameters
  • Form parameter 'content', containing the zipped page implementation content.
  • Form parameter 'metadata', containing the page metadata. For details see the {pageId}/metadata endpoint.
Back to Top

Response

204 Response

None

401 Response

Authentication required.

404 Response

Not allowed to set.
Back to Top

Examples

The following example shows how to add a custom page by submitting a PUT request on the REST resource using cURL. For more information about cURL, see Use cURL

To add and manage custom pages, see Manage Custom Pages in Developer Portal.

curl -i -X PUT
-H 'Authorization: Bearer access_token' 
-H 'Content-Type: multipart/form-data' 
-F 'content=@content.zip'
-F 'metadata=@metadata.json'
 http://example.com/developers/services/v1/portal/customization/pages/{pageId}

Where:

  • access_token refers to the access token generated by Oracle Identity Cloud Service for the Oracle API Platform Cloud Service account. See Security, Authentication and Authorization.

  • example.com refers to the path where Developer Portal is deployed.

  • {pageId}refers to the name of the custom page. For example, Home.

  • metadata.json is the metadata file and content.zip is the zipped page content for the custom page.

The content.zip file typically consists of the following files:

The following is the sample of the metadata.json:

{
  "homePage": "always",
  "module": { "urlScheme": "home",
    "documentationUrl": "https://docs.oracle.com/en/cloud/paas/api-platform-cloud/apfdv/index.html",
    "implementation": {
      "document": "index.html",
      "requirejs": {
        "path": "home",
        "start": "js/start"
      },
      "css": ["css/main.css"]
    }
  },
  "button": {
    "order": 500,
    "text": {
      "root": "Home" - this is just the button text, does not correlate with the page id
    },
    "icon": {
      "image": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHgAAAAYCAYAAAAxkDmIAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAABARJREFUeNrsmkloU0EcxpNQi1U8ueDdiwso9lIXtIJ68KAgovasHjyoFYsiolWxaEGL68ENFD14cgEVqxQXXE5KRbBV8SAIKoi0LkWsts/fhH/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vFaH36x2ZrWk+gcbCVxtdw4lObP4Jvd93XpzmE2hZ+Nf5ph8b/Gt/MmH+/VFBlqN3BPrB5Y5cm8F5+SiQn+f3YGv/BOrkX5vBzv7z/B5s7T8fvyrCiUm1HIon8iwjiQp/ePmpRKWN6GY7g5O2Z9GOLVnk75m0PYsuN/9xBOwV+YtV+EXkJyv/VTmyW6UGj/D2X4ABAHDgwM81lh4xAAAAAElFTkSuQmCC"
    }
  }
}

Example of Response Headers

The following shows an example of the response headers.

HTTP/1.1 204 No Content
Date: Fri, 05 Sep 2018 05:38:18 GMT
Content-length: 0
X-oracle-dms-ecid: fd4f7481-e810-498f-9ef3-3cc199fcc455-0006eb27
X-oracle-dms-rid: 0:1
Back to Top