@lap v0.3
# Machine-readable API spec. Each @endpoint block is one API call.
@api VTEX Headless CMS
@base https://storeframework.myvtex.com
@version 0.31.2
@endpoints 3
@toc _v(3)

@endpoint GET /_v/cms/api/{projectId}
@desc Get all content types
@required {projectId: str # Project ID specified in the settings of the CMS (alpha) app.}
@returns(200) {contentTypes: [map]} # OK
@errors {404: Not Found, 500: Internal Server Error}

@endpoint GET /_v/cms/api/{projectId}/{content-type}
@desc Get all CMS pages by content type
@required {projectId: str # Project ID specified in the settings of the CMS (alpha) app., content-type: str # Content type identifier defined in the FastStore project.}
@optional {page: str # The page number to retrieve in a paginated list of results. If not specified, the default return is 10 items per page., versionId: str # Version ID presented in the URL path of a CMS preview., releaseId: str # Release ID presented in the URL path of a CMS preview., filters[{field}]: str # Filter results by a property of the page (e.g., `filters[status]`) or by a nested custom field of the `parameters` object (e.g., `filters[parameters.collection.sort]`). *Replace {field} with the desired property.*}
@returns(200) {hasNextPage: bool, totalItems: int, data: [map]} # OK
@errors {404: Not Found, 500: Internal Server Error}

@endpoint GET /_v/cms/api/{projectId}/{content-type}/{document-id}
@desc Get CMS page
@required {projectId: str # Project ID specified in the settings of the CMS (alpha) app., content-type: str # Content type ID defined in the FastStore project., document-id: str # Document ID presented in the URL path of a CMS preview.}
@optional {versionId: str # Version ID presented in the URL path of a CMS preview., releaseId: str # Release ID presented in the URL path of a CMS preview.}
@returns(200) {id: str, name: str, type: str, status: str, versionId: str, versionStatus: str, sections: [map]} # OK
@errors {404: Not Found, 500: Internal Server Error}

@end
