Example Requests
Sample Requests for the Insight API
Authentication Required
x-app-id
: Your application ID (required)x-api-key
: Your API key (required)Content-Type
: application/json
(for POST requests)Introduction
1. Fetch All Discoveries
Request:
curl --request GET 'https://insight.lineupiq.io/api/v1/discovery' \
--header 'x-app-id: YOUR_APP_ID' \
--header 'x-api-key: YOUR_API_KEY' \
--header 'Accept: application/json'
Response Example:
{
"discoveries": [
{
"request_id": "5112714f-8696-46ff-8427-b63581a648a4",
"timestamp": "2025-02-07T20:59:04.760410Z",
"venue_name": "Union Hall",
"venue_capacity": 20000,
"genres": ["country"]
}
],
"record_count": 1
}
2. Fetch a Specific Discovery
Request:
curl --request GET 'https://insight.lineupiq.io/api/v1/discovery/{request_id}' \
--header 'x-app-id: YOUR_APP_ID' \
--header 'x-api-key: YOUR_API_KEY' \
--header 'Accept: application/json'
Response Example:
{
"venue_id": 8000000,
"venue_name": "Union Hall",
"venue_capacity": 8955905755005401,
"lat_long": "53.499, -113.486",
"address": "1234 Somestreet SW",
"city": "Someville",
"region_code": "FL",
"country_code": "CA",
"postcode": "X1X 1X1",
"genres": ["pop"],
"artists": [
{
"artist_id": 6740923203292642,
"artist_name": "Rosemary Clooney",
"tags": ["1stPlace", "TopSpotifyFollowers"],
"genres": ["country", "electronic"],
"type": "MusicGroup"
}
],
"requester": {
"name": "PublicApi TestUser",
"email": "publicapi@lineupqiq.io",
"app_id": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
}
}
3. Generate a New Discovery
Request:
curl --request POST 'https://insight.lineupiq.io/api/v1/discovery' \
--header 'x-app-id: YOUR_APP_ID' \
--header 'x-api-key: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"venue_name": "The Great Hall",
"venue_id": 8000000,
"venue_capacity": 1200,
"lat_long": "53.499, -113.486",
"address": "6222 199 Street Northwest",
"city": "Edmonton",
"region_code": "AB",
"country_code": "CA",
"postcode": "T6E 6D9",
"genres": ["country", "rock", "pop"]
}'
Response Example:
{
"status": "SUCCESS",
"request_id": "62ff278c-cc6d-48a6-9969-fb2b3c1755ec",
"data": [
{
"artist_name": "Brett Kissel",
"artist_id": 9029961,
"rank": 1,
"average_capacity": 21544,
"genres": ["country"]
}
],
"requester": {
"name": "John Snow",
"email": "john.snow@gmail.com",
"app_id": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
}
}
Error Handling
Status Code | Message | Description |
---|---|---|
200 | OK | Request successful. |
400 | Bad Request | Invalid or missing parameters. |
401 | Unauthorized | Invalid API key or missing authentication headers. |
403 | Forbidden | Insufficient permissions. |
404 | Not Found | Resource does not exist. |
429 | Too Many Requests | Rate limit exceeded. |
500 | Server Error | Unexpected internal error. |