It seems that there is no single API call to retrieve all the diagnostic settings, you could gets the active diagnostic settings list for the specified resource.
Refer to the link https://docs.microsoft.com/en-us/rest/api/monitor/diagnosticsettings/list
Update:
1.First, go to your sql server>Access control(IAM)>Add>Add Role Assignment and assign a role to your service principal.

2.Use the following rest api C# code to get sql database diagnostics settings info.
public static void getDiaSettings()
{
var appId = "xxxxxxxx";
var secretKey = "xxxxxxxx";
var tenantId = "xxxxxxxx";
var context = new AuthenticationContext("https://login.windows.net/" + tenantId);
ClientCredential clientCredential = new ClientCredential(appId, secretKey);
var tokenResponse = context.AcquireTokenAsync("https://management.azure.com/", clientCredential).Result;
var accessToken = tokenResponse.AccessToken;
using (var client = new HttpClient())
{
client.DefaultRequestHeaders.Add("Authorization", "Bearer " + accessToken);
var baseUrl = new Uri($"https://management.azure.com/");
var request2= baseUrl +
@"/subscriptions/xxxxxxxx/resourceGroups/yourResourceGroup/providers/Microsoft.Sql/servers/yourSqlServer/databases/yourSqlDatabase/providers/microsoft.insights/diagnosticSettings?api-version=2017-05-01-preview";
var response = client.GetAsync(request2).Result.Content.ReadAsStringAsync().Result;
}
}