Discussions
Ipdate multiple URLs at a time
Hi,
I am able to add the URL with the below code using Jupyter. Is there a way to update the existing URL instead of adding new one? And also I am trying to update multiple ActorId's at a time.
update_payload = {
'Properties': ['Id','ActorId','ActorTypeId','DocUrl','StorageTypeId','Title','DocType.Id'],
"Entity": {
'StorageTypeId': 'URL',
'DocUrl': 'www.yahoo.com',
'Title': 'www.yahoo.com',
'DocType': {'Id': 30},
'ActorTypeId': 'WO',
'ActorId': 10537
}
}
Hi,
We can use PUT method to update existing URL, here is a sample;
{
"Properties": [
"Id",
"Docurl"
],
"Entity": {
"DocUrl": "https://cdn.pixabay.com/photo/2022/02/05/08/13/tulip-6994245_1280.jpg",
"Id": 3352
}
}
We can use Batch API to update multiple documents:
here is a sample:
POST /api/v1/Batch/Update HTTP/1.1
Host: am-ce917.corrigo.com
[
{
"EntityType": "Document",
"Properties": [
"Id",
"Docurl"
],
"Entity": {
"DocUrl": "https://cdn.pixabay.com/photo/2022/02/05/08/13/tulip-6994245_1280.jpg",
"Id": 3352
}
},
{
"EntityType": "Document",
"Properties": [
"Id",
"Docurl"
],
"Entity": {
"DocUrl": "https://cdn.pixabay.com/photo/2022/02/05/08/13/tulip-6994245_1280.jpg",
"Id": 3353
}
}
]
Hi Li,
The below code works in Jupyter to add URL. Usually with few modifications the same code should work in Alteryx as well but the below code doesn't work in Alteryx, any suggestions?
Jupyter:
{
'Properties': ['Id','ActorId','ActorTypeId','DocUrl','StorageTypeId','Title','DocType.Id'],
"Entity": {
'StorageTypeId': 'URL',
'DocUrl': 'www.yahoo.com',
'Title': 'www.yahoo.com',
'DocType': {'Id': 30},
'ActorTypeId': 'WO',
'ActorId': 10537
}
}
Alteryx:
"{
'Properties': ['ActorId','ActorTypeId','DocUrl','StorageTypeId','Title','DocType.Id'],
'Entity': {
'StorageTypeId': 'URL',
'DocUrl': 'www.yahoo.com',
'Title': 'www.yahoo.com',
'DocType': {'Id': 30},
'ActorTypeId': 'WO',
'ActorId': 10537
}
}"
ο»Ώ