RFC-12 Forms (ProForma) Cloud API

We are thrilled to announce the release of the first set of new APIs for Forms (previously known as ProForma) in Jira Service Management Cloud (see docs). We welcome your thoughts on the APIs we’re launching and any suggestions for enhancements or additional integrations.

RFCs are a way for Atlassian to share what we’re working on with our valued developer community.

It’s a document for building shared understanding of a topic. It expresses a technical solution, but can also communicate how it should be built or even document standards. The most important aspect of an RFC is that a written specification facilitates feedback and drives consensus. It is not a tool for approving or committing to ideas, but more so a collaborative practice to shape an idea and to find serious flaws early.

Please respect our community guidelines: keep it welcoming and safe by commenting on the idea not the people (especially the author); keep it tidy by keeping on topic; empower the community by keeping comments constructive. Thanks!

Summary of Project:

Our aim with this RFC is to:

  1. Introduce the available APIs and their potential applications;
  2. Gather your feedback on the possibility of developing a native Connect version of the API;
  3. Share our plans for the second stage of API development and solicit your input on whether our proposals align with your needs.

Here are the milestones for you to provide feedback directly here on the RFC.

  • Publish: May 9, 2023
  • Discussion open until: May 30, 2023
  • Resolve and shareback: June 7, 2023

Problem

Two years ago, we acquired the ProForma marketplace app and have since been working to integrate its features natively into JSM Cloud. Until now, there were no public APIs for our customers, Solution Partners, or Marketplace Partners to work with. The demand for an API has been overwhelming (JSDCLOUD-10671) and ranks as the second most voted-for feature on JAC, just behind attachment fields (which are also under development). This initial API release for Forms in JSM Cloud matches the functionality found in the Data Center version and signifies the first of two development milestones.

The lack of APIs meant that marketplace apps, scripting tools, and advanced customers could not automate or seamlessly integrate forms into their custom processes or applications. The only alternatives were to use Automation for Jira with its limited set of triggers/filters/actions, or to interact with forms via the UI.

Parity first

We have received significant feedback on how Data Center APIs enable our customers and partners to build powerful solutions with Forms. As part of our Forms integration efforts, we have aimed to establish parity between forms in Cloud and Data Center. In particular, we see offering APIs for forms as essential, which is why we have prioritized creating parity between forms and Jira instead of developing numerous new features within forms.

Upcoming APIs:

The second milestone, currently underway, will allow Marketplace Partners to integrate Forms directly into their apps. For example, partners like Refined will be able to display and save forms within their apps. We also recognize that many of our customers, especially our largest ones, are unable to migrate to Cloud because Marketplace Partners cannot integrate with forms. Therefore, our priority is to remove obstacles for our partners, enabling our customers to transition to cloud solutions more easily.

Tip: Although we do not yet support partners creating and saving forms, partners can start working on rendering forms now, as the full data structure is accessible through Get Form endpoint.

Solution

This initial API release focuses on providing access to form controls, such as reopening and copying via the API, as well as granting access to form content in various formats, enabling the data to be utilized in other systems.

Authentication & Access

In this initial release, there are two supported authentication methods: basic auth with API tokens, and OAuth 2.

App developers should be choosing OAuth 2 rather than basic auth. OAuth 2 allows an app to act both as an app or as a user (in Forge), and is more secure than basic auth. OAuth 2 is automatically supported by Forge as well as Connect-on-Forge apps, and you can also use it to create three-legged OAuth integrations. Note however OAuth 2 won’t work with traditional Connect JWT apps. We are looking at adding support for Connect apps in a future release but would like your feedback on how important Connect support would be to you.

If you’re a Jira customer implementing scripts or custom tools you may prefer basic auth with API tokens. This is easier to implement but means your script or tool will always run as your own user, which makes it less suitable for apps.

Accessing Form Data

When working with individual forms attached to an issue, we now offer three different endpoints to access the form contents.

Forms Index (docs)

When interacting with forms on an issue, the first step is to access the index to determine which forms are available for that issue. The index endpoint returns a list of forms and their current states, allowing you to access the subsequent endpoints to extract the actual form.

XLSX and PDF (docs and docs))

You can now download form contents as either a PDF document or an XLSX document, replicating the formats available through the user interface.

Simplified Answers Array (docs)

This format returns the question keys and response values in a single JSON array. It is an excellent way to extract responses to fields within a form, and many of our Data Center customers have successfully used this endpoint to integrate form data into other systems as needed.

If a question key has been specified for a given field via the property within the question, the key will be provided in the output. Using the question key can make it much easier to identify a specific field and its corresponding response within the answers array.

RAW JSON (doc)

We have also enabled the extraction of the entire form as a raw JSON object. This feature is primarily intended to support marketplace partners who wish to integrate forms into other apps or systems. This format is generally not intended for users who want to extract or interact with the contents of a particular form.

This format contains all elements within the Atlassian document format, including questions, validation, and conditional logic, so that you can understand how we structure form data. If desired, you can render the content of this form using Atlassian Document Format renderers.

Form actions

These endpoints are designed to let you control the state of forms attached to an issue. They largely replicate the form controls available within the UI.

Reopen a form (docs)

Automating the process of reopening a form can be beneficial, such as when you want to reopen the form upon a specific status change.

Submit a form (docs)

Please exercise caution when using this action, as it will force the submission of an open form, regardless of its completion status or whether it meets all validation requirements. If a form is configured to lock upon submission, it will become locked, and only a project administrator or system administrator will be able to reopen the form.

Set form to internal/external (docs)

These endpoints allow control over a form’s visibility to help seekers via the request portal. Internal forms are visible only to agents or users who can access the issue within Jira Service Management, while external forms are visible to both help seekers and agents.

Copy form (docs)

This endpoint enables you to copy an existing form from one issue to another. This feature can be particularly helpful when coordinating with multiple teams working in different projects. For example, during the HR onboarding process, you can copy the original request form from the HR project to other projects, such as Facilities or IT, enabling them to work on it.

Limitations

Forms must have UUIDs

The Forms API works only with forms that have UUIDs assigned to them. Before 2023, forms were allocated simple incremental numeric IDs, but these have been deprecated in favor of UUIDs. To avoid changing the Forms API as we remove numeric IDs, we decided to hide them from the API entirely. The downside of this decision is that any form without a UUID cannot be accessed by the Forms API.

Form UUIDs were rolled out to all Jira Cloud instances in December 2022, so you can essentially assume that forms created from 2023 onwards will work with the API, while those created before that will not. In the coming months, we plan to run migrations to apply UUIDs to every form, but we have not committed to a specific date for this.

If you use the “get form index” endpoint on an issue that lacks form UUIDs, it will return a 412 error code. Please refer to our Error Codes documentation for an example of the expected format.

No Validation When Submitting a Form

In this initial release the “submit form” API does not perform a validation check before submitting the form; it will submit even if the form contains invalid answers. Users need to ensure the form is filled with valid answers.

Connect Apps Not Supported

Apps built using Connect JWT cannot access the Forms API because this initial release only supports basic auth and OAuth 2. We plan to add support for Connect in a future release but would appreciate your feedback on the importance of Connect support for your needs.

Note that if you migrate your Connect app to a Connect-on-Forge app, you may be able to use the Forms API now. Connect-on-Forge uses OAuth 2 authentication, which is supported by the API. However, it currently only supports app authentication and does not support user impersonation (see FRGE-686).

Asks

As we continue to improve and expand our Forms API, we greatly value the insights and experiences of our partners. While we appreciate any feedback you have on this release (even if it’s simply expressing agreement with no serious flaws), we’re particularly interested in learning more about the following aspects:

  1. What do you think about the current limitations of the Forms API, such as the requirement for UUIDs and the absence of validation checks upon form submission? Are these limitations significantly affecting your ability to integrate forms into your processes or applications?
  2. Are there other potential use cases or impacts of the Forms API that we haven’t anticipated? Are there any additional features or improvements you’d like to see in future releases to better support your needs? Are we missing any actions you need to work with forms?
  3. For those using Connect apps, is migrating to Connect-on-Forge a practical option for accessing the Forms API? Are there any major obstacles or concerns you have regarding this migration, such as the lack of user impersonation or other potential issues?

We encourage you to express your thoughts and share your experiences, as your feedback will help shape the future development of the Forms API. Our goal is to ensure we’re providing the most effective solutions for our partners and customers, and your input is invaluable in guiding our efforts.

Please don’t hesitate to share your opinions, ask questions, or suggest new ideas. We’re excited to learn from you and work together to make the Forms API even better.

Our commitment

This is not a set-and-forget post; we want to want to have a conversation with you and listen to your feedback. But we all have other work to do, so at a minimum, we commit to reviewing the comments and feedback we receive on this post every Monday. At the end of this process, we will do our best to reconcile the feedback and our own thinking and share back with you where we are likely to head.

Thank you,

Simon Herd (PM) & Charlie Gutjahr (Architect), on behalf of the 13 members of the PerFORMers team who are working on these initiatives.

13 Likes

Hi Simon,
Where is the data stored? Is this on Forge infrastructure?

Thanks,

/Daniel

Hi Simon, this is great news. A couple of thoughts:

  • Connect support: That’s an absolute must and should be the top priority before anything else. I would have expected this as part of V1, to be honest.

  • Available APIs: Unless I’m missing something, I can only see APIs for “form instances” on specific issues, rather than “form definitions”, e.g. as are listed @ /jira/servicedesk/projects/<KEY>/settings/forms. (“form instances” vs. “form definitions” is almost certainly not the correct terminology, but I hope understandable anyway.) To give a concrete use case, in JXL, we’d use these “form definition APIs” for users to pick a form definition + a field of this form definition to add to their sheet/table, and then expose the concrete values of this field for the issues of the sheet/table.

  • Bulk APIs: As far as I understand, “form instances” can only be retrieved “one by one”, for individual issues. For apps that deal with large amounts of issues, this is going to be a scalability issue; there’ll have to be an API to load these form instances in bulk, either for batches of issues or based on a JQL statement (with pagination, of course). Ideally, this data could even be returned with the standard search endpoint, e.g. using an expand parameter or the like.

Best,
Hannes

3 Likes

We’d also need it to work with Connect, since it’s still very unclear when we can use Connect-on-Forge.

3 Likes

Another vote for a connect API.

2 Likes

As it is currently unclear what the status is of Connect on Forge, and given the long-long list of known limitations, I would not consider Connect on Forge to be production ready. Creating a hard dependency on Connect on Forge is not prudent at this moment.

I also vote for Connect support out-of-the-box, and would like to argue that until Atlassian has official sunset Connect, this should be the default for all Atlassian teams.

4 Likes

Where is the data stored? Is this on Forge infrastructure?

Hey Daniel, nice to see you got the first comment in :grinning:

Form data is stored where it always has been since ProForma was a Marketplace app: in Jira entity properties on the project and the issue.

When you call forms APIs it is reading and writing data on Jira entity properties and interpreting them correctly to provide a consistent data model. A Marketplace app could actually read the data directly from entity properties but there are eight different schema versions in use and lots of gotchas and no public documentation, whereas the official API will provide a consistent data model no matter how old the data.

Note however we make no promises that data will continue to be stored in entity properties. As I’m sure you know entity properties come with a lot of limitations and there are many compelling reasons for us to move forms to different storage. If we do change the storage I intend that the forms API would continue working without change; the location of the data should not affect the behaviour of the forms API.

So no forms are not stored on Forge infrastructure… yet. I can’t make any promises but I will say I would like to migrate it to the same underlying storage system that powers the Forge Storage API. Personally I think we Atlassians should be using the same services that Partners use.

3 Likes

Thanks Hannes, here are my responses:

Connect support

I’m not surprised Connect support is a top priority but it’s useful to hear from you that it is! I’d like to hear from everyone else who wants Connect support too because it helps us justify our focus on Connect in the next release.

Available APIs

Yes you are correct that we are only the supporting the “form instances” in this initial release (btw the terminology we use is “forms” for instances on the issue, and “form templates” for definitions on the project). That’s because the Jira Server / Jira Data Center version of the ProForma APIs don’t have this either and we were focussing on being parity with them to Jira Cloud.

I’ve noted your request for form template APIs. In particular I think it would be an API which can list the form templates available on a project, plus an API to provide the full definition of a form template including its fields. Does that sound correct to you?

Bulk APIs

This is a great question because it has been the subject of much debate in our teams. I think we all agree that we should provide bulk APIs but we first have to decide how to balance the tradeoffs and technical constraints.

Is it fair for me to interpret your comment as meaning that your most preferred option would be that forms can be returned in the existing Jira issue search APIs by using an expand parameter? And then a forms-specific API to paginate through, say, all the forms of a particular type on a project would be a second priority to that?

Also what would you prefer if you could choose between an API like those above (ie with search and pagination) or a new version of our export API which returns JSON (currently it only returns XLSX)? The search/pagination APIs would be fast and return smaller responses but require your code to put all the responses together, whereas the export API would give you one response but be very slow (up to an hour) and potentially result in multi-megabyte downloads for larger customers.

4 Likes

Thanks @hannes-finesoftware, @BenRomberg, @BorisBerenberg, @remie for your votes for Connect support in the forms API. It is a top priority for our next release but I appreciate hearing you say it because it helps us justify our focus on Connect.

8 Likes

Hi Charlie,

In particular I think it would be an API which can list the form templates available on a project, plus an API to provide the full definition of a form template including its fields. Does that sound correct to you?

100%, this sounds perfect.

Is it fair for me to interpret your comment as meaning that your most preferred option would be that forms can be returned in the existing Jira issue search APIs by using an expand parameter?

Correct; for us, this would be perfect. Ideally, to manage the potential performance implications, I could even specify the form definitions that I’m interest in, like expand=forms.<form-definition-id>,forms.<second-form-definition-id> or something like this.

And then a forms-specific API to paginate through, say, all the forms of a particular type on a project would be a second priority to that?

I personally wouldn’t really need that; our data access is very “issue-driven”, for the lack of a better word. Can’t speak for others, of course.

export API

See above, I personally wouldn’t have much use for this.

Hope this helps,
Best,
Hannes

2 Likes

Also voting for Connect support.

It looks like Atlassian is “forgetting” about Connect support in multiple latest API additions, which is very unfortunate for established Connect apps.

It means an exisitng Connect app cannot leverage on the new extension points.

This is also true for the latest Jira GraphQL API (e.g. Jira Teams data) implementation that does not work with Connect authorization.

5 Likes

I’m not surprised Connect support is a top priority but it’s useful to hear from you that it is! I’d like to hear from everyone else who wants Connect support too because it helps us justify our focus on Connect in the next release.

+1 from me. Forge did not support Portal customers until very recently, so the vast majority of JSM apps is still Connect

2 Likes

+1 for adding connect support.

We don’t have support for Forms in our issue sync app yet. If I think about adding support, I’d like to have an API for not only accessing the details of a form but also making modifications so that I could possibly sync a form in one issue with a form in another one. I haven’t seen that this would be possible with the current set of APIs.
Is this use case something you consider to support?

3 Likes

+1 on Connect support.

2 Likes

I should add that for us to use this we need:

  • Connect API
  • Ability to get a form template definition during user configuration of our app
  • Ability to get form response contents during runtime of our app
3 Likes

This is also true for the latest Jira GraphQL API (e.g. Jira Teams data) implementation that does not work with Connect authorization.

Thanks @OlehVasyliv the reasons we couldn’t initially support Connect on the forms API are very similar to why Jira GraphQL API couldn’t support Connect. I will push for a solution that can provide Connect support not only to the forms API but also to the Jira GraphQL API. However it’s too early for us to know if it will work for that API too so I can’t promise anything yet.

2 Likes

I’d like to have an API for not only accessing the details of a form but also making modifications so that I could possibly sync a form in one issue with a form in another one.

@matthias We are planning for APIs to modify forms on issues. There are several ways a form could be modified but I think the two most important are:

  1. Modifying just the answers on the form, similar to filling it out in the UI
  2. Modifying the layout / template of the form, similar to copying a form in UI (possibly overwriting an existing form)

If you were to sync forms would it be just the answers, or would it be the entire form including the layout / template?

1 Like

@CharlieGutjahr Modifying only the answers would definitely be our first step.
Syncing the whole form including its layout/template could follow at a later point.

3 Likes

@SimonHerd there are huge, well documented gaps in the Connect-on-Forge offering which mean many apps and vendors cannot migrate to Connect-on-Forge and probably won’t be able to for months or years from now. Equally, building a brand new Forge app just to use these new APIs doesn’t play nicely with our existing Connect apps - customers need to purchase and install a new app to get the new functionality, communicating between a Connect and Forge app is non-trivial etc. Equally building an OAuth2 Connect app is a fundamentally different model to the traditional Connect JWT apps, a significant implementation change that provides very little value to customers compared to being able to use new APIs within a traditional Connect app.

If Atlassian want these new APIs (or any other new ones) to be available and adopted by existing apps and vendors, they need to be supported on the Connect platform. Please do not release them until they have Connect support.

3 Likes

Hey @CharlieGutjahr - can we also add this one to the wishlist? :slight_smile:

https://ecosystem.atlassian.net/browse/ACJIRA-2568