Purview API - 412 error when doing GET request? - azure-purview

I have a AWS Lambda Pipeline that makes API calls to the Purview API and has been working fine until yesterday.
The error occasionally I get is as below:
{'requestId': 'xxxxxx-xxxx-xxxx-xxxxxx', 'errorCode': 'PreConditionCheckFailed', 'errorMessage': 'Pre-condition check failed. Please fetch latest data from Catalog service and update again. Conflict object ID: xxxxx-xxxxx-xxxx-xxxxxxx'}
Some additional info:
From some googling, I understand that this might be an error that is described to only pop up from any other API requests other than GET, so not sure why I'm getting this here when I'm only using GET requests
the API endpoint is: https://learn.microsoft.com/en-us/rest/api/purview/catalogdataplane/entity/get-by-guid
the API call returns the error when I try to use a GUID for a table's column. But, in the error, the 'conflict object ID' is the GUID for the table
I rescanned data sources and assets, replaced collections in Purview but still get the same error
Anyone have any ideas why?

Related

How do I use Azure Devops TFS REST API to get older TestRuns of a TestPoint/TestCase/TestSuite?

The API call:
https://dev.azure.com/{organization}/{project}/_apis/test/Plans/{planId}/Suites/{suiteId}/points?api-version=7.0
Returns JSON data with objects "LastTestRun" and "LastTestResult" that contain their Ids. I am trying to find a proper way of getting older (not last) data of TestResults of the given TestPoint using API calls.
I tried the following API call:
https://dev.azure.com/{organization}/{project}/_apis/test/runs?planId=123
That returns me a list of all TestRuns in the given TestPlan. I can loop through the list and make API call for every single TestRun:
https://dev.azure.com/{organization}/{project}/_apis/test/Runs/{runId}/results
And, then retrieve the TestPointId. The problem is I'm working with large amounts of data, so I'm looping through 7000 API calls and it takes too much time (parallel of course).
I tried calling the last API call with $select so I can retrieve only the TestPointId but it is not supported.
A version of the AzureDevops I am working with: Version Azure DevOps Server 2020 Update 1.2.
Based on your expectation, I have tested as well to get test results with only test point value and tested get the runs of a specific test case in a test suite. Neither succeeded.
Currently there seemed no official API support the test point filter. For this, you may access this URL: https://aka.ms/AzDevOpsIdeas to submit any comments and proposals for future releases and implementations.

Get detailed error message from AWS gateway validator in case of using multiple schemas for one endpoint

I'm using an openapi specification, which configures AWS gateway. I'm also using request validation. It works fine with informative error messages if I print out $context.error.validationErrorString in case of 4xx error messages. (In case of missing request data, It will write out exactly which request data is missing)
In case of using multiple schemas for an endpoint in the openapi spec (with using oneOf), validation also works, but the error message does not contain specific message, just that schema matching was not succesfull [instance failed to match exactly one schema (matched 0 out of 1)
I think the problem is that schema validation happens first, so api gw throws this error first. Is there any possibility to find out what is the exact request validation error in this way, so maybe fore api gw to run also the request validation?
Confirmed with AWS support that this is not possible at the moment.

Azure Data Factory - REST Pagination rules

I'm trying to pull data from Hubspot to my SQL Server Database through an Azure Data Factory pipeline with the usage of a REST dataset. I have problems setting up the right pagination rules. I've already spent a day on Google and MS guides, but I find it hard to get it working properly.
This is the source API. I am able to connect and pull the first set of 20 rows. It gives an offset which is usable with vidoffset= which is returned in the body.
I need to return the result of vid-offset from the body to the HTTP request. Also the process needs to stop when has-more results in 'false'.
I tried to reproduce the same in my environment and I got the below results:
First I create a linked service with this URL: https://api.hubapi.com/contacts/v1/lists/all/contacts/all?hapikey=demo&vidOffset
Then after I created the pagination end condition rule with $.has-more and absolute URL.
For demo purpose, I took sink as a storage account.
The pipeline run success full look at the below image for reference.
For more information refer this Ms Document

Best Approach for Http Request Handling from Api

What is the best practise for api return values for basic db operations while we are trying to add,delete,create,update etc..?
1-(If exists what is most suitable status codes for these operations?)Just returning corresponding http status code?(e.g. return 204 for delete operation,201 create operation,500 for "data does not exist" etc.)
2-Return boolean
3-Return custom exception
Shortly,Assume we have project A and it is using api of project B. And B is trying to delete a record from db with a spesific id, but this id does not exist in db.For such scenario, what should we do ?
1-(If exists what is most suitable status codes for these operations?)Just returning corresponding http status code?(e.g. return 204 for delete operation,201 create operation,500 for "data does not exist" etc.)
Returning 204 for deleting and 201 for creation is absolutely fine, but just try to think about what is the most descriptive response code from the perspective of the requester. Also, remember that 500 response codes are used for when something is wrong on the server side (e.g. an unexpected exception).
Shortly,Assume we have project A and it is using api of project B. And B is trying to delete a record from db with a spesific id, but this id does not exist in db.For such scenario, what should we do ?
Again, think about what would be the most helpful error to the requester. 404 Not Found would accurately describe why the operation failed. You can place an error message in the response body if you want to make it more descriptive - but you don't have to.

Setting id to task using Google Task API returns 400 invalid value

I am using Google's Java API for an project.
Strangely, inserting a task without setting an id works fine. However, inserting a task with a id returns a 400 invalid value error. The id is to be used for syncing local data with Google Tasks
I'm pretty sure there's nothing wrong with the algorithm that generates the ids for the task. The same algorithm works perfectly for Google Calendar API.
Am I missing something here?
You may refer with this SO answer. It suggested to pass the id key/value pair together with the title information you are already sending. There's no documentation to indicate this is a required parameter, especially since it is included in the URL. Google requires the id of the task to be passed as a part of url, parameters and body.