---
title: "REST API docs"
url: https://www.marlasowards.com/samples/contributor-guide/10-rest-api-docs
description: "Where a docs site's REST API docs come from, and how to update them from a Swagger JSON file and write their descriptions."
author: Writing sample by Marla Sowards
---

> For an index of every page on this site, see [llms.txt](https://www.marlasowards.com/llms.txt).

> **Note:** I built this project for an enterprise SaaS company. However, what I've shared is genericized to mask proprietary information, including names of companies, products, features, and UI controls. Product images are mockups generated by Claude.

# REST API docs

## Find the source files

### Landing page

#### Classic edition

**Vertex** repo > **articles** > **api-reference** > **rest-api** > **rest-api-landing-page.md**

#### Cloud edition

Currently pointing to Classic edition source files

### Conceptual

#### Classic edition

**Vertex** repo > **articles** > **service-docs**

#### Cloud edition

Currently pointing to Classic edition source files

### Reference

DocFx generates REST API docs from Swagger files in a **restapi** directory at the root of a docs source. Example:

```plaintext
articles/
builds/
restapi/
docfx.json
index.md
```

#### Classic edition

Vertex repo

#### Cloud edition

docs-template.fork.docs-infrastructure

## Change the API docs

- To change them: Add, remove, or replace a **.json** file in **restapi**.
- To change their order on the site: Update **restapi/toc.yml**.

## How to get a JSON file from Swagger

Try some form of the following. Also adjust the version. These may no longer be accurate.

### Examples

| Service                    | Example location                                                  |
| -------------------------- | ----------------------------------------------------------------- |
| Sentry Service             | https\<nolink>://server/Sentry/swagger/ui/swagger.json            |
| Conveyor Service V1        | http\<nolink>://server/Conveyor/docs/V1/swagger                   |
| Conveyor Service V2        | https\<nolink>://server/Conveyor2/swagger/ui/index                |
| Beacon Service             | https\<nolink>://server/Beacon/swagger/swagger.json               |
| Forge Service              | http\<nolink>://server/Forge/docs/V1/swagger                      |
| Passport Service           | https\<nolink>://server/Passport/swagger/ui/index/V1/swagger.json |
| Passport Directory Service | https\<nolink>://server/PassportDirectory/swagger/ui/swagger.json |
| Forge Service V1           | https\<nolink>://server/Forge/swagger/swagger.json                |
| Forge Service V2           | https\<nolink>://server/Forge2/swagger/swagger.json               |

## If necessary, downgrade the JSON file from OpenAPI to Swagger 2

Currently DocFx does not support OpenAPI.

See the api-spec-converter project on GitHub.

## Write a description

A description must be at the top of the JSON file for the landing pages to generate correctly. Example:

```json
{
  "swagger": "2.0",
  "info": {
    "version": "swagger.json",
    "description": "The Collect database V2 stores information about source systems and data marts within the platform. Client applications can insert, update, remove, and retrieve information from the Collect database by issuing HTTP requests to Collect Service V2. Collect Service V2 has newer routes to make managing data marts easier. It uses the Passport Service.",
    "title": "Example.Collect.V2.WebService"
  }
}
```

## For admins only

Use scripts to add a tags object to the end of each Swagger file and generate landing pages for each API.

## Troubleshoot

See [API already defined build error](https://www.marlasowards.com/samples/contributor-guide/troubleshoot/24-api-already-defined-build-error.md).
