Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Is it possible to retrieve the numerical ID of a form from the GUID id?

vertexar November 12, 2024

 

When you list all your forms in Atlassian's UI, and you click on a form to edit it, it takes you to a URL that looks like:

https://<domain>.atlassian.net/jira/servicedesk/projects/<projectKey>/settings/forms/form/3/edit

But when you list forms, or when you create one, you get this as a response:

{ 
id: '544157f1-b116-4c44-9b08-16d4871360d9',
name: 'A Quick Form Representing a Questionnaire 2',
updated: '2024-11-12T14:46:17.574Z',
portalRequestTypeIds: [],
recommendedIssueRequestTypeIds: [],
issueCreateIssueTypeIds: [],
issueCreateRequestTypeIds: []
}

Please note that the ID is a GUID, while the ID used in the edit URL is an integer.

The question is: Is it possible to retrieve the numerical ID, in order to manually build the edit form URL?

Mentioning the forms god @Bruno Altenhofen in case you have a moment :)

Thank you!

 

 

 

 

1 answer

1 accepted

2 votes
Answer accepted
Bruno Altenhofen
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 14, 2024

Hey @vertexar 

Ah, the grand tale of UUIDs, GUIDs, and numerical IDs—a journey for the legends!

Wandering through Atlassian's forms can feel like embarking on an epic quest, perfect for an "RPG tank" like me! Not quite divine, but I appreciate the good humor and kind words! Hahaha!

Here's the lowdown: those GUIDs in API responses are like secret codes known only within Jira's inner circles. Meanwhile, the edit URL teases you with a cheeky little integer, daring you to connect the dots.

If you're on an adventure to find that elusive numerical ID for constructing URLs, here are some tips:

  • Manual Exploration: Since the Get form templates REST API method only returns the GUID, you can manually navigate the form in the Jira UI and jot down the numerical ID from the URL.
  • Form Properties: You can access the forms/proforma properties, which may be deprecated soon (more info here), to get forms with the indented ID.
    • Use the following Jira REST API:
      https://<domain>.atlassian.net/rest/api/3/project/<projectKey>/properties/proforma.forms

      This will provide a response like this:

      {
       "key": "proforma.forms",
       "value": {
        "schemaVersion": 6,
        "forms": [
         {
          "id": 1,
          "uuid": "728285fe-fb17-4793-961d-5fac79c57711",
          "name": "Employee onboarding",
          "updated": "2024-03-28T13:37:13.247932968Z",
          "v2": true
         },
         {
          "id": 4,
          "uuid": "91a2fdbb-5a2f-489b-a240-4b2170068c87",
          "name": "Employee Onboarding",
          "updated": "2024-03-28T13:42:01.574595551Z",
          "portalRequestTypeIds": [
           83
          ],
          "v2": true
         },
         {
          "id": 5,
          "uuid": "993e24ee-7b37-43f4-873c-f09ea0a24c78",
          "name": "Employee Offboarding",
          "updated": "2024-03-28T14:16:02.793929131Z",
          "portalRequestTypeIds": [
           84
          ],
          "v2": true
         },
         {
          "id": 6,
          "uuid": "a0bcb910-e3d8-40bc-9e89-80133b13e8de",
          "name": "Test paragraph field PDF format",
          "updated": "2024-05-07T14:24:50.161610827Z",
          "v2": true
         }
        ],
        "maxId": 6,
        "newIssue": false
       }
      }
      

I hope this helps you conquer the form frontier! Happy adventuring!

vertexar November 15, 2024

You are awesome @Bruno Altenhofen ! I cannot thank you enough for taking the time to write such a detailed, humorous response! You rule! Thank you!  :)

Like Bruno Altenhofen likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events