cancel
Showing results for 
Search instead for 
Did you mean: 

Alfresco built-in webscripts

tara_b
Champ in-the-making
Champ in-the-making
Hi,

I'm new to Alfresco and have been playing around creating my own web scripts. Now I want to use one of the default scripts that comes with Alfresco -> tags.get. I've found an information page here: http://localhost:8080/alfresco/service/ … g/tags.get. This page tells me i can access the script using this url: /api/tags/{store_type}/{store_id}?tf={tag_filter?}

This is where i get stuck. How do i know my store_type and store_id to access this web script?

Thanks much!
5 REPLIES 5

lista
Star Contributor
Star Contributor

tara_b
Champ in-the-making
Champ in-the-making
Hi,

Thanks for your reply.  The Node Handle page was helpful in describing the following:
Store Protocol - that is, the type of store
Store Identifier - the id of the store
eg:  workspace://default


However i still dont know which Store Protocol and Identifier i need. I know i'm calling the script correctly because i can call the Login script (login.get.desc), which has a URL of:  

<url>/api/login?u={username}&amp;pw={password?}</url>

That works fine. But I still cant access the Tag script, with the URL of:

 <url>/api/tags/{store_type}/{store_id}?tf={tag_filter?}</url>

I appreciate any help on this problem! Smiley Happy

mikeh
Star Contributor
Star Contributor
Unless you've got a special case, it'll be: workspace and SpacesStore.

These parts form something called a "nodeRef" that you'll come across throughout Alfresco. You can get the nodeRef for a piece of content from it's details page.

Thanks,
Mike

sanket
Champ on-the-rise
Champ on-the-rise
Hi Mike.
I am not able to use the built-in webscript - Add tag. I am passing the parameters as follows into my URL -
store_ref = workspace
store_id = SpacesStore
id = 5e91b415-12b0-46ac-a75d-c320e7cbe0fc

URL :
http://localhost:8080/alfresco/service/api/node/workspace/spacesstore/5e91b415-12b0-46ac-a75d-c320e7...

But I get the error:
{ "status" : { "code" : 500, "name" : "Internal Error", "description" : "An error inside the HTTP server which prevented it from fulfilling the request." }, "message" : "03010002 Wrapped Exception (with status template): 03010001 Error during processing of the template 'Expression tags is undefined on line 2, column 16 in org\/alfresco\/repository\/tagging\/node.tags.post.json.ftl.'.

So how can I add a tag on this nodeRef ?

Can u plz help ?
Thanks in advance.

kdevineni
Champ in-the-making
Champ in-the-making
I am in the same situation, unable to add tags with the inbuilt tag…

How to post the tags that needs to be added to the node , which parameter should be used.

I am getting the same the exception…

Any ideas how to make it work…