Read a source URL and say what it names, before the source is made (REQ-128).
POST
/github/resolve
const url = 'https://example.com/api/v1/github/resolve';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"url":"example"}'};
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/github/resolve \ --header 'Content-Type: application/json' \ --data '{ "url": "example" }'Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
url
required
string
Examplegenerated
{ "url": "example"}Responses
Section titled “ Responses ”What the URL names.
Media typeapplication/json
object
repo
required
string
branch
required
The branch of the URL, or the repo’s default branch.
string
path
required
The folder, the doc, or “.” for the whole repo.
string
file
required
The path names one doc.
boolean
title
The title of the doc a one-doc URL names.
string
profile
The profile the doc names or a mapping gives, or the guess when it has neither.
string
guessed
The profile is a guess, so the person confirms it before the source is made.
boolean
profiles
required
The profile keys to choose from.
Array<string>
Examplegenerated
{ "repo": "example", "branch": "example", "path": "example", "file": true, "title": "example", "profile": "example", "guessed": true, "profiles": [ "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"}