@@ -317,6 +317,80 @@ Build detail
317
317
318
318
Some fields primarily used for UI elements in Read the Docs are omitted.
319
319
320
+
321
+ Embed
322
+ ~~~~~
323
+
324
+ .. http :get :: /api/v2/embed/
325
+
326
+ Retrieve details of builds ordered by most recent first
327
+
328
+ **Example request **:
329
+
330
+ .. prompt :: bash $
331
+
332
+ curl https://readthedocs.org/api/v2/embed/?project=docs&version=latest&doc=features&path=features.html
333
+ # or
334
+ curl https://readthedocs.org/api/v2/embed/?url=https://docs.readthedocs.io/en/latest/features.html
335
+
336
+ **Example response **:
337
+
338
+ .. sourcecode :: js
339
+
340
+ {
341
+ "content": [
342
+ "..."
343
+ ],
344
+ "headers": [
345
+ {
346
+ "Read the Docs features": "#"
347
+ },
348
+ {
349
+ "Automatic Documentation Deployment": "#automatic-documentation-deployment"
350
+ },
351
+ {
352
+ "Custom Domains & White Labeling": "#custom-domains-white-labeling"
353
+ },
354
+ {
355
+ "Versioned Documentation": "#versioned-documentation"
356
+ },
357
+ {
358
+ "Downloadable Documentation": "#downloadable-documentation"
359
+ },
360
+ {
361
+ "Full-Text Search": "#full-text-search"
362
+ },
363
+ {
364
+ "Open Source and Customer Focused": "#open-source-and-customer-focused"
365
+ }
366
+ ],
367
+ "url": "https://docs.readthedocs.io/en/latest/features",
368
+ "meta": {
369
+ "project": "docs",
370
+ "version": "latest",
371
+ "doc": "features",
372
+ "section": "read the docs features"
373
+ }
374
+ }
375
+
376
+ :>json string content: HTML content of the section.
377
+ :>json object headers: section's headers in the document.
378
+ :>json string url: URL of the document.
379
+ :>json object meta: meta data of the requested section.
380
+
381
+ :query string project: Read the Docs project's slug.
382
+ :query string version: Read the Docs version's slug.
383
+ :query string doc: document to fetch content from.
384
+ :query string section: section within the document to fetch.
385
+ :query string path: full path to the document including extension.
386
+
387
+ :query string url: full URL of the document (and section) to fetch content from.
388
+
389
+ .. note ::
390
+
391
+ You can call this endpoint by sending at least ``project `` and ``doc `` *or * ``url `` attribute.
392
+
393
+
320
394
Undocumented resources and endpoints
321
395
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
322
396
0 commit comments