How can I get all fields including forms in the request type get api? and How can I update the form?
Asked by Thanu Thana:

My request-type template has the below fields (summary is a normal field others are from a form template.) - Refer the SS  

But when I use the APIs " {{baseurl}}/rest/servicedeskapi/servicedesk/1/requesttype/9/field?expand=\[hiddenFields\]" which gives me only "summary" in the response.  

<br />

<br />

![Screenshot 2024-06-11 081222.png](/t5/image/serverpage/image-id/329038iFE051E4FA127D5FA/image-size/large?v=v2&px=999 "Screenshot 2024-06-11 081222.png")

<br />

The API {{baseurl}}/rest/servicedeskapi/servicedesk/1/requesttype/9/field?expand=\[hiddenFields\]" response

{  
"requestTypeFields": \[  
{  
"fieldId": "summary",  
"name": "Summary",  
"description": "",  
"required": true,  
"defaultValues": \[\],  
"validValues": \[\],  
"jiraSchema": {  
"type": "string",  
"system": "summary"  
},  
"visible": true  
}  
\],  
"canRaiseOnBehalfOf": true,  
"canAddRequestParticipants": true  
}

**How can I get all fields including forms in the request type get api? and How can I update them?**


Answers:
author: Thanu Thana
body: Only Request types and their fields can get using this API"{{baseurl}}/rest/servicedeskapi/servicedesk/1/requesttype/9/field"  

To check the forms Plz check form apis.  
[https://developer.atlassian.com/cloud/forms/rest/api-group-forms-on-issue/#api-issue-issueidorkey-form-formid-get](https://developer.atlassian.com/cloud/forms/rest/api-group-forms-on-issue/#api-issue-issueidorkey-form-formid-get%C2%A0)  

1. Get form for a request type (you should have already set up the Form in a request type - REFER -<https://support.atlassian.com/jira-service-management-cloud/docs/create-or-edit-a-form/> )  

API : <https://api.atlassian.com/jira/forms/cloud/>{cloudId}/servicedesk/1/requesttype/{requestTypeId}/form  

2. Add form to a specific issue   
<https://developer.atlassian.com/cloud/forms/rest/api-group-forms-on-issue/#api-issue-issueidorkey-form-post>   

3. Change the Visibility to external  
<https://developer.atlassian.com/cloud/forms/rest/api-group-forms-on-issue/#api-issue-issueidorkey-form-formid-action-external-put>   

4. Add Answers to the form  
<https://developer.atlassian.com/cloud/forms/rest/api-group-forms-on-issue/#api-issue-issueidorkey-form-formid-put>  

Here form id is not form template id. form id is response of "Add form API"


author: Seth Strzechowski
body: Did you ever figure this out? Going through the same thing right now

comments: author: Thanu Thana
body: Hi,   
yes [@Seth Strzechowski](/t5/user/viewprofilepage/user-id/5523369)   

Only Request types and their fields can get using this API"{{baseurl}}/rest/servicedeskapi/servicedesk/1/requesttype/9/field"  

To check the forms Plz check form apis.  
[https://developer.atlassian.com/cloud/forms/rest/api-group-forms-on-issue/#api-issue-issueidorkey-form-formid-get](https://developer.atlassian.com/cloud/forms/rest/api-group-forms-on-issue/#api-issue-issueidorkey-form-formid-get?)  

1. Get form for a request type (you should have already set up the Form in a request type - REFER -<https://support.atlassian.com/jira-service-management-cloud/docs/create-or-edit-a-form/> )  

API : <https://api.atlassian.com/jira/forms/cloud/>{cloudId}/servicedesk/1/requesttype/{requestTypeId}/form  

2. Add form to a specific issue   
<https://developer.atlassian.com/cloud/forms/rest/api-group-forms-on-issue/#api-issue-issueidorkey-form-post>   

3. Change the Visibility to external  
<https://developer.atlassian.com/cloud/forms/rest/api-group-forms-on-issue/#api-issue-issueidorkey-form-formid-action-external-put>   

4. Add Answers to the form  
<https://developer.atlassian.com/cloud/forms/rest/api-group-forms-on-issue/#api-issue-issueidorkey-form-formid-put>  

Here form id is not form template id. form id is response of "Add form API"  
![Screenshot 2024-06-18 194931.png](https://community.atlassian.com/t5/image/serverpage/image-id/330421i755C46AF8B598ECB/image-size/large?v=v2&px=999 "Screenshot 2024-06-18 194931.png")  

Hope this is helpful. Feel free to ask if you need anything.  


author: Seth Strzechowski
body: Thank you!


Tags: cloud

jira-service-management

jira-service-management-cloud

rest-api