music nerd

AdminApprove a contributor's submissions

Admin

Approve a contributor's submissions

Approves up to 10 of the user's pending submissions from the list, and returns how many were approved, skipped (already reviewed, or not this user's) and failed. Approved Lore sources queue a Lore refresh for their artist; warning says when one could not start.

POST/api/admin/users/{id}/submissions/approve
POST/api/admin/users/0b1e4c2a-7f3d-4a58-9c61-2d8e5f7a9b10/submissions/approve

Approves up to 10 of the user's pending submissions from the list, and returns how many were approved, skipped (already reviewed, or not this user's) and failed. Approved Lore sources queue a Lore refresh for their artist; warning says when one could not start.

Authorization

Authorizationstringrequired

A Music Nerd admin's access token. Copy it at https://musicnerd.net/access after signing in. A signed-in user who is not an admin gets 403. Kept in this tab only.

Path

idstringrequired

The contributor's user ID (a UUID).

Body
cURL
curl --request POST \
  --url 'https://musicnerd-api.vercel.app/api/admin/users/0b1e4c2a-7f3d-4a58-9c61-2d8e5f7a9b10/submissions/approve' \
  --header 'Content-Type: application/json' \
  --data '{
  "items": [
    {
      "id": "5f2d0c1e-8a7b-4c3d-9e1f-0a2b3c4d5e6f",
      "type": "link"
    },
    {
      "id": "9a8b7c6d-5e4f-4a3b-8c2d-1e0f9a8b7c6d",
      "type": "lore"
    }
  ]
}'

Send the request to see the live response here.

Authorizations

Authorizationstringheaderrequired

Bearer authentication header of the form Bearer <token>. A Music Nerd admin's access token. Copy it at https://musicnerd.net/access after signing in. A signed-in user who is not an admin gets 403.

Path Parameters

idstringrequired

The contributor's user ID (a UUID).

Body

application/jsonrequired
itemsarray<object>required

minItems: 1 · maxItems: 10

Item properties for items
idstringrequired

format: uuid

typestring · enumrequired

Values: "link", "lore", "upload"

Response

application/json

The counts. A failed item stays pending for individual review.

statusstring · enumrequired

Values: "ok"

approvedintegerrequired

minimum: 0

skippedintegerrequired

minimum: 0

failedintegerrequired

minimum: 0

warningstring

Present when a Lore refresh could not start.