Get custom page metadata

get

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

Returns the current custom Developer Portal pages settings as JSON. Returns a 404 if no custom page with the given ID exists.

This is a public resource; it does not require authentication and can be accessed by any user.

Request

Path Parameters
Back to Top

Response

Supported Media Types

200 Response

JSON custom pages structure.
Body ()
The custom page metadata provides information for the Developer portal framework about how to load and render a custom page.
Root Schema : CustomPageMetadata
Type: object
The custom page metadata provides information for the Developer portal framework about how to load and render a custom page.
Show Source
  • Specifies whether the page is visible when the Developer Portal is accessed without authentication. Defaults to false.
  • button
    Controls the appearance of the custom page's Navigation Bar button.
  • Specifies whether the page should be used as the landing (home) page of the Developer Portal. The property can take the following values:
    • Never: the page is not used as home page. This is the default
    • Always: the page is used as the home page.
    • Authenticated: the page is used as home page only if a user is logged in.
    • Unauthenticated: the page is used as home page only if the Developer Portal is accessed anonymously.
  • module
    The custom page is added to the Developer Portal as a dynamically loaded module. This parameter sepcifies various properties of the module.
Nested Schema : button
Type: object
Controls the appearance of the custom page's Navigation Bar button.
Show Source
Nested Schema : module
Type: object
The custom page is added to the Developer Portal as a dynamically loaded module. This parameter sepcifies various properties of the module.
Show Source
  • Defines the Help link for the custom page. The Help button will open the specified page in a new tab. If not defined, the start page of the standard Developer Portal documentation will be displayed.
  • implementation

    Configures parameters for the Developer Portal on how the page should be loaded. All file names specified by properties in this object must be relative to the zipped content you uploaded for the page.

    Your page is typically built from HTML, CSS and JS files. The implementation object controls how these files get loaded into the Developer Portal.

  • urlScheme
    Defines the URL path(s) associated with the module. This path will be appended to "/developers/" when you navigate to the page.
Nested Schema : icon
Type: object
Icon data for the custom button.
Show Source
Nested Schema : text
Type: object
Specifies the text of the Navigation Bar button.
Show Source
Nested Schema : implementation
Type: object

Configures parameters for the Developer Portal on how the page should be loaded. All file names specified by properties in this object must be relative to the zipped content you uploaded for the page.

Your page is typically built from HTML, CSS and JS files. The implementation object controls how these files get loaded into the Developer Portal.

Show Source
  • css
    The CSS files listed here will be loaded by adding <link> tags to the <head> element of the Developer portal page.
  • The name of the HTML file that renders your page. This should not be a full HTML document, just an HTML segment (typically a <div> tag) that gets embedded into the Developer Portal's HTML DOM.
  • js
    The JS files listed here will be loaded by adding <script> tags to the <head> element of the Developer portal page.
  • requirejs
    The Developer Portal is a RequireJS-based application and the recommended way of implementing a custom page is to write it as RequireJS modules.
Nested Schema : urlScheme
Type: array
Defines the URL path(s) associated with the module. This path will be appended to "/developers/" when you navigate to the page.
Nested Schema : css
Type: array
The CSS files listed here will be loaded by adding <link> tags to the <head> element of the Developer portal page.
Nested Schema : js
Type: array
The JS files listed here will be loaded by adding <script> tags to the <head> element of the Developer portal page.
Nested Schema : requirejs
Type: object
The Developer Portal is a RequireJS-based application and the recommended way of implementing a custom page is to write it as RequireJS modules.
Show Source
  • If the custom page consists of multiple RequireJS modules, the root location of the page file hierarchy must be specified for RequireJS. This property represents an alias name for the root location, which the Developer adds to the RequireJS path configuration. The custom page's RequireJS modules can then reference other modules by using the "<alias>/..." references in their dependency list.
  • Specifies the start module of the page. Since it will be loaded through RequireJS, the .js extension must be omitted.

    The define() method of the start module should return an object with an init() method. When the module is loaded and the init() method exists, the Developer portal calls it with two parameters:

    • container: A container object the properties and methods of which the custom page can access the overall Developer Portal environment.
    • element: The parent HTMLElement into which the HTML of the page is embedded.

404 Response

No custom pages found.
Back to Top

Examples

The following example shows how to retrieve the metadata of a custom page published to Developer Portal. The example uses the cURL command to submit a GET request on the REST resource.

curl -i -X GET 
-H 'Authorization: Bearer access_token' 
-H 'Content-Type: application/json' 
http://example.com:7201/developers/services/v1/portal/customization/pages/{pageid}/metadata

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 which you want to retrieve the metadata.

For more information about cURL, see Use cURL.

Example of Response Headers

The following shows an example of the response header.

HTTP/1.1 200 OK
Content-Length: 1843
Mon, 24 Sep 2018 09:30:44 GMT
Content-type: application/json
X-oracle-dms-ecid: 585fdc37-bd3c-4713-890e-282f963e56ac-000031f6
X-oracle-dms-rid: 0:1

Example of Response Body

The following example shows the metadata of a custom page named Home returned in the JSON format in the response body.

{
    "button": {
        "icon": {
            "image": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHgAAAAYCAYAAAAxkDmIAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAABARJREFUeNrsmkloU0EcxpNQi1U8ueDdiwso9lIXtIJ68KAgovasHjyoFYsiolWxaEGL68ENFD14cgEVqxQXXE5KRbBV8SAIKoi0LkWsts/fhH/C9GVe3mTeC01KBj7ykkx/+cI3M/95kyY9z0tU2shtVa1tx4PeW4S2o/loFOpG59BZlB0VO5sanT74YMcXK35Y23fncyT//W2znfy/7n4Ti/8Z06ZG8h/WUgGvb0P30Rx0E11G49BpdB3VyHPXcIvKL7Z/wi0b/8lDR475X1uIHqIOtAb1Zvqi/WiP1vc9OqXETB6wDNeJjwYsZ7ATn5k8YBlurP4NMzhWvingW2gemoJ6DH9zGP2VZWOZ8iijarVNyASc5e9aMrmH59Z805cwBOzs3yZkAs7yCaeH55H8GwJ29m/im5boOnQ3AJ6QurBLHmeiA2glaqaeT7CYBGm+CrdQPrLmu/ivbuq05qtwS82/ia8HXI9uS6eflrViEO1FT+UDvhJyF2owzNx6FJmPulCDoW8s/gm5CzUYZm49Knn/fn4m4C3ogRT1S+iJ7W6AZdmTEdUoo2k0ukLILVq4znzZMebwUYvWx5nPsmzkE3KLFm7J+g/jqxpcJyPgEVqlFXXbgIc8J9ixPFyQmrB4cNbaPp3P0tzrm9mF7jCH8KnBfVH8+2+TCHYIv3NDzRA+S3Ovb2ZH8g8vkv8wfkq25L99O7bA+2a0VNb88QGBK8PrpIZs1vn+cF34tEB+HP4JPJDvD7cU/fv5KVkW1Lb8m8Xo2ITuoWvoap5Z/UtGZG2GT7ix8Wk5/Dj9E3IOn3DLxr/OT8mo+GM5/R+jf3J93qI2VPjDzFcf8BItkOIc1tRx2Xe57grqRB0eIzfszzN8am1sfFoOP07/1OEcPrW2bPzr/JScb05CR+W0JGg0eLK+Z9b+F+o1wvR84abkZEX1O6PzCblgvuHcNZDv4p8wPV+4gXxCLjn/YXy1PNxAF9FGNF3OPZ+FjBD9qOyTBDuRhxVoPZqLTlKL22WnnOVzneZTkwvi03L4qF3ei+yfYHP41OJ22Sln+Vyn+dTkkvIfxK+SN9WLb9EOGVHd8mFenlGlNgW1hJi5Kd8t93PqZnsrOqH1NfIJO5Sv3fQXzLfxT4jOfMIedv9h/CrtRKQVtcnZ5g+L0fPRd+LSLKPvFaH36x2ZrWk+gcbCVxtdw4lObP4Jvd93XpzmE2hZ+Nf5ph8b/Gt/MmH+/VFBlqN3BPrB5Y5cm8F5+SiQn+f3YGv/BOrkX5vBzv7z/B5s7T8fvyrCiUm1HIon8iwjiQp/ePmpRKWN6GY7g5O2Z9GOLVnk75m0PYsuN/9xBOwV+YtV+EXkJyv/VTmyW6UGj/D2X4ABAHDgwM81lh4xAAAAAElFTkSuQmCC"
        },
        "text": {
            "root": "Home"
        },
        "order": 500
    },
    "module": {
        "documentationUrl": "https://docs.oracle.com/en/cloud/paas/api-platform-cloud/apfdv/index.html",
        "urlScheme": "home",
        "implementation": {
            "css": [
                "css/main.css"
            ],
            "document": "index.html",
            "requirejs": {
                "path": "home",
                "start": "js/start"
            }
        }
    },
    "homePage": "always"
}
Back to Top