A CSV upload to /api/calllistsuppressions/ answered with a success
status even when rows were rejected, so a user had no way to
notice that the import was incomplete.
The rejected rows are reported with a 422 now, whose message tells
how many rows were imported and which line numbers were skipped,
the same information the web interface shows.
Change-Id: I7ab235227a3f69c8739e8ff2b199debf6fa8a304
'In "filter" mode matching calls do not appear at all, in "obfuscate" mode the number is replaced by the given "label", and in "disabled" mode the suppression is not applied. '.
'Admin and reseller users always see the unsuppressed call lists. The combination of "domain", "direction" and "pattern" must be unique. '.
'You can POST suppressions individually one-by-one using json. For bulk uploads specify the Content-Type as "text/csv" and POST the CSV in the request body to the collection with an optional parameter "purge_existing=true". '.
'The CSV columns are "domain,direction,pattern,mode,label" without a header row. To download all the suppressions in CSV format, GET the collection with an "Accept: text/csv" header.';
'The CSV columns are "domain,direction,pattern,mode,label" without a header row. If any row of the CSV is rejected, the upload returns a 422 reporting how many rows were imported and the line numbers which were skipped. '.
'To download all the suppressions in CSV format, GET the collection with an "Accept: text/csv" header.';
}
suborder_by_cols{
@ -104,13 +107,19 @@ sub process_data :Private {
);
}
#upload_suppressions_csv returns two values only, unlike the upload_csv of
#the other resources, which also return the list of the accepted records