Symfony ApiPlatform 3.0.6 POST route Abstract Item normalizer error - api-platform.com

I am in the middle of upgrading a project from API 2.7 to API 3.0 and have trouble with this
POST route
This is my request body:
[
{
"name": "firstName",
"width": "10%",
"priority": 1
},
{
"name": "lastName",
"width": "10%",
"priority": 1
}
]
The error output is:
"#context": "/api/contexts/Error",
"#type": "hydra:Error",
"hydra:title": "An error occurred",
"hydra:description": "ApiPlatform\\Serializer\\AbstractItemNormalizer::canAccessAttributePostDenormalize(): Argument #3 ($attribute) must be of type string, int given
I had a similar issue on another route and defining uriVariables solved it, but that did not work this time.

Related

Strtapi GraphQL: Field "ressourcePost" is not defined by type "MarketingRessourcePageFiltersInput"

Currently im trying to make a request to my local strapi with graphQL,in the playground works just fine.
But i try to do the same request with same query from my FE app and i get this message with code error 400
{
"errors": [
{
"message": "Field \"ressourcePost\" is not defined by type \"MarketingRessourcePageFiltersInput\".",
"locations": [{ "line": 5, "column": 21 }],
"extensions": { "code": "GRAPHQL_VALIDATION_FAILED" }
}
]
}

Google Knowledge Graph API `articleBody` field missing from `detailedDescription`

Following the sample request for Taylor Swift shown here, I get the following response which does not match the response shown on the site. Moreover, I'm interested in the articleBody of the detailedDescription field which is not being returned the same way. Has there been an update to the API that was not reflected in the documentation? Is there a way to request the articleBody via the Python API?
{
"#context": {
"#vocab": "http://schema.org/",
"goog": "http://schema.googleapis.com/",
"EntitySearchResult": "goog:EntitySearchResult",
"detailedDescription": "goog:detailedDescription",
"resultScore": "goog:resultScore",
"kg": "http://g.co/kg"
},
"#type": "ItemList",
"itemListElement": [
{
"#type": "EntitySearchResult",
"result": {
"#id": "kg:/m/0dl567",
"name": "Taylor Swift",
"#type": [
"Thing",
"Person"
],
"description": "American singer",
"image": {
"contentUrl": "http://t0.gstatic.com/images?q=tbn:ANd9GcST848UJ0u31E6aoQfb2nnKZFyad7rwNF0ZLOCACGpu4jnboEzV",
"url": "https://en.wikipedia.org/wiki/Begin_Again_(Taylor_Swift_song)"
},
"url": "http://taylorswift.com/"
},
"resultScore": 1237.141968
}
]
}

Crm Update productsubstitutes gets 502 error within logic app

I am trying to update existing productsubstitutes entities in Dynamics CRM Online within a Logic App.
I make lookups on the products that should be linked and than use the connector to send the following data:
{
"host": {
"connection": {
"name": "/subscriptions/XXXX/resourceGroups/XXX/providers/Microsoft.Web/connections/dynamics_crm_dev"
}
},
"method": "patch",
"path": "/datasets/XXX.crm4/tables/productsubstitutes/items/ITEMID",
"retryPolicy": {
"type": "None"
},
"body": {
"ItemInternalId": "ITEMID",
"_productid_value": "1f2017c1-b9e8-40db-9e15-c890b127e7b2",
"_salesrelationshiptype_label": "Interchangeable",
"_substitutedproductid_value": "4e1d1dd7-b9e8-40db-9e15-c890b127e7b2",
"direction": 0,
"productsubstituteid": "839229d1-b9e8-40db-9e15-c890b127e7b2",
"interchangability": 928350000,
"type": 928350000
}
This results in the strange error message:
"statusCode": 502,
"headers": {
XXX
},
"body": {
"error": {
"code": 502,
"source": "logic-apis-westeurope.azure-apim.net",
"clientRequestId": "XXXX-XXX-4b5c-a4d5-XXXX",
"message": "BadGateway",
"innerError": {
"status": 502,
"message": "The other row for the product relationship is not available.",
"source": "XXXX.crm4.dynamics.com",
"errors": [],
"debugInfo": "XXXX-XXX-4b5c-a4d5-XXXX"
}
}
}
Both product IDs: 4e1d1dd7-b9e8-40db-9e15-c890b127e7b2 and 1f2017c1-b9e8-40db-9e15-c890b127e7b2 are correct and where obtained via lookups before the update requests.
This problem is reproducible, and as it looks its only happening on particular products.
Edit:
I rebuilt the update within a small C# component with the XRM SDK and I am getting the same error.
So its definitely crm related.
Edit2:
I have a MS ticket open they are aware of the issue.. and will come back on it on the 23.08 days.

Unable to hit url by HttpPOST in actionable cards in microsoft teams

I am trying to make a Actionable Message for Microsoft Teams with an ActionCard.
I want to hit a url by HttpPost. When I hit the url, I got the error message:
Failed to send
There was a problem submitting your changes. Try again in a minute.
I followed Microsoft's documentation and according to the documentation my code is right. I am very confuse why this error is coming up.
This is the ActionCard I'm using:
{
"#type": "ActionCard",
"name": "Selector",
"inputs": [{
"#type": "MultichoiceInput",
"id": "list",
"title": "Select a status",
"isMultiSelect": "false",
"style": "expanded",
"choices": [{
"display": "In Progress",
"value": "1"
},
{
"display": "Active",
"value": "2"
},
{
"display": "Closed",
"value": "3"
}
]
}],
"actions": [{
"#type": "HttpPOST",
"name": "Save",
"body": "value={{list.value}}",
"target": "https://www.google.com"
}]
}
Microsoft Teams is surfacing an error because you're call resulted in an error.
Your code looks fine but your target URL (Google.com) isn't valid. You can't make an POST request to https://www.google.com. Attempting to do so results in a Error 405 (Method Not Allowed).
Making an HttpPOST requires a target that is willing to accept it and return some type of 2xx Success response. Typically it will be 200 OK but some APIs get more granular with their responses (201 Created, 202 Accepted, etc.).

Mailchimp API v3 add merge field with checkboxes

I need to add checkboxes merge-field with choices to a list.
API key is valid, other requests work and I'm doing such request:
POST https://us12.api.mailchimp.com/3.0/lists/424242/merge-fields
Body: {"name": "provider_accounts", "type": "checkboxes", "options": { "choices": ["BMW", "Audi", "Toyota"]}, "tag": "provider_accounts"}
And I got an error for some reason!
{
"type": "http://developer.mailchimp.com/documentation/mailchimp/guides/error-glossary/",
"title": "Invalid Resource",
"status": 400,
"detail": "The resource submitted could not be validated. For field-specific details, see the 'errors' array.",
"instance": "",
"errors": [
{},
{}
]
}
BTW if I change the type to radio request works and new merge-field is created.

Resources