Is there an endpoint to batch get urn:li:digitalmediaAsset in the LinkedIn API? - linkedin

We are doing a rest/posts?author={MY_ORG} request against the LinkedIn Api (version 202211). Some of the posts returned contain content referenced with urn:li:digitalmediaAsset for which we need the download URL.
When I encounter urn:li:image or urn:li:video I can do a BATCH get to fetch additional details about the assets. I'd like to do the same thing for urn:li:digitalmediaAsset. I haven't seen an endpoint for that - does it exist?
I understand, that I can use a projection here but, I'd like to align with the code that I have for images and videos if the endpoint exists. In other words, I am looking for an alternative to using projections.

Related

How to link from browser to Paw.app?

I am using the Paw app for testing API calls to many different endpoints. We have our own admin web app where we can lookup endpoints that I want to test. Now I am copying the URL and pasting it into Paw and then copying the username or API key separately.
It would be awesome if I could add a custom "Open in Paw" link, that prefills the endpoint and auth details. Paw itself uses a "paw://" link for their new serial number registration.
Is it possible to use that schema to do this?
I could not found any documentation on this.
It is possible to use paw:// schema for the custom link.
It should start with either paw://current.document/open? or paw://new.document/open?
Then you can choose to open text or URL and give it a url-encoded value like text=curl%20-X%20%22GET%22%20%22https:%2F%2Fecho.paw.cloud%2F%22%20%5C%09-H%20%22Cookie:%20sessionid%3Dvr3qftico4qeri1l21mayf40axdyidlt%22
Then choose one of our importers from https://paw.cloud/extensions?extension_type=importer for importing the format of your text/url-resource and include the identifier in the link &importer=com.luckymarmot.PawExtensions.cURLImporter
So the full link can look like this paw://current.document/open?text=curl%20-X%20%22GET%22%20%22https:%2F%2Fecho.paw.cloud%2F%22%20%5C%09-H%20%22Cookie:%20sessionid%3Dvr3qftico4qeri1l21mayf40axdyidlt%22&importer=com.luckymarmot.PawExtensions.cURLImporter

What will the RightSignature API send to my callback URL when a signer signs a document

When I send a one-off document to RightSignature via their API, I'm specifying a callback location in the XML document as specified in RightSignature's schema definition. I then get a signer-link value back from their API for the document. I display the HTML response from the signer-link URL in an iFrame on our website. When our user signs the document in this iFrame, which is rendering the responses from their website, I want their website to post to our callback location.
Can I do this with the RightSignature API and does it make sense?
So far, I'm only getting content in the iFrame that indicates that the signing was successful. The callback location does not seem to be getting called.
I got it solved just now. Basically, i was doing two things wrong first you have to go in RightSignature Account and set it there the CallBack url
Account > Settings > Advanced Settings
But the thing which RS is unable to mention to us that this url can not be of localhost, but it should be of https i mean like Live URL of your site like
https://stagingmysite.azurewebsites.net/User/CallBackFunction
And then in your CallBack just write these two lines and you will receive complete XML which would have the GUID and document status as well.
byte[] data = Request.BinaryRead(Request.TotalBytes);
string callBackXML = System.Text.Encoding.UTF8.GetString(data);
I found the answer with some help from the API team at RightSignature. I was using callback_location but what I really wanted is redirect_location. Their online documentation was difficult to follow and did not clearly point out the difference.
I got this working after a lot of trial and error.

How to make POST request using OAuth via Youtube API?

I am trying to get this thing to work for a couple days since it's my first time working with the OAuth system without any luck.
I have been experimenting here: https://developers.google.com/youtube/v3/docs/subscriptions/insert#try-it
With the following settings:
http://i.gyazo.com/5cd28f1194d5dfebee25d07bc0db965e.png
When I execute the code it successfully subscribes to the specified channelIdaccount with the authorized account.
I have tried to copy paste the shown POST URL into my browser without any luck. The plan was just to test it as I would like to implement this in PHP.
Now to my questions:
The {YOUR_API_KEY}, is this where I am supposed to type in the access token? If so, do I need the &mine=true tag at all?
I just realized that there are no ID's in the URL but there is an JSON-object in the request box example. Am I supposed to convert a string to JSON-object and pass it to the $fields= tag?

How can I post new comment with Graph API into Social Comments Box?( http)

I want to comment on post with graph api
but dont work graph api
https://graph.facebook.com/id/comments?access_token=&message= test
Sadly I don't know how to use the Facebook Graph API, or HTTP, but I googled for how to post comments, and found this in the API documentation:
Publishing
You can publish new comments to any object as below:
POST /v2.2/{object-id}/comments HTTP/1.1
Host: graph.facebook.com
message=This+is+a+test+comment
Permissions
A user access token with publish_actions permission can be used to publish new comments.
The same user must also be able to comment on the object.
The can_comment field on individual comment objects indicates whether it is possible to reply to that comment by
publishing another.
You might be able to use this, but change the message to whatever specifies your graph.
However, keep in mind that this might not work, because I have no experience with the Facebook Graph API. I found this in the documentation.

Sample rest url to retrieve content from alfresco

I want to retrieve content of sample.html inside catalog folder in alfresco using restful.
From alfresco document i got the following rest url to retrieve content of a document. But i dont know exactly what is property, stor_type, store_id,id and attach.
GET /alfresco/service/api/node/content{property}/{store_type}/{store_id}/{id}?a={attach?}
It would be grateful if someone explains me the above rest url properties and provide me a example.
The CMIS Web Scripts Reference and the Repository RESTful API Reference give a little more information (but no examples).
property is the property of the node to follow in order to obtain the content - this will default to cm:content so can generally be omitted
store_type will normally be "workspace" for live application data - see this forum discussion on store types etc
store_id will be "SpacesStore" for normal files - see this forum discussion on other stores
id is the unique identifier for the node (within a given store), e.g. 986b162e-0867-4a7b-9f4f-0e3837cdc97b
attach - if true, force download of content as attachment (defaults to false) - I think this is to trigger "Save as..." in a browser rather than directly streaming the content?
Example GET URL (untested - and of course you'd need to use a valid host, port and id)
http://my.example.com:8080/alfresco/service/api/node/content/workspace/SpacesStore/986b162e-0867-4a7b-9f4f-0e3837cdc97b
Together, the store_type, store_id and id form a NodeRef which uniquely identifies a node, e.g.
workspace://SpacesStore/f1a5e908-80cb-4c6e-b919-cc80fe53b835
There are a couple of examples (though not of this exact API call) on Jeff Potts' tutorial on Curl and web scripts.
If you want to download a file by name and path (without already knowing the node ID) then you will need to use another API, as the one you are using requires you to know the node ID.
This page mentions a direct download URL that accepts a path and filename, e.g.
/alfresco/download/direct?path=/Company%20Home/My%20Home%20Space/myimage.jpg
Depending on access controls, you may need to add the login ticket parameter to this URL, e.g. &alf_ticket=1234567890, where 1234567890 is the security ticket provided by the login URL.
Note: although I refer to the CMIS Web Scripts Reference above, see also this posting and Jira ticket that state that CMIS web script URLs are deprecated, i.e. ( /alfresco/service/cmis and /alfresco/cmis)

Resources