Clear complete Table for custom entity via App? - shopware

Is it possible to clear the complete table via an App through the API for a custom entity?
I tried a DELETE but get an error message: Method Not Allowed (Allow: GET, POST)
The documentation states, that its not needed to set the permission in the xml for the own entity. And I can see that also the delete permission is set when looking at the permissions from the App.
How can I achieve this?
Thanks,
Danny

You can use the sync endpoint to mass-delete records but you will still need the ids for all the records to be deleted. There is no way to truncate a table via the api if that is what you're looking for.

Related

Query using SharePoint REST API using Author/EMail

I running into an issue with filtering using the Autor/EMail field in REST API. The query works fine when the List in Not Throttled. But we get Throttling exception when the List is throttled (>5000). The Created By Column is Indexed was well.
https://example.org/sites/dev/rnd/_api/web/lists/getbytitle('Favs')/items?$Select=ID,ItemId,ListName,Author/EMail&$Expand=Author&$Filter=Author/EMail eq 'john.smith#org.com'
After couple of trial and error I found that Author/Email is not the correct field to use. Instead we need to use Author/Id. The Id would the site user id and we can get the value from the property _spPageContextInfo.userId
Hope this helps somebody.

logging request and response while using netsuite suitetalk

is it possible to print/log the request response while using the Netsuite API, is there any property we need to set in the nsclient.properties file that might help.
I am trying to find this so that while integrating with NetSuite, in case of any issues, I don't have to go check the API request/response logs in NetSuite.
regards,
Moin
Requests and responses are logged within NetSuite itself. You need to have the Admin role to see them.
I don't think so. I'm not pretty sure that there is any inbuilt feature in NetSuite that allows you to log the request and response of your deployed Restlet. In Netsuite there is a method called :
nlapiLogExecution(logType, title, details)
Which you can use for temporal logging/Debugging. However, it doesn't persist your logging data permanently, so you can't use the same later. Yeah, Of-course you can find many workarounds to get your task done. Create a custom record with appropriate fields for logging then inside your restlet you can write the code to create a log file for each req/resp.

Add special via foursquare api, got code 200 but special doesn't show up

I am trying to add a special via the foursquare api Add special endpoint.
I am generating a proper POST request and getting a similar response to what the api should return. But it still wont show up on the specials on foursquare.
Do I need to add a campaign too for it to show up?
This is the response object I am getting:
{"meta":{"code":200},"notifications":[{"type":"notificationTray","item":{"unreadCount":0}}],"response":{"special":{"id":"51ed8c2a498e821be0469850","type":"friends","status":"New
- in review","count1":10,"name":"Friends Special...!","text":"Everyone gets free cookies??","unlockedText":"hgc","autoRedeem":false}}}
Any ideas on what needs to be done?
PS: I am able to add a special manually on foursquare!!
This venue is an office and according to this api doc offices and homes aren't allowed to add specials. This is a bit of a conflict.
Is it that offices are not allowed to add specials only via the API since I am able to create a special manually on foursquare.
Alright so, got the answer.. Create a special then create a campaign works!!
But I'm still wondering how I was able to add a special when the documentation clearly says that homes and offices aren't allowed to do so!

Client Object Model access to Custom User Properties

I've setup up a custom user property via central admin and set the value on a couple of my users. That said when I query the User Information List using Query Builder I'm not seeing values for the field. I've even tried specifying the fields to return via ViewFields.
Anyone have any experience with this? Any other suggestions?
Thanks!
Casey
i've also searched a while, but the closed i came to was this... i ended up using the UserProfileService instead, like described in this article.

Data in custom attribute not returned in UserProfile object in MOSS

I've created two new custom attributes in the UserProfile. When the service we wrote returns data about a specific user by using the UserProfile object, sometimes the data isn't returned, even though if we look at the user in SSP it look populated. Some users work; this is the first user we set up with data. I'm not sure if sometime in the meantime after setting up the first user and testing, if there's something we ran and need to run again. How can I get all the users to get their data returned in a call to their UserProfile?
It may be a language issue, perhaps you can detect a pattern in working/not working users and their language?
Have you looked at the visibility of the custom attributes? Is it possible that it's a question of who is supposed to be able see the attribute that is causing your issue?
It could be connected to when the profile was created and when the attributes were added.
Is there any pattern to which users work and which do not?
Try creating a new user, and see if the attributes are available for that user.

Resources