REST API error for BulkClassification
pharrell
Posts: 6 Bronze 2
Hello,
A few environment specifics to get this started: We're on SQL 2019 on all servers, Data Catalog is on 2.0.15.25662, I am using VS 2017 for SSIS package work, and I use the ZappySys SSIS tools to make REST API calls from within SSIS.
I am working to automate the classification of a particular system. I do understand that PowerShell is an option here, but it's my understanding this should all be doable through REST API calls and so I'd like to do that from SSIS if possible .To keep it simple, I am testing the process on a database that automatically generates new tables for auditing operations. I only need to apply two specific tags to any of the columns in newly created tables, so there is no need to check data type or anything like that.
I've set up an authorization token. I have been able to successfully send GET requests to retrieve the columnIDs I need to work with (/api/v1.0/columns?). The issue I am having is when I send a PATCH request for BulkClassification there is a 400 error returned. And these appears to be the offending lines:
A few environment specifics to get this started: We're on SQL 2019 on all servers, Data Catalog is on 2.0.15.25662, I am using VS 2017 for SSIS package work, and I use the ZappySys SSIS tools to make REST API calls from within SSIS.
I am working to automate the classification of a particular system. I do understand that PowerShell is an option here, but it's my understanding this should all be doable through REST API calls and so I'd like to do that from SSIS if possible .To keep it simple, I am testing the process on a database that automatically generates new tables for auditing operations. I only need to apply two specific tags to any of the columns in newly created tables, so there is no need to check data type or anything like that.
I've set up an authorization token. I have been able to successfully send GET requests to retrieve the columnIDs I need to work with (/api/v1.0/columns?). The issue I am having is when I send a PATCH request for BulkClassification there is a 400 error returned. And these appears to be the offending lines:
- 2023-02-16 09:54:01.746 -06:00 [INFO] Antiforgery token validation failed. The required antiforgery cookie ".AspNetCore.Antiforgery.xmlG6Io3-iw" is not present. Microsoft.AspNetCore.Antiforgery.AntiforgeryValidationException: The required antiforgery cookie ".AspNetCore.Antiforgery.xmlG6Io3-iw" is not present. at Microsoft.AspNetCore.Antiforgery.DefaultAntiforgery.ValidateRequestAsync(HttpContext httpContext) at Microsoft.AspNetCore.Mvc.ViewFeatures.Filters.ValidateAntiforgeryTokenAuthorizationFilter.OnAuthorizationAsync(AuthorizationFilterContext context)
- 2023-02-16 09:54:01.747 -06:00 [INFO] Authorization failed for the request at filter 'Microsoft.AspNetCore.Mvc.ViewFeatures.Filters.AutoValidateAntiforgeryTokenAuthorizationFilter'.
- accept -- with a value of */*
- X-XSRF-TOKEN -- with a value that matches the exact token generated in the site
- Content-Type -- with a value of application/json
Tagged:
Answers
A support ticket has been created for you and I will contact you via the support ticket created, as I need to request log files that you most likely do not want to post on this public forum.
Many Thanks
Eddie
Senior Product Support Engineer
Redgate Software Ltd
Email: support@red-gate.com