Delete Akeneo attribute/entities values by API - akeneo

I need to delete some attribute values from Akeneo using API.
In the documentation I can't find any example on how to delete attribute and entities possible values.
This is the link of the documentation that I'm looking:
https://api.akeneo.com/api-reference.html#Referenceentityrecord
How can I deal with the DELETE of these values ?
Thanks to support

There is no API endpoint to remove an attribute or a reference-entity record (and more generally, if there is nothing in the doc it means it doesn't exist)

Related

When updating a model on a RESTful API, should there be an update endpoint per field? or one endpoint for the model?

For a RESTful API, consider a model schema as follows:
MyCoolObject {
field_a
field_b
field_c
}
Is it better to create one update endpoint to update one or many fields on the model (PUT)? Or create one endpoint per field that would only update that one field (PATCH)?
Heuristic: how do you GET the information from your API?
Typically if you get the information a single resource with all of the information included in its representation...
GET /my-cool-object
Then you should also edit that information using the same resource
PUT /my-cool-object
PATCH /my-cool-object
POST /my-cool-object
In cases where you get the information from multiple resources (presumably via links)
GET /my-cool-object
GET /my-cool-object/a
GET /my-cool-object/b
GET /my-cool-object/c
Then you would normally edit the information in its own resource
PUT /my-cool-object/a
PATCH /my-cool-object/a
POST /my-cool-object/a

External access settings for Office 365 groups

I'm trying to update GroupSettings of individual O365 Group, however I always get error
Resource 'guid' does not exist or one of its queried reference-property objects are not present.
A code I'm using to update the group settings
var graphResult = graphClient.GroupSettings[guid].Request().UpdateAsync(groupSetting).GetAwaiter().GetResult();
I've tried to use Group guid as well as GroupSettings guid, none of that worked.
I can set the settings for the first time (overwrite defaults) using codde below, but update doesn't work afterwards.
graphResult = graphClient.Groups[guid].Settings.Request().AddAsync(groupSetting).GetAwaiter().GetResult();
Any idea what can be wrong please?
Thanks
You should use GroupSettings guid here.
I can repro your issue when I use an incorrect guid here.
You should firstly use GET https://graph.microsoft.com/v1.0/groupSettings to find the GroupSettings guid of the GroupSetting you want to update.
Please note that you should include all the values in the request body even though you don't want to update some of them.
Then you could put it as the guid in your code.
It's stronly recommended to have a quick test in Microsoft Graph Explorer.
Since documentation doesn't say how to update settings for particular group, here it is: you need to use both IDs in call
graphResult = graphClient.Groups[groupGuid].Settings[settingsGuid].Request().UpdateAsync(groupSetting)

Apache Zeppelin: get built in table data in code

Apache Zeppelin 0.8.0 allow to modify data in cells in built-in table.
I assume new values are linked to some variable inside angular scope.
How can I find out what is the name of this variable, so I'd be able to read it in the next paragraph using zeppelin context:
z.angular("tableData??")
Is it possible to get all variables available in zeppelin context?
Any suggestions appreciated.
As for now I've found an indirect way of doing it. It's a bit tacky way, so I'm still looking for better solution.
In the example below I'm implementing simplified scenario, where I just need to remove selected lines.
There are few features I'm using:
Table grid allow to incorporate html into the cells.
%spark.sql
select product, price, '%html <input class="input_data" ... />' from table_a
Unfortunately it's impossible to use %angular inside table, so I've requested this feature: ZEPPELIN-3068
Using this feature we can add another column into the table with any html element (checkbox, input field or external link). I can use selected variables from table to generate unique ids.
It can even be a small form with POST request to web-service that will immediately perform requested changes.
Next paragraph will contain javascript that read data from html elements we've created above and store it in zeppelin context.
%angular
document.getElementsByClassName("input_data")
ps. if anyone need code, I can add full script.

How to move all documents from one collection to a new one with no routing key specified (6.3.0)

Have a collection c1 that has 400,000 documents and c2 with no documents (new collection).
No routing key is specified in either collection.
Trying to use the migrate Collections API endpoint found/described
in the documentation.
Since no routing key is specified I'm not sure what to use for the split.key parameter. I have found this thread that mentions that a split.key=! should encompass all documents. This has not proven true in my tests.
Here is my attempted url: http://solr.node:8983/solr/admin/collections?action=MIGRATE&collection=c1&split.key=!&target.collection=c2&async=1
This has not worked, and I have tried many iterations of the split.key parameter with no avail. Have tried blank, a!, id!, id, compositeId and none of them have migrated any documents to the c2 collection.
How does the Migrate function work with no specified routing key? Is there a default value to use to grab all documents that will actually work?
Thank you!
Edit: since no routing key was specified the current router is compositeId as solr does that when it is not specified.
I have the same question with you. I would like to get the answer too.
I only get some answer from SOLR guide.
split.key
The routing key prefix. For example, if the uniqueKey of a document is "a!123", then you would use split.key=a!. This parameter is required.
reference: https://solr.apache.org/guide/8_6/collection-management.html

Change type of Datastore field to Text from String?

I can't seem to do this. The list that the app engine datastore viewer does not contain Text as an option. I had to change my fields because some of my values were too long for String, but now I can't retroactively fix my old entries.
To change the property type used by the old entities, you need to manually update each of them.
This can be easily and efficiently accomplished using the mapper API. This guide explains how to use this API.
You may also want to read this blog post by Nick Johnson.
You don't have to fix your old entries. The old ones should work as is, and the new ones just won't be indexed.
See
http://groups.google.com/group/google-appengine/browse_thread/thread/282dc825f9c46684 .

Resources