HelloSign: how to duplicate a template though API? - hellosign-api

The following screenshot is the manual approach to duplicate a template.
Is there an API to do it?
# API like this
HelloSignClient.duplicate_template(template_id)

This is Hazem from HelloSign API Support team.
Take a look at the /template endpoints - to replicate the "Duplicate" feature on hellosign.com for templates, you'd use GET /template/files (if you need the original files), and then POST /template/update_files. That creates a new template using the original template's overlay, and the "new" or the same documents that you pass in (which in this case would be files from your GET /template/files call).
For more details about this endpoint, please check the links below:
*Update Template Files
https://app.hellosign.com/api/reference#update_template_files
*Get Template Files
https://app.hellosign.com/api/reference#get_template_files

Related

How can I list tags en Google Data Catalog?

I'm creating tag templates programmatically and it doesn't appear in the section "Tag Templates" (the creation of each tag template was successful because I can attach it in each table), but when I create those tag templates by hand, they appear as a list.
Btw I'm trying to list the tag templates that I created, with the following sentence:
tag_list = datacatalog.list_tags(parent=f"projects/{project_id}/locations/{location}")
but when I print it says
google.api_core.exceptions.InvalidArgument: 400 Malformed Data Catalog resource name projects/sybogames-analytics-dev/locations/us.
anyone knows why?
thanks in advance.
I'm unfamiliar with the Data Catalog service but, looking at the possible methods in APIs Explorer, I think (!?) you may need to terminate parent with /entrygroup/{entrygroup}.
There are 2 (!?) possible methods for list_tags:
entryGroups.entries.tag_list
entryGroup.tags.list
Both define parent similarly and require /entryGroups/{entrygroup}:
The resource can be an Entry or an EntryGroup (without /entries/{entries} at the end). It takes the form projects/{project}/locations/{location}/entryGroups/{entrygroup}/entries/{entries}.
You can use APIs Explorer to invoke either method to test it.
You can also use gcloud data-catalog tags list and, if you append --log-http to it, you'll be able to see exactly what underlying REST call is being made.

Calling Elasticsearch Template Query using NEST?

Is there a way to call Template Query using NEST? Is there any examples?
The search template endpoint isn't mapped in NEST yet, and poses a bit of a challenge since it's very different to how queries are normally constructed. We're actually working on this now (in this branch) and are hoping to get this functionality in the upcoming 1.1 release. Here's a link to the original issue for tracking purposes.
EDIT: Forgot to mention, the endpoint is available on the low-level Elasticsearch.Net client, which you can access via ElasticClient:
var client = new ElasticClient(...);
client.Raw.SearchTemplate(...);
The search template endpoint has been mapped in NEST 2.x.
There is a general example about templating here:
https://www.elastic.co/guide/en/elasticsearch/client/net-api/2.x/template-query-usage.html
Here is some information about how inline templates can be used in a phrase suggestion with the collate option:
https://www.elastic.co/guide/en/elasticsearch/client/net-api/2.x/suggest-usage.html
Here is an issue on GitHub I posted with some information on how to save templates to Elastic:
https://github.com/elastic/elasticsearch-net/issues/2176
Here's a general example of how to use NEST:
var templateRequest= new PutSearchTemplateDescriptor(new Id("my_template"));
templateRequest.Template("{\"multi_match\":{\"query\":{\"query\":\"{{suggestion}}\",\"fields\":[\"field1\",\"field2\"]}}}");
var response = ElasticClient.PutSearchTemplate(templateRequest);
When using the template in a suggest collate:
.Collate(c => c
.Query(q => q
.Indexed("my_template")
)
.Prune()
)
Another question on similiar lines, Is PutSearchTemplateDescriptor the write method to call a pre-regsitered template?
I have registered the template to the .scripts but unable to find the right method to call the template from NEST client

How to correct from getting Internal Server Error with Joomla

Help
I am working on my joomla! 2.5.6 site and have done something to cause an issue on the front end and the back end.
These are the steps I did to create the issues.
Created a template in Artisteer 4 beta to use as a secondary template, not default.
I tried to delete the template but it told me that I could not delete the last template style.
I used FileZilla FTP to delete that template
The template manager still showed that template in the list.
I read that I had to use the ext manager to delete the template.
I uploaded the template back into a new directory as the same name as the one I previously deleted.
I then deleted the template correctly using the ext manager.
I decided to begin using rt-gantry v3.2.22 as my default template
Now, as I am making mods to this I am constantly met with a 500 Internal Server error. Most times just refreshing the page will take me to the page I wanted and sometimes it takes 2,3,4,5 refreshes to do it.
On the front end after I save a change and refresh the page, I may not see the change unless I refresh it several times. There are some instances that the page displays without any CSS, sometimes it displays with old data. Eventually it will display the saved changes correctly.
How can I find the source of this issue and correct it.
Thanks in advance,
Jeff
url is www.lastingimpressionwebdesign.com
Its a little confusing keeping track of what is or isn't there, but if you're able to get into the admin, then clearly it's a template issue. All the files, of course, need to be there, but there has to be an entry in the jos_extensions table to match them. Also, I'm suspicious of your comment that you're using rt-gantry v3.2.22 as your "template" - that is a framework for templates, not a template itself. You may want to update or re-install Gantry to insure you have a complete installation of it as well.
In short, I'd suggest reverting everything to a standard Joomla template such as Beez, *get the front-end working, and then start gradually adding back your choice in templates with overrides/assignments one step at a time.
It could be the ownership or permissions of your file. It could also be your hosting provider's server environment and how PHP is configured. It's hard to say without looking at the logs.

generating thumbnails in Alfresco 4.0.d

I am using the Java web services in Alfresco Community 4.0.d and currently looking to add thumbnail functionality to my site. I noticed the thumbnails are not available immediately after posting a new image; I was wondering if someone can recommend a good approach to have the generation triggered manually?
Answered your question in the forums as well. Using the JavaScript API you can ask a document to generate its thumbnail, like this:
document.createThumbnail("doclib");
In this case, "doclib" is the name of the thumbnail configuration for the document library thumbnails in Share, but this could be any thumbnail definition you've created.
Docs live at http://docs.alfresco.com/4.0/topic/com.alfresco.enterprise.doc/references/API-JS-Thumbnail-createThumbnail.html
For Java, look at the org.alfresco.repo.thumbnail.CreateThumbnailActionExecuter class source. In your own class you could do something similar. Or, better yet, use the actionService to invoke the create-thumbnail action.
To use the Action Service, all you need is the name of the action and the parameters it expects. For example, here's what it looks like when you use the mail action:
ActionService actionService = getServiceRegistry().getActionService();
Action mailAction = actionService.createAction(MailActionExecuter.NAME);
mailAction.setParameterValue(MailActionExecuter.PARAM_SUBJECT, ExternalReviewNotification.SUBJECT);
mailAction.setParameterValue(MailActionExecuter.PARAM_TO, recipient);
mailAction.setParameterValue(MailActionExecuter.PARAM_FROM, ExternalReviewNotification.FROM_ADDRESS);
mailAction.setParameterValue(MailActionExecuter.PARAM_TEXT, sb.toString());
actionService.executeAction(mailAction, null);
To do this for thumbnails, you'll use "create-thumbnail" for the name (or CreateThumbnailActionExecuter.NAME). Looking at the source for that class I see that it takes two parameters, PARAM_CONTENT_PROPERTY, which would be "cm:content", and PARAM_THUMBNAIL_NAME which would be "doclib" for the normal document library thumbnail or your thumbnail name if you've defined your own.
One thing to note, in the executeAction call, that second argument is the "actioned upon noderef". In your case, you'll want that to be the node you are generating the thumbnail for.

Multiple Grails scaffolding templates in one application

I'm creating a DB web application with grails for my company and found myself in the need to change the default scaffolding templates.
So far so good, everything gets generated with the modified templates (controllers, views, ..).
Now, however, I get a request to create some "composite screens" with functionalities and a layout that differ from the overwritten templates.
So now my question is: is it possible in grails to create one or more templates (next the the default one) and pass this template name as an argument to the generate-* commands?
Thanks in advance!
EDIT: Adding the template name to the generate commands was just an idea, if it's possible to do this a different way, I'll be happy too.
Grails commands are scripts in grails/scripts. If you follow its logic you will see two things.
1) There is only one parameter passed to the script → domain.
2) Class for generating views is DefaultGrailsTemplateGenerator. You can analyse sourcecode and check what this class offers.
Update
Link to DefaultGrailsTemplateGenerator in GitHub.
I am not sure about the generate command parameters, but if you add another .gsp page into scaffolding directory, I believe it will try to run it through generation process.
So for example I used to have a show.gsp page as well as showBasic.gsp page, which showed fewer properties.