ContributionsMost RecentMost LikesSolutionsRe: Uploading Image using REST: apiuser permissions issue Thanks for your reply! I forgot to post the response that I got from KaelaC during one of our consulting sessions. It turns out that you are not able to make calls to upload photos to a user's albums on their behalf. So in this case where we have a Java service making API calls using an "API user" we are unable to upload the photo for our other users. Kaela did mention that there may be some backlog items for your API team to create a separate "API user" permission set that would give a middleware service like ours more latitude to do these types of operations via the API. Our current solution to this issue is to contract Lithium's professional services team to do some custom integration with our APIs to make calls to our APIs to retrieve data for our users in Lithium. Uploading Image using REST: apiuser permissions issue Hello! I'm trying to upload a photo to the default album of a user via REST v1 by using an API user. The API user has every permission that I have access to in the Admin console. We are using session key authentication to make the calls. The REST endpoint that we are calling is: users/login/{{username}}/media/albums/default/public/images/upload This call is successful when passing in the API user's login to the call. However, when I pass in any other login, I get the following response error: { "response": { "status": "error", "value": null, "error": { "code": "303", "message": "User 59 does not have the following permission(s) at [OUR COMMUNITY]: [ ]" }, "image": null, "ratings_histogram": null } } What permissions am I missing? Thanks for your help! Custom Endpoint: CRUD with API v2 Support? Is there CRUD support with API V2 in custom endpoints? I get that you can do a LiQL search using API v2, but can you also use API V2 to create, update, and/or delete? Specifically I would like to reproduce the HTTP PUT request in the endpoint to update a user's profile data: http://community.lithium.com/t5/Developer-Documentation/bd-p/dev-doc-portal?section=commv2&collection=users#action-update This would help me condense external API calls when updating user information. Thanks! Re: Custom Endpoint: Update user settings/profile data Nice catch! Your example worked. The only change I need to make was instead of ?email=example@didthiswork.com, I changed it to ?value=example@didthiswork.com. Thank you! Re: Custom Endpoint: Update user settings/profile data Sorry for the confusion. Yes I did try just restadmin, but my calls would hit the <#recover> block. So then I did the restadmind to figure out what error I was getting to cause the code to reach the <#recover>. That's when I found that this error was happening. Re: Custom Endpoint: Update user settings/profile data Thank you VarunGrazitti for your suggestion. Fortunately I'm not getting the 500 error anymore. Unfortunately, the error has changed to: <error code="501"> <message>Unknown path element at node 'user.email.set'.</message> </error> I got that after changing the function to use the "restadmind" context object. My modified code looks like this: <#function updateEmail username email> <#return (restadmind("/users/login/" + username + "/email/set/" + email))/> </#function> <#attempt> ${updateEmail(username, email)} Updated email to ${email} <#recover>There was an error updating email. </#attempt> Am I not supposed to put the email to change to after the /set/ ? Thanks for all your help! Custom Endpoint: Update user settings/profile data Hello! I'm new to the Freemarker language and somewhat new to Lithium. I'm trying to create a custom endpoint that takes parameters from a call from a Java service and uses them to update a user's profile. So far I have tried to update the email address with no luck. I'm getting a 500 error when calling this endpoint. Here's what I have so far: <#include "common-vars.ftl"/> <#attempt> <#assign username = http.request.parameters.name.get("username")/> <#recover><#assign username = ""/> </#attempt> <#attempt> <#assign firstName = http.request.parameters.name.get("firstName")/> <#recover><#assign firstName = ""/> </#attempt> <#attempt> <#assign lastName = http.request.parameters.name.get("lastName")/> <#recover><#assign lastName = ""/> </#attempt> <#attempt> <#assign email = http.request.parameters.name.get("email")/> <#recover><#assign email = ""/> </#attempt> <#attempt> <#assign aboutMe = http.request.parameters.name.get("aboutMe")/> <#recover><#assign aboutMe = ""/> </#attempt> <#attempt> <#assign avatar = http.request.parameters.name.get("avatar")/> <#recover><#assign avatar = ""/> </#attempt> <#attempt> <#assign userIdQry = "SELECT id from users where login = '${username}'"/> <#assign userId = executeLiQLQuery(userIdQry)/> <#recover><#assign userId = ""/> </#attempt> <#function updateEmail username email> <#return (rest("/restapi/vc/users/login/" + username + "/email/set/" + email))/> </#function> <#attempt> ${restadmin("/restapi/vc/users/login/" + ${username} + "/email/set/" + ${email}} <#recover>There was an error updating email. </#attempt> As you can see from the code, there are a few other fields that we would like to update via this endpoint. Thank you for your help! EDIT: If there is a way to use API v2 to update multiple fields with one call, that would be extremely helpful! Solved