The links Speccy offers between docs in one folder, for a person to confirm.
POST
/links/suggest
const url = 'https://example.com/api/v1/links/suggest';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"docs":[{"path":"example","profile":"example"}],"source_id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","local":true}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/v1/links/suggest \ --header 'Content-Type: application/json' \ --data '{ "docs": [ { "path": "example", "profile": "example" } ], "source_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "local": true }'A doc whose profile names an upstream type gets a suggested link when exactly one other doc in its folder has that type. With source_id, the source’s bundles count as docs in their folders; with local, the bundles on disk do.
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
docs
required
Array<object>
object
path
required
string
profile
required
The doc type. Empty means not a spec.
string
source_id
string format: uuid
local
boolean
Examplegenerated
{ "docs": [ { "path": "example", "profile": "example" } ], "source_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "local": true}Responses
Section titled “ Responses ”The suggested links.
Media typeapplication/json
object
items
required
Array<object>
object
from
required
The path of the doc that links.
string
to
required
The path of the doc it links to.
string
kind
required
string
Examplegenerated
{ "items": [ { "from": "example", "to": "example", "kind": "example" } ]}default
Section titled “default”An error.
Media typeapplication/problem+json
RFC 9457 problem details with a stable code.
object
type
required
string
title
required
string
status
required
integer
detail
string
instance
string
code
required
A stable machine-readable error code.
string
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example", "code": "example"}