MENU navbar-image

Introduction

API documentation de l'application Charisma Spotify

This documentation aims to provide all the information you need to work with our API.

Base URL

https://app.api.prd.editions-charisma.fr

Authenticating requests

To authenticate requests, include an Authorization header with the value "Bearer {YOUR_AUTH_KEY}".

All authenticated endpoints are marked with a requires authentication badge in the documentation below.

You can retrieve your token by visiting your dashboard and clicking Generate API token.

01 - User Authentication

POST /api/login

Request a token for a user's session after providing credentials

Example request:
curl --request POST \
    "https://app.api.prd.editions-charisma.fr/api/login" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"email\": \"azerty@azerty.com\",
    \"password\": \"azerty\"
}"
const url = new URL(
    "https://app.api.prd.editions-charisma.fr/api/login"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "email": "azerty@azerty.com",
    "password": "azerty"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://app.api.prd.editions-charisma.fr/api/login',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'email' => 'azerty@azerty.com',
            'password' => 'azerty',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "accessToken": "eyJhbGciOiJSUz...O3pGQ",
    "refreshToken": "eyJhbGci...RT8",
    "accessExpiresIn": 1800,
    "refreshExpiresIn": 1800,
    "tokenType": "Bearer",
    "scope": "openid profile email"
}
 

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Invalid user credentials"
}
 

Request      

POST api/login

Body Parameters

email  string  

The email or userId of the user. Must be a valid email address.

password  string  

The password of the user.

Get new token from refresh token

Get a new token from refresh token

Example request:
curl --request POST \
    "https://app.api.prd.editions-charisma.fr/api/refresh" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"refresh_token\": \"voluptatem\"
}"
const url = new URL(
    "https://app.api.prd.editions-charisma.fr/api/refresh"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "refresh_token": "voluptatem"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://app.api.prd.editions-charisma.fr/api/refresh',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'refresh_token' => 'voluptatem',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "accessToken": "eyJhbGciOiJSUz...O3pGQ",
    "refreshToken": null,
    "accessExpiresIn": 1800,
    "refreshExpiresIn": 1800,
    "tokenType": "Bearer",
    "scope": "openid profile email"
}
 

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Invalid user credentials"
}
 

Request      

POST api/refresh

Body Parameters

refresh_token  string  

GET /api/userinfo

requires authentication

Get the user's information

Example request:
curl --request GET \
    --get "https://app.api.prd.editions-charisma.fr/api/userinfo" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://app.api.prd.editions-charisma.fr/api/userinfo"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://app.api.prd.editions-charisma.fr/api/userinfo',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "userId": "927558a5-354c-4147-86b5-4c74392760a0",
    "firstname": "Azerty",
    "lastname": "UIOP",
    "roles": [
        "ed_streaming_administrator",
        "offline_access",
        "uma_authorization"
    ],
    "email": "azerty@azerty.com",
    "username": "azerty@azerty.com",
    "enabled": null
}
 

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Bad token"
}
 

Request      

GET api/userinfo

POST /api/logout

requires authentication

Logout the user's session

Example request:
curl --request POST \
    "https://app.api.prd.editions-charisma.fr/api/logout" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://app.api.prd.editions-charisma.fr/api/logout"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://app.api.prd.editions-charisma.fr/api/logout',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (204):

[Empty response]
 

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Bad token"
}
 

Request      

POST api/logout

Get a service access token [SAT]

Request an authorization token for a SAT session after providing credentials

Example request:
curl --request POST \
    "https://app.api.prd.editions-charisma.fr/api/authorize" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"clientId\": \"ut\",
    \"clientSecret\": \"pariatur\"
}"
const url = new URL(
    "https://app.api.prd.editions-charisma.fr/api/authorize"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "clientId": "ut",
    "clientSecret": "pariatur"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://app.api.prd.editions-charisma.fr/api/authorize',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'clientId' => 'ut',
            'clientSecret' => 'pariatur',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "accessToken": "eyJhbGciOiJSUz...O3pGQ",
    "refreshToken": null,
    "accessExpiresIn": 1800,
    "refreshExpiresIn": 1800,
    "tokenType": "Bearer",
    "scope": "openid profile email"
}
 

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Invalid user credentials"
}
 

Request      

POST api/authorize

Body Parameters

clientId  string  

clientSecret  string  

02 - Médias (Front)

Rechercher un auteur

requires authentication

Permet de rechercher les auteurs

Example request:
curl --request POST \
    "https://app.api.prd.editions-charisma.fr/api/media/author/find" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"content\": \"azerty\",
    \"section\": null,
    \"page\": 1,
    \"resultPerPage\": 20,
    \"sortBy\": \"releaseDate\",
    \"sortDirection\": \"DESC\"
}"
const url = new URL(
    "https://app.api.prd.editions-charisma.fr/api/media/author/find"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "content": "azerty",
    "section": null,
    "page": 1,
    "resultPerPage": 20,
    "sortBy": "releaseDate",
    "sortDirection": "DESC"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://app.api.prd.editions-charisma.fr/api/media/author/find',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'content' => 'azerty',
            'section' => null,
            'page' => 1,
            'resultPerPage' => 20,
            'sortBy' => 'releaseDate',
            'sortDirection' => 'DESC',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Invalid user credentials"
}
 

Example response (200):


{
    "status": "ok",
    "data": {
        "items": Author[],
        "page": 1,
        "maxPage": 3,
        "resultPerPage": 20
    }
}
 

Request      

POST api/media/author/find

Body Parameters

content  string optional  

Recherche dans les champs fullname description.

section  string[]  

Liste de sections.

page  integer  

numéro de la page à renvoyer.

resultPerPage  integer  

nombre de résultat à renvoyer.

sortBy  string optional  

champ utilisé pour le tri. id, fullname, releaseDate (defaut).

sortDirection  string optional  

ordre de tri ASC ou DESC (defaut).

Rechercher une catégorie

requires authentication

Permet de rechercher les categories

Example request:
curl --request POST \
    "https://app.api.prd.editions-charisma.fr/api/media/category/find" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"content\": \"azerty\",
    \"page\": 1,
    \"resultPerPage\": 20,
    \"sortBy\": \"releaseDate\",
    \"sortDirection\": \"DESC\"
}"
const url = new URL(
    "https://app.api.prd.editions-charisma.fr/api/media/category/find"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "content": "azerty",
    "page": 1,
    "resultPerPage": 20,
    "sortBy": "releaseDate",
    "sortDirection": "DESC"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://app.api.prd.editions-charisma.fr/api/media/category/find',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'content' => 'azerty',
            'page' => 1,
            'resultPerPage' => 20,
            'sortBy' => 'releaseDate',
            'sortDirection' => 'DESC',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Invalid user credentials"
}
 

Example response (200):


{
    "status": "ok",
    "data": {
        "items": Category[],
        "page": 1,
        "maxPage": 3,
        "resultPerPage": 20
    }
}
 

Request      

POST api/media/category/find

Body Parameters

content  string optional  

Recherche dans les champs name.

page  integer  

numéro de la page à renvoyer.

resultPerPage  integer  

nombre de résultat à renvoyer.

sortBy  string optional  

champ utilisé pour le tri. id, fullname, releaseDate (defaut).

sortDirection  string optional  

ordre de tri ASC ou DESC (defaut).

Rechercher un theme

requires authentication

Permet de rechercher les themes

Example request:
curl --request POST \
    "https://app.api.prd.editions-charisma.fr/api/media/theme/find" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"content\": \"azerty\",
    \"theme\": 1,
    \"startReleaseDate\": \"1950-01-01\",
    \"endReleaseDate\": \"2024-12-31\",
    \"page\": 1,
    \"resultPerPage\": 50,
    \"sortBy\": \"position\",
    \"sortDirection\": \"ASC\"
}"
const url = new URL(
    "https://app.api.prd.editions-charisma.fr/api/media/theme/find"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "content": "azerty",
    "theme": 1,
    "startReleaseDate": "1950-01-01",
    "endReleaseDate": "2024-12-31",
    "page": 1,
    "resultPerPage": 50,
    "sortBy": "position",
    "sortDirection": "ASC"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://app.api.prd.editions-charisma.fr/api/media/theme/find',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'content' => 'azerty',
            'theme' => 1,
            'startReleaseDate' => '1950-01-01',
            'endReleaseDate' => '2024-12-31',
            'page' => 1,
            'resultPerPage' => 50,
            'sortBy' => 'position',
            'sortDirection' => 'ASC',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Invalid user credentials"
}
 

Example response (200):


{
    "status": "ok",
    "data": {
        "items": Theme[],
        "page": 1,
        "maxPage": 3,
        "resultPerPage": 20
    }
}
 

Request      

POST api/media/theme/find

Body Parameters

content  string optional  

Recherche dans les champs name.

theme  integer optional  

identifiant du thème.

startReleaseDate  string optional  

date de début de filtre (format YYYY-MM-DD). Must be a valid date.

endReleaseDate  string optional  

date de fin de filtre (format YYYY-MM-DD). Must be a valid date.

page  integer  

numéro de la page à renvoyer.

resultPerPage  integer  

nombre de résultat à renvoyer.

sortBy  string optional  

champ utilisé pour le tri. id, fullname, position (defaut).

sortDirection  string optional  

ordre de tri ASC ou DESC (defaut).

Rechercher un album

requires authentication

Permet de rechercher les albums

Example request:
curl --request POST \
    "https://app.api.prd.editions-charisma.fr/api/media/album/find" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"section\": \"music\",
    \"content\": \"azerty\",
    \"author\": 0,
    \"startReleaseDate\": \"2015-12-05\",
    \"endReleaseDate\": \"2016-12-05\",
    \"page\": 1,
    \"resultPerPage\": 20,
    \"sortBy\": \"releaseDate\",
    \"sortDirection\": \"DESC\"
}"
const url = new URL(
    "https://app.api.prd.editions-charisma.fr/api/media/album/find"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "section": "music",
    "content": "azerty",
    "author": 0,
    "startReleaseDate": "2015-12-05",
    "endReleaseDate": "2016-12-05",
    "page": 1,
    "resultPerPage": 20,
    "sortBy": "releaseDate",
    "sortDirection": "DESC"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://app.api.prd.editions-charisma.fr/api/media/album/find',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'section' => 'music',
            'content' => 'azerty',
            'author' => 0,
            'startReleaseDate' => '2015-12-05',
            'endReleaseDate' => '2016-12-05',
            'page' => 1,
            'resultPerPage' => 20,
            'sortBy' => 'releaseDate',
            'sortDirection' => 'DESC',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Invalid user credentials"
}
 

Example response (200):


{
    "status": "ok",
    "data": {
        "items": Album[],
        "page": 1,
        "maxPage": 3,
        "resultPerPage": 20
    }
}
 

Request      

POST api/media/album/find

Body Parameters

section  string optional  

predication | music.

content  string optional  

Recherche dans les champs title subtitle description author(fullname).

author  integer optional  

Id de l' auteur.

startReleaseDate  string  

Date de publication de départ. Must be a valid date.

endReleaseDate  string  

Date de publication de fin. Must be a valid date.

page  integer  

numéro de la page à renvoyer.

resultPerPage  integer  

nombre de résultat à renvoyer.

sortBy  string optional  

champ utilisé pour le tri. id, title, authror, releaseDate (defaut).

sortDirection  string optional  

ordre de tri ASC ou DESC (defaut).

Rechercher un coffret

requires authentication

Permet de rechercher les coffrets

Example request:
curl --request POST \
    "https://app.api.prd.editions-charisma.fr/api/media/boxset/find" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"content\": \"azerty\",
    \"startReleaseDate\": \"2015-12-05\",
    \"endReleaseDate\": \"2016-12-05\",
    \"page\": 1,
    \"resultPerPage\": 20,
    \"sortBy\": \"releaseDate\",
    \"sortDirection\": \"DESC\"
}"
const url = new URL(
    "https://app.api.prd.editions-charisma.fr/api/media/boxset/find"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "content": "azerty",
    "startReleaseDate": "2015-12-05",
    "endReleaseDate": "2016-12-05",
    "page": 1,
    "resultPerPage": 20,
    "sortBy": "releaseDate",
    "sortDirection": "DESC"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://app.api.prd.editions-charisma.fr/api/media/boxset/find',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'content' => 'azerty',
            'startReleaseDate' => '2015-12-05',
            'endReleaseDate' => '2016-12-05',
            'page' => 1,
            'resultPerPage' => 20,
            'sortBy' => 'releaseDate',
            'sortDirection' => 'DESC',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Invalid user credentials"
}
 

Example response (200):


{
    "status": "ok",
    "data": {
        "items": Boxset[],
        "page": 1,
        "maxPage": 3,
        "resultPerPage": 20
    }
}
 

Request      

POST api/media/boxset/find

Body Parameters

content  string optional  

Recherche dans les champs title subtitle description author(fullname).

startReleaseDate  string  

Date de publication de départ. Must be a valid date.

endReleaseDate  string  

Date de publication de fin. Must be a valid date.

page  integer  

numéro de la page à renvoyer.

resultPerPage  integer  

nombre de résultat à renvoyer.

sortBy  string optional  

champ utilisé pour le tri. id, title, authror, releaseDate (defaut).

sortDirection  string optional  

ordre de tri ASC ou DESC (defaut).

Rechercher un média

requires authentication

Permet de rechercher les médias

Example request:
curl --request POST \
    "https://app.api.prd.editions-charisma.fr/api/media/find" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"content\": \"azerty\",
    \"section\": \"predication\",
    \"type\": \"audio\",
    \"author\": 0,
    \"theme\": 8,
    \"category\": 15,
    \"startReleaseDate\": \"2015-12-05\",
    \"endReleaseDate\": \"2016-12-05\",
    \"page\": 1,
    \"resultPerPage\": 20,
    \"isFavorite\": false,
    \"isHistory\": false,
    \"sortBy\": \"releaseDate\",
    \"sortDirection\": \"DESC\"
}"
const url = new URL(
    "https://app.api.prd.editions-charisma.fr/api/media/find"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "content": "azerty",
    "section": "predication",
    "type": "audio",
    "author": 0,
    "theme": 8,
    "category": 15,
    "startReleaseDate": "2015-12-05",
    "endReleaseDate": "2016-12-05",
    "page": 1,
    "resultPerPage": 20,
    "isFavorite": false,
    "isHistory": false,
    "sortBy": "releaseDate",
    "sortDirection": "DESC"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://app.api.prd.editions-charisma.fr/api/media/find',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'content' => 'azerty',
            'section' => 'predication',
            'type' => 'audio',
            'author' => 0,
            'theme' => 8,
            'category' => 15,
            'startReleaseDate' => '2015-12-05',
            'endReleaseDate' => '2016-12-05',
            'page' => 1,
            'resultPerPage' => 20,
            'isFavorite' => false,
            'isHistory' => false,
            'sortBy' => 'releaseDate',
            'sortDirection' => 'DESC',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Invalid user credentials"
}
 

Example response (200):


{
    "status": "ok",
    "data": {
        "items": Media[],
        "page": 1,
        "maxPage": 3,
        "resultPerPage": 20
    }
}
 

Request      

POST api/media/find

Body Parameters

content  string optional  

Recherche dans les champs title subtitle description category author(fullname).

section  string optional  

predication | music.

type  string  

audio | video.

author  integer optional  

Id de l' auteur.

theme  integer optional  

ID du theme.

category  integer optional  

startReleaseDate  string  

Date de publication de départ. Must be a valid date.

endReleaseDate  string  

Date de publication de fin. Must be a valid date.

page  integer  

numéro de la page à renvoyer.

resultPerPage  integer  

nombre de résultat à renvoyer.

isFavorite  boolean optional  

indique si le média est taggé comme favori.

isHistory  boolean optional  

indique si le média a été joué par l'utilisatuer.

sortBy  string optional  

champ utilisé pour le tri. id, title, releaseDate (defaut).

sortDirection  string optional  

ordre de tri ASC ou DESC (defaut).

Explorer les médias

requires authentication

Permet de renovyer une liste contenant tous les médias classés suivant la demande utilisateur

Example request:
curl --request POST \
    "https://app.api.prd.editions-charisma.fr/api/media/explorer" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://app.api.prd.editions-charisma.fr/api/media/explorer"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://app.api.prd.editions-charisma.fr/api/media/explorer',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "status": "ok",
    "data": true
}
 

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Invalid user credentials"
}
 

Request      

POST api/media/explorer

Tagger un média en favoris

requires authentication

Permet de tagger un média en favoris

Example request:
curl --request POST \
    "https://app.api.prd.editions-charisma.fr/api/media/favorite/update" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"mediaId\": \"042e63a6e171ce59614a9418bf55de9c\",
    \"operation\": \"like\"
}"
const url = new URL(
    "https://app.api.prd.editions-charisma.fr/api/media/favorite/update"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "mediaId": "042e63a6e171ce59614a9418bf55de9c",
    "operation": "like"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://app.api.prd.editions-charisma.fr/api/media/favorite/update',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'mediaId' => '042e63a6e171ce59614a9418bf55de9c',
            'operation' => 'like',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "status": "ok",
    "data": true
}
 

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Invalid user credentials"
}
 

Request      

POST api/media/favorite/update

Body Parameters

mediaId  string  

Id du média à tagger.

operation  string  

like ou dislike.

Récupérer les détails d'un média

requires authentication

Permet de recuperer un media

Example request:
curl --request GET \
    --get "https://app.api.prd.editions-charisma.fr/api/media/get/00014b36f5a5fd5066e768b04a1d2003" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://app.api.prd.editions-charisma.fr/api/media/get/00014b36f5a5fd5066e768b04a1d2003"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://app.api.prd.editions-charisma.fr/api/media/get/00014b36f5a5fd5066e768b04a1d2003',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Bad token"
}
 

Example response (200):


{
    "status": "ok",
    "data": {
        "item": {
			"id": 0,
			"previewImage": "",
			"title": "",
			"type": "audio | video",
			"section": "predication | music",
			"durationInSecond": 0,
			"positionInSecond": 0,
			"releaseDateTimestamp": 101010000,
			"releaseDate": "05-12-2001",
			"playUrl": "",
			"downloadUrl": "",
			"isFavorite": false,
			"description": "",
			"author": Author,
			"featuring": Author[],
			"album": Album,
			"category": Category[]
		}
    }
}
 

Request      

GET api/media/get/{song_id}

URL Parameters

song_id  string  

The ID of the song.

song  string  

ID du média. Exemple : 042e63a6e171ce59614a9418bf55de9c

Récupérer les détails d'un auteur/artiste

requires authentication

Permet de recuperer le détails d'un auteur.

Example request:
curl --request GET \
    --get "https://app.api.prd.editions-charisma.fr/api/media/author/get/1" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://app.api.prd.editions-charisma.fr/api/media/author/get/1"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://app.api.prd.editions-charisma.fr/api/media/author/get/1',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Bad token"
}
 

Example response (200):


{
    "status": "ok",
    "data": {
        "item": {
            "id": 0,
            "fullname": "Pierre Dupont",
            "description": "description de Pierre Dupont",
            "image": "image.png",
            "section": [
                "predication",
                "music"
            ]
        }
    }
}
 

Request      

GET api/media/author/get/{author_id}

URL Parameters

author_id  integer  

The ID of the author.

author  integer  

ID de l'objet author. Exemple : 1

Récupérer les détails d'un theme

requires authentication

Permet de recuperer les détails d'un theme.

Example request:
curl --request GET \
    --get "https://app.api.prd.editions-charisma.fr/api/media/theme/get/1" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://app.api.prd.editions-charisma.fr/api/media/theme/get/1"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://app.api.prd.editions-charisma.fr/api/media/theme/get/1',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Bad token"
}
 

Example response (200):


{
    "status": "ok",
    "data": {
        "item": {
            "id": 1,
            "name": "Musique",
            "slug": "musique"
        }
    }
}
 

Request      

GET api/media/theme/get/{theme_id}

URL Parameters

theme_id  integer  

The ID of the theme.

theme  integer  

ID du thème. Exemple : 1

Récupérer les détails d'un album

requires authentication

Permet de recuperer les détails d'un album.

Example request:
curl --request GET \
    --get "https://app.api.prd.editions-charisma.fr/api/media/album/get/10" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://app.api.prd.editions-charisma.fr/api/media/album/get/10"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://app.api.prd.editions-charisma.fr/api/media/album/get/10',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Bad token"
}
 

Example response (200):


{
    "status": "ok",
    "data": {
        "item": {
			"id": 0,
			"title": "",
			"subtitle": "",
			"image": "",
			"color": "#000000",
			"description": "",
			"duration": "5h25 | 45min",
			"items": Media[]
			"author": Author,
			"isFavorite": false,
		}
    }
}
 

Request      

GET api/media/album/get/{album_id}

URL Parameters

album_id  integer  

The ID of the album.

album  integer  

ID de l'album. Exemple : 1

Récupérer les détails d'un coffret

requires authentication

Permet de recuperer les détails d'un coffret.

Example request:
curl --request GET \
    --get "https://app.api.prd.editions-charisma.fr/api/media/boxset/get/10" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://app.api.prd.editions-charisma.fr/api/media/boxset/get/10"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://app.api.prd.editions-charisma.fr/api/media/boxset/get/10',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Bad token"
}
 

Example response (200):


{
    "status": "ok",
    "data": {
        "item": {
			"id": 0,
			"title": "",
			"subtitle": "",
			"image": "",
			"color": "#000000",
			"description": "",
			"duration": "5h25 | 45min",
			"items": Media[]
		}
    }
}
 

Request      

GET api/media/boxset/get/{boxset_id}

URL Parameters

boxset_id  integer  

The ID of the boxset.

boxset  integer  

ID du coffret. Exemple : 1

Explorer les albums

requires authentication

Permet de renovyer une liste contenant tous les albums classés suivant la demande utilisateur

Example request:
curl --request POST \
    "https://app.api.prd.editions-charisma.fr/api/media/explorer-albums" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://app.api.prd.editions-charisma.fr/api/media/explorer-albums"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://app.api.prd.editions-charisma.fr/api/media/explorer-albums',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "status": "ok",
    "data": true
}
 

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Invalid user credentials"
}
 

Request      

POST api/media/explorer-albums

Logger un song pour audience

requires authentication

Permet de marquer un song pour les statistiques d'audience

Example request:
curl --request POST \
    "https://app.api.prd.editions-charisma.fr/api/media/log" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"mediaId\": \"042e63a6e171ce59614a9418bf55de9c\",
    \"timestamp\": \"0\"
}"
const url = new URL(
    "https://app.api.prd.editions-charisma.fr/api/media/log"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "mediaId": "042e63a6e171ce59614a9418bf55de9c",
    "timestamp": "0"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://app.api.prd.editions-charisma.fr/api/media/log',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'mediaId' => '042e63a6e171ce59614a9418bf55de9c',
            'timestamp' => '0',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "status": "ok",
    "data": true
}
 

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Bad token"
}
 

Example response (404):


{
    "code": 404,
    "message": "Resource not found",
    "path": null,
    "description": "No query result found for this Id"
}
 

Request      

POST api/media/log

Body Parameters

mediaId  string  

Id du média à tagger.

timestamp  string  

Position du lecteur dans le media.

Rechercher les albums d'une catégorie

requires authentication

Permet de renovyer une liste contenant tous les albums contenus dans la catégorie choisie

Example request:
curl --request POST \
    "https://app.api.prd.editions-charisma.fr/api/media/find-albums-by-category" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"content\": \"azerty\",
    \"section\": \"predication\",
    \"type\": \"audio\",
    \"author\": 0,
    \"theme\": 8,
    \"category\": 7,
    \"startReleaseDate\": \"2015-12-05\",
    \"endReleaseDate\": \"2016-12-05\",
    \"page\": 1,
    \"resultPerPage\": 20,
    \"isFavorite\": false,
    \"isHistory\": false,
    \"sortBy\": \"releaseDate\",
    \"sortDirection\": \"DESC\"
}"
const url = new URL(
    "https://app.api.prd.editions-charisma.fr/api/media/find-albums-by-category"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "content": "azerty",
    "section": "predication",
    "type": "audio",
    "author": 0,
    "theme": 8,
    "category": 7,
    "startReleaseDate": "2015-12-05",
    "endReleaseDate": "2016-12-05",
    "page": 1,
    "resultPerPage": 20,
    "isFavorite": false,
    "isHistory": false,
    "sortBy": "releaseDate",
    "sortDirection": "DESC"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://app.api.prd.editions-charisma.fr/api/media/find-albums-by-category',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'content' => 'azerty',
            'section' => 'predication',
            'type' => 'audio',
            'author' => 0,
            'theme' => 8,
            'category' => 7,
            'startReleaseDate' => '2015-12-05',
            'endReleaseDate' => '2016-12-05',
            'page' => 1,
            'resultPerPage' => 20,
            'isFavorite' => false,
            'isHistory' => false,
            'sortBy' => 'releaseDate',
            'sortDirection' => 'DESC',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "status": "ok",
    "data": true
}
 

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Invalid user credentials"
}
 

Request      

POST api/media/find-albums-by-category

Body Parameters

content  string optional  

Recherche dans les champs title subtitle description category author(fullname).

section  string optional  

predication | music.

type  string  

audio | video.

author  integer optional  

Id de l' auteur.

theme  integer optional  

ID du theme.

category  integer optional  

startReleaseDate  string  

Date de publication de départ. Must be a valid date.

endReleaseDate  string  

Date de publication de fin. Must be a valid date.

page  integer  

numéro de la page à renvoyer.

resultPerPage  integer  

nombre de résultat à renvoyer.

isFavorite  boolean optional  

indique si le média est taggé comme favori.

isHistory  boolean optional  

indique si le média a été joué par l'utilisatuer.

sortBy  string optional  

champ utilisé pour le tri. id, title, releaseDate (defaut).

sortDirection  string optional  

ordre de tri ASC ou DESC (defaut).

Récupérer les détails d'une catégorie

requires authentication

Permet de recuperer une category.

Example request:
curl --request POST \
    "https://app.api.prd.editions-charisma.fr/api/media/category/get" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"id\": 1,
    \"page\": 1,
    \"resultPerPage\": 20,
    \"slug\": \"ma-categorie\",
    \"type\": \"album\"
}"
const url = new URL(
    "https://app.api.prd.editions-charisma.fr/api/media/category/get"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "id": 1,
    "page": 1,
    "resultPerPage": 20,
    "slug": "ma-categorie",
    "type": "album"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://app.api.prd.editions-charisma.fr/api/media/category/get',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'id' => 1,
            'page' => 1,
            'resultPerPage' => 20,
            'slug' => 'ma-categorie',
            'type' => 'album',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Bad token"
}
 

Example response (200):


{
    "status": "ok",
    "data": {
        "item": {
            "id": 0,
            "name": "Ma catégorie",
            "image": "mon_image.png",
            "color": "#000000"
        }
    }
}
 

Request      

POST api/media/category/get

Body Parameters

id  integer optional  

$id de la catégorie.

page  integer  

numéro de la page à renvoyer.

resultPerPage  integer  

nombre de résultat à renvoyer.

slug  string optional  

slug de la catégorie (optionnel, si présent utilise le slug au lieu de l'id).

type  string optional  

dispostion dees élements à afficher (album ou media).

Récupérer les catégories pour les pages

Retourne toutes les catégories avec show_in_page=1, sans leurs albums

Example request:
curl --request GET \
    --get "https://app.api.prd.editions-charisma.fr/api/media/category/page" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://app.api.prd.editions-charisma.fr/api/media/category/page"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://app.api.prd.editions-charisma.fr/api/media/category/page',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "status": "ok",
    "data": [
        {
            "id": 1,
            "name": "Gospel",
            "slug": "gospel",
            "position": 1,
            "show_in_tabs": true,
            "show_in_page": true
        }
    ]
}
 

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Bad token"
}
 

Request      

GET api/media/category/page

02 - Médias (Front Web)

Récupérer les détails d'une catégorie (web)

requires authentication

Permet de recuperer une category.

Example request:
curl --request POST \
    "https://app.api.prd.editions-charisma.fr/api/media/category/get-web" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"id\": 1,
    \"page\": 1,
    \"resultPerPage\": 20,
    \"slug\": \"ma-categorie\",
    \"type\": \"album\"
}"
const url = new URL(
    "https://app.api.prd.editions-charisma.fr/api/media/category/get-web"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "id": 1,
    "page": 1,
    "resultPerPage": 20,
    "slug": "ma-categorie",
    "type": "album"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://app.api.prd.editions-charisma.fr/api/media/category/get-web',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'id' => 1,
            'page' => 1,
            'resultPerPage' => 20,
            'slug' => 'ma-categorie',
            'type' => 'album',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Bad token"
}
 

Example response (200):


{
    "status": "ok",
    "data": {
        "item": {
            "id": 0,
            "name": "Ma catégorie",
            "image": "mon_image.png",
            "color": "#000000"
        }
    }
}
 

Request      

POST api/media/category/get-web

Body Parameters

id  integer optional  

$id de la catégorie.

page  integer  

numéro de la page à renvoyer.

resultPerPage  integer  

nombre de résultat à renvoyer.

slug  string optional  

slug de la catégorie (optionnel, si présent utilise le slug au lieu de l'id).

type  string optional  

dispostion dees élements à afficher (album ou media).

Récupérer les détails d'un album (web)

requires authentication

Permet de recuperer les détails d'un album (web).

Example request:
curl --request GET \
    --get "https://app.api.prd.editions-charisma.fr/api/media/album/get-web/10" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://app.api.prd.editions-charisma.fr/api/media/album/get-web/10"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://app.api.prd.editions-charisma.fr/api/media/album/get-web/10',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Bad token"
}
 

Example response (200):


{
    "status": "ok",
    "data": {
        "item": {
			"id": 0,
			"title": "",
			"subtitle": "",
			"image": "",
			"color": "#000000",
			"description": "",
			"duration": "5h25 | 45min",
			"items": Media[]
			"author": Author,
			"isFavorite": false,
		}
    }
}
 

Request      

GET api/media/album/get-web/{album_id}

URL Parameters

album_id  integer  

The ID of the album.

album  integer  

ID de l'album. Exemple : 1

Rechercher un auteur (web)

requires authentication

Permet de rechercher les auteurs (web)

Example request:
curl --request POST \
    "https://app.api.prd.editions-charisma.fr/api/media/author/find-web" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"content\": \"azerty\",
    \"section\": null,
    \"page\": 1,
    \"resultPerPage\": 20,
    \"sortBy\": \"releaseDate\",
    \"sortDirection\": \"DESC\"
}"
const url = new URL(
    "https://app.api.prd.editions-charisma.fr/api/media/author/find-web"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "content": "azerty",
    "section": null,
    "page": 1,
    "resultPerPage": 20,
    "sortBy": "releaseDate",
    "sortDirection": "DESC"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://app.api.prd.editions-charisma.fr/api/media/author/find-web',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'content' => 'azerty',
            'section' => null,
            'page' => 1,
            'resultPerPage' => 20,
            'sortBy' => 'releaseDate',
            'sortDirection' => 'DESC',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Invalid user credentials"
}
 

Example response (200):


{
    "status": "ok",
    "data": {
        "items": Author[],
        "page": 1,
        "maxPage": 3,
        "resultPerPage": 20
    }
}
 

Request      

POST api/media/author/find-web

Body Parameters

content  string optional  

Recherche dans les champs fullname description.

section  string[]  

Liste de sections.

page  integer  

numéro de la page à renvoyer.

resultPerPage  integer  

nombre de résultat à renvoyer.

sortBy  string optional  

champ utilisé pour le tri. id, fullname, releaseDate (defaut).

sortDirection  string optional  

ordre de tri ASC ou DESC (defaut).

Rechercher un theme (web)

requires authentication

Permet de rechercher les themes

Example request:
curl --request POST \
    "https://app.api.prd.editions-charisma.fr/api/media/theme/find-web" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"content\": \"azerty\",
    \"theme\": 1,
    \"startReleaseDate\": \"1950-01-01\",
    \"endReleaseDate\": \"2024-12-31\",
    \"page\": 1,
    \"resultPerPage\": 50,
    \"sortBy\": \"position\",
    \"sortDirection\": \"ASC\"
}"
const url = new URL(
    "https://app.api.prd.editions-charisma.fr/api/media/theme/find-web"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "content": "azerty",
    "theme": 1,
    "startReleaseDate": "1950-01-01",
    "endReleaseDate": "2024-12-31",
    "page": 1,
    "resultPerPage": 50,
    "sortBy": "position",
    "sortDirection": "ASC"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://app.api.prd.editions-charisma.fr/api/media/theme/find-web',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'content' => 'azerty',
            'theme' => 1,
            'startReleaseDate' => '1950-01-01',
            'endReleaseDate' => '2024-12-31',
            'page' => 1,
            'resultPerPage' => 50,
            'sortBy' => 'position',
            'sortDirection' => 'ASC',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Invalid user credentials"
}
 

Example response (200):


{
    "status": "ok",
    "data": {
        "items": Theme[],
        "page": 1,
        "maxPage": 3,
        "resultPerPage": 20
    }
}
 

Request      

POST api/media/theme/find-web

Body Parameters

content  string optional  

Recherche dans les champs name.

theme  integer optional  

identifiant du thème.

startReleaseDate  string optional  

date de début de filtre (format YYYY-MM-DD). Must be a valid date.

endReleaseDate  string optional  

date de fin de filtre (format YYYY-MM-DD). Must be a valid date.

page  integer  

numéro de la page à renvoyer.

resultPerPage  integer  

nombre de résultat à renvoyer.

sortBy  string optional  

champ utilisé pour le tri. id, fullname, position (defaut).

sortDirection  string optional  

ordre de tri ASC ou DESC (defaut).

Rechercher un album (web)

requires authentication

Permet de rechercher les albums (web)

Example request:
curl --request POST \
    "https://app.api.prd.editions-charisma.fr/api/media/album/find-web" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"section\": \"music\",
    \"content\": \"azerty\",
    \"author\": 0,
    \"startReleaseDate\": \"2015-12-05\",
    \"endReleaseDate\": \"2016-12-05\",
    \"page\": 1,
    \"resultPerPage\": 20,
    \"sortBy\": \"releaseDate\",
    \"sortDirection\": \"DESC\"
}"
const url = new URL(
    "https://app.api.prd.editions-charisma.fr/api/media/album/find-web"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "section": "music",
    "content": "azerty",
    "author": 0,
    "startReleaseDate": "2015-12-05",
    "endReleaseDate": "2016-12-05",
    "page": 1,
    "resultPerPage": 20,
    "sortBy": "releaseDate",
    "sortDirection": "DESC"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://app.api.prd.editions-charisma.fr/api/media/album/find-web',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'section' => 'music',
            'content' => 'azerty',
            'author' => 0,
            'startReleaseDate' => '2015-12-05',
            'endReleaseDate' => '2016-12-05',
            'page' => 1,
            'resultPerPage' => 20,
            'sortBy' => 'releaseDate',
            'sortDirection' => 'DESC',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Invalid user credentials"
}
 

Example response (200):


{
    "status": "ok",
    "data": {
        "items": Album[],
        "page": 1,
        "maxPage": 3,
        "resultPerPage": 20
    }
}
 

Request      

POST api/media/album/find-web

Body Parameters

section  string optional  

predication | music.

content  string optional  

Recherche dans les champs title subtitle description author(fullname).

author  integer optional  

Id de l' auteur.

startReleaseDate  string  

Date de publication de départ. Must be a valid date.

endReleaseDate  string  

Date de publication de fin. Must be a valid date.

page  integer  

numéro de la page à renvoyer.

resultPerPage  integer  

nombre de résultat à renvoyer.

sortBy  string optional  

champ utilisé pour le tri. id, title, authror, releaseDate (defaut).

sortDirection  string optional  

ordre de tri ASC ou DESC (defaut).

Rechercher un coffret (web)

requires authentication

Permet de rechercher les coffrets

Example request:
curl --request POST \
    "https://app.api.prd.editions-charisma.fr/api/media/boxset/find-web" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"content\": \"azerty\",
    \"startReleaseDate\": \"2015-12-05\",
    \"endReleaseDate\": \"2016-12-05\",
    \"page\": 1,
    \"resultPerPage\": 20,
    \"sortBy\": \"releaseDate\",
    \"sortDirection\": \"DESC\"
}"
const url = new URL(
    "https://app.api.prd.editions-charisma.fr/api/media/boxset/find-web"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "content": "azerty",
    "startReleaseDate": "2015-12-05",
    "endReleaseDate": "2016-12-05",
    "page": 1,
    "resultPerPage": 20,
    "sortBy": "releaseDate",
    "sortDirection": "DESC"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://app.api.prd.editions-charisma.fr/api/media/boxset/find-web',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'content' => 'azerty',
            'startReleaseDate' => '2015-12-05',
            'endReleaseDate' => '2016-12-05',
            'page' => 1,
            'resultPerPage' => 20,
            'sortBy' => 'releaseDate',
            'sortDirection' => 'DESC',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Invalid user credentials"
}
 

Example response (200):


{
    "status": "ok",
    "data": {
        "items": Boxset[],
        "page": 1,
        "maxPage": 3,
        "resultPerPage": 20
    }
}
 

Request      

POST api/media/boxset/find-web

Body Parameters

content  string optional  

Recherche dans les champs title subtitle description author(fullname).

startReleaseDate  string  

Date de publication de départ. Must be a valid date.

endReleaseDate  string  

Date de publication de fin. Must be a valid date.

page  integer  

numéro de la page à renvoyer.

resultPerPage  integer  

nombre de résultat à renvoyer.

sortBy  string optional  

champ utilisé pour le tri. id, title, authror, releaseDate (defaut).

sortDirection  string optional  

ordre de tri ASC ou DESC (defaut).

Rechercher un média (web)

requires authentication

Permet de rechercher les médias

Example request:
curl --request POST \
    "https://app.api.prd.editions-charisma.fr/api/media/find-web" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"content\": \"azerty\",
    \"section\": \"predication\",
    \"type\": \"audio\",
    \"author\": 0,
    \"theme\": 8,
    \"category\": 10,
    \"startReleaseDate\": \"2015-12-05\",
    \"endReleaseDate\": \"2016-12-05\",
    \"page\": 1,
    \"resultPerPage\": 20,
    \"isFavorite\": false,
    \"isHistory\": false,
    \"sortBy\": \"releaseDate\",
    \"sortDirection\": \"DESC\"
}"
const url = new URL(
    "https://app.api.prd.editions-charisma.fr/api/media/find-web"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "content": "azerty",
    "section": "predication",
    "type": "audio",
    "author": 0,
    "theme": 8,
    "category": 10,
    "startReleaseDate": "2015-12-05",
    "endReleaseDate": "2016-12-05",
    "page": 1,
    "resultPerPage": 20,
    "isFavorite": false,
    "isHistory": false,
    "sortBy": "releaseDate",
    "sortDirection": "DESC"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://app.api.prd.editions-charisma.fr/api/media/find-web',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'content' => 'azerty',
            'section' => 'predication',
            'type' => 'audio',
            'author' => 0,
            'theme' => 8,
            'category' => 10,
            'startReleaseDate' => '2015-12-05',
            'endReleaseDate' => '2016-12-05',
            'page' => 1,
            'resultPerPage' => 20,
            'isFavorite' => false,
            'isHistory' => false,
            'sortBy' => 'releaseDate',
            'sortDirection' => 'DESC',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Invalid user credentials"
}
 

Example response (200):


{
    "status": "ok",
    "data": {
        "items": Media[],
        "page": 1,
        "maxPage": 3,
        "resultPerPage": 20
    }
}
 

Request      

POST api/media/find-web

Body Parameters

content  string optional  

Recherche dans les champs title subtitle description category author(fullname).

section  string optional  

predication | music.

type  string  

audio | video.

author  integer optional  

Id de l' auteur.

theme  integer optional  

ID du theme.

category  integer optional  

startReleaseDate  string  

Date de publication de départ. Must be a valid date.

endReleaseDate  string  

Date de publication de fin. Must be a valid date.

page  integer  

numéro de la page à renvoyer.

resultPerPage  integer  

nombre de résultat à renvoyer.

isFavorite  boolean optional  

indique si le média est taggé comme favori.

isHistory  boolean optional  

indique si le média a été joué par l'utilisatuer.

sortBy  string optional  

champ utilisé pour le tri. id, title, releaseDate (defaut).

sortDirection  string optional  

ordre de tri ASC ou DESC (defaut).

Explorer les médias (web)

requires authentication

Permet de renovyer une liste contenant tous les médias classés suivant la demande utilisateur

Example request:
curl --request POST \
    "https://app.api.prd.editions-charisma.fr/api/media/explorer-web" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://app.api.prd.editions-charisma.fr/api/media/explorer-web"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://app.api.prd.editions-charisma.fr/api/media/explorer-web',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "status": "ok",
    "data": true
}
 

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Invalid user credentials"
}
 

Request      

POST api/media/explorer-web

Explorer les albums web version

requires authentication

Permet de renovyer une liste contenant tous les albums classés suivant la demande utilisateur (web version)

Example request:
curl --request POST \
    "https://app.api.prd.editions-charisma.fr/api/media/explorer-albums-web" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://app.api.prd.editions-charisma.fr/api/media/explorer-albums-web"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://app.api.prd.editions-charisma.fr/api/media/explorer-albums-web',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "status": "ok",
    "data": true
}
 

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Invalid user credentials"
}
 

Request      

POST api/media/explorer-albums-web

Récupérer toutes les catégories affichées dans les tabs

requires authentication

Permet de récupérer toutes les catégories où show_in_tabs = true avec leurs albums. Les catégories sont triées par position.

Example request:
curl --request POST \
    "https://app.api.prd.editions-charisma.fr/api/media/category/tabs" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"id\": 1,
    \"page\": 1,
    \"resultPerPage\": 20,
    \"slug\": \"ma-categorie\",
    \"type\": \"album\"
}"
const url = new URL(
    "https://app.api.prd.editions-charisma.fr/api/media/category/tabs"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "id": 1,
    "page": 1,
    "resultPerPage": 20,
    "slug": "ma-categorie",
    "type": "album"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://app.api.prd.editions-charisma.fr/api/media/category/tabs',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'id' => 1,
            'page' => 1,
            'resultPerPage' => 20,
            'slug' => 'ma-categorie',
            'type' => 'album',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
  "status": "ok",
  "data": {
    "items": [
      {
        "title": "Dernières sorties",
        "id": 1,
        "type": "album",
        "albums": [...],
        "page": 1,
        "perPage": 20,
        "maxPage": 3
      }
    ]
  }
}
 

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Bad token"
}
 

Request      

POST api/media/category/tabs

Body Parameters

id  integer optional  

$id de la catégorie.

page  integer  

numéro de la page à renvoyer.

resultPerPage  integer  

nombre de résultat à renvoyer.

slug  string optional  

slug de la catégorie (optionnel, si présent utilise le slug au lieu de l'id).

type  string optional  

dispostion dees élements à afficher (album ou media).

Récupérer les détails d'un auteur/artiste

requires authentication

Permet de recuperer le détails d'un auteur.

Example request:
curl --request GET \
    --get "https://app.api.prd.editions-charisma.fr/api/media/author/get-web/1" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://app.api.prd.editions-charisma.fr/api/media/author/get-web/1"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://app.api.prd.editions-charisma.fr/api/media/author/get-web/1',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Bad token"
}
 

Example response (200):


{
    "status": "ok",
    "data": {
        "item": {
            "id": 0,
            "fullname": "Pierre Dupont",
            "description": "description de Pierre Dupont",
            "image": "image.png",
            "section": [
                "predication",
                "music"
            ]
        }
    }
}
 

Request      

GET api/media/author/get-web/{author_id}

URL Parameters

author_id  integer  

The ID of the author.

author  integer  

ID de l'objet author. Exemple : 1

03 - Thèmes (Administration)

Lister les thèmes

requires authentication

Permet de recuperer la liste des themes (categorie côté Front)

Example request:
curl --request GET \
    --get "https://app.api.prd.editions-charisma.fr/api/themes" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://app.api.prd.editions-charisma.fr/api/themes"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://app.api.prd.editions-charisma.fr/api/themes',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{...}, {...}
 

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Bad token"
}
 

Request      

GET api/themes

Créer un thème

requires authentication

Permet de créer un nouveau thème

Example request:
curl --request POST \
    "https://app.api.prd.editions-charisma.fr/api/themes" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Azerty\",
    \"slug\": \"azerty\",
    \"image\": \"image.png\",
    \"color\": \"#000000\",
    \"position\": 1
}"
const url = new URL(
    "https://app.api.prd.editions-charisma.fr/api/themes"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "Azerty",
    "slug": "azerty",
    "image": "image.png",
    "color": "#000000",
    "position": 1
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://app.api.prd.editions-charisma.fr/api/themes',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'name' => 'Azerty',
            'slug' => 'azerty',
            'image' => 'image.png',
            'color' => '#000000',
            'position' => 1,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Bad token"
}
 

Example response (422):


{ "message" : "The given data was invalid.", "error" : {...}}
 

Example response (200):


{
    "name": "Thème",
    "slug": "slug",
    "image": "",
    "color": "#000000",
    "id": 44
}
 

Request      

POST api/themes

Body Parameters

name  string  

Nom du thème.

slug  string  

slug associé au thème.

image  string optional  

Image associée au thème.

color  string optional  

Couleur d'affichage du thème. Code HTML.

position  integer optional  

Position dans l'affichage.

Afficher un thème

requires authentication

Permet de récupérer les détails d'un thème

Example request:
curl --request GET \
    --get "https://app.api.prd.editions-charisma.fr/api/themes/1" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://app.api.prd.editions-charisma.fr/api/themes/1"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://app.api.prd.editions-charisma.fr/api/themes/1',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Bad token"
}
 

Example response (404):


{
    "code": 404,
    "message": "Resource not found",
    "path": null,
    "description": "No query result found for this Id"
}
 

Example response (200):


{
    "name": "Thème",
    "slug": "slug",
    "image": "",
    "color": "#000000",
    "id": 44
}
 

Request      

GET api/themes/{id}

URL Parameters

id  integer  

The ID of the theme.

Modifier un thème

requires authentication

Permet de modifier un thème

Example request:
curl --request PUT \
    "https://app.api.prd.editions-charisma.fr/api/themes/1" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Azerty\",
    \"slug\": \"azerty\",
    \"image\": \"image.png\",
    \"color\": \"#000000\",
    \"position\": 1
}"
const url = new URL(
    "https://app.api.prd.editions-charisma.fr/api/themes/1"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "Azerty",
    "slug": "azerty",
    "image": "image.png",
    "color": "#000000",
    "position": 1
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->put(
    'https://app.api.prd.editions-charisma.fr/api/themes/1',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'name' => 'Azerty',
            'slug' => 'azerty',
            'image' => 'image.png',
            'color' => '#000000',
            'position' => 1,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Bad token"
}
 

Example response (422):


{ "message" : "The given data was invalid.", "error" : {...}}
 

Example response (404):


{
    "code": 404,
    "message": "Resource not found",
    "path": null,
    "description": "No query result found for this Id"
}
 

Example response (200):


{
    "name": "Thème",
    "slug": "slug",
    "image": "",
    "color": "#000000",
    "id": 44
}
 

Request      

PUT api/themes/{id}

PATCH api/themes/{id}

URL Parameters

id  integer  

The ID of the theme.

Body Parameters

name  string optional  

Nom du thème.

slug  string optional  

slug associé au thème.

image  string optional  

Image associée au thème.

color  string optional  

Couleur d'affichage du thème. Code HTML.

position  integer optional  

Position dans l'affichage.

Supprimer un thème

requires authentication

Permet de supprimer un thème

Example request:
curl --request DELETE \
    "https://app.api.prd.editions-charisma.fr/api/themes/1" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://app.api.prd.editions-charisma.fr/api/themes/1"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->delete(
    'https://app.api.prd.editions-charisma.fr/api/themes/1',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (204):

[Empty response]
 

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Bad token"
}
 

Example response (404):


{
    "code": 404,
    "message": "Resource not found",
    "path": null,
    "description": "No query result found for this Id"
}
 

Request      

DELETE api/themes/{id}

URL Parameters

id  integer  

The ID of the theme.

04 - Catégories (Administration)

Lister les catégories

requires authentication

Permet de recuperer la liste des catégories (section côté Front)

Example request:
curl --request GET \
    --get "https://app.api.prd.editions-charisma.fr/api/categories" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://app.api.prd.editions-charisma.fr/api/categories"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://app.api.prd.editions-charisma.fr/api/categories',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{...}, {...}
 

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Bad token"
}
 

Request      

GET api/categories

Créer une catégorie

requires authentication

Permet de créer une nouvelle catégorie

Example request:
curl --request POST \
    "https://app.api.prd.editions-charisma.fr/api/categories" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Azerty\",
    \"slug\": \"azerty\",
    \"position\": 5
}"
const url = new URL(
    "https://app.api.prd.editions-charisma.fr/api/categories"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "Azerty",
    "slug": "azerty",
    "position": 5
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://app.api.prd.editions-charisma.fr/api/categories',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'name' => 'Azerty',
            'slug' => 'azerty',
            'position' => 5,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Bad token"
}
 

Example response (422):


{ "message" : "The given data was invalid.", "error" : {...}}
 

Example response (200):


{
    "name": "Ma catégorie",
    "slug": "slug",
    "id": 33
}
 

Request      

POST api/categories

Body Parameters

name  string  

Nom de la catégorie.

slug  string  

slug associé à la catégorie.

position  integer optional  

position de la catégorie.

Afficher une catégorie

requires authentication

Permet de récupérer les détails d'une catégorie

Example request:
curl --request GET \
    --get "https://app.api.prd.editions-charisma.fr/api/categories/1" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://app.api.prd.editions-charisma.fr/api/categories/1"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://app.api.prd.editions-charisma.fr/api/categories/1',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Bad token"
}
 

Example response (404):


{
    "code": 404,
    "message": "Resource not found",
    "path": null,
    "description": "No query result found for this Id"
}
 

Example response (200):


{
    "name": "Ma catégorie",
    "slug": "slug",
    "id": 33
}
 

Request      

GET api/categories/{id}

URL Parameters

id  integer  

The ID of the category.

Modifier une catégorie

requires authentication

Permet de modifier une catégorie

Example request:
curl --request PUT \
    "https://app.api.prd.editions-charisma.fr/api/categories/1" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Azerty\",
    \"slug\": \"azerty\",
    \"position\": 5
}"
const url = new URL(
    "https://app.api.prd.editions-charisma.fr/api/categories/1"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "Azerty",
    "slug": "azerty",
    "position": 5
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->put(
    'https://app.api.prd.editions-charisma.fr/api/categories/1',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'name' => 'Azerty',
            'slug' => 'azerty',
            'position' => 5,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Bad token"
}
 

Example response (422):


{ "message" : "The given data was invalid.", "error" : {...}}
 

Example response (404):


{
    "code": 404,
    "message": "Resource not found",
    "path": null,
    "description": "No query result found for this Id"
}
 

Example response (200):


{
    "name": "Ma catégorie",
    "slug": "slug",
    "id": 33
}
 

Request      

PUT api/categories/{id}

PATCH api/categories/{id}

URL Parameters

id  integer  

The ID of the category.

Body Parameters

name  string optional  

Nom de la catégorie.

slug  string optional  

slug associé à la catégorie.

position  integer optional  

position de la catégorie.

Supprimer une catégorie

requires authentication

Permet de supprimer une catégorie

Example request:
curl --request DELETE \
    "https://app.api.prd.editions-charisma.fr/api/categories/1" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://app.api.prd.editions-charisma.fr/api/categories/1"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->delete(
    'https://app.api.prd.editions-charisma.fr/api/categories/1',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (204):

[Empty response]
 

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Bad token"
}
 

Example response (404):


{
    "code": 404,
    "message": "Resource not found",
    "path": null,
    "description": "No query result found for this Id"
}
 

Request      

DELETE api/categories/{id}

URL Parameters

id  integer  

The ID of the category.

05 - Types de Médias (Administration)

Lister les types de médias

requires authentication

Permet de recuperer la liste des types de médias

Example request:
curl --request GET \
    --get "https://app.api.prd.editions-charisma.fr/api/mediatypes" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://app.api.prd.editions-charisma.fr/api/mediatypes"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://app.api.prd.editions-charisma.fr/api/mediatypes',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{...}, {...}
 

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Bad token"
}
 

Request      

GET api/mediatypes

Créer un type de média

requires authentication

Permet de créer un nouveau type de média

Example request:
curl --request POST \
    "https://app.api.prd.editions-charisma.fr/api/mediatypes" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Azerty\",
    \"slug\": \"azerty\"
}"
const url = new URL(
    "https://app.api.prd.editions-charisma.fr/api/mediatypes"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "Azerty",
    "slug": "azerty"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://app.api.prd.editions-charisma.fr/api/mediatypes',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'name' => 'Azerty',
            'slug' => 'azerty',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Bad token"
}
 

Example response (422):


{ "message" : "The given data was invalid.", "error" : {...}}
 

Example response (200):


{
    "name": "Audio",
    "slug": "audio",
    "id": 1
}
 

Request      

POST api/mediatypes

Body Parameters

name  string  

Libellé du type de média.

slug  string  

slug associé au type de média.

Afficher un type de média

requires authentication

Permet de récupérer les détails d'un type de média

Example request:
curl --request GET \
    --get "https://app.api.prd.editions-charisma.fr/api/mediatypes/1" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://app.api.prd.editions-charisma.fr/api/mediatypes/1"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://app.api.prd.editions-charisma.fr/api/mediatypes/1',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Bad token"
}
 

Example response (404):


{
    "code": 404,
    "message": "Resource not found",
    "path": null,
    "description": "No query result found for this Id"
}
 

Example response (200):


{
    "name": "Audio",
    "slug": "audio",
    "id": 1
}
 

Request      

GET api/mediatypes/{id}

URL Parameters

id  integer  

The ID of the mediatype.

Modifier un type de média

requires authentication

Permet de modifier un type de média

Example request:
curl --request PUT \
    "https://app.api.prd.editions-charisma.fr/api/mediatypes/1" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Azerty\",
    \"slug\": \"azerty\"
}"
const url = new URL(
    "https://app.api.prd.editions-charisma.fr/api/mediatypes/1"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "Azerty",
    "slug": "azerty"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->put(
    'https://app.api.prd.editions-charisma.fr/api/mediatypes/1',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'name' => 'Azerty',
            'slug' => 'azerty',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Bad token"
}
 

Example response (422):


{ "message" : "The given data was invalid.", "error" : {...}}
 

Example response (404):


{
    "code": 404,
    "message": "Resource not found",
    "path": null,
    "description": "No query result found for this Id"
}
 

Example response (200):


{
    "name": "Audio",
    "slug": "audio",
    "id": 1
}
 

Request      

PUT api/mediatypes/{id}

PATCH api/mediatypes/{id}

URL Parameters

id  integer  

The ID of the mediatype.

Body Parameters

name  string optional  

Libellé du type de média.

slug  string optional  

slug associé au type de média.

Supprimer un type de média

requires authentication

Permet de supprimer un type de média

Example request:
curl --request DELETE \
    "https://app.api.prd.editions-charisma.fr/api/mediatypes/1" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://app.api.prd.editions-charisma.fr/api/mediatypes/1"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->delete(
    'https://app.api.prd.editions-charisma.fr/api/mediatypes/1',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (204):

[Empty response]
 

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Bad token"
}
 

Example response (404):


{
    "code": 404,
    "message": "Resource not found",
    "path": null,
    "description": "No query result found for this Id"
}
 

Request      

DELETE api/mediatypes/{id}

URL Parameters

id  integer  

The ID of the mediatype.

06 - Artistes (Administration)

Lister les artistes

requires authentication

Permet de recuperer la liste des artistes

Example request:
curl --request GET \
    --get "https://app.api.prd.editions-charisma.fr/api/artists" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://app.api.prd.editions-charisma.fr/api/artists"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://app.api.prd.editions-charisma.fr/api/artists',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{...}, {...}
 

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Bad token"
}
 

Request      

GET api/artists

Créer un artiste

requires authentication

Permet de créer une nouvel artiste

Example request:
curl --request POST \
    "https://app.api.prd.editions-charisma.fr/api/artists" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Jean Dupont\",
    \"image\": \"unknown-artist.jpg\",
    \"description\": \"Lorem ipsum\",
    \"section\": \"predication,music\",
    \"position\": 15,
    \"is_active\": false,
    \"is_invite\": false,
    \"categories\": [
        1,
        2,
        3
    ]
}"
const url = new URL(
    "https://app.api.prd.editions-charisma.fr/api/artists"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "Jean Dupont",
    "image": "unknown-artist.jpg",
    "description": "Lorem ipsum",
    "section": "predication,music",
    "position": 15,
    "is_active": false,
    "is_invite": false,
    "categories": [
        1,
        2,
        3
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://app.api.prd.editions-charisma.fr/api/artists',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'name' => 'Jean Dupont',
            'image' => 'unknown-artist.jpg',
            'description' => 'Lorem ipsum',
            'section' => 'predication,music',
            'position' => 15,
            'is_active' => false,
            'is_invite' => false,
            'categories' => [
                1,
                2,
                3,
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Bad token"
}
 

Example response (422):


{ "message" : "The given data was invalid.", "error" : {...}}
 

Example response (200):


{
  "id": 3,
  "name": "Charisma Eglise Chretienne",
  "image": "http://127.0.0.1:8001/artists/unknown-artist.jpg",
  "is_active": 1,
  "is_invite": 1,
  "description": "",
  "albums" : Albums[],
  "categories" : Categories[],
  "songs" : Songs[]
}
 

Request      

POST api/artists

Body Parameters

name  string  

Nom de l'artiste.

image  string optional  

Image associée à l'artiste.

description  string optional  

Description associé à l'artiste.

section  string optional  

Section associé à l'artiste : predication, music ou predication,music.

position  integer optional  

is_active  boolean optional  

Indique si l'artiste est actif (true par defaut).

is_invite  boolean optional  

Indique si l'artiste est un invité (true par defaut).

categories  string[] optional  

Liste des categories associées à l'artiste.

Afficher un artiste

requires authentication

Permet de récupérer les détails d'un artiste

Example request:
curl --request GET \
    --get "https://app.api.prd.editions-charisma.fr/api/artists/1" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://app.api.prd.editions-charisma.fr/api/artists/1"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://app.api.prd.editions-charisma.fr/api/artists/1',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Bad token"
}
 

Example response (404):


{
    "code": 404,
    "message": "Resource not found",
    "path": null,
    "description": "No query result found for this Id"
}
 

Example response (200):


{
  "id": 3,
  "name": "Charisma Eglise Chretienne",
  "image": "http://127.0.0.1:8001/artists/unknown-artist.jpg",
  "is_active": 1,
  "is_invite": 1,
  "description": "",
  "albums" : Albums[],
  "categories" : Categories[],
  "songs" : Songs[]
}
 

Request      

GET api/artists/{id}

URL Parameters

id  integer  

The ID of the artist.

Modifier un artiste

requires authentication

Permet de modifier un artiste

Example request:
curl --request PUT \
    "https://app.api.prd.editions-charisma.fr/api/artists/1" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Jean Dupont\",
    \"image\": \"unknown-artist.jpg\",
    \"description\": \"Lorem ipsum\",
    \"is_active\": false,
    \"is_invite\": false,
    \"categories\": [
        1,
        2,
        3
    ]
}"
const url = new URL(
    "https://app.api.prd.editions-charisma.fr/api/artists/1"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "Jean Dupont",
    "image": "unknown-artist.jpg",
    "description": "Lorem ipsum",
    "is_active": false,
    "is_invite": false,
    "categories": [
        1,
        2,
        3
    ]
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->put(
    'https://app.api.prd.editions-charisma.fr/api/artists/1',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'name' => 'Jean Dupont',
            'image' => 'unknown-artist.jpg',
            'description' => 'Lorem ipsum',
            'is_active' => false,
            'is_invite' => false,
            'categories' => [
                1,
                2,
                3,
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Bad token"
}
 

Example response (422):


{ "message" : "The given data was invalid.", "error" : {...}}
 

Example response (404):


{
    "code": 404,
    "message": "Resource not found",
    "path": null,
    "description": "No query result found for this Id"
}
 

Example response (200):


{
  "id": 3,
  "name": "Charisma Eglise Chretienne",
  "image": "http://127.0.0.1:8001/artists/unknown-artist.jpg",
  "is_active": 1,
  "is_invite": 1,
  "description": "",
  "albums" : Albums[],
  "categories" : Categories[],
  "songs" : Songs[]
}
 

Request      

PUT api/artists/{id}

PATCH api/artists/{id}

URL Parameters

id  integer  

The ID of the artist.

Body Parameters

name  string optional  

Nom de l'artiste.

image  string optional  

Image associée à l'artiste.

description  string optional  

Description associé à l'artiste.

is_active  boolean optional  

Indique si l'artiste est actif (true par defaut).

is_invite  boolean optional  

Indique si l'artiste est un invité (true par defaut).

categories  string[] optional  

Liste des categories associées à l'artiste.

Supprimer un artiste

requires authentication

Permet de supprimer un artiste

Example request:
curl --request DELETE \
    "https://app.api.prd.editions-charisma.fr/api/artists/1" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://app.api.prd.editions-charisma.fr/api/artists/1"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->delete(
    'https://app.api.prd.editions-charisma.fr/api/artists/1',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (204):

[Empty response]
 

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Bad token"
}
 

Example response (404):


{
    "code": 404,
    "message": "Resource not found",
    "path": null,
    "description": "No query result found for this Id"
}
 

Request      

DELETE api/artists/{id}

URL Parameters

id  integer  

The ID of the artist.

Uploader une image d'artiste

requires authentication

Permet d'uploader l'image d'un artiste

Example request:
curl --request POST \
    "https://app.api.prd.editions-charisma.fr/api/artists/upload" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: multipart/form-data" \
    --header "Accept: application/json" \
    --form "disk=ftp" \
    --form "file=@/tmp/phpnWtKEW" 
const url = new URL(
    "https://app.api.prd.editions-charisma.fr/api/artists/upload"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "multipart/form-data",
    "Accept": "application/json",
};

const body = new FormData();
body.append('disk', 'ftp');
body.append('file', document.querySelector('input[name="file"]').files[0]);

fetch(url, {
    method: "POST",
    headers,
    body,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://app.api.prd.editions-charisma.fr/api/artists/upload',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'multipart/form-data',
            'Accept' => 'application/json',
        ],
        'multipart' => [
            [
                'name' => 'disk',
                'contents' => 'ftp'
            ],
            [
                'name' => 'file',
                'contents' => fopen('/tmp/phpnWtKEW', 'r')
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "filename": "image.png"
}
 

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Bad token"
}
 

Example response (422):


{ "message" : "The given data was invalid.", "error" : {...}}
 

Request      

POST api/artists/upload

Body Parameters

file  file  

Image à uploader. Must be a file.

disk  string  

Site de dépôt local ou ftp.

Uploader une image d'artiste V2

requires authentication

Permet d'uploader l'image d'un artiste en local uniquement

Example request:
curl --request POST \
    "https://app.api.prd.editions-charisma.fr/api/artists/upload2" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: multipart/form-data" \
    --header "Accept: application/json" \
    --form "file=@/tmp/phpXkwYsx" 
const url = new URL(
    "https://app.api.prd.editions-charisma.fr/api/artists/upload2"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "multipart/form-data",
    "Accept": "application/json",
};

const body = new FormData();
body.append('file', document.querySelector('input[name="file"]').files[0]);

fetch(url, {
    method: "POST",
    headers,
    body,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://app.api.prd.editions-charisma.fr/api/artists/upload2',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'multipart/form-data',
            'Accept' => 'application/json',
        ],
        'multipart' => [
            [
                'name' => 'file',
                'contents' => fopen('/tmp/phpXkwYsx', 'r')
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "filename": "image.png"
}
 

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Bad token"
}
 

Example response (422):


{ "message" : "The given data was invalid.", "error" : {...}}
 

Request      

POST api/artists/upload2

Body Parameters

file  file  

Fichier audio à uploader. La durée sera calculée automatiquement et sauvegardée avec le nom du fichier comme ID. Must be a file.

07 - Albums (Administration)

Lister les albums

requires authentication

Permet de recuperer la liste des albums avec l'artist, leurs categories et leurs thèmes

Example request:
curl --request GET \
    --get "https://app.api.prd.editions-charisma.fr/api/albums" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://app.api.prd.editions-charisma.fr/api/albums"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://app.api.prd.editions-charisma.fr/api/albums',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{...}, {...}
 

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Bad token"
}
 

Request      

GET api/albums

Créer un album

requires authentication

Permet de créer une nouvel album

Example request:
curl --request POST \
    "https://app.api.prd.editions-charisma.fr/api/albums" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Titre album\",
    \"artist_id\": 5,
    \"release_date\": \"2025-12-21T12:16:27\",
    \"is_active\": false,
    \"is_boxset\": false,
    \"cover\": \"unknown-album.jpg\",
    \"themes\": [
        1,
        2,
        3
    ],
    \"categories\": [
        1,
        2,
        3
    ],
    \"subtitle\": \"Lorem ipsum\",
    \"color\": \"#000000\",
    \"description\": \"Lorem ipsum\",
    \"section\": \"predication,music\"
}"
const url = new URL(
    "https://app.api.prd.editions-charisma.fr/api/albums"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "Titre album",
    "artist_id": 5,
    "release_date": "2025-12-21T12:16:27",
    "is_active": false,
    "is_boxset": false,
    "cover": "unknown-album.jpg",
    "themes": [
        1,
        2,
        3
    ],
    "categories": [
        1,
        2,
        3
    ],
    "subtitle": "Lorem ipsum",
    "color": "#000000",
    "description": "Lorem ipsum",
    "section": "predication,music"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://app.api.prd.editions-charisma.fr/api/albums',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'name' => 'Titre album',
            'artist_id' => 5,
            'release_date' => '2025-12-21T12:16:27',
            'is_active' => false,
            'is_boxset' => false,
            'cover' => 'unknown-album.jpg',
            'themes' => [
                1,
                2,
                3,
            ],
            'categories' => [
                1,
                2,
                3,
            ],
            'subtitle' => 'Lorem ipsum',
            'color' => '#000000',
            'description' => 'Lorem ipsum',
            'section' => 'predication,music',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Bad token"
}
 

Example response (422):


{ "message" : "The given data was invalid.", "error" : {...}}
 

Example response (200):


{
    "id": 20,
    "artist_id": 4,
    "name": "Etre proche",
    "cover": "http://127.0.0.1:8001/covers/wyefChYJrE7cj53pTcd5YXZDZFm6yYibUP1BOr7g.jpg",
    "created_at": "2021-11-27T19:02:10.000000Z",
    "is_active": 1,
    "subtitle": "",
    "color": "",
    "description": "",
    "is_favorite": 0,
    "is_boxset": 0,
    "release_date": "0000-00-00",
    "is_compilation": false,
    "artist": {},
    "categories": [
        {},
        {}
    ],
    "themes": [
        {},
        {}
    ],
    "songs": [
        {},
        {}
    ]
}
 

Request      

POST api/albums

Body Parameters

name  string  

Nom de l'album.

artist_id  integer  

Id de l'album associé.

release_date  string  

Must be a valid date.

is_active  boolean optional  

Indique si l'album est actif (true par defaut).

is_boxset  boolean optional  

Indique si l'album est un coffret (false par defaut).

cover  string optional  

Image associée à l'album.

themes  string[] optional  

Liste des thèmes associées à l'album.

categories  string[] optional  

Liste des categories associées à l'album.

subtitle  string optional  

Sous-titre de l'album.

color  string optional  

Couleur d'affichage de l'album. Code HTML.

description  string optional  

Description associé à l'album.

section  string optional  

Section associé à l'artiste : predication, music ou predication,music.

Afficher un album

requires authentication

Permet de récupérer les détails d'un album

Example request:
curl --request GET \
    --get "https://app.api.prd.editions-charisma.fr/api/albums/10" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://app.api.prd.editions-charisma.fr/api/albums/10"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://app.api.prd.editions-charisma.fr/api/albums/10',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Bad token"
}
 

Example response (404):


{
    "code": 404,
    "message": "Resource not found",
    "path": null,
    "description": "No query result found for this Id"
}
 

Example response (200):


{
    "id": 20,
    "artist_id": 4,
    "name": "Etre proche",
    "cover": "http://127.0.0.1:8001/covers/wyefChYJrE7cj53pTcd5YXZDZFm6yYibUP1BOr7g.jpg",
    "created_at": "2021-11-27T19:02:10.000000Z",
    "is_active": 1,
    "subtitle": "",
    "color": "",
    "description": "",
    "is_favorite": 0,
    "is_boxset": 0,
    "release_date": "0000-00-00",
    "is_compilation": false,
    "artist": {},
    "categories": [
        {},
        {}
    ],
    "themes": [
        {},
        {}
    ],
    "songs": [
        {},
        {}
    ]
}
 

Request      

GET api/albums/{id}

URL Parameters

id  integer  

The ID of the album.

Modifier un album

requires authentication

Permet de modifier un album

Example request:
curl --request PUT \
    "https://app.api.prd.editions-charisma.fr/api/albums/10" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Titre album\",
    \"artist_id\": 5,
    \"release_date\": \"2025-12-21T12:16:27\",
    \"is_active\": false,
    \"is_boxset\": false,
    \"cover\": \"unknown-album.jpg\",
    \"themes\": [
        1,
        2,
        3
    ],
    \"categories\": [
        1,
        2,
        3
    ],
    \"subtitle\": \"Lorem ipsum\",
    \"color\": \"#000000\",
    \"description\": \"Lorem ipsum\"
}"
const url = new URL(
    "https://app.api.prd.editions-charisma.fr/api/albums/10"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "Titre album",
    "artist_id": 5,
    "release_date": "2025-12-21T12:16:27",
    "is_active": false,
    "is_boxset": false,
    "cover": "unknown-album.jpg",
    "themes": [
        1,
        2,
        3
    ],
    "categories": [
        1,
        2,
        3
    ],
    "subtitle": "Lorem ipsum",
    "color": "#000000",
    "description": "Lorem ipsum"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->put(
    'https://app.api.prd.editions-charisma.fr/api/albums/10',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'name' => 'Titre album',
            'artist_id' => 5,
            'release_date' => '2025-12-21T12:16:27',
            'is_active' => false,
            'is_boxset' => false,
            'cover' => 'unknown-album.jpg',
            'themes' => [
                1,
                2,
                3,
            ],
            'categories' => [
                1,
                2,
                3,
            ],
            'subtitle' => 'Lorem ipsum',
            'color' => '#000000',
            'description' => 'Lorem ipsum',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Bad token"
}
 

Example response (422):


{ "message" : "The given data was invalid.", "error" : {...}}
 

Example response (404):


{
    "code": 404,
    "message": "Resource not found",
    "path": null,
    "description": "No query result found for this Id"
}
 

Example response (200):


{
    "id": 20,
    "artist_id": 4,
    "name": "Etre proche",
    "cover": "http://127.0.0.1:8001/covers/wyefChYJrE7cj53pTcd5YXZDZFm6yYibUP1BOr7g.jpg",
    "created_at": "2021-11-27T19:02:10.000000Z",
    "is_active": 1,
    "subtitle": "",
    "color": "",
    "description": "",
    "is_favorite": 0,
    "is_boxset": 0,
    "release_date": "0000-00-00",
    "is_compilation": false,
    "artist": {},
    "categories": [
        {},
        {}
    ],
    "themes": [
        {},
        {}
    ],
    "songs": [
        {},
        {}
    ]
}
 

Request      

PUT api/albums/{id}

PATCH api/albums/{id}

URL Parameters

id  integer  

The ID of the album.

Body Parameters

name  string optional  

Nom de l'album.

artist_id  integer optional  

Id de l'album associé.

release_date  string optional  

Must be a valid date.

is_active  boolean optional  

Indique si l'album est actif (true par defaut).

is_boxset  boolean optional  

Indique si l'album est un coffret (false par defaut).

cover  string optional  

Image associée à l'album.

themes  string[] optional  

Liste des thèmes associées à l'album.

categories  string[] optional  

Liste des categories associées à l'album.

subtitle  string optional  

Sous-titre de l'album.

color  string optional  

Couleur d'affichage de l'album. Code HTML.

description  string optional  

Description associé à l'album.

Supprimer un album

requires authentication

Permet de supprimer un album

Example request:
curl --request DELETE \
    "https://app.api.prd.editions-charisma.fr/api/albums/10" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://app.api.prd.editions-charisma.fr/api/albums/10"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->delete(
    'https://app.api.prd.editions-charisma.fr/api/albums/10',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (204):

[Empty response]
 

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Bad token"
}
 

Example response (404):


{
    "code": 404,
    "message": "Resource not found",
    "path": null,
    "description": "No query result found for this Id"
}
 

Request      

DELETE api/albums/{id}

URL Parameters

id  integer  

The ID of the album.

Uploader une image d'album

requires authentication

Permet d'uploader l'image d'un album

Example request:
curl --request POST \
    "https://app.api.prd.editions-charisma.fr/api/albums/upload" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: multipart/form-data" \
    --header "Accept: application/json" \
    --form "disk=ftp" \
    --form "file=@/tmp/php3wmxyA" 
const url = new URL(
    "https://app.api.prd.editions-charisma.fr/api/albums/upload"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "multipart/form-data",
    "Accept": "application/json",
};

const body = new FormData();
body.append('disk', 'ftp');
body.append('file', document.querySelector('input[name="file"]').files[0]);

fetch(url, {
    method: "POST",
    headers,
    body,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://app.api.prd.editions-charisma.fr/api/albums/upload',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'multipart/form-data',
            'Accept' => 'application/json',
        ],
        'multipart' => [
            [
                'name' => 'disk',
                'contents' => 'ftp'
            ],
            [
                'name' => 'file',
                'contents' => fopen('/tmp/php3wmxyA', 'r')
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "filename": "image.png"
}
 

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Bad token"
}
 

Example response (422):


{ "message" : "The given data was invalid.", "error" : {...}}
 

Request      

POST api/albums/upload

Body Parameters

file  file  

Image à uploader. Must be a file.

disk  string  

Site de dépôt local ou ftp.

Uploader une image d'album - V2

requires authentication

Permet d'uploader l'image d'un album en local

Example request:
curl --request POST \
    "https://app.api.prd.editions-charisma.fr/api/albums/upload2" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: multipart/form-data" \
    --header "Accept: application/json" \
    --form "file=@/tmp/php2X5PbW" 
const url = new URL(
    "https://app.api.prd.editions-charisma.fr/api/albums/upload2"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "multipart/form-data",
    "Accept": "application/json",
};

const body = new FormData();
body.append('file', document.querySelector('input[name="file"]').files[0]);

fetch(url, {
    method: "POST",
    headers,
    body,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://app.api.prd.editions-charisma.fr/api/albums/upload2',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'multipart/form-data',
            'Accept' => 'application/json',
        ],
        'multipart' => [
            [
                'name' => 'file',
                'contents' => fopen('/tmp/php2X5PbW', 'r')
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "filename": "image.png"
}
 

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Bad token"
}
 

Example response (422):


{ "message" : "The given data was invalid.", "error" : {...}}
 

Request      

POST api/albums/upload2

Body Parameters

file  file  

Fichier audio à uploader. La durée sera calculée automatiquement et sauvegardée avec le nom du fichier comme ID. Must be a file.

Ajouter un media à un coffret

requires authentication

Permet d'ajouter un média à un coffret

Example request:
curl --request POST \
    "https://app.api.prd.editions-charisma.fr/api/boxsets/10/00014b36f5a5fd5066e768b04a1d2003/12" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://app.api.prd.editions-charisma.fr/api/boxsets/10/00014b36f5a5fd5066e768b04a1d2003/12"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://app.api.prd.editions-charisma.fr/api/boxsets/10/00014b36f5a5fd5066e768b04a1d2003/12',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (204):

[Empty response]
 

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Bad token"
}
 

Example response (404):


{
    "code": 404,
    "message": "Resource not found",
    "path": null,
    "description": "No query result found for this Id"
}
 

Request      

POST api/boxsets/{album_id}/{song_id}/{track}

URL Parameters

album_id  integer  

The ID of the album.

song_id  string  

The ID of the song.

track  integer  

Position dans le coffret. Exemple : 1

album  integer  

Id de l'album. Exemple : 1

song  string  

Id du média. Exemple: 042e63a6e171ce59614a9418bf55de9c

Enlever un media d'un coffret

requires authentication

Permet d'enlever un média d'un coffret

Example request:
curl --request DELETE \
    "https://app.api.prd.editions-charisma.fr/api/boxsets/10/00014b36f5a5fd5066e768b04a1d2003" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://app.api.prd.editions-charisma.fr/api/boxsets/10/00014b36f5a5fd5066e768b04a1d2003"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->delete(
    'https://app.api.prd.editions-charisma.fr/api/boxsets/10/00014b36f5a5fd5066e768b04a1d2003',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (204):

[Empty response]
 

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Bad token"
}
 

Example response (404):


{
    "code": 404,
    "message": "Resource not found",
    "path": null,
    "description": "No query result found for this Id"
}
 

Request      

DELETE api/boxsets/{album_id}/{song_id}

URL Parameters

album_id  integer  

The ID of the album.

song_id  string  

The ID of the song.

album  integer  

Id de l'album. Exemple : 1

song  string  

Id du média. Exemple: 042e63a6e171ce59614a9418bf55de9c

08 - Songs (Administration)

Lister les songs

requires authentication

Permet de recuperer la liste des songs avec l'artist, l'albums leurs thèmes associés

Example request:
curl --request GET \
    --get "https://app.api.prd.editions-charisma.fr/api/songs" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://app.api.prd.editions-charisma.fr/api/songs"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://app.api.prd.editions-charisma.fr/api/songs',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{...}, {...}
 

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Bad token"
}
 

Request      

GET api/songs

Créer un song

requires authentication

Permet de créer une nouveau song (media)

Example request:
curl --request POST \
    "https://app.api.prd.editions-charisma.fr/api/songs" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"album_id\": 5,
    \"title\": \"Titre song\",
    \"release_date\": \"2015-12-05\",
    \"length\": 3455,
    \"path\": \"9iNQWG4QgaNd1PBKX6CHMOeVxPXNB93nr0v7aou4.mp3\",
    \"mediatype_id\": 1,
    \"is_active\": false,
    \"themes\": [
        1,
        2,
        3
    ],
    \"tags\": [
        1,
        2,
        3
    ],
    \"positionInSecond\": 0,
    \"track\": 1,
    \"section\": \"predication,music\"
}"
const url = new URL(
    "https://app.api.prd.editions-charisma.fr/api/songs"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "album_id": 5,
    "title": "Titre song",
    "release_date": "2015-12-05",
    "length": 3455,
    "path": "9iNQWG4QgaNd1PBKX6CHMOeVxPXNB93nr0v7aou4.mp3",
    "mediatype_id": 1,
    "is_active": false,
    "themes": [
        1,
        2,
        3
    ],
    "tags": [
        1,
        2,
        3
    ],
    "positionInSecond": 0,
    "track": 1,
    "section": "predication,music"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://app.api.prd.editions-charisma.fr/api/songs',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'album_id' => 5,
            'title' => 'Titre song',
            'release_date' => '2015-12-05',
            'length' => 3455,
            'path' => '9iNQWG4QgaNd1PBKX6CHMOeVxPXNB93nr0v7aou4.mp3',
            'mediatype_id' => 1,
            'is_active' => false,
            'themes' => [
                1,
                2,
                3,
            ],
            'tags' => [
                1,
                2,
                3,
            ],
            'positionInSecond' => 0,
            'track' => 1,
            'section' => 'predication,music',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Bad token"
}
 

Example response (422):


{ "message" : "The given data was invalid.", "error" : {...}}
 

Example response (200):


{
    "id": "042e63a6e171ce59614a9418bf55de9c",
    "album_id": 1,
    "artist_id": 1,
    "title": "NP12T1.3 fonctions de la prieres en langues",
    "length": 3560.44,
    "track": 0,
    "disc": 1,
    "path": "NPEDRO/NP12T1.3 fonctions de la prieres en langues.mp3",
    "release_date": "2007-10-15",
    "created_at": "2021-09-01T16:31:37.000000Z",
    "is_active": 1,
    "mediatype_id": 1,
    "description": "",
    "positionInSecond": 0,
    "url": "http://127.0.0.1:8001/files/NPEDRO%2FNP12T1.3%20fonctions%20de%20la%20prieres%20en%20langues.mp3",
    "album": {},
    "artist": {},
    "themes": [
        {},
        {},
        {}
    ]
}
 

Request      

POST api/songs

Body Parameters

album_id  integer  

Id de l'album associé.

title  string  

Titre du média.

release_date  string  

Date de publication du média. Must be a valid date.

length  integer  

Durée du média en seocndes.

path  string  

chemin relatif d'accès au média.

mediatype_id  integer  

Type du média 1 (audio) ou 2 (vidéo).

is_active  boolean optional  

Indique si l'album est actif (true par defaut).

themes  string[] optional  

Liste des thèmes associées au média.

tags  string[] optional  

Liste des mots-clé associées au média.

positionInSecond  integer optional  

Position en second de début du media.

track  integer optional  

Numéro de piste du média.

section  string optional  

Section associé à l'artiste : predication, music ou predication,music.

Afficher un song

requires authentication

Permet de récupérer les détails d'un media

Example request:
curl --request GET \
    --get "https://app.api.prd.editions-charisma.fr/api/songs/00014b36f5a5fd5066e768b04a1d2003" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://app.api.prd.editions-charisma.fr/api/songs/00014b36f5a5fd5066e768b04a1d2003"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://app.api.prd.editions-charisma.fr/api/songs/00014b36f5a5fd5066e768b04a1d2003',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Bad token"
}
 

Example response (404):


{
    "code": 404,
    "message": "Resource not found",
    "path": null,
    "description": "No query result found for this Id"
}
 

Example response (200):


{
    "id": "042e63a6e171ce59614a9418bf55de9c",
    "album_id": 1,
    "artist_id": 1,
    "title": "NP12T1.3 fonctions de la prieres en langues",
    "length": 3560.44,
    "track": 0,
    "disc": 1,
    "path": "NPEDRO/NP12T1.3 fonctions de la prieres en langues.mp3",
    "release_date": "2007-10-15",
    "created_at": "2021-09-01T16:31:37.000000Z",
    "is_active": 1,
    "mediatype_id": 1,
    "description": "",
    "positionInSecond": 0,
    "url": "http://127.0.0.1:8001/files/NPEDRO%2FNP12T1.3%20fonctions%20de%20la%20prieres%20en%20langues.mp3",
    "album": {},
    "artist": {},
    "themes": [
        {},
        {},
        {}
    ]
}
 

Request      

GET api/songs/{id}

URL Parameters

id  string  

The ID of the song.

Modifier un song

requires authentication

Permet de modifier un song

Example request:
curl --request PUT \
    "https://app.api.prd.editions-charisma.fr/api/songs/00014b36f5a5fd5066e768b04a1d2003" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"album_id\": 8,
    \"title\": \"omnis\",
    \"release_date\": \"2025-12-21T12:16:27\",
    \"length\": 17,
    \"path\": \"at\",
    \"mediatype_id\": 8,
    \"is_active\": false,
    \"themes\": [
        1,
        2,
        3
    ],
    \"tags\": [
        1,
        2,
        3
    ],
    \"positionInSecond\": 19,
    \"track\": 13
}"
const url = new URL(
    "https://app.api.prd.editions-charisma.fr/api/songs/00014b36f5a5fd5066e768b04a1d2003"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "album_id": 8,
    "title": "omnis",
    "release_date": "2025-12-21T12:16:27",
    "length": 17,
    "path": "at",
    "mediatype_id": 8,
    "is_active": false,
    "themes": [
        1,
        2,
        3
    ],
    "tags": [
        1,
        2,
        3
    ],
    "positionInSecond": 19,
    "track": 13
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->put(
    'https://app.api.prd.editions-charisma.fr/api/songs/00014b36f5a5fd5066e768b04a1d2003',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'album_id' => 8,
            'title' => 'omnis',
            'release_date' => '2025-12-21T12:16:27',
            'length' => 17,
            'path' => 'at',
            'mediatype_id' => 8,
            'is_active' => false,
            'themes' => [
                1,
                2,
                3,
            ],
            'tags' => [
                1,
                2,
                3,
            ],
            'positionInSecond' => 19,
            'track' => 13,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Bad token"
}
 

Example response (422):


{ "message" : "The given data was invalid.", "error" : {...}}
 

Example response (404):


{
    "code": 404,
    "message": "Resource not found",
    "path": null,
    "description": "No query result found for this Id"
}
 

Example response (200):


{
    "id": "042e63a6e171ce59614a9418bf55de9c",
    "album_id": 1,
    "artist_id": 1,
    "title": "NP12T1.3 fonctions de la prieres en langues",
    "length": 3560.44,
    "track": 0,
    "disc": 1,
    "path": "NPEDRO/NP12T1.3 fonctions de la prieres en langues.mp3",
    "release_date": "2007-10-15",
    "created_at": "2021-09-01T16:31:37.000000Z",
    "is_active": 1,
    "mediatype_id": 1,
    "description": "",
    "positionInSecond": 0,
    "url": "http://127.0.0.1:8001/files/NPEDRO%2FNP12T1.3%20fonctions%20de%20la%20prieres%20en%20langues.mp3",
    "album": {},
    "artist": {},
    "themes": [
        {},
        {},
        {}
    ]
}
 

Request      

PUT api/songs/{id}

PATCH api/songs/{id}

URL Parameters

id  string  

The ID of the song.

Body Parameters

album_id  integer  

title  string  

release_date  string  

Must be a valid date.

length  integer  

path  string  

mediatype_id  integer  

is_active  boolean optional  

Indique si le média est actif (true par defaut).

themes  string[] optional  

Liste des thèmes associées au média.

tags  string[] optional  

Liste des mots-clés associées au média.

positionInSecond  integer optional  

track  integer optional  

Supprimer un song

requires authentication

Permet de supprimer un média

Example request:
curl --request DELETE \
    "https://app.api.prd.editions-charisma.fr/api/songs/00014b36f5a5fd5066e768b04a1d2003" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://app.api.prd.editions-charisma.fr/api/songs/00014b36f5a5fd5066e768b04a1d2003"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->delete(
    'https://app.api.prd.editions-charisma.fr/api/songs/00014b36f5a5fd5066e768b04a1d2003',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (204):

[Empty response]
 

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Bad token"
}
 

Example response (404):


{
    "code": 404,
    "message": "Resource not found",
    "path": null,
    "description": "No query result found for this Id"
}
 

Request      

DELETE api/songs/{id}

URL Parameters

id  string  

The ID of the song.

Uploader un fichier Song

requires authentication

Permet d'uploader un média

Example request:
curl --request POST \
    "https://app.api.prd.editions-charisma.fr/api/songs/upload" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: multipart/form-data" \
    --header "Accept: application/json" \
    --form "disk=ftp" \
    --form "file=@/tmp/phpEYlQIy" 
const url = new URL(
    "https://app.api.prd.editions-charisma.fr/api/songs/upload"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "multipart/form-data",
    "Accept": "application/json",
};

const body = new FormData();
body.append('disk', 'ftp');
body.append('file', document.querySelector('input[name="file"]').files[0]);

fetch(url, {
    method: "POST",
    headers,
    body,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://app.api.prd.editions-charisma.fr/api/songs/upload',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'multipart/form-data',
            'Accept' => 'application/json',
        ],
        'multipart' => [
            [
                'name' => 'disk',
                'contents' => 'ftp'
            ],
            [
                'name' => 'file',
                'contents' => fopen('/tmp/phpEYlQIy', 'r')
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "filename": "audio.mp3"
}
 

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Bad token"
}
 

Example response (422):


{ "message" : "The given data was invalid.", "error" : {...}}
 

Request      

POST api/songs/upload

Body Parameters

file  file  

Image à uploader. Must be a file.

disk  string  

Site de dépôt local ou ftp.

Uploader un fichier Song V2

requires authentication

Permet d'uploader un média en local uniquement et calcule sa durée automatiquement. Le nom du fichier (sans extension) est utilisé comme song_id pour l'enregistrement en base.

Example request:
curl --request POST \
    "https://app.api.prd.editions-charisma.fr/api/songs/upload2" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: multipart/form-data" \
    --header "Accept: application/json" \
    --form "file=@/tmp/phpewDGll" 
const url = new URL(
    "https://app.api.prd.editions-charisma.fr/api/songs/upload2"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "multipart/form-data",
    "Accept": "application/json",
};

const body = new FormData();
body.append('file', document.querySelector('input[name="file"]').files[0]);

fetch(url, {
    method: "POST",
    headers,
    body,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://app.api.prd.editions-charisma.fr/api/songs/upload2',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'multipart/form-data',
            'Accept' => 'application/json',
        ],
        'multipart' => [
            [
                'name' => 'file',
                'contents' => fopen('/tmp/phpewDGll', 'r')
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "filename": "audio.mp3",
    "duration": 180.5,
    "song_id": "audio"
}
 

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Bad token"
}
 

Example response (422):


{ "message" : "The given data was invalid.", "error" : {...}}
 

Request      

POST api/songs/upload2

Body Parameters

file  file  

Fichier audio à uploader. La durée sera calculée automatiquement et sauvegardée avec le nom du fichier comme ID. Must be a file.

Ajouter les tags par défaut

requires authentication

Permet de rajouter les tags manquant aux médias existant (titre, artiste)

Example request:
curl --request POST \
    "https://app.api.prd.editions-charisma.fr/api/songs/update-tags" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://app.api.prd.editions-charisma.fr/api/songs/update-tags"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://app.api.prd.editions-charisma.fr/api/songs/update-tags',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{...}, {...}
 

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Bad token"
}
 

Request      

POST api/songs/update-tags

Récupérer la durée d'un song

requires authentication

Permet de récupérer la durée d'un song en secondes

Example request:
curl --request GET \
    --get "https://app.api.prd.editions-charisma.fr/api/songs/00014b36f5a5fd5066e768b04a1d2003/duration" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://app.api.prd.editions-charisma.fr/api/songs/00014b36f5a5fd5066e768b04a1d2003/duration"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://app.api.prd.editions-charisma.fr/api/songs/00014b36f5a5fd5066e768b04a1d2003/duration',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "song_id": 1,
    "duration": 180.5
}
 

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Bad token"
}
 

Example response (404):


{
    "code": 404,
    "message": "Resource not found",
    "path": null,
    "description": "No duration found for this song"
}
 

Request      

GET api/songs/{song_id}/duration

URL Parameters

song_id  string  

The ID of the song.

09 - Audiences

Récupérer les audiences

requires authentication

Permet de recuperer toutes les audiences

Example request:
curl --request GET \
    --get "https://app.api.prd.editions-charisma.fr/api/audiences" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://app.api.prd.editions-charisma.fr/api/audiences"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://app.api.prd.editions-charisma.fr/api/audiences',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Bad token"
}
 

Example response (200):


[
    {
        "audience_id": 1,
        "user_id": 7,
        "song_id": "1e2a099afe462a41d09d2ea6f23461e7",
        "description": "",
        "age": 0,
        "genre": "",
        "device_name": "0",
        "operating_system": " ",
        "ip_address": "127.0.0.1",
        "browser_name": " ",
        "is_robot": 1,
        "user_agent": "PostmanRuntime/7.29.0",
        "is_desktop": 0,
        "is_phone": 0,
        "is_mobile": 0,
        "is_tablet": 0,
        "song": {
            "id": "1e2a099afe462a41d09d2ea6f23461e7",
            "album_id": 1,
            "artist_id": 1,
            "title": "7.Etablissement de buts pratiques",
            "length": 5373.02,
            "track": 0,
            "disc": 1,
            "path": "7.Etablissement de buts pratiques.mp3",
            "release_date": "2005-07-12",
            "is_active": 1,
            "mediatype_id": 1,
            "description": "",
            "positionInSecond": 0,
            "section": "",
            "url": "http://127.0.0.1:8001/songs/./7.Etablissement%20de%20buts%20pratiques.mp3"
        },
        "user": {
            "id": 7,
            "name": "Jacques",
            "email": "jacques@localhost.com",
            "ip_address": "127.0.0.1"
        }
    },
    {
        "audience_id": 2,
        "user_id": 7,
        "song_id": "199115e59701be9992b8ece7730e9029",
        "description": "",
        "age": 0,
        "genre": "",
        "device_name": "0",
        "operating_system": " ",
        "ip_address": "127.0.0.1",
        "browser_name": " ",
        "is_robot": 1,
        "user_agent": "PostmanRuntime/7.29.0",
        "is_desktop": 0,
        "is_phone": 0,
        "is_mobile": 0,
        "is_tablet": 0,
        "song": {
            "id": "199115e59701be9992b8ece7730e9029",
            "album_id": 1,
            "artist_id": 1,
            "title": "NP20T7.Les precurseurs du reveil",
            "length": 2731.31,
            "track": 0,
            "disc": 1,
            "path": "NPEDRO/NP20T7.Les precurseurs du reveil.mp3",
            "release_date": "2000-04-15",
            "is_active": 1,
            "mediatype_id": 1,
            "description": "",
            "positionInSecond": 0,
            "section": "music,predication",
            "url": "http://127.0.0.1:8001/songs/NPEDRO/NP20T7.Les%20precurseurs%20du%20reveil.mp3"
        },
        "user": {
            "id": 7,
            "name": "Jacques",
            "email": "jacques@localhost.com",
            "ip_address": "127.0.0.1"
        }
    }
]
 

Request      

GET api/audiences

10 - Mots-Clés (Administration)

Lister les mots-clé

requires authentication

Permet de recuperer la liste des mots-clés (tags)

Example request:
curl --request GET \
    --get "https://app.api.prd.editions-charisma.fr/api/tags" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://app.api.prd.editions-charisma.fr/api/tags"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://app.api.prd.editions-charisma.fr/api/tags',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{...}, {...}
 

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Bad token"
}
 

Request      

GET api/tags

Créer un mot-clé

requires authentication

Permet de créer un nouveau mot-clé (tag)

Example request:
curl --request POST \
    "https://app.api.prd.editions-charisma.fr/api/tags" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Azerty\",
    \"slug\": \"azerty\"
}"
const url = new URL(
    "https://app.api.prd.editions-charisma.fr/api/tags"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "Azerty",
    "slug": "azerty"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://app.api.prd.editions-charisma.fr/api/tags',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'name' => 'Azerty',
            'slug' => 'azerty',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Bad token"
}
 

Example response (422):


{ "message" : "The given data was invalid.", "error" : {...}}
 

Example response (200):


{
    "name": "Tag",
    "slug": "slug",
    "id": 44
}
 

Request      

POST api/tags

Body Parameters

name  string  

Nom du mot-clé.

slug  string  

slug associé au mot-clé.

Afficher un mot-clé (tag)

requires authentication

Permet de récupérer les détails d'un mot-clé

Example request:
curl --request GET \
    --get "https://app.api.prd.editions-charisma.fr/api/tags/1" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://app.api.prd.editions-charisma.fr/api/tags/1"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://app.api.prd.editions-charisma.fr/api/tags/1',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Bad token"
}
 

Example response (404):


{
    "code": 404,
    "message": "Resource not found",
    "path": null,
    "description": "No query result found for this Id"
}
 

Example response (200):


{
    "name": "Tag",
    "slug": "slug",
    "id": 44
}
 

Request      

GET api/tags/{id}

URL Parameters

id  integer  

The ID of the tag.

Modifier un mot-clé

requires authentication

Permet de modifier un mot-clé

Example request:
curl --request PUT \
    "https://app.api.prd.editions-charisma.fr/api/tags/1" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Azerty\",
    \"slug\": \"azerty\"
}"
const url = new URL(
    "https://app.api.prd.editions-charisma.fr/api/tags/1"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "Azerty",
    "slug": "azerty"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->put(
    'https://app.api.prd.editions-charisma.fr/api/tags/1',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'name' => 'Azerty',
            'slug' => 'azerty',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Bad token"
}
 

Example response (422):


{ "message" : "The given data was invalid.", "error" : {...}}
 

Example response (404):


{
    "code": 404,
    "message": "Resource not found",
    "path": null,
    "description": "No query result found for this Id"
}
 

Example response (200):


{
    "name": "Tag",
    "slug": "slug",
    "id": 44
}
 

Request      

PUT api/tags/{id}

PATCH api/tags/{id}

URL Parameters

id  integer  

The ID of the tag.

Body Parameters

name  string optional  

Nom du mot-clé.

slug  string optional  

slug associé au mot-clé.

Supprimer un mot-clé

requires authentication

Permet de supprimer un mot-clé

Example request:
curl --request DELETE \
    "https://app.api.prd.editions-charisma.fr/api/tags/1" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://app.api.prd.editions-charisma.fr/api/tags/1"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->delete(
    'https://app.api.prd.editions-charisma.fr/api/tags/1',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (204):

[Empty response]
 

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Bad token"
}
 

Example response (404):


{
    "code": 404,
    "message": "Resource not found",
    "path": null,
    "description": "No query result found for this Id"
}
 

Request      

DELETE api/tags/{id}

URL Parameters

id  integer  

The ID of the tag.

11 - User Administration

Lister les utilisateurs

requires authentication

Permet de recuperer la liste des utilisateurs (SAT)

Example request:
curl --request GET \
    --get "https://app.api.prd.editions-charisma.fr/api/users" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://app.api.prd.editions-charisma.fr/api/users"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://app.api.prd.editions-charisma.fr/api/users',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{ [ {...}, {...} ] }
 

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Bad token"
}
 

Request      

GET api/users

Créer un utilisateur

requires authentication

Permet de créer une affectation de suivi

Example request:
curl --request POST \
    "https://app.api.prd.editions-charisma.fr/api/users" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"email\": \"admin@admin.com\",
    \"username\": \"et\",
    \"firstname\": \"admin\",
    \"lastname\": \"admin\"
}"
const url = new URL(
    "https://app.api.prd.editions-charisma.fr/api/users"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "email": "admin@admin.com",
    "username": "et",
    "firstname": "admin",
    "lastname": "admin"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://app.api.prd.editions-charisma.fr/api/users',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'email' => 'admin@admin.com',
            'username' => 'et',
            'firstname' => 'admin',
            'lastname' => 'admin',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Bad token"
}
 

Example response (422):


{ "message" : "The given data was invalid.", "error" : {...}}
 

Request      

POST api/users

Body Parameters

email  string  

The user's email. Must be a valid email address.

username  string  

firstname  string  

The user's firstname.

lastname  string  

The user's lastname.

Changer le mot de passe d'un utilisateur

requires authentication

Permet de reinitialiser le mot de passe d'un utilisateur

Example request:
curl --request PUT \
    "https://app.api.prd.editions-charisma.fr/api/users/nam/reset-password" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"password\": \"admin\",
    \"temporary\": false
}"
const url = new URL(
    "https://app.api.prd.editions-charisma.fr/api/users/nam/reset-password"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "password": "admin",
    "temporary": false
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->put(
    'https://app.api.prd.editions-charisma.fr/api/users/nam/reset-password',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'password' => 'admin',
            'temporary' => false,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (204):

[Empty response]
 

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Bad token"
}
 

Example response (422):


{ "message" : "The given data was invalid.", "error" : {...}}
 

Request      

PUT api/users/{userId}/reset-password

URL Parameters

userId  string  

ID de l'utilisateur. Exemple : 7b5be751-a49c-4b73-85a7-61a567bb8187

Body Parameters

password  string  

The user's password.

temporary  boolean optional  

Specify if the password is temporary.

Add user to subscribe list

Add user to subscribe list

Example request:
curl --request POST \
    "https://app.api.prd.editions-charisma.fr/api/users/subscribe" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"user_id\": \"admin@admin.com\",
    \"client_id\": \"admin\",
    \"client_secret\": \"nemo\"
}"
const url = new URL(
    "https://app.api.prd.editions-charisma.fr/api/users/subscribe"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "user_id": "admin@admin.com",
    "client_id": "admin",
    "client_secret": "nemo"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://app.api.prd.editions-charisma.fr/api/users/subscribe',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'user_id' => 'admin@admin.com',
            'client_id' => 'admin',
            'client_secret' => 'nemo',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "accessToken": "eyJhbGciOiJSUz...O3pGQ",
    "refreshToken": null,
    "accessExpiresIn": 1800,
    "refreshExpiresIn": 1800,
    "tokenType": "Bearer",
    "scope": "openid profile email"
}
 

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Invalid user credentials"
}
 

Request      

POST api/users/subscribe

Body Parameters

user_id  string  

The user's keycloak id.

client_id  string  

The application cleint id.

client_secret  string  

Remove user from subscribe list

Remove user from subscribe list

Example request:
curl --request POST \
    "https://app.api.prd.editions-charisma.fr/api/users/unsubscribe" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"user_id\": \"admin@admin.com\",
    \"client_id\": \"admin\",
    \"client_secret\": \"omnis\"
}"
const url = new URL(
    "https://app.api.prd.editions-charisma.fr/api/users/unsubscribe"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "user_id": "admin@admin.com",
    "client_id": "admin",
    "client_secret": "omnis"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://app.api.prd.editions-charisma.fr/api/users/unsubscribe',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'user_id' => 'admin@admin.com',
            'client_id' => 'admin',
            'client_secret' => 'omnis',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "accessToken": "eyJhbGciOiJSUz...O3pGQ",
    "refreshToken": null,
    "accessExpiresIn": 1800,
    "refreshExpiresIn": 1800,
    "tokenType": "Bearer",
    "scope": "openid profile email"
}
 

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Invalid user credentials"
}
 

Request      

POST api/users/unsubscribe

Body Parameters

user_id  string  

The user's keycloak id.

client_id  string  

The application cleint id.

client_secret  string  

12 - Statistiques (Administration)

Recupérer les statistics

requires authentication

Permet de recuperer la liste des statistics d'écoute (section côté Admin)

Example request:
curl --request GET \
    --get "https://app.api.prd.editions-charisma.fr/api/statistics" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://app.api.prd.editions-charisma.fr/api/statistics"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://app.api.prd.editions-charisma.fr/api/statistics',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{...}, {...}
 

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Bad token"
}
 

Request      

GET api/statistics

Recupérer les statistics entre 2 dates

requires authentication

Example request:
curl --request GET \
    --get "https://app.api.prd.editions-charisma.fr/api/media/get-stats?start_date=vero&end_date=esse" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"start_date\": \"2025-12-21\",
    \"end_date\": \"2025-12-21\"
}"
const url = new URL(
    "https://app.api.prd.editions-charisma.fr/api/media/get-stats"
);

const params = {
    "start_date": "vero",
    "end_date": "esse",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "start_date": "2025-12-21",
    "end_date": "2025-12-21"
};

fetch(url, {
    method: "GET",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://app.api.prd.editions-charisma.fr/api/media/get-stats',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'start_date'=> 'vero',
            'end_date'=> 'esse',
        ],
        'json' => [
            'start_date' => '2025-12-21',
            'end_date' => '2025-12-21',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{...}, {...}
 

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Bad token"
}
 

Request      

GET api/media/get-stats

Query Parameters

start_date  string  

date Date de début.

end_date  string  

date Date de fin

Permet de recuperer la liste des statistics d'écoute (section côté Admin)

Body Parameters

start_date  string  

Must be a valid date in the format Y-m-d.

end_date  string  

Must be a valid date in the format Y-m-d.

13 - Jaquettes (Administration)

Lister les jaquettes

requires authentication

Permet de recuperer la liste des jaquettes

Example request:
curl --request GET \
    --get "https://app.api.prd.editions-charisma.fr/api/jackets" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://app.api.prd.editions-charisma.fr/api/jackets"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://app.api.prd.editions-charisma.fr/api/jackets',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{...}, {...}
 

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Bad token"
}
 

Request      

GET api/jackets

Créer une nouvelle jaquette

requires authentication

Permet de créer une nouvelle jaquette

Example request:
curl --request POST \
    "https://app.api.prd.editions-charisma.fr/api/jackets" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Azerty\",
    \"description\": \"Lorem ipsum\",
    \"path\": \"assets\\/jaquettes\\/jaquette_benny_hinn.png\",
    \"position\": 1,
    \"is_active\": true
}"
const url = new URL(
    "https://app.api.prd.editions-charisma.fr/api/jackets"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "Azerty",
    "description": "Lorem ipsum",
    "path": "assets\/jaquettes\/jaquette_benny_hinn.png",
    "position": 1,
    "is_active": true
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://app.api.prd.editions-charisma.fr/api/jackets',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'name' => 'Azerty',
            'description' => 'Lorem ipsum',
            'path' => 'assets/jaquettes/jaquette_benny_hinn.png',
            'position' => 1,
            'is_active' => true,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Bad token"
}
 

Example response (422):


{ "message" : "The given data was invalid.", "error" : {...}}
 

Example response (200):


[
    {
        "id": 3,
        "name": "Jaquette 0",
        "path": "/assets/jaquettes/jaquette_benny hinn.png",
        "position": 0,
        "description": "Description de la jaquette 0",
        "is_active": true
    },
    {
        "id": 3,
        "name": "Jaquette 0",
        "path": "/assets/jaquettes/jaquette_benny hinn.png",
        "position": 0,
        "description": "Description de la jaquette 0",
        "is_active": true
    },
    {
        "id": 3,
        "name": "Jaquette 0",
        "path": "/assets/jaquettes/jaquette_benny hinn.png",
        "position": 0,
        "description": "Description de la jaquette 0",
        "is_active": true
    }
]
 

Request      

POST api/jackets

Body Parameters

name  string  

Nom de la jaquette.

description  string optional  

Description de la jaquette.

path  string  

Chemin relatif de la jaquette.

position  integer optional  

Position dans l'affichage.

is_active  boolean optional  

Afficher une jaquette

requires authentication

Permet de récupérer les détails d'une jaquette

Example request:
curl --request GET \
    --get "https://app.api.prd.editions-charisma.fr/api/jackets/13" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://app.api.prd.editions-charisma.fr/api/jackets/13"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://app.api.prd.editions-charisma.fr/api/jackets/13',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Bad token"
}
 

Example response (404):


{
    "code": 404,
    "message": "Resource not found",
    "path": null,
    "description": "No query result found for this Id"
}
 

Example response (200):


[
    {
        "id": 3,
        "name": "Jaquette 0",
        "path": "/assets/jaquettes/jaquette_benny hinn.png",
        "position": 0,
        "description": "Description de la jaquette 0",
        "is_active": true
    },
    {
        "id": 3,
        "name": "Jaquette 0",
        "path": "/assets/jaquettes/jaquette_benny hinn.png",
        "position": 0,
        "description": "Description de la jaquette 0",
        "is_active": true
    },
    {
        "id": 3,
        "name": "Jaquette 0",
        "path": "/assets/jaquettes/jaquette_benny hinn.png",
        "position": 0,
        "description": "Description de la jaquette 0",
        "is_active": true
    }
]
 

Request      

GET api/jackets/{id}

URL Parameters

id  integer  

The ID of the jacket.

Modifier une jaquette

requires authentication

Permet de modifier une jaquette

Example request:
curl --request PUT \
    "https://app.api.prd.editions-charisma.fr/api/jackets/20" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Azerty\",
    \"description\": \"Lorem ipsum\",
    \"path\": \"ut\",
    \"position\": 1
}"
const url = new URL(
    "https://app.api.prd.editions-charisma.fr/api/jackets/20"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "Azerty",
    "description": "Lorem ipsum",
    "path": "ut",
    "position": 1
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->put(
    'https://app.api.prd.editions-charisma.fr/api/jackets/20',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'name' => 'Azerty',
            'description' => 'Lorem ipsum',
            'path' => 'ut',
            'position' => 1,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Bad token"
}
 

Example response (422):


{ "message" : "The given data was invalid.", "error" : {...}}
 

Example response (404):


{
    "code": 404,
    "message": "Resource not found",
    "path": null,
    "description": "No query result found for this Id"
}
 

Example response (200):


[
    {
        "id": 3,
        "name": "Jaquette 0",
        "path": "/assets/jaquettes/jaquette_benny hinn.png",
        "position": 0,
        "description": "Description de la jaquette 0",
        "is_active": true
    },
    {
        "id": 3,
        "name": "Jaquette 0",
        "path": "/assets/jaquettes/jaquette_benny hinn.png",
        "position": 0,
        "description": "Description de la jaquette 0",
        "is_active": true
    },
    {
        "id": 3,
        "name": "Jaquette 0",
        "path": "/assets/jaquettes/jaquette_benny hinn.png",
        "position": 0,
        "description": "Description de la jaquette 0",
        "is_active": true
    }
]
 

Request      

PUT api/jackets/{id}

PATCH api/jackets/{id}

URL Parameters

id  integer  

The ID of the jacket.

Body Parameters

name  string optional  

Nom de la jaquette.

description  string optional  

Description de la jaquette.

path  string optional  

position  integer optional  

Position dans l'affichage.

Supprimer une jaquette

requires authentication

Permet de supprimer une jaquette

Example request:
curl --request DELETE \
    "https://app.api.prd.editions-charisma.fr/api/jackets/8" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://app.api.prd.editions-charisma.fr/api/jackets/8"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->delete(
    'https://app.api.prd.editions-charisma.fr/api/jackets/8',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (204):

[Empty response]
 

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Bad token"
}
 

Example response (404):


{
    "code": 404,
    "message": "Resource not found",
    "path": null,
    "description": "No query result found for this Id"
}
 

Request      

DELETE api/jackets/{id}

URL Parameters

id  integer  

The ID of the jacket.

Uploader une image de jaquette

requires authentication

Permet d'uploader l'image d'une jaquette en local

Example request:
curl --request POST \
    "https://app.api.prd.editions-charisma.fr/api/jackets/upload" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: multipart/form-data" \
    --header "Accept: application/json" \
    --form "file=@/tmp/phpoCCiJA" 
const url = new URL(
    "https://app.api.prd.editions-charisma.fr/api/jackets/upload"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "multipart/form-data",
    "Accept": "application/json",
};

const body = new FormData();
body.append('file', document.querySelector('input[name="file"]').files[0]);

fetch(url, {
    method: "POST",
    headers,
    body,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://app.api.prd.editions-charisma.fr/api/jackets/upload',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'multipart/form-data',
            'Accept' => 'application/json',
        ],
        'multipart' => [
            [
                'name' => 'file',
                'contents' => fopen('/tmp/phpoCCiJA', 'r')
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "filename": "assets/jaquettes/jaquette_benny_hinn.png"
}
 

Example response (401):


{
    "code": 401,
    "message": "Unauthorized",
    "path": null,
    "description": "Bad token"
}
 

Example response (422):


{ "message" : "The given data was invalid.", "error" : {...}}
 

Request      

POST api/jackets/upload

Body Parameters

file  file  

Fichier audio à uploader. La durée sera calculée automatiquement et sauvegardée avec le nom du fichier comme ID. Must be a file.

Endpoints

POST api/broadcasting/auth

Example request:
curl --request POST \
    "https://app.api.prd.editions-charisma.fr/api/broadcasting/auth" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://app.api.prd.editions-charisma.fr/api/broadcasting/auth"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://app.api.prd.editions-charisma.fr/api/broadcasting/auth',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request      

POST api/broadcasting/auth

GET api/data

Example request:
curl --request GET \
    --get "https://app.api.prd.editions-charisma.fr/api/data" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://app.api.prd.editions-charisma.fr/api/data"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://app.api.prd.editions-charisma.fr/api/data',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 60
x-ratelimit-remaining: 59
access-control-allow-origin: *
 

{
    "code": 401,
    "message": "Unauthorized.",
    "path": null,
    "description": "Unauthorized."
}
 

Request      

GET api/data

POST api/settings

Example request:
curl --request POST \
    "https://app.api.prd.editions-charisma.fr/api/settings" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"media_path\": \"autem\"
}"
const url = new URL(
    "https://app.api.prd.editions-charisma.fr/api/settings"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "media_path": "autem"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://app.api.prd.editions-charisma.fr/api/settings',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'media_path' => 'autem',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request      

POST api/settings

Body Parameters

media_path  string  

PUT api/songs

Example request:
curl --request PUT \
    "https://app.api.prd.editions-charisma.fr/api/songs" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"data\": [
        \"facere\"
    ],
    \"songs\": [
        \"vel\"
    ]
}"
const url = new URL(
    "https://app.api.prd.editions-charisma.fr/api/songs"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "data": [
        "facere"
    ],
    "songs": [
        "vel"
    ]
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->put(
    'https://app.api.prd.editions-charisma.fr/api/songs',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'data' => [
                'facere',
            ],
            'songs' => [
                'vel',
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request      

PUT api/songs

Body Parameters

data  string[]  

songs  string[]  

POST api/upload

Example request:
curl --request POST \
    "https://app.api.prd.editions-charisma.fr/api/upload" \
    --header "Content-Type: multipart/form-data" \
    --header "Accept: application/json" \
    --form "file=@/tmp/php8mKdpH" 
const url = new URL(
    "https://app.api.prd.editions-charisma.fr/api/upload"
);

const headers = {
    "Content-Type": "multipart/form-data",
    "Accept": "application/json",
};

const body = new FormData();
body.append('file', document.querySelector('input[name="file"]').files[0]);

fetch(url, {
    method: "POST",
    headers,
    body,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://app.api.prd.editions-charisma.fr/api/upload',
    [
        'headers' => [
            'Content-Type' => 'multipart/form-data',
            'Accept' => 'application/json',
        ],
        'multipart' => [
            [
                'name' => 'file',
                'contents' => fopen('/tmp/php8mKdpH', 'r')
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request      

POST api/upload

Body Parameters

file  file  

Must be a file.

POST api/interaction/play

Example request:
curl --request POST \
    "https://app.api.prd.editions-charisma.fr/api/interaction/play" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"song\": \"fuga\"
}"
const url = new URL(
    "https://app.api.prd.editions-charisma.fr/api/interaction/play"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "song": "fuga"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://app.api.prd.editions-charisma.fr/api/interaction/play',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'song' => 'fuga',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request      

POST api/interaction/play

Body Parameters

song  string  

Mark / Unmark a new song as favorite.

Example request:
curl --request POST \
    "https://app.api.prd.editions-charisma.fr/api/interaction/like" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"mediaId\": \"042e63a6e171ce59614a9418bf55de9c\",
    \"operation\": \"like\"
}"
const url = new URL(
    "https://app.api.prd.editions-charisma.fr/api/interaction/like"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "mediaId": "042e63a6e171ce59614a9418bf55de9c",
    "operation": "like"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://app.api.prd.editions-charisma.fr/api/interaction/like',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'mediaId' => '042e63a6e171ce59614a9418bf55de9c',
            'operation' => 'like',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request      

POST api/interaction/like

Body Parameters

mediaId  string  

Id du média à tagger.

operation  string  

like ou dislike.

POST api/interaction/batch/like

Example request:
curl --request POST \
    "https://app.api.prd.editions-charisma.fr/api/interaction/batch/like" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"songs\": [
        \"itaque\"
    ]
}"
const url = new URL(
    "https://app.api.prd.editions-charisma.fr/api/interaction/batch/like"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "songs": [
        "itaque"
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://app.api.prd.editions-charisma.fr/api/interaction/batch/like',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'songs' => [
                'itaque',
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request      

POST api/interaction/batch/like

Body Parameters

songs  string[]  

POST api/interaction/batch/unlike

Example request:
curl --request POST \
    "https://app.api.prd.editions-charisma.fr/api/interaction/batch/unlike" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"songs\": [
        \"velit\"
    ]
}"
const url = new URL(
    "https://app.api.prd.editions-charisma.fr/api/interaction/batch/unlike"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "songs": [
        "velit"
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://app.api.prd.editions-charisma.fr/api/interaction/batch/unlike',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'songs' => [
                'velit',
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request      

POST api/interaction/batch/unlike

Body Parameters

songs  string[]  

GET api/interaction/recently-played/{count?}

Example request:
curl --request GET \
    --get "https://app.api.prd.editions-charisma.fr/api/interaction/recently-played/7030538" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://app.api.prd.editions-charisma.fr/api/interaction/recently-played/7030538"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://app.api.prd.editions-charisma.fr/api/interaction/recently-played/7030538',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (500):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Too few arguments to function App\\Http\\Controllers\\API\\Interaction\\Controller::__construct(), 2 passed in /home/bwuq2475/public_html/Editions_Charisma/production/Api/streaming_audio/koel_api_test/app/Http/Controllers/API/Interaction/RecentlyPlayedController.php on line 18 and exactly 4 expected",
    "exception": "ArgumentCountError",
    "file": "/home/bwuq2475/public_html/Editions_Charisma/production/Api/streaming_audio/koel_api_test/app/Http/Controllers/API/Interaction/Controller.php",
    "line": 27,
    "trace": [
        {
            "file": "/home/bwuq2475/public_html/Editions_Charisma/production/Api/streaming_audio/koel_api_test/app/Http/Controllers/API/Interaction/RecentlyPlayedController.php",
            "line": 18,
            "function": "__construct",
            "class": "App\\Http\\Controllers\\API\\Interaction\\Controller",
            "type": "->"
        },
        {
            "function": "__construct",
            "class": "App\\Http\\Controllers\\API\\Interaction\\RecentlyPlayedController",
            "type": "->"
        },
        {
            "file": "/home/bwuq2475/public_html/Editions_Charisma/production/Api/streaming_audio/koel_api_test/vendor/laravel/framework/src/Illuminate/Container/Container.php",
            "line": 929,
            "function": "newInstanceArgs",
            "class": "ReflectionClass",
            "type": "->"
        },
        {
            "file": "/home/bwuq2475/public_html/Editions_Charisma/production/Api/streaming_audio/koel_api_test/vendor/laravel/framework/src/Illuminate/Container/Container.php",
            "line": 770,
            "function": "build",
            "class": "Illuminate\\Container\\Container",
            "type": "->"
        },
        {
            "file": "/home/bwuq2475/public_html/Editions_Charisma/production/Api/streaming_audio/koel_api_test/vendor/laravel/framework/src/Illuminate/Foundation/Application.php",
            "line": 881,
            "function": "resolve",
            "class": "Illuminate\\Container\\Container",
            "type": "->"
        },
        {
            "file": "/home/bwuq2475/public_html/Editions_Charisma/production/Api/streaming_audio/koel_api_test/vendor/laravel/framework/src/Illuminate/Container/Container.php",
            "line": 706,
            "function": "resolve",
            "class": "Illuminate\\Foundation\\Application",
            "type": "->"
        },
        {
            "file": "/home/bwuq2475/public_html/Editions_Charisma/production/Api/streaming_audio/koel_api_test/vendor/laravel/framework/src/Illuminate/Foundation/Application.php",
            "line": 866,
            "function": "make",
            "class": "Illuminate\\Container\\Container",
            "type": "->"
        },
        {
            "file": "/home/bwuq2475/public_html/Editions_Charisma/production/Api/streaming_audio/koel_api_test/vendor/laravel/framework/src/Illuminate/Routing/Route.php",
            "line": 274,
            "function": "make",
            "class": "Illuminate\\Foundation\\Application",
            "type": "->"
        },
        {
            "file": "/home/bwuq2475/public_html/Editions_Charisma/production/Api/streaming_audio/koel_api_test/vendor/laravel/framework/src/Illuminate/Routing/Route.php",
            "line": 1099,
            "function": "getController",
            "class": "Illuminate\\Routing\\Route",
            "type": "->"
        },
        {
            "file": "/home/bwuq2475/public_html/Editions_Charisma/production/Api/streaming_audio/koel_api_test/vendor/laravel/framework/src/Illuminate/Routing/Route.php",
            "line": 1030,
            "function": "controllerMiddleware",
            "class": "Illuminate\\Routing\\Route",
            "type": "->"
        },
        {
            "file": "/home/bwuq2475/public_html/Editions_Charisma/production/Api/streaming_audio/koel_api_test/vendor/laravel/framework/src/Illuminate/Routing/Router.php",
            "line": 810,
            "function": "gatherMiddleware",
            "class": "Illuminate\\Routing\\Route",
            "type": "->"
        },
        {
            "file": "/home/bwuq2475/public_html/Editions_Charisma/production/Api/streaming_audio/koel_api_test/vendor/laravel/framework/src/Illuminate/Routing/Router.php",
            "line": 792,
            "function": "gatherRouteMiddleware",
            "class": "Illuminate\\Routing\\Router",
            "type": "->"
        },
        {
            "file": "/home/bwuq2475/public_html/Editions_Charisma/production/Api/streaming_audio/koel_api_test/vendor/laravel/framework/src/Illuminate/Routing/Router.php",
            "line": 776,
            "function": "runRouteWithinStack",
            "class": "Illuminate\\Routing\\Router",
            "type": "->"
        },
        {
            "file": "/home/bwuq2475/public_html/Editions_Charisma/production/Api/streaming_audio/koel_api_test/vendor/laravel/framework/src/Illuminate/Routing/Router.php",
            "line": 740,
            "function": "runRoute",
            "class": "Illuminate\\Routing\\Router",
            "type": "->"
        },
        {
            "file": "/home/bwuq2475/public_html/Editions_Charisma/production/Api/streaming_audio/koel_api_test/vendor/laravel/framework/src/Illuminate/Routing/Router.php",
            "line": 729,
            "function": "dispatchToRoute",
            "class": "Illuminate\\Routing\\Router",
            "type": "->"
        },
        {
            "file": "/home/bwuq2475/public_html/Editions_Charisma/production/Api/streaming_audio/koel_api_test/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php",
            "line": 190,
            "function": "dispatch",
            "class": "Illuminate\\Routing\\Router",
            "type": "->"
        },
        {
            "file": "/home/bwuq2475/public_html/Editions_Charisma/production/Api/streaming_audio/koel_api_test/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
            "line": 141,
            "function": "Illuminate\\Foundation\\Http\\{closure}",
            "class": "Illuminate\\Foundation\\Http\\Kernel",
            "type": "->"
        },
        {
            "file": "/home/bwuq2475/public_html/Editions_Charisma/production/Api/streaming_audio/koel_api_test/vendor/fruitcake/laravel-cors/src/HandleCors.php",
            "line": 52,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "/home/bwuq2475/public_html/Editions_Charisma/production/Api/streaming_audio/koel_api_test/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
            "line": 180,
            "function": "handle",
            "class": "Fruitcake\\Cors\\HandleCors",
            "type": "->"
        },
        {
            "file": "/home/bwuq2475/public_html/Editions_Charisma/production/Api/streaming_audio/koel_api_test/app/Http/Middleware/ForceHttps.php",
            "line": 26,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "/home/bwuq2475/public_html/Editions_Charisma/production/Api/streaming_audio/koel_api_test/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
            "line": 180,
            "function": "handle",
            "class": "App\\Http\\Middleware\\ForceHttps",
            "type": "->"
        },
        {
            "file": "/home/bwuq2475/public_html/Editions_Charisma/production/Api/streaming_audio/koel_api_test/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php",
            "line": 21,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "/home/bwuq2475/public_html/Editions_Charisma/production/Api/streaming_audio/koel_api_test/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ConvertEmptyStringsToNull.php",
            "line": 31,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest",
            "type": "->"
        },
        {
            "file": "/home/bwuq2475/public_html/Editions_Charisma/production/Api/streaming_audio/koel_api_test/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
            "line": 180,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Middleware\\ConvertEmptyStringsToNull",
            "type": "->"
        },
        {
            "file": "/home/bwuq2475/public_html/Editions_Charisma/production/Api/streaming_audio/koel_api_test/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php",
            "line": 21,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "/home/bwuq2475/public_html/Editions_Charisma/production/Api/streaming_audio/koel_api_test/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TrimStrings.php",
            "line": 40,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest",
            "type": "->"
        },
        {
            "file": "/home/bwuq2475/public_html/Editions_Charisma/production/Api/streaming_audio/koel_api_test/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
            "line": 180,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Middleware\\TrimStrings",
            "type": "->"
        },
        {
            "file": "/home/bwuq2475/public_html/Editions_Charisma/production/Api/streaming_audio/koel_api_test/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ValidatePostSize.php",
            "line": 27,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "/home/bwuq2475/public_html/Editions_Charisma/production/Api/streaming_audio/koel_api_test/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
            "line": 180,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Middleware\\ValidatePostSize",
            "type": "->"
        },
        {
            "file": "/home/bwuq2475/public_html/Editions_Charisma/production/Api/streaming_audio/koel_api_test/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/PreventRequestsDuringMaintenance.php",
            "line": 86,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "/home/bwuq2475/public_html/Editions_Charisma/production/Api/streaming_audio/koel_api_test/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
            "line": 180,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Middleware\\PreventRequestsDuringMaintenance",
            "type": "->"
        },
        {
            "file": "/home/bwuq2475/public_html/Editions_Charisma/production/Api/streaming_audio/koel_api_test/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
            "line": 116,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "/home/bwuq2475/public_html/Editions_Charisma/production/Api/streaming_audio/koel_api_test/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php",
            "line": 165,
            "function": "then",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "/home/bwuq2475/public_html/Editions_Charisma/production/Api/streaming_audio/koel_api_test/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php",
            "line": 134,
            "function": "sendRequestThroughRouter",
            "class": "Illuminate\\Foundation\\Http\\Kernel",
            "type": "->"
        },
        {
            "file": "/home/bwuq2475/public_html/Editions_Charisma/production/Api/streaming_audio/koel_api_test/vendor/knuckleswtf/scribe/src/Extracting/Strategies/Responses/ResponseCalls.php",
            "line": 299,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Kernel",
            "type": "->"
        },
        {
            "file": "/home/bwuq2475/public_html/Editions_Charisma/production/Api/streaming_audio/koel_api_test/vendor/knuckleswtf/scribe/src/Extracting/Strategies/Responses/ResponseCalls.php",
            "line": 287,
            "function": "callLaravelOrLumenRoute",
            "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
            "type": "->"
        },
        {
            "file": "/home/bwuq2475/public_html/Editions_Charisma/production/Api/streaming_audio/koel_api_test/vendor/knuckleswtf/scribe/src/Extracting/Strategies/Responses/ResponseCalls.php",
            "line": 89,
            "function": "makeApiCall",
            "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
            "type": "->"
        },
        {
            "file": "/home/bwuq2475/public_html/Editions_Charisma/production/Api/streaming_audio/koel_api_test/vendor/knuckleswtf/scribe/src/Extracting/Strategies/Responses/ResponseCalls.php",
            "line": 45,
            "function": "makeResponseCall",
            "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
            "type": "->"
        },
        {
            "file": "/home/bwuq2475/public_html/Editions_Charisma/production/Api/streaming_audio/koel_api_test/vendor/knuckleswtf/scribe/src/Extracting/Strategies/Responses/ResponseCalls.php",
            "line": 35,
            "function": "makeResponseCallIfConditionsPass",
            "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
            "type": "->"
        },
        {
            "file": "/home/bwuq2475/public_html/Editions_Charisma/production/Api/streaming_audio/koel_api_test/vendor/knuckleswtf/scribe/src/Extracting/Extractor.php",
            "line": 222,
            "function": "__invoke",
            "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
            "type": "->"
        },
        {
            "file": "/home/bwuq2475/public_html/Editions_Charisma/production/Api/streaming_audio/koel_api_test/vendor/knuckleswtf/scribe/src/Extracting/Extractor.php",
            "line": 179,
            "function": "iterateThroughStrategies",
            "class": "Knuckles\\Scribe\\Extracting\\Extractor",
            "type": "->"
        },
        {
            "file": "/home/bwuq2475/public_html/Editions_Charisma/production/Api/streaming_audio/koel_api_test/vendor/knuckleswtf/scribe/src/Extracting/Extractor.php",
            "line": 116,
            "function": "fetchResponses",
            "class": "Knuckles\\Scribe\\Extracting\\Extractor",
            "type": "->"
        },
        {
            "file": "/home/bwuq2475/public_html/Editions_Charisma/production/Api/streaming_audio/koel_api_test/vendor/knuckleswtf/scribe/src/GroupedEndpoints/GroupedEndpointsFromApp.php",
            "line": 123,
            "function": "processRoute",
            "class": "Knuckles\\Scribe\\Extracting\\Extractor",
            "type": "->"
        },
        {
            "file": "/home/bwuq2475/public_html/Editions_Charisma/production/Api/streaming_audio/koel_api_test/vendor/knuckleswtf/scribe/src/GroupedEndpoints/GroupedEndpointsFromApp.php",
            "line": 80,
            "function": "extractEndpointsInfoFromLaravelApp",
            "class": "Knuckles\\Scribe\\GroupedEndpoints\\GroupedEndpointsFromApp",
            "type": "->"
        },
        {
            "file": "/home/bwuq2475/public_html/Editions_Charisma/production/Api/streaming_audio/koel_api_test/vendor/knuckleswtf/scribe/src/GroupedEndpoints/GroupedEndpointsFromApp.php",
            "line": 56,
            "function": "extractEndpointsInfoAndWriteToDisk",
            "class": "Knuckles\\Scribe\\GroupedEndpoints\\GroupedEndpointsFromApp",
            "type": "->"
        },
        {
            "file": "/home/bwuq2475/public_html/Editions_Charisma/production/Api/streaming_audio/koel_api_test/vendor/knuckleswtf/scribe/src/Commands/GenerateDocumentation.php",
            "line": 55,
            "function": "get",
            "class": "Knuckles\\Scribe\\GroupedEndpoints\\GroupedEndpointsFromApp",
            "type": "->"
        },
        {
            "file": "/home/bwuq2475/public_html/Editions_Charisma/production/Api/streaming_audio/koel_api_test/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php",
            "line": 36,
            "function": "handle",
            "class": "Knuckles\\Scribe\\Commands\\GenerateDocumentation",
            "type": "->"
        },
        {
            "file": "/home/bwuq2475/public_html/Editions_Charisma/production/Api/streaming_audio/koel_api_test/vendor/laravel/framework/src/Illuminate/Container/Util.php",
            "line": 41,
            "function": "Illuminate\\Container\\{closure}",
            "class": "Illuminate\\Container\\BoundMethod",
            "type": "::"
        },
        {
            "file": "/home/bwuq2475/public_html/Editions_Charisma/production/Api/streaming_audio/koel_api_test/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php",
            "line": 93,
            "function": "unwrapIfClosure",
            "class": "Illuminate\\Container\\Util",
            "type": "::"
        },
        {
            "file": "/home/bwuq2475/public_html/Editions_Charisma/production/Api/streaming_audio/koel_api_test/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php",
            "line": 37,
            "function": "callBoundMethod",
            "class": "Illuminate\\Container\\BoundMethod",
            "type": "::"
        },
        {
            "file": "/home/bwuq2475/public_html/Editions_Charisma/production/Api/streaming_audio/koel_api_test/vendor/laravel/framework/src/Illuminate/Container/Container.php",
            "line": 661,
            "function": "call",
            "class": "Illuminate\\Container\\BoundMethod",
            "type": "::"
        },
        {
            "file": "/home/bwuq2475/public_html/Editions_Charisma/production/Api/streaming_audio/koel_api_test/vendor/laravel/framework/src/Illuminate/Console/Command.php",
            "line": 183,
            "function": "call",
            "class": "Illuminate\\Container\\Container",
            "type": "->"
        },
        {
            "file": "/home/bwuq2475/public_html/Editions_Charisma/production/Api/streaming_audio/koel_api_test/vendor/symfony/console/Command/Command.php",
            "line": 326,
            "function": "execute",
            "class": "Illuminate\\Console\\Command",
            "type": "->"
        },
        {
            "file": "/home/bwuq2475/public_html/Editions_Charisma/production/Api/streaming_audio/koel_api_test/vendor/laravel/framework/src/Illuminate/Console/Command.php",
            "line": 153,
            "function": "run",
            "class": "Symfony\\Component\\Console\\Command\\Command",
            "type": "->"
        },
        {
            "file": "/home/bwuq2475/public_html/Editions_Charisma/production/Api/streaming_audio/koel_api_test/vendor/symfony/console/Application.php",
            "line": 1078,
            "function": "run",
            "class": "Illuminate\\Console\\Command",
            "type": "->"
        },
        {
            "file": "/home/bwuq2475/public_html/Editions_Charisma/production/Api/streaming_audio/koel_api_test/vendor/symfony/console/Application.php",
            "line": 324,
            "function": "doRunCommand",
            "class": "Symfony\\Component\\Console\\Application",
            "type": "->"
        },
        {
            "file": "/home/bwuq2475/public_html/Editions_Charisma/production/Api/streaming_audio/koel_api_test/vendor/symfony/console/Application.php",
            "line": 175,
            "function": "doRun",
            "class": "Symfony\\Component\\Console\\Application",
            "type": "->"
        },
        {
            "file": "/home/bwuq2475/public_html/Editions_Charisma/production/Api/streaming_audio/koel_api_test/vendor/laravel/framework/src/Illuminate/Console/Application.php",
            "line": 102,
            "function": "run",
            "class": "Symfony\\Component\\Console\\Application",
            "type": "->"
        },
        {
            "file": "/home/bwuq2475/public_html/Editions_Charisma/production/Api/streaming_audio/koel_api_test/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php",
            "line": 155,
            "function": "run",
            "class": "Illuminate\\Console\\Application",
            "type": "->"
        },
        {
            "file": "/home/bwuq2475/public_html/Editions_Charisma/production/Api/streaming_audio/koel_api_test/artisan",
            "line": 36,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Console\\Kernel",
            "type": "->"
        }
    ]
}
 

Request      

GET api/interaction/recently-played/{count?}

URL Parameters

count  string optional  

GET api/interaction/favorites

Example request:
curl --request GET \
    --get "https://app.api.prd.editions-charisma.fr/api/interaction/favorites" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://app.api.prd.editions-charisma.fr/api/interaction/favorites"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://app.api.prd.editions-charisma.fr/api/interaction/favorites',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 60
x-ratelimit-remaining: 58
access-control-allow-origin: *
 

{
    "code": 401,
    "message": "Unauthorized.",
    "path": null,
    "description": "Unauthorized."
}
 

Request      

GET api/interaction/favorites

GET api/playlist

Example request:
curl --request GET \
    --get "https://app.api.prd.editions-charisma.fr/api/playlist" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://app.api.prd.editions-charisma.fr/api/playlist"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://app.api.prd.editions-charisma.fr/api/playlist',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 60
x-ratelimit-remaining: 57
access-control-allow-origin: *
 

{
    "code": 401,
    "message": "Unauthorized.",
    "path": null,
    "description": "Unauthorized."
}
 

Request      

GET api/playlist

POST api/playlist

Example request:
curl --request POST \
    "https://app.api.prd.editions-charisma.fr/api/playlist" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"placeat\",
    \"songs\": [
        \"sed\"
    ]
}"
const url = new URL(
    "https://app.api.prd.editions-charisma.fr/api/playlist"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "placeat",
    "songs": [
        "sed"
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://app.api.prd.editions-charisma.fr/api/playlist',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'name' => 'placeat',
            'songs' => [
                'sed',
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request      

POST api/playlist

Body Parameters

name  string  

songs  string[] optional  

PUT api/playlist/{id}

Example request:
curl --request PUT \
    "https://app.api.prd.editions-charisma.fr/api/playlist/17" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://app.api.prd.editions-charisma.fr/api/playlist/17"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->put(
    'https://app.api.prd.editions-charisma.fr/api/playlist/17',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request      

PUT api/playlist/{id}

PATCH api/playlist/{id}

URL Parameters

id  integer  

The ID of the playlist.

DELETE api/playlist/{id}

Example request:
curl --request DELETE \
    "https://app.api.prd.editions-charisma.fr/api/playlist/10" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://app.api.prd.editions-charisma.fr/api/playlist/10"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->delete(
    'https://app.api.prd.editions-charisma.fr/api/playlist/10',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request      

DELETE api/playlist/{id}

URL Parameters

id  integer  

The ID of the playlist.

POST api/lastfm/session-key

Example request:
curl --request POST \
    "https://app.api.prd.editions-charisma.fr/api/lastfm/session-key" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"key\": \"totam\"
}"
const url = new URL(
    "https://app.api.prd.editions-charisma.fr/api/lastfm/session-key"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "key": "totam"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://app.api.prd.editions-charisma.fr/api/lastfm/session-key',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'key' => 'totam',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request      

POST api/lastfm/session-key

Body Parameters

key  string  

DELETE api/lastfm/disconnect

Example request:
curl --request DELETE \
    "https://app.api.prd.editions-charisma.fr/api/lastfm/disconnect" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://app.api.prd.editions-charisma.fr/api/lastfm/disconnect"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->delete(
    'https://app.api.prd.editions-charisma.fr/api/lastfm/disconnect',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request      

DELETE api/lastfm/disconnect

Example request:
curl --request GET \
    --get "https://app.api.prd.editions-charisma.fr/api/search" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://app.api.prd.editions-charisma.fr/api/search"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://app.api.prd.editions-charisma.fr/api/search',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 60
x-ratelimit-remaining: 55
access-control-allow-origin: *
 

{
    "code": 401,
    "message": "Unauthorized.",
    "path": null,
    "description": "Unauthorized."
}
 

GET api/search/songs

Example request:
curl --request GET \
    --get "https://app.api.prd.editions-charisma.fr/api/search/songs" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://app.api.prd.editions-charisma.fr/api/search/songs"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://app.api.prd.editions-charisma.fr/api/search/songs',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 60
x-ratelimit-remaining: 54
access-control-allow-origin: *
 

{
    "code": 401,
    "message": "Unauthorized.",
    "path": null,
    "description": "Unauthorized."
}
 

Request      

GET api/search/songs

POST api/os/s3/song

Example request:
curl --request POST \
    "https://app.api.prd.editions-charisma.fr/api/os/s3/song" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"bucket\": \"facere\",
    \"key\": \"qui\",
    \"tags\": {
        \"duration\": 105122177.764
    }
}"
const url = new URL(
    "https://app.api.prd.editions-charisma.fr/api/os/s3/song"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "bucket": "facere",
    "key": "qui",
    "tags": {
        "duration": 105122177.764
    }
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://app.api.prd.editions-charisma.fr/api/os/s3/song',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'bucket' => 'facere',
            'key' => 'qui',
            'tags' => [
                'duration' => 105122177.764,
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request      

POST api/os/s3/song

Body Parameters

bucket  string  

key  string  

tags  object optional  

tags.duration  number  

DELETE api/os/s3/song

Example request:
curl --request DELETE \
    "https://app.api.prd.editions-charisma.fr/api/os/s3/song" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"bucket\": \"amet\",
    \"key\": \"reiciendis\"
}"
const url = new URL(
    "https://app.api.prd.editions-charisma.fr/api/os/s3/song"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "bucket": "amet",
    "key": "reiciendis"
};

fetch(url, {
    method: "DELETE",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->delete(
    'https://app.api.prd.editions-charisma.fr/api/os/s3/song',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'bucket' => 'amet',
            'key' => 'reiciendis',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request      

DELETE api/os/s3/song

Body Parameters

bucket  string  

key  string  

GET api/hello

Example request:
curl --request GET \
    --get "https://app.api.prd.editions-charisma.fr/api/hello" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://app.api.prd.editions-charisma.fr/api/hello"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://app.api.prd.editions-charisma.fr/api/hello',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

Show headers
content-type: text/html; charset=UTF-8
cache-control: no-cache, private
x-ratelimit-limit: 60
x-ratelimit-remaining: 53
access-control-allow-origin: *
 

:)
 

Request      

GET api/hello

Store a newly created resource in storage.

Example request:
curl --request POST \
    "https://app.api.prd.editions-charisma.fr/api/audiences" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://app.api.prd.editions-charisma.fr/api/audiences"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://app.api.prd.editions-charisma.fr/api/audiences',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request      

POST api/audiences

Display the specified resource.

Example request:
curl --request GET \
    --get "https://app.api.prd.editions-charisma.fr/api/audiences/3" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://app.api.prd.editions-charisma.fr/api/audiences/3"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://app.api.prd.editions-charisma.fr/api/audiences/3',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (500):

Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 60
x-ratelimit-remaining: 52
access-control-allow-origin: *
 

{
    "message": "SQLSTATE[42S22]: Column not found: 1054 Unknown column 'id' in 'WHERE' (SQL: select * from `audiences` where `id` = 1 limit 1)",
    "exception": "Illuminate\\Database\\QueryException",
    "file": "/home/bwuq2475/public_html/Editions_Charisma/production/Api/streaming_audio/koel_api_test/vendor/laravel/framework/src/Illuminate/Database/Connection.php",
    "line": 760,
    "trace": [
        {
            "file": "/home/bwuq2475/public_html/Editions_Charisma/production/Api/streaming_audio/koel_api_test/vendor/laravel/framework/src/Illuminate/Database/Connection.php",
            "line": 720,
            "function": "runQueryCallback",
            "class": "Illuminate\\Database\\Connection",
            "type": "->"
        },
        {
            "file": "/home/bwuq2475/public_html/Editions_Charisma/production/Api/streaming_audio/koel_api_test/vendor/laravel/framework/src/Illuminate/Database/Connection.php",
            "line": 422,
            "function": "run",
            "class": "Illuminate\\Database\\Connection",
            "type": "->"
        },
        {
            "file": "/home/bwuq2475/public_html/Editions_Charisma/production/Api/streaming_audio/koel_api_test/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php",
            "line": 2706,
            "function": "select",
            "class": "Illuminate\\Database\\Connection",
            "type": "->"
        },
        {
            "file": "/home/bwuq2475/public_html/Editions_Charisma/production/Api/streaming_audio/koel_api_test/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php",
            "line": 2694,
            "function": "runSelect",
            "class": "Illuminate\\Database\\Query\\Builder",
            "type": "->"
        },
        {
            "file": "/home/bwuq2475/public_html/Editions_Charisma/production/Api/streaming_audio/koel_api_test/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php",
            "line": 3230,
            "function": "Illuminate\\Database\\Query\\{closure}",
            "class": "Illuminate\\Database\\Query\\Builder",
            "type": "->"
        },
        {
            "file": "/home/bwuq2475/public_html/Editions_Charisma/production/Api/streaming_audio/koel_api_test/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php",
            "line": 2695,
            "function": "onceWithColumns",
            "class": "Illuminate\\Database\\Query\\Builder",
            "type": "->"
        },
        {
            "file": "/home/bwuq2475/public_html/Editions_Charisma/production/Api/streaming_audio/koel_api_test/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php",
            "line": 710,
            "function": "get",
            "class": "Illuminate\\Database\\Query\\Builder",
            "type": "->"
        },
        {
            "file": "/home/bwuq2475/public_html/Editions_Charisma/production/Api/streaming_audio/koel_api_test/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php",
            "line": 694,
            "function": "getModels",
            "class": "Illuminate\\Database\\Eloquent\\Builder",
            "type": "->"
        },
        {
            "file": "/home/bwuq2475/public_html/Editions_Charisma/production/Api/streaming_audio/koel_api_test/vendor/laravel/framework/src/Illuminate/Database/Concerns/BuildsQueries.php",
            "line": 296,
            "function": "get",
            "class": "Illuminate\\Database\\Eloquent\\Builder",
            "type": "->"
        },
        {
            "file": "/home/bwuq2475/public_html/Editions_Charisma/production/Api/streaming_audio/koel_api_test/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php",
            "line": 2042,
            "function": "first",
            "class": "Illuminate\\Database\\Eloquent\\Builder",
            "type": "->"
        },
        {
            "file": "/home/bwuq2475/public_html/Editions_Charisma/production/Api/streaming_audio/koel_api_test/vendor/laravel/framework/src/Illuminate/Routing/ImplicitRouteBinding.php",
            "line": 61,
            "function": "resolveRouteBinding",
            "class": "Illuminate\\Database\\Eloquent\\Model",
            "type": "->"
        },
        {
            "file": "/home/bwuq2475/public_html/Editions_Charisma/production/Api/streaming_audio/koel_api_test/vendor/laravel/framework/src/Illuminate/Routing/Router.php",
            "line": 947,
            "function": "resolveForRoute",
            "class": "Illuminate\\Routing\\ImplicitRouteBinding",
            "type": "::"
        },
        {
            "file": "/home/bwuq2475/public_html/Editions_Charisma/production/Api/streaming_audio/koel_api_test/vendor/laravel/framework/src/Illuminate/Routing/Middleware/SubstituteBindings.php",
            "line": 41,
            "function": "substituteImplicitBindings",
            "class": "Illuminate\\Routing\\Router",
            "type": "->"
        },
        {
            "file": "/home/bwuq2475/public_html/Editions_Charisma/production/Api/streaming_audio/koel_api_test/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
            "line": 180,
            "function": "handle",
            "class": "Illuminate\\Routing\\Middleware\\SubstituteBindings",
            "type": "->"
        },
        {
            "file": "/home/bwuq2475/public_html/Editions_Charisma/production/Api/streaming_audio/koel_api_test/vendor/laravel/framework/src/Illuminate/Routing/Middleware/ThrottleRequests.php",
            "line": 126,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "/home/bwuq2475/public_html/Editions_Charisma/production/Api/streaming_audio/koel_api_test/vendor/laravel/framework/src/Illuminate/Routing/Middleware/ThrottleRequests.php",
            "line": 62,
            "function": "handleRequest",
            "class": "Illuminate\\Routing\\Middleware\\ThrottleRequests",
            "type": "->"
        },
        {
            "file": "/home/bwuq2475/public_html/Editions_Charisma/production/Api/streaming_audio/koel_api_test/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
            "line": 180,
            "function": "handle",
            "class": "Illuminate\\Routing\\Middleware\\ThrottleRequests",
            "type": "->"
        },
        {
            "file": "/home/bwuq2475/public_html/Editions_Charisma/production/Api/streaming_audio/koel_api_test/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
            "line": 116,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "/home/bwuq2475/public_html/Editions_Charisma/production/Api/streaming_audio/koel_api_test/vendor/laravel/framework/src/Illuminate/Routing/Router.php",
            "line": 799,
            "function": "then",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "/home/bwuq2475/public_html/Editions_Charisma/production/Api/streaming_audio/koel_api_test/vendor/laravel/framework/src/Illuminate/Routing/Router.php",
            "line": 776,
            "function": "runRouteWithinStack",
            "class": "Illuminate\\Routing\\Router",
            "type": "->"
        },
        {
            "file": "/home/bwuq2475/public_html/Editions_Charisma/production/Api/streaming_audio/koel_api_test/vendor/laravel/framework/src/Illuminate/Routing/Router.php",
            "line": 740,
            "function": "runRoute",
            "class": "Illuminate\\Routing\\Router",
            "type": "->"
        },
        {
            "file": "/home/bwuq2475/public_html/Editions_Charisma/production/Api/streaming_audio/koel_api_test/vendor/laravel/framework/src/Illuminate/Routing/Router.php",
            "line": 729,
            "function": "dispatchToRoute",
            "class": "Illuminate\\Routing\\Router",
            "type": "->"
        },
        {
            "file": "/home/bwuq2475/public_html/Editions_Charisma/production/Api/streaming_audio/koel_api_test/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php",
            "line": 190,
            "function": "dispatch",
            "class": "Illuminate\\Routing\\Router",
            "type": "->"
        },
        {
            "file": "/home/bwuq2475/public_html/Editions_Charisma/production/Api/streaming_audio/koel_api_test/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
            "line": 141,
            "function": "Illuminate\\Foundation\\Http\\{closure}",
            "class": "Illuminate\\Foundation\\Http\\Kernel",
            "type": "->"
        },
        {
            "file": "/home/bwuq2475/public_html/Editions_Charisma/production/Api/streaming_audio/koel_api_test/vendor/fruitcake/laravel-cors/src/HandleCors.php",
            "line": 52,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "/home/bwuq2475/public_html/Editions_Charisma/production/Api/streaming_audio/koel_api_test/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
            "line": 180,
            "function": "handle",
            "class": "Fruitcake\\Cors\\HandleCors",
            "type": "->"
        },
        {
            "file": "/home/bwuq2475/public_html/Editions_Charisma/production/Api/streaming_audio/koel_api_test/app/Http/Middleware/ForceHttps.php",
            "line": 26,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "/home/bwuq2475/public_html/Editions_Charisma/production/Api/streaming_audio/koel_api_test/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
            "line": 180,
            "function": "handle",
            "class": "App\\Http\\Middleware\\ForceHttps",
            "type": "->"
        },
        {
            "file": "/home/bwuq2475/public_html/Editions_Charisma/production/Api/streaming_audio/koel_api_test/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php",
            "line": 21,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "/home/bwuq2475/public_html/Editions_Charisma/production/Api/streaming_audio/koel_api_test/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ConvertEmptyStringsToNull.php",
            "line": 31,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest",
            "type": "->"
        },
        {
            "file": "/home/bwuq2475/public_html/Editions_Charisma/production/Api/streaming_audio/koel_api_test/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
            "line": 180,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Middleware\\ConvertEmptyStringsToNull",
            "type": "->"
        },
        {
            "file": "/home/bwuq2475/public_html/Editions_Charisma/production/Api/streaming_audio/koel_api_test/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php",
            "line": 21,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "/home/bwuq2475/public_html/Editions_Charisma/production/Api/streaming_audio/koel_api_test/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TrimStrings.php",
            "line": 40,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest",
            "type": "->"
        },
        {
            "file": "/home/bwuq2475/public_html/Editions_Charisma/production/Api/streaming_audio/koel_api_test/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
            "line": 180,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Middleware\\TrimStrings",
            "type": "->"
        },
        {
            "file": "/home/bwuq2475/public_html/Editions_Charisma/production/Api/streaming_audio/koel_api_test/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ValidatePostSize.php",
            "line": 27,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "/home/bwuq2475/public_html/Editions_Charisma/production/Api/streaming_audio/koel_api_test/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
            "line": 180,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Middleware\\ValidatePostSize",
            "type": "->"
        },
        {
            "file": "/home/bwuq2475/public_html/Editions_Charisma/production/Api/streaming_audio/koel_api_test/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/PreventRequestsDuringMaintenance.php",
            "line": 86,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "/home/bwuq2475/public_html/Editions_Charisma/production/Api/streaming_audio/koel_api_test/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
            "line": 180,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Middleware\\PreventRequestsDuringMaintenance",
            "type": "->"
        },
        {
            "file": "/home/bwuq2475/public_html/Editions_Charisma/production/Api/streaming_audio/koel_api_test/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
            "line": 116,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "/home/bwuq2475/public_html/Editions_Charisma/production/Api/streaming_audio/koel_api_test/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php",
            "line": 165,
            "function": "then",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "/home/bwuq2475/public_html/Editions_Charisma/production/Api/streaming_audio/koel_api_test/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php",
            "line": 134,
            "function": "sendRequestThroughRouter",
            "class": "Illuminate\\Foundation\\Http\\Kernel",
            "type": "->"
        },
        {
            "file": "/home/bwuq2475/public_html/Editions_Charisma/production/Api/streaming_audio/koel_api_test/vendor/knuckleswtf/scribe/src/Extracting/Strategies/Responses/ResponseCalls.php",
            "line": 299,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Kernel",
            "type": "->"
        },
        {
            "file": "/home/bwuq2475/public_html/Editions_Charisma/production/Api/streaming_audio/koel_api_test/vendor/knuckleswtf/scribe/src/Extracting/Strategies/Responses/ResponseCalls.php",
            "line": 287,
            "function": "callLaravelOrLumenRoute",
            "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
            "type": "->"
        },
        {
            "file": "/home/bwuq2475/public_html/Editions_Charisma/production/Api/streaming_audio/koel_api_test/vendor/knuckleswtf/scribe/src/Extracting/Strategies/Responses/ResponseCalls.php",
            "line": 89,
            "function": "makeApiCall",
            "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
            "type": "->"
        },
        {
            "file": "/home/bwuq2475/public_html/Editions_Charisma/production/Api/streaming_audio/koel_api_test/vendor/knuckleswtf/scribe/src/Extracting/Strategies/Responses/ResponseCalls.php",
            "line": 45,
            "function": "makeResponseCall",
            "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
            "type": "->"
        },
        {
            "file": "/home/bwuq2475/public_html/Editions_Charisma/production/Api/streaming_audio/koel_api_test/vendor/knuckleswtf/scribe/src/Extracting/Strategies/Responses/ResponseCalls.php",
            "line": 35,
            "function": "makeResponseCallIfConditionsPass",
            "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
            "type": "->"
        },
        {
            "file": "/home/bwuq2475/public_html/Editions_Charisma/production/Api/streaming_audio/koel_api_test/vendor/knuckleswtf/scribe/src/Extracting/Extractor.php",
            "line": 222,
            "function": "__invoke",
            "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
            "type": "->"
        },
        {
            "file": "/home/bwuq2475/public_html/Editions_Charisma/production/Api/streaming_audio/koel_api_test/vendor/knuckleswtf/scribe/src/Extracting/Extractor.php",
            "line": 179,
            "function": "iterateThroughStrategies",
            "class": "Knuckles\\Scribe\\Extracting\\Extractor",
            "type": "->"
        },
        {
            "file": "/home/bwuq2475/public_html/Editions_Charisma/production/Api/streaming_audio/koel_api_test/vendor/knuckleswtf/scribe/src/Extracting/Extractor.php",
            "line": 116,
            "function": "fetchResponses",
            "class": "Knuckles\\Scribe\\Extracting\\Extractor",
            "type": "->"
        },
        {
            "file": "/home/bwuq2475/public_html/Editions_Charisma/production/Api/streaming_audio/koel_api_test/vendor/knuckleswtf/scribe/src/GroupedEndpoints/GroupedEndpointsFromApp.php",
            "line": 123,
            "function": "processRoute",
            "class": "Knuckles\\Scribe\\Extracting\\Extractor",
            "type": "->"
        },
        {
            "file": "/home/bwuq2475/public_html/Editions_Charisma/production/Api/streaming_audio/koel_api_test/vendor/knuckleswtf/scribe/src/GroupedEndpoints/GroupedEndpointsFromApp.php",
            "line": 80,
            "function": "extractEndpointsInfoFromLaravelApp",
            "class": "Knuckles\\Scribe\\GroupedEndpoints\\GroupedEndpointsFromApp",
            "type": "->"
        },
        {
            "file": "/home/bwuq2475/public_html/Editions_Charisma/production/Api/streaming_audio/koel_api_test/vendor/knuckleswtf/scribe/src/GroupedEndpoints/GroupedEndpointsFromApp.php",
            "line": 56,
            "function": "extractEndpointsInfoAndWriteToDisk",
            "class": "Knuckles\\Scribe\\GroupedEndpoints\\GroupedEndpointsFromApp",
            "type": "->"
        },
        {
            "file": "/home/bwuq2475/public_html/Editions_Charisma/production/Api/streaming_audio/koel_api_test/vendor/knuckleswtf/scribe/src/Commands/GenerateDocumentation.php",
            "line": 55,
            "function": "get",
            "class": "Knuckles\\Scribe\\GroupedEndpoints\\GroupedEndpointsFromApp",
            "type": "->"
        },
        {
            "file": "/home/bwuq2475/public_html/Editions_Charisma/production/Api/streaming_audio/koel_api_test/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php",
            "line": 36,
            "function": "handle",
            "class": "Knuckles\\Scribe\\Commands\\GenerateDocumentation",
            "type": "->"
        },
        {
            "file": "/home/bwuq2475/public_html/Editions_Charisma/production/Api/streaming_audio/koel_api_test/vendor/laravel/framework/src/Illuminate/Container/Util.php",
            "line": 41,
            "function": "Illuminate\\Container\\{closure}",
            "class": "Illuminate\\Container\\BoundMethod",
            "type": "::"
        },
        {
            "file": "/home/bwuq2475/public_html/Editions_Charisma/production/Api/streaming_audio/koel_api_test/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php",
            "line": 93,
            "function": "unwrapIfClosure",
            "class": "Illuminate\\Container\\Util",
            "type": "::"
        },
        {
            "file": "/home/bwuq2475/public_html/Editions_Charisma/production/Api/streaming_audio/koel_api_test/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php",
            "line": 37,
            "function": "callBoundMethod",
            "class": "Illuminate\\Container\\BoundMethod",
            "type": "::"
        },
        {
            "file": "/home/bwuq2475/public_html/Editions_Charisma/production/Api/streaming_audio/koel_api_test/vendor/laravel/framework/src/Illuminate/Container/Container.php",
            "line": 661,
            "function": "call",
            "class": "Illuminate\\Container\\BoundMethod",
            "type": "::"
        },
        {
            "file": "/home/bwuq2475/public_html/Editions_Charisma/production/Api/streaming_audio/koel_api_test/vendor/laravel/framework/src/Illuminate/Console/Command.php",
            "line": 183,
            "function": "call",
            "class": "Illuminate\\Container\\Container",
            "type": "->"
        },
        {
            "file": "/home/bwuq2475/public_html/Editions_Charisma/production/Api/streaming_audio/koel_api_test/vendor/symfony/console/Command/Command.php",
            "line": 326,
            "function": "execute",
            "class": "Illuminate\\Console\\Command",
            "type": "->"
        },
        {
            "file": "/home/bwuq2475/public_html/Editions_Charisma/production/Api/streaming_audio/koel_api_test/vendor/laravel/framework/src/Illuminate/Console/Command.php",
            "line": 153,
            "function": "run",
            "class": "Symfony\\Component\\Console\\Command\\Command",
            "type": "->"
        },
        {
            "file": "/home/bwuq2475/public_html/Editions_Charisma/production/Api/streaming_audio/koel_api_test/vendor/symfony/console/Application.php",
            "line": 1078,
            "function": "run",
            "class": "Illuminate\\Console\\Command",
            "type": "->"
        },
        {
            "file": "/home/bwuq2475/public_html/Editions_Charisma/production/Api/streaming_audio/koel_api_test/vendor/symfony/console/Application.php",
            "line": 324,
            "function": "doRunCommand",
            "class": "Symfony\\Component\\Console\\Application",
            "type": "->"
        },
        {
            "file": "/home/bwuq2475/public_html/Editions_Charisma/production/Api/streaming_audio/koel_api_test/vendor/symfony/console/Application.php",
            "line": 175,
            "function": "doRun",
            "class": "Symfony\\Component\\Console\\Application",
            "type": "->"
        },
        {
            "file": "/home/bwuq2475/public_html/Editions_Charisma/production/Api/streaming_audio/koel_api_test/vendor/laravel/framework/src/Illuminate/Console/Application.php",
            "line": 102,
            "function": "run",
            "class": "Symfony\\Component\\Console\\Application",
            "type": "->"
        },
        {
            "file": "/home/bwuq2475/public_html/Editions_Charisma/production/Api/streaming_audio/koel_api_test/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php",
            "line": 155,
            "function": "run",
            "class": "Illuminate\\Console\\Application",
            "type": "->"
        },
        {
            "file": "/home/bwuq2475/public_html/Editions_Charisma/production/Api/streaming_audio/koel_api_test/artisan",
            "line": 36,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Console\\Kernel",
            "type": "->"
        }
    ]
}
 

Request      

GET api/audiences/{id}

URL Parameters

id  integer  

The ID of the audience.

Update the specified resource in storage.

Example request:
curl --request PUT \
    "https://app.api.prd.editions-charisma.fr/api/audiences/12" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://app.api.prd.editions-charisma.fr/api/audiences/12"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->put(
    'https://app.api.prd.editions-charisma.fr/api/audiences/12',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request      

PUT api/audiences/{id}

PATCH api/audiences/{id}

URL Parameters

id  integer  

The ID of the audience.

Remove the specified resource from storage.

Example request:
curl --request DELETE \
    "https://app.api.prd.editions-charisma.fr/api/audiences/6" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://app.api.prd.editions-charisma.fr/api/audiences/6"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->delete(
    'https://app.api.prd.editions-charisma.fr/api/audiences/6',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request      

DELETE api/audiences/{id}

URL Parameters

id  integer  

The ID of the audience.

POST api/{song_id}/scrobble

Example request:
curl --request POST \
    "https://app.api.prd.editions-charisma.fr/api/00014b36f5a5fd5066e768b04a1d2003/scrobble" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"timestamp\": 0
}"
const url = new URL(
    "https://app.api.prd.editions-charisma.fr/api/00014b36f5a5fd5066e768b04a1d2003/scrobble"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "timestamp": 0
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://app.api.prd.editions-charisma.fr/api/00014b36f5a5fd5066e768b04a1d2003/scrobble',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'timestamp' => 0.0,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request      

POST api/{song_id}/scrobble

URL Parameters

song_id  string  

The ID of the song.

Body Parameters

timestamp  number  

PUT api/playlist/{playlist_id}/sync

Example request:
curl --request PUT \
    "https://app.api.prd.editions-charisma.fr/api/playlist/1/sync" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"songs\": [
        \"voluptatem\"
    ]
}"
const url = new URL(
    "https://app.api.prd.editions-charisma.fr/api/playlist/1/sync"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "songs": [
        "voluptatem"
    ]
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->put(
    'https://app.api.prd.editions-charisma.fr/api/playlist/1/sync',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'songs' => [
                'voluptatem',
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request      

PUT api/playlist/{playlist_id}/sync

URL Parameters

playlist_id  integer  

The ID of the playlist.

Body Parameters

songs  string[] optional  

GET api/playlist/{playlist_id}/songs

Example request:
curl --request GET \
    --get "https://app.api.prd.editions-charisma.fr/api/playlist/13/songs" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://app.api.prd.editions-charisma.fr/api/playlist/13/songs"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://app.api.prd.editions-charisma.fr/api/playlist/13/songs',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (404):

Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 60
x-ratelimit-remaining: 56
access-control-allow-origin: *
 

{
    "code": 404,
    "message": "Resource not found",
    "path": null,
    "description": "No query result found for this Id"
}
 

Request      

GET api/playlist/{playlist_id}/songs

URL Parameters

playlist_id  integer  

The ID of the playlist.

Test upload sans validation de song_id (temporaire)

Example request:
curl --request POST \
    "https://app.api.prd.editions-charisma.fr/api/songs/test-upload" \
    --header "Content-Type: multipart/form-data" \
    --header "Accept: application/json" \
    --form "file=@/tmp/phpFChXr7" 
const url = new URL(
    "https://app.api.prd.editions-charisma.fr/api/songs/test-upload"
);

const headers = {
    "Content-Type": "multipart/form-data",
    "Accept": "application/json",
};

const body = new FormData();
body.append('file', document.querySelector('input[name="file"]').files[0]);

fetch(url, {
    method: "POST",
    headers,
    body,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://app.api.prd.editions-charisma.fr/api/songs/test-upload',
    [
        'headers' => [
            'Content-Type' => 'multipart/form-data',
            'Accept' => 'application/json',
        ],
        'multipart' => [
            [
                'name' => 'file',
                'contents' => fopen('/tmp/phpFChXr7', 'r')
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Request      

POST api/songs/test-upload

Body Parameters

file  file  

Fichier audio à uploader. La durée sera calculée automatiquement et sauvegardée avec le nom du fichier comme ID. Must be a file.