Creating a new page - Cloud

Talend Cloud API Designer User Guide

Version
Cloud
Language
English
Product
Talend Cloud
Module
Talend API Designer
Content
Design and Development > Designing APIs
Last publication date
2024-03-13

Add a Markdown file as a new page in your portal.

Procedure

  1. In your API Portal repository, go to the content folder.
  2. Create a new Markdown file.
    The name of the file is used to create the URL of the page. If you create a file named examples.md, the page will be available at <portal-url>/examples.
  3. Add metadata for your page
    The metadata is surrounded with --- and defines the title of the page and its position on the header. The header displays pages from lowest to highest weight. If two pages have the same weight, they are sorted alphabetically. By default, the weight of the "Getting started" page is set to 10, and the "APIs" page is set to 20. If you add a new page named "Examples" with weight: 20, it will appear after "APIs" in the header.

    Example

    ---
    title: Examples
    menu:
      main:
        weight: 20
    ---
  4. Add your content under the metadata.
    For more information about writing in Markdown, see Markdown Guide.

    Example

    ---
    title: Examples
    menu:
      main:
        weight: 20
    ---
    
    # Examples
    
    ## Fetching a book by title
    
    1. Generate an access token.
    2. Run the following command with the relevant query parameters:
      `curl -X GET -H "Authorization:Basic {userToken}" https://company.com/api/books?title={bookTitle}`
    
    ### Result
    A response containing information about the book is returned. For example, the request `https://company.com/api/books?title=Jane+Eyre` returns the following information:
    ``` json
    [
      {
        "id": "hfp1651869",
        "title": "Jane Eyre",
        "author": "Charlotte Brontë",
        "publisher": "Penguin",
        "isbn": "978-0141441146"
      }
    ]
    ```
    Tip: If your want to add code samples in your content, you can specify the language after the opening ``` to enable syntax highlighting.
  5. Commit your changes.

Results

Once your portal is deployed, the new page appears. In this example, it looks like this:
Screenshot of the new Examples page in the portal.