You can use Jira REST API to Create issue and add to the body of the request’s issue.templates.automation property.
{
"properties": [
{ "key": "issue.templates.automation",
"value": {
"applyTemplate": "TEMPLATE-1"
}
}
]
}
Provide:
TEMPLATE-1 is an issue key of your template. As soon as you click Create, TEMPLATE-1 will be applied to the issue. It may overwrite provided summary based on your template’s scope.
Use the example below to create similar configuration.
{
"fields": {
"project": {
"key": "JSA"
},
"summary": "Create issue from Postman",
"issuetype": {
"id": "10000"
}
},
"properties": [
{
"key": "issue.templates.automation",
"value": {
"applyTemplate": "TEMPLATE-1",
"variables": {
"MyDynamicVariable": "abc"
}
}
}
]
}
You can also provide values for dynamic variables defined in your primary template as shown above.