Obsoleto
Excluir um artista
DELETE
/api/v1/artists/{artistId}
Este endpoint era usado para excluir artistas. Infelizmente, isso causou muita controvérsia. Portanto, este endpoint agora está obsoleto e não deve mais ser usado.
Autorizações
bearerAuth
TipoHTTP (bearer)
ou
apiKeyHeader
TipoAPI Key (header: X-API-Key)
Parâmetros
Parâmetros de Caminho
artistId*
Tipointeger
ObrigatórioExemplo
1
format
int64
Respostas
Requisição Inválida
application/json
JSON
{
"type": "https://example.com/errors/generic-error",
"title": "Algo deu errado aqui.",
"status": 403,
"detail": "Infelizmente, não podemos fornecer mais informações."
}
DELETE
/api/v1/artists/{artistId}
Autorização
bearerAuth
Variáveis
Chave
Valor
artistId*
Exemplos
cURL
curl -X DELETE \
'https://stoplight.io/mocks/enzonotario/argentine-rock/122547792/api/v1/artists/1' \
-H "Content-Type: application/json" \
-H "authorization: Bearer Bearer Token"
JavaScript
fetch('https://stoplight.io/mocks/enzonotario/argentine-rock/122547792/api/v1/artists/1', {method:'DELETE',headers:{'Content-Type':'application/json','authorization':'Bearer Bearer Token'}})
.then(response => response.json())
.then(data => console.log(data));
PHP
<?php
$url = 'https://stoplight.io/mocks/enzonotario/argentine-rock/122547792/api/v1/artists/1';
$method = 'DELETE';
$headers = [
'Content-Type' => 'application/json',
'authorization' => 'Bearer Bearer Token',
];
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, $method);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
?>
Python
import requests
url = 'https://stoplight.io/mocks/enzonotario/argentine-rock/122547792/api/v1/artists/1'
headers = {
'Content-Type': 'application/json',
'authorization': 'Bearer Bearer Token'
}
response = requests.delete(url, headers=headers)
print(response.json())