Skip to content

Read a source URL and say what it names, before the source is made (REQ-128).

POST
/github/resolve
curl --request POST \
--url https://example.com/api/v1/github/resolve \
--header 'Content-Type: application/json' \
--data '{ "url": "example" }'
Media typeapplication/json
object
url
required
string
Examplegenerated
{
"url": "example"
}

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"
]
}

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"
}