i have created site ,name as testing under that created folder test.I am uploading images under test1 as sub folder under test by using rest API.i can get noderef of site by using url http://localhost:8081/alfresco/service/api/sites/testing
it give result like this
{
"url": "/alfresco/service/api/sites/testing",
"sitePreset": "site-dashboard",
"shortName": "testing",
"title": "Sample: Web Site Design Project",
"description": "This is a Sample Alfresco Team site.",
"node": "/alfresco/service/api/node/workspace/SpacesStore/b4cff62a-664d-4d45-9302-98723eac1319",
"tagScope": "/alfresco/service/api/tagscopes/workspace/SpacesStore/b4cff62a-664d-4d45-9302-98723eac1319",
"siteManagers":
[
"admin",
"mjackson"
],
"isPublic": true,
"visibility": "PUBLIC"
}
but i tried to get children of this by giving url
http://localhost:8081/alfresco/service/api/node/workspace/SpacesStore/b4cff62a-664d-4d45-9302-98723eac1319/children
it give 404 error please help this.I am using REST API
Related
I'm trying to migrate existing code that fetches organization posts from ugcPosts API to new versioned call of the Posts API(version 202210) and I'm facing issues with getting thumbnails for articles. Response that I get from Posts API doesn't contain thumbnail URL but instead it contains thumbnail URN(old ugcPost API returned thumbnail URL as a part of the post). Here is an example of an article post that I get from API
{
"isReshareDisabledByAuthor": false,
"createdAt": 1666603988797,
"lifecycleState": "PUBLISHED",
"lastModifiedAt": 1666603988797,
"visibility": "PUBLIC",
"publishedAt": 1666603988797,
"author": "urn:li:organization:1111",
"id": "urn:li:share:2222",
"distribution": {
"feedDistribution": "MAIN_FEED",
"thirdPartyDistributionChannels": []
},
"content": {
"article": {
"description": "some description",
"thumbnail": "urn:li:image:3333",
"source": "https://example.com",
"title": "some title"
}
},
"commentary": "some comment",
"lifecycleStateInfo": {
"isEditedByAuthor": false
}
}
I tried to use Images API to fetch thumbnail URL using a call
GET https://api.linkedin.com/rest/images/urn:li:image:3333
Unfortunately Linked In API responds with code 400 and message Invalid asset owner urn type provided: urn:li:article:4444
I don't get why it happens. Token that I'm using has enough permissions to fetch organization posts(token's scope contains permissions w_member_social, r_liteprofile, r_1st_connections_size, w_organization_social, r_member_social, r_organization_social, rw_organization_admin). Article id that presents in error message isn't anyhow connected to post id. It's also not clear why that asset is referenced as urn:li:article while the post itself is described as urn:li:share. To me it looks like Linked In API bug or am I doing something wrong?
Turns out there was a bug in Linked In API which was confirmed by their support. At this moment same calls work fine with version 202210
I have the following directory structure in my Nextjs app:
pages/post/[id]/index.js
I am trying to configure Amplify to correctly route this URL:
mydomain.com/post/123
I have the following rewrite configured:
{
"source": "/post/<*>",
"target": "/post/[id]/index.html",
"status": "200",
"condition": null
},
But it isn't working. What is the correct format for the Amplify rewrite when the directory is a dynamic route?
My routes do work when running locally. I can't get it configured in Amplify.
If you want to have mydomain.com/post/123 work, then your directory needs to match this route:
pages
|
+-- post
| |
| \-- [id].js
With your directory structure, the dynamic route doesn't know which file to load since index.js is resolved for a folder route such as /posts
Creating a file with the square braces will catch your /123 route as mentioned in the next.js docs: https://nextjs.org/docs/routing/dynamic-routes
The current rewrite rule you have should work for this structure where you do something like this as the rule:
{
"source": "/post/<*>",
"target": "/post/[id].html",
"status": "200",
"condition": null
}
This one worked for me:
{
"source": "/legal/<*>",
"target": "/legal/[pid]/index.html",
"status": "404-200",
"condition": null
}
Source address
Target address
Type
Country code
/legal/<*>
/legal/[pid]/index.html
404 (Rewrite)
-
Hello I cannot manage to upload videos on linkedIn member account using V2 API
I followed the instructions described at the official page
the steps to upload a video (under 200 MB) are
Register an upload for Video
Upload the video
Check status of upload
they all worked , and the last step gives back a successful respose
{
"serviceRelationships": [
{
"identifier": "urn:li:userGeneratedContent",
"relationshipType": "OWNER"
}
],
"recipes": [
{
"recipe": "urn:li:digitalmediaRecipe:feedshare-image",
"status": "AVAILABLE"
}
],
"mediaTypeFamily": "STILLIMAGE",
"created": 1583915898789,
"lastModified": 1583916648095,
"id": "C4D22AQELBNtjd0NB2Q",
"status": "ALLOWED"
}
but the video is not displayed in the linked in account page..
I thought it needs to be shared as for the image, but the ugcPosts API does not work..
is this still a closed feature by LinkedIn?
if so how can it be granted?
Any suggestion is higly appreciated!
Hey as stated in the documentation you can use uploaded assets with their corresponding asset urn in ugcPosts (videos) or shares (images).
What got my attention in your question you register a video upload and get back
"recipes": [
{
"recipe": "urn:li:digitalmediaRecipe:feedshare-image",
"status": "AVAILABLE"
}
],
"mediaTypeFamily": "STILLIMAGE",
This indicates to me that you used the wrong recipe in the registerUpload request. It should be urn:li:digitalmediaRecipe:feedshare-video
Is there a way to retrieve versioned content of document? Possibly by native Alfresco's REST API.
The answer given by Matteo Calò is technically correct. That API does exist and it does what he says. However, that endpoint is marked with "limited support" which means you should be cautious when using it. Instead, you should prefer API's marked "PUBLIC" or use standards-based API's like CMIS, which Alfresco supports.
The CMIS browser binding can be used to get an object's content like this:
http://localhost:8080/alfresco/api/-default-/public/cmis/versions/1.1/browser/root/test/test.txt
Its properties like this:
http://localhost:8080/alfresco/api/-default-/public/cmis/versions/1.1/browser/root/test/test.txt?cmisselector=object
And its versions like this:
http://localhost:8080/alfresco/api/-default-/public/cmis/versions/1.1/browser/root/test/test.txt?cmisselector=versions
In this example I'm retrieving the object by path. My test object is in a folder called test and my object's name is test.txt. If, on the other hand, you know the object's ID, you could get its versions like this:
http://localhost:8080/alfresco/api/-default-/public/cmis/versions/1.1/browser/root?cmisselector=versions&objectId=54f47f6f-ee88-4612-8206-ebca8f5b7e6b;3.0
Any time you can use a CMIS URL to give you what you need, you should use it, especially if the alternative is a web script that may not be fully public.
There is follow API:
http://HOST:PORT/share/proxy/alfresco/api/version?nodeRef=NODEREF
it returns a list of versions with metadata of NODEREF like this:
[{
"nodeRef": "versionStore://version2Store/60d3d217-e80b-4066-9e43-6361bb573462",
"name": "prova1.json",
"label": "1.11",
"description": "",
"createdDate": "08 lug 2016 12:21:49 GMT+0200 (CEST)",
"createdDateISO": "2016-07-08T12:21:49.843+02:00",
"creator": {
"userName": "admin",
"firstName": "Administrator",
"lastName": ""
}
},
{
"nodeRef": "versionStore://version2Store/a1b38d5e-2556-416a-908e-180687d3ff8c",
"name": "prova1.json",
"label": "1.10",
"description": "",
"createdDate": "07 lug 2016 13:20:44 GMT+0200 (CEST)",
"createdDateISO": "2016-07-07T13:20:44.804+02:00",
"creator": {
"userName": "admin",
"firstName": "Administrator",
"lastName": ""
}
}]
I am creating a static site using grunt.js and assemble. I have a data.json file used for building pages using assemble:
{
"articles": [
{
"author": "Brian",
"headline": "A Generation on the Hook 1",
"body": "cars, and start businesses by means of debt",
"slug" : "n-hook1",
"publish_on": "2014-10-10T04:00:00+00:00",
"url": "http://example.com/2014/oct/08/n-hook1/",
},
{
"author": "Brian",
"headline": "A Generation on the Hook 2",
"body": "As millions go to college, buy homes,",
"slug" : "n-hook2",
"publish_on": "2014-10-12T04:00:00+00:00",
"url": "http://example.com/2014/oct/08/n-hook2/",
},
],
}
I would like the output to be created in the following directories like this: 2014/oct/08/n-hook1/index.html. How can I create the directories in assemble?
Is this even possible with assemble.io? If there is something better, let me know. I am new to the js world and would like some direction. I did see this question but this seems to involve placing the files in different directories. Maybe I have to write a helper? If so, I am not sure where to start.
I like assemble because pages that are generated a completely upt o the client side rendering, and I just present the json data. Not sure if there is something better.
The grunt-assemble-permalinks plugin was the solution, it does what I need.