-
Notifications
You must be signed in to change notification settings - Fork 5
PatchSong
Walter Lara edited this page Nov 29, 2023
·
19 revisions
Allows to update an existing Song. Only allowed if the requestor is the Song owner.
URL: /v1/songs/{songId}
Method: PATCH
Path Parameters:
Parameter | Type | Description |
---|---|---|
songId | string | UUID of the Song to update. |
Query Parameters: None
Headers:
Authorization: Bearer {accessToken}
Content-Type: application/json
Content:
Field | Type | Description | Requirement Type |
---|---|---|---|
title | string | Song title. | Optional |
archived | boolean | Song archive indicator. | Optional |
genres | string array | Song genres. | Optional |
moods | string array | Song moods. | Optional |
coverArtUrl | string | Valid URL of cover art picture file. | Optional |
lyricsUrl | string | Valid URL of song lyrics file. | Optional |
description | string | Song description. | Optional |
album | string | Song album. | Optional |
track | integer | Song track. | Optional |
language | string | Song language. | Optional |
coverRemixSample | boolean | Indicates if the Song is a Cover, Remix or Sample. | Optional |
compositionCopyrightOwner | string | Song composition copyright owner. | Optional |
compositionCopyrightYear | integer | Song composition copyright year. | Optional |
phonographicCopyrightOwner | string | Song phonographic copyright owner. | Optional |
phonographicCopyrightYear | integer | Song phonographic copyright year. | Optional |
parentalAdvisory | string | Song parental advisory. | Optional |
barcodeType | string | Song barcode type. Valid values are: Upc and Ean. | Optional |
barcodeNumber | string | Song barcode number. | Optional |
isrc | string | International Standard Recording Code (ISRC). | Optional |
iswc | string | International Standard Musical Work Code (ISWC). | Optional |
ipis | string array | Interested Party Information (IPIS) Numbers. | Optional |
releaseDate | string | Song release date (ISO-8601 format) | Optional |
Content example:
{
"title": "Blinding Lights",
"genres": ["Synthwave", "Synthpop"],
"moods": ["Cool", "Upbeat"],
"coverArtUrl": "https://www.example.com/bindinglights/cover.png",
"lyricsUrl": "https://www.example.com/bindinglights/lyrics.txt",
"description": "Song by The Weeknd"
}
Code: 204 NO CONTENT
Headers: None
Code: 401 UNAUTHORIZED
Condition: If {accessToken}
is invalid or expired.
Code: 403 FORBIDDEN
Condition: If the requestor is not the Song owner.
Headers:
Content-Type: application/json
Content example:
{
"code": 403,
"description": "Forbidden",
"cause": "operation allowed only by owner"
}
Code: 404 NOT FOUND
Condition: If the specified Song is not found.
Headers:
Content-Type: application/json
Content example:
{
"code": 404,
"description": "Not Found",
"cause": "Entity SongEntity, id=d0907e3d-a9a7-43b1-93dc-f3b0ee929021 not found in the database"
}
Code: 422 UNPROCESSABLE ENTITY
Condition: If {songId}
is malformed.
Headers:
Content-Type: application/json
Content example:
{
"code": 422,
"description": "Unprocessable Entity",
"cause": "Invalid UUID string: 123456789"
}