everybody!
I'm trying to assign topics to Knowledge articles through REST API in Salesforce. According to the documentation (Topic and Article Assignments) it's possible, but when I try to run the example from the documentation using the URL
https://myInstance.my.saleforce.com/connect/topics/data-category-groups/dataCategoryGroup/data-categories/dataCategory/articles
with the following request body:
{
"operation": "AssignTopicsToArticle",
"topicNames": ["API", "REST"]
}
I get an error:
{
"errorCode": "POST_BODY_PARSE_ERROR",
"message": "Invalid value for article topic operation type: AssignTopicsToArticle"
}
Could you please tell me in which direction should I dig?
Thank you in advance!
Related
When using the directoryObjects/validateProperties API for creating/validating AD Group properties, a 400 error is returned indicating 'Invalid entity provided. Supported entities include: Group'. I have confirmed that the only entityType I am providing in the request is 'Group' or 'group'.
{ code: 'Request_BadRequest',
message:
'Invalid entity type provided. Supported entities include: Group.',
innerError:
{ 'request-id': '4949163f-43c4-42e8-b016-436af61e4eb5',
date: '2020-06-11T10:29:08' } } }
The error occurs in both /v1.0 and /beta versions of the MS Azure AD API, with the body/payload stringified or not.
Not exactly sure what is expected. Can someone please provide assistance on this? Thanks.
I have validated the properties by using the same JSON Data from the document in the Graph explorer and it worked for me.
This is the below data which I have given
{
"entityType": "Group",
"displayName": "Myprefix_test_mysuffix",
"mailNickname": "Myprefix_test_mysuffix",
"onBehalfOfUserId": "1ab4e79f-5f52-44b8-8c72-7d03c05e6ff4"
}
And I am hitting the V1.0 endpoint
https://graph.microsoft.com/v1.0/directoryObjects/validateProperties
Try with my sample copying it change the onBehalfOfUserID to your userID and hit the same Http call in Graph Explorer.
Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 2 years ago.
Improve this question
We tried Form Recognizer custom training, with these steps (API 2.0)
https://pnagarjuna.wordpress.com/2020/01/07/azure-form-recognizer-service-custom-model-training-steps/
The Training modell is success (201), but after Check Custom Model Status we got this error
{ "modelInfo": { "modelId": "f17bd306-3c6a-4067-8ef1-5f2e6ced79e1", "status": "invalid", "createdDateTime": "2020-02-05T17:24:30Z", "lastUpdatedDateTime": "2020-02-05T17:24:31Z" }, "trainResult": { "trainingDocuments": [], "errors": [{ "code": "2014", "message": "No valid blobs found in the specified Azure blob container. Please conform to the document format/size/page/dimensions requirements." }] }}
We also check
https://learn.microsoft.com/en-us/azure/cognitive-services/form-recognizer/overview#custom-model
and everything is okay.
How can go further?
Thank you!
Gabor
Could you check if the prefix value in your post train request is consistent with the path in your azure blob container? If you put the sample files under the root path of your blob container, then give an empty string for prefix. As train and get trained model request are asynchronized in form recognizer v2.0, so some post request argument related error can only be fetched via get trained model request.
#Nini,
Could you provide an example for prefix value?
I face the same issue like author does.
I use 2.0 API version.
I generated SAS for whole container, the I use the next request in order to train custom model
{
"source": "https://{resourcename}.blob.core.windows.net/{containername}?sp=rl&st=2020-02-13T11:19:53Z&se=2021-02-14T11:19:00Z&sv=2019-02-02&sr=c&sig={signature}",
"sourceFilter": {
"prefix": "/USMF/VendorInvoices/Vendor - 1001/",
"includeSubFolders": false
},
"useLabelFile": false
}
target folder URI:
https://{resourcename}.blob.core.windows.net/{container name}/USMF/VendorInvoices/Vendor - 1001/
Response body:
{
"modelInfo": {
"modelId": "4e23f488-d8db-4c98-8018-4cd337d9a655",
"status": "invalid",
"createdDateTime": "2020-02-13T12:07:52Z",
"lastUpdatedDateTime": "2020-02-13T12:07:52Z"
},
"keys": {
"clusters": {}
},
"trainResult": {
"trainingDocuments": [],
"errors": [{
"code": "2014",
"message": "No valid blobs found in the specified Azure blob container. Please conform to the document format/size/page/dimensions requirements."
}]
}
}
If I keep training data set under root and therefore the prefix value is empty string then everything is OK.
Thank you for reporting this.
Any chance you can switch from policy defined SAS token (one with sig={signature}) to sas token with explicit permissions? (one with sp={permissionenum})
Could you explain your thought in details?
Here is what I did.
I generated the SAS token without applying any access policy. SAS is generated for whole container. I just chose Read, List permissions from the list and expiration date.
I am wondered that if I keep training data set under root folder then everything is OK. But when I put files under folder structure then the form recognizer service can't find those files.
The question has been resolved.
It's not an service issue definitely.
First of all, my prefix shouldn't contain '/' symbol at the beginning.
Another important point is the prefix is case sensitive.
In my case I've uploaded file with "USMF/VendorInvoices/Vendor - 1001/" prefix but requested model training with "usmf/VendorInvoices/Vendor - 1001/". So, this led to the error message - No valid blobs found in the specified Azure blob container. Please conform to the document format/size/page/dimensions requirements.
I want to implement URL for search specific data in my base using filterByFormula
below are my link and I got an error and how to resolve that
my url:
api.airtable.com/v0/APPID/Stories?filterByFormula=(FIND(“Car (in robot form) will offer a hug when I am stressed out”,{User want}) &api_key=MYKEY
Error :
{
"error": {
"type": "INVALID_FILTER_BY_FORMULA",
"message": "The formula for filtering records is invalid: Invalid formula. Please check your formula text."
}
}
I tried using postman, please help me.
While querying filtered data from Airtable via API, you don't have to use FIND keyword. You can filter data with simple Airtable formula like structure. For example,
{Email} = 'johnwick#neverdie.com'
Above filter retrieve all the records from the table whose Email is simply johnwick#neverdie.com
To limit number of records retrieve by API maxRecord parameter is available for that. For more info about various parameters please refer my answer here AirTable API Find record by email or official Airtable API Documentation
In your case
API url would be structured like,
api.airtable.com/v0/APPID/Stories?filterByFormula=Car+(in+robot+form)+will+offer+a+hug+when+I+am+stressed+out%3D%22User+want%22&api_key=MYKEY
For more info about Airtable API encoding, check this https://codepen.io/airtable/full/rLKkYB?baseId=app1C5TVoophmmr8M&tableId=tblvILr4aSAYI98oa
Hope this helps!
Is there a way to make a POST request to query google datastore and get back results? I know there's a way to do this with BigQuery, but I'm unable to find a way to query DS.
Google API docs mention the runQuery request but that doesn't come back with the results.
https://cloud.google.com/datastore/docs/reference/rest/v1/projects/runQuery#QueryResultBatch
To be more specific, I get the response below when I call runQuery:
Request body to runQuery
{
"gqlQuery": {
"allowLiterals": true,
"queryString": "SELECT * from Products where name > 'App' "
}
}
Response body
"batch": {
"moreResults": "NO_MORE_RESULTS",
"endCursor": "CgA=",
"entityResultType": "FULL"
}
My expectation was that the batch object should have the results.
Would appreciate any help!
Thanks,
Sammy
Im using the Microsoft Graph to get calendar event with application permission. It works perfectly. Now Im trying to set up a subscription to listen to event changes however the normal v1.0 do not suport this. However beta, at least in the description, say it works.
From the page: https://graph.microsoft.io/en-us/docs/api-reference/beta/api/subscription_post_subscriptions
"Note: the /beta endpoint allows Application permissions as a preview feature for most resources."
So I tried this with the URL:
https://graph.microsoft.com/beta/subscriptions
Sending in a json object like this:
{
"changeType":"created,updated,deleted",
"notificationUrl":"https%3A%2F%2FXXX.com%2Fo365.php",
"resource":"%2Fusers%2Fooom%40xxx.com%2Fevents",
"clientState":"1486588355561",
"expirationDateTime":"2018-11-20T18:23:45.9356913Z"
}
Doing this I get the result:
{
"error": {
"code": "BadRequest",
"message": "Resource not found for the segment '/users/room#xxx.com/events'.",
"innerError": {
"request-id": "d9ca58b1-ee1f-4072-81d5-0f1a25dcdd45",
"date": "2017-02-08T21:26:51"
}
}
}
I have tried all types of combos in the resource but cant get it to work.
Anybody that have an idea on how to do this?
The value of json properties don't need to be url encoded. The resource also doesn't need a '/' in front of "users" (although this isn't what is causing your issue).
Try changing your JSON to:
{
"changeType":"created,updated,deleted",
"notificationUrl":"https://myurl.com/o365.php",
"resource":"users/person#myemail.com/events",
"clientState":"1486588355561",
"expirationDateTime":"2018-11-20T18:23:45.9356913Z"
}
Feel free to respond back if this doesn't address the issue.