Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

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

Thanu Thana June 10, 2024

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.



Screenshot 2024-06-11 081222.png

 


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?

2 answers

1 accepted

0 votes
Answer accepted
Thanu Thana June 18, 2024

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 

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/ 

0 votes
Seth Strzechowski
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 18, 2024

Did you ever figure this out? Going through the same thing right now

Thanu Thana June 18, 2024

Hi, 
yes @Seth Strzechowski 

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 

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

Hope this is helpful. Feel free to ask if you need anything.
Like Seth Strzechowski likes this
Seth Strzechowski
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 18, 2024

Thank you!

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events