Skip to main content Skip to complementary content

Creating a movie data type

Create a data type representing a movie to reuse it in your API.

Procedure

  1. Click the + button in the top right corner of the left panel and select Data type.
    Options available from the + button.
  2. Enter Movie in the Name field, and Movies in the Section field.
    A new section will be created to contain the data type.
  3. Enter a description for the data type, Represents a movie for example.
  4. In the DATA TYPE section, select object as the Type and enter the example below in the Examples field.
    <movie>
        <movieId>1</movieId>
        <title>The Social Network</title>
        <releaseYear>2010</releaseYear>
        <director>David Fincher</director>
        <price>4.99</price>
    </movie>
  5. Click Add property and configure the five properties as follows, with a description for each if needed.
    Name Type Required
    movieId integer Yes
    title string Yes
    releaseYear integer Yes
    director string No
    price number Yes
  6. Click Save.

Results

Your data type is configured.
Screenshot of the configured data type.

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – please let us know!