Create a Domain

You can create a new domain from scratch, and then add content to it, or you can fork an existing domain like you fork an API.

To create a new domain:

  1. In the top left corner of any page, click and select Create New Domain.

    API_screenshot_create_domain_01.png
  2. Enter domain information:

    API_screenshot_create_domain_03.png
    • Specification – Choose the domain format: OpenAPI 2.0, OpenAPI 3.0 or AsyncAPI. Note: OpenAPI 3.0 support has some limitations, AsyncAPI also has limitations.

    • Name – The domain name is its unique ID and is part of its URL on API Hub for Design, as in https://app.swaggerhub.com/domains/{owner}/commons/1.0.

      Requirements:

      • 3 to 60 character long

      • allowed characters: A..Z a..z 0..9 - _ .

      • must start and end with a letter or digit

      Note

      Domain names are case-sensitive, so commons and Commons are two different domains.

    • Version – The version number of the domain. For example, 1.0, 1.0.0, 1.0rc5, beta, 2016-04-15, and so on. See Version Format.

    • Owner – Choose whether to create the domain in your personal or organization account (if you are a member of an organization on API Hub for Design). The owner ID of the domain owner is part of the domain path in API Hub for Design: https://app.swaggerhub.com/domains/OwnerID/{domain-name}/1.0. Organization-owned domains count toward theorganization's limits rather than yours.

      Note

      Organization owners can always create domains in that organization. Members with the Designer role can also create domains.

    • Project – If an organization is selected as the Owner, you can optionally select a project to add this domain to. The list contains existing projects available to you.

      Note

      This option was added in v. 1.23.

    • Visibility – Choose whether the domain will be public (visible to anyone in your company) or private (can be accessed only by you and by the collaborators with whom you share the domain). For details, see Public and Private APIs.

  3. Click Create Domain.

After you create a domain, the API Hub for Design editor opens, in which you can add components to your domain, such as common parameters and data models. Once the components are added, you can refer to them from your APIs.

See Also

Publication date: