IBM Connection changing document owner - connection

Hi I'm trying to change the document owner of a document located in a connection library (v 5.5), I'm still waiting for a reply from IBM but probably is going to take too long for me, that's why I'll try to reverse engineer.
I tried with the standard editor POST request changing Editor to Owner:
http://ecm2mydomain.com/dm/atom/library/{id}/document/{id}/members/feed?membershipTimestamp=1456418747000
<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<isSecurityInherited xmlns="urn:ibm.com/td">false</isSecurityInherited>
<entry>
<role xmlns="urn:ibm.com/td">Reader</role>
<uid xmlns="urn:ibm.com/td">$IC-T-I-a</uid>
<securityAction xmlns="urn:ibm.com/td">ADD</securityAction>
</entry>
<entry>
<role xmlns="urn:ibm.com/td">Reader</role>
<uid xmlns="urn:ibm.com/td">$IC-C-M-e43da535-c2bb-4206-9d04-637ad878374b</uid>
<securityAction xmlns="urn:ibm.com/td">ADD</securityAction>
</entry>
<entry>
<role xmlns="urn:ibm.com/td">Owner</role>
<uid xmlns="urn:ibm.com/td">id</uid>
<securityAction xmlns="urn:ibm.com/td">ADD</securityAction>
</entry>
</feed>
it returns:
404
and is not working, do you have any idea?

I found the solution to the problem, is not possible to change the owner since the document on CCM will be owned by community group and the creator of the document.
If you want to add somebody as document owner you have to add it to the community owner group, the original creator is only readable!

Related

Batch Delete Videos From YouTube Favorites Playlist

I am trying to batch delete videos from the user his YouTube favorites using the YouTube v2 API. (See also https://developers.google.com/youtube/2.0/developers_guide_protocol_batch_processing)
Posting videos to the favorites in batch works nicely; and I can also remove single videos from the favorites without problem (This rules out a problem with authentication).
My request body is as follows, where VIDEOID1 and VIDEOID2 are the <yt:favoriteId>Ids found in their corresponding video xml:
<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns='http://www.w3.org/2005/Atom' xmlns:media='http://search.yahoo.com/mrss/' xmlns:batch='http://schemas.google.com/gdata/batch' xmlns:yt='http://gdata.youtube.com/schemas/2007'>
<batch:operation type="delete"/>
<entry><id>VIDEOID1</id></entry>
<entry><id>VIDEOID2</id></entry>
</feed>
This is the response I get back however, where UserID ofcourse is the userID of the user and BatchID is the BatchID given by the service:
<?xml version='1.0' encoding='UTF-8'?>
<feed xmlns='http://www.w3.org/2005/Atom'>
<id>https://gdata.youtube.com/feeds/api/users/USERID/favorites/batch/BATCHID</id>
<updated>2014-01-31T14:50:54.948Z</updated>
<category scheme='http://schemas.google.com/g/2005#kind' term='http://gdata.youtube.com/schemas/2007#favorite'/>
<title>Batch Feed</title>
<entry xmlns:batch='http://schemas.google.com/gdata/batch'>
<id>VIDEOID1</id>
<updated>2014-01-31T14:50:54.948Z</updated>
<title>Error</title>
<content>Invalid entry Id/Uri</content>
<batch:status code='400' reason='Invalid entry Id/Uri'/>
</entry>
<entry xmlns:batch='http://schemas.google.com/gdata/batch'>
<id>VIDEOID2</id>
<updated>2014-01-31T14:50:54.949Z</updated>
<title>Error</title>
<content>Invalid entry Id/Uri</content>
<batch:status code='400' reason='Invalid entry Id/Uri'/>
</entry>
</feed>
It states Invalid entry Id/Uri for the videos I try to remove, while when I remove them by singular delete request with the same ID, it works.
Is batch deleting videos from favorites not supported, or am I missing something?
I've got it to work, thanks to this question and answer: Batch deleting videos using YouTube API and HTTpWebRequest
The trick was using the user its userId instead of default, and to use to complete video URL as id.
The batch URL looks like this:
https://gdata.youtube.com/feeds/api/users/USERID/favorites/batch?v=2&alt=json
The request looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns='http://www.w3.org/2005/Atom' xmlns:media='http://search.yahoo.com/mrss/' xmlns:batch='http://schemas.google.com/gdata/batch' xmlns:yt='http://gdata.youtube.com/schemas/2007'>
<batch:operation type="delete"/>
<entry>
<id>https://gdata.youtube.com/feeds/api/users/USERID/favorites/VIDEOID1?v=2</id>
</entry>
<entry>
<id>https://gdata.youtube.com/feeds/api/users/USERID/favorites/VIDEOID2?v=2</id>
</entry>
</feed>

Cannot get records for particular meeting

Cannot figure out how to properly send request to get all records, which are corresponding to the meeting.
From this request mysite.adobeconnect.com/api/xml?action=sco-info&sco-id=1087877981
I get such response:
<?xml version="1.0" encoding="utf-8"?>
<results>
<status code="ok"/>
<sco account-id="1051298934" disabled="" display-seq="0" folder-id="1057190786" icon="meeting" lang="en" max-retries="" sco-id="1087877981" source-sco-id="1051270965" type="meeting" version="3">
<date-begin>2013-08-20T03:15:00.000-07:00</date-begin>
<date-created>2013-08-20T03:30:04.200-07:00</date-created>
<date-end>2013-08-20T04:15:00.000-07:00</date-end>
<date-modified>2013-08-20T06:39:45.927-07:00</date-modified>
<name>DevTeam Meeting 2</name>
<url-path>/devmeeting2/</url-path>
<update-linked-item>true</update-linked-item>
</sco>
<source-sco>
<source-sco account-id="1051298934" disabled="" display-seq="0" folder-id="1051270964" icon="meeting" lang="en" max-retries="" sco-id="1051270965" source-sco-id="-8888" type="meeting" version="1">
<date-created>2012-05-15T14:09:07.453-07:00</date-created>
<date-modified>2013-08-13T16:33:57.600-07:00</date-modified>
<name>Default Meeting Template</name>
<url-path>/defaultmeetingtemplate/</url-path>
</source-sco></source-sco>
</results>
Where I see folder-id="1057190786" and sco-id="1087877981", but when I'm trying to get records for this meeting, using folder-id or sco-id according to documentation with requests
mysite.adobeconnect.com/api/xml?action=list-recordings&folder-id=1057190786
or
mysite.adobeconnect.com/api/xml?action=list-recordings&folder-id=1087877981
I receive:
<?xml version="1.0" encoding="utf-8"?>
<results>
<status code="invalid">
<invalid field="action" type="enum" subcode="no-such-item"/>
</status>
</results>
You should use another API method to get the recordings. They listed in the "scos" container, "url-path" element is what you need.
You should try the sco-contents method...
/api/xml?action=sco-contents&filter-icon=archive&sco-id=1087877981
Get your meeting contents calling sco-contents
You will find your records in those sco with icon="archive"
Don't use "list-recordings" as is not available anymore.
Reference (Sep. 20, 2016)
Provides a list of recordings (FLV and MP4) for a specified folder. The service and hence the API is no longer available.
Docs here.

Intuit anywhere API telling me that a field is required when it's already specified

I am trying to create an invoice in QB for windows. Here is the XML:
<?xml version='1.0' encoding='utf-8'?>
<Add xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.intuit.com/sb/cdm/v2" xsi:schemaLocation="http://www.intuit.com/sb/cdm/V2./RestDataFilter.xsd " RequestId="1836474224e142c9ad9b7dd6cb0eaa41" FullResponse="true">
<OfferingId>ipp</OfferingId>
<ExternalRealmId>596059545</ExternalRealmId>
<Invoice>
<Header>
<TxnDate>2013-01-30</TxnDate>
<DiscountAmt>0</DiscountAmt>
<ARAccountName>Sales - Support and Maintenance</ARAccountName>
<DiscountAccountName>Discounts/Refunds</DiscountAccountName>
<DueDate>2013-02-17</DueDate>
<Currency>USD</Currency>
<CustomerId>4</CustomerId>
</Header>
<Line>
<Qty>1</Qty>
<UnitPrice>7.00</UnitPrice>
<Desc>Follow-up Test, Instant for Person138-Org3 Person138-Org3</Desc>
</Line>
</Invoice>
</Add>
Here's the response:
-2001: cvc-complex-type.2.4.a: Invalid content was found starting with element 'ARAccountName'. One of '{"http://www.intuit.com/sb/cdm/v2":DiscountAccountId, "http://www.intuit.com/sb/cdm/v2":DiscountAccountName, "http://www.intuit.com/sb/cdm/v2":DiscountTaxable, "http://www.intuit.com/sb/cdm/v2":TxnId}' is expected.
I don't understand, as I already have DiscountAccountName specified. I also tried to go with something more like the create example (same as above but with ARAccountName and DiscountAccountName removed) and got a similar response. Thanks in advance for your help.
The Intuit XML requests are validated by an XSD, and with XML validated by XSDs the order of the tags you provide matters.
That means that if the documentation (https://ipp.developer.intuit.com/0010_Intuit_Partner_Platform/0050_Data_Services/0500_QuickBooks_Windows/0600_Object_Reference/Invoice) dictates that ARAccountName comes before DiscountAmt, then you must put ARAccountName before DiscountAmt.
Switch the order of your XML tags to match the order shown in the docs, and you'll be all set.

Import custom Atom feed in PowerPivot

Question: I have created a sample xml document containing data conforming to the atom 1.0 schema. When I import the contents of this file (for testing purposes) in PowerPivot, it creates columns for each atom element in each entry, instead of creating a column per content element. Why is this?
Background: A customer wants to import data from a web service which provides a feed that uses a custom XML schema that is not supported by PowerPivot. The service provides the ability for the caller to supply an XSLT template that will be applied to the feed. I am hoping to be able to transform this feed into a valid atom feed thereby allowing the customer to import data into PowerPivot.
Sample atom xml:
<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices"
xmlns="http://www.w3.org/2005/Atom"
xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata">
<title type="text">My Data Feed</title>
<id>http://temp/feed</id>
<updated>2012-12-13T00:00:00Z</updated>
<entry>
<id>http://temp/feed/1</id>
<title type="text">Title</title>
<author>
<name>Author</name>
</author>
<updated>2012-12-13T00:00:00Z</updated>
<content type="application/xml">
<d:Name>John Smith</d:Name>
<d:Address>Address</d:Address>
<d:Zip>1234</d:Zip>
</content>
</entry>
</feed>
When imported into PowerPivot (selecting "From Data Feeds", clicking "Browse" and pointing out the xml file), it looks like this:
I was excpecting three columns: Name, Address and Zip. If I change "Include Atom Elements" from Auto to False in the connection configuration, no columns are imported.
It seems I was just missing the m:properties element. Final result - also includes examples of null attributes and data types:
<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices"
xmlns="http://www.w3.org/2005/Atom"
xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata">
<title type="text">My Data Feed</title>
<id>http://temp/feed</id>
<updated>2012-12-13T00:00:00Z</updated>
<entry>
<id>http://temp/feed/1</id>
<title type="text">Title</title>
<author>
<name>Author</name>
</author>
<updated>2012-12-13T00:00:00Z</updated>
<content type="application/xml">
<!-- attributes placed under the properties element -->
<m:properties>
<d:Name>John Smith</d:Name>
<d:Address>Address</d:Address>
<d:Zip m:type="Edm.Int32">1234</d:Zip>
<d:Comment m:null="true" />
</m:properties>
</content>
</entry>
</feed>

error posting images to my bucket in google cloud storage

I have a bucket with the acl set to Allusers and Full_control, so that users can post and retrieve images from the bucket.
. I have tried using this url (http://commondatastorage.googleapis.com/bucket/+Image.png) to post images from my app; but i get the "error 1104, the image cannot be posted with the url provided.
here is my alc for the bucket:
<?xml version="1.0" ?>
<AccessControlList>
<Owner>
<ID>
00b50024a97592382732e7e69afac5fcba343397379237323e5ebd216831a418023820874872
</ID>
</Owner>
<Entries>
<Entry>
<Scope type="AllUsers"/>
<Permission>
FULL_CONTROL
</Permission>
</Entry>
<Entry>
<Scope type="GroupById">
<ID>
00b4903a2853501162e8e89afac5fcba14239486e5ebd216831a419323059585
</ID>
</Scope>
<Permission>
FULL_CONTROL
</Permission>
</Entry>
</Entries>
</AccessControlList>
This doesn't sound like an ACL problem. Can you try without the + at the beginning of the object name? i.e. image.png rather than +image.png?
Thanks for sending me the source. Your program is written with App Inventor and does not have the Auth token.
App Inventor can get the token, but you need to know what to do.
I am working on documenting that flow for others, I'll work with you to get you going and also follow up with a working example here.
Gary

Resources