music nerd

VaultAdd a source

Vault

Add a source

Adds a web page to the artist's sources. It is approved at once when the caller is an admin or a whitelisted contributor, and then starts a Lore refresh; otherwise it waits for review. Returns the saved source.

POST/api/artist/{id}/knowledge/sources
POST/api/artist/{id}/knowledge/sources

Adds a web page to the artist's sources. It is approved at once when the caller is an admin or a whitelisted contributor, and then starts a Lore refresh; otherwise it waits for review. Returns the saved source.

Authorization

Authorizationstringrequired

The signed-in user's access token. Copy it at https://musicnerd.net/access after signing in. The user must be the artist's approved claimant or a Music Nerd admin. Kept in this tab only.

Path

idstringrequired

The artist's ID.

Body
cURL
curl --request POST \
  --url 'https://musicnerd-api.vercel.app/api/artist/{id}/knowledge/sources' \
  --header 'Content-Type: application/json' \
  --data '{
  "url": "https://pitchfork.com/reviews/albums/bio-ritmo-puerta-del-sur/"
}'

Send the request to see the live response here.

Authorizations

Authorizationstringheaderrequired

Bearer authentication header of the form Bearer <token>. The signed-in user's access token. Copy it at https://musicnerd.net/access after signing in. The user must be the artist's approved claimant or a Music Nerd admin.

Path Parameters

idstringrequired

The artist's ID.

Body

application/jsonrequired
urlstringrequired

A public http(s) web page. A bare domain gets https://; the fragment is dropped.

maxLength: 2048

Response

application/json

The saved source. warning is set when the source was approved but the Lore refresh could not start.

statusstring · enumrequired

Values: "ok"

sourceobjectrequired

A source in the artist's vault: a web page or an uploaded file.

Properties for source
idstringrequired

format: uuid

artistIdstringrequired

format: uuid

originstringrequired

upload for an uploaded file, submission for a page a user added, research for one Music Nerd found.

activityIdstring | null

The activity event that recorded the addition.

format: uuid

urlstringrequired

The web page, or an uploaded file's public URL in storage.

format: uri

titlestring | null

The page's title, or the uploaded file's name.

snippetstring | null

A short excerpt. For an upload, the first 300 characters of extracted text, or Uploaded file: <name>.

typestring | null

article, interview, review, profile, document, image, audio, video, data, social, website or music. An upload is image or audio by MIME type, data for CSV and JSON, document otherwise.

statusstring · enumrequired

An upload is always approved.

Values: "pending", "approved", "rejected"

fileNamestring | null
fileSizeinteger | null

Bytes.

filePathstring | null

The storage key (<artistId>/<name>), not the URL.

contentTypestring | null

The resolved MIME type.

extractedTextstring | null

The file's text, for text files and PDFs with readable text.

ogImagestring | null
podcastEpisodeKeystring | null
podcastShowTitlestring | null
podcastEpisodeTitlestring | null
publishedAtstring | null

format: date

createdAtstringrequired
updatedAtstring | null
warningstring

Advice to show the user. Absent when there is none.