Skip to content

GetSongCount

Walter Lara edited this page Jul 16, 2024 · 8 revisions

Get Song Count

Allows to get a song count based on filters.

Request

URL: /v1/songs/count

Method: GET

Path Parameters: None

Query Parameters:

Parameter Type Description Requirement Type
archived boolean Indicates if only archived songs should be included. Default is false. Optional
phrase string Case-insensitive phrase to filter out songs by searching the Song title, description, album and nftName fields as well as the Song Owner nickname if set, otherwise firstName and lastName. If the parameter is missing, defaults to no filtering out. Optional
ids string list Comma-separated list of song UUID's for filtering results. Prefix each value with - to exclude and + (optional) to include. Defaults to inclusion if no prefix is specified. Optional
ownerIds string list Comma-separated list of owner UUID's for filtering results. A value of "me" can be used instead of the caller's UUID. Prefix each value with - to exclude and + (optional) to include. Defaults to inclusion if no prefix is specified. Optional
genres string list Comma-separated list of song genres for filtering results. Prefix each value with - to exclude and + (optional) to include. Defaults to inclusion if no prefix is specified. Optional
moods string list Comma-separated list of song moods to for filtering results. Prefix each value with - to exclude and + (optional) to include. Defaults to inclusion if no prefix is specified. Optional
mintingStatuses string list Comma-separated list of song Song minting statuses for filtering results. Prefix each value with - to exclude and + (optional) to include. Defaults to inclusion if no prefix is specified. Optional
olderThan string ISO-8601 formated oldest (maximum) timestamp to filter-out results. If missing, defaults to no filtering out. Optional
newerThan string ISO-8601 formated newest (minimum) timestamp to filter-out results. If missing, defaults to no filtering out. Optional

Headers:

Authorization: Bearer {accessToken}

Accept: application/json

✅ Success Response

Code: 200 OK

Headers:

Content-Type: application/json

Content:

Field Type Description Condition
count long Song count. Always

Content example:

{
    "count": 300
}

❌ Error Responses

1. Unauthorized

Code: 401 UNAUTHORIZED

Condition: If {accessToken} is invalid or expired.

2. Unprocessable Entity

Code: 422 UNPROCESSABLE ENTITY

Condition: If any of the UUID query parameters is malformed.

Headers:

Content-Type: application/json

Content example:

{
    "code": 422,
    "description": "Unprocessable Entity",
    "cause": "Invalid UUID string: 123456789"
}

See Also

Post Song (Add New Song)

Patch Song (Update Song)

Get Songs

Get Song

Delete Song

Upload Song Audio

Process Song Stream Token Agreement

Get Song Genres

Get Song Genre Count

Clone this wiki locally