Uploaded image for project: 'Jira Cloud'
  1. Jira Cloud
  2. JRACLOUD-45929

Allow creating projects with Shared Configuration using REST API

    XMLWordPrintable

Details

    • 64
    • 40
    • Our product teams collect and evaluate feedback from a number of different sources. To learn more about how we use customer feedback in the planning process, check out our new feature policy.

    Description

      NOTE: This suggestion is for JIRA Cloud. Using JIRA Server? See the corresponding suggestion.

      Problem Definition

      Currently the JIRA REST API does not support creating projects using a Shared Configuration. The only way to do this is through the JIRA Project Creation UI.

      Suggested Solution

      Allow creating projects with Shared Configuration through REST API.

      Workaround

      Option 1

      JIRA CLI Plugin can also create projects via scripting, but with more flexibility of setting the schemes: https://appfire.atlassian.net/wiki/spaces/JCLI/pages/70782732/Examples#Examples-createProject

      Option 2

      To create a new Project with existing configuration from another project, we can use the following JSON keys in the existing /rest/api/3/project API call.

      • issueSecurityScheme
      • permissionScheme
      • notificationScheme
      • workflowScheme
      • issueTypeScreenScheme
      • issueTypeScheme
      • fieldConfigurationScheme

      not all of them are needed to be added. If you don't mention one, it'll be assigned the default scheme.
      you can't use projectTemplateKey JSON key with the above keys.

      The above keys needs the id of the existing configuration item. You can lookup the ID by using the following REST API endpoints.

      issueSecurityScheme API
      permissionScheme API
      notificationScheme API
      workflowScheme API
      issueTypeScreenScheme API
      issueTypeScheme API
      fieldConfigurationScheme API

      Then, use the id with the create project API call. Here's an example call -

      curl --request POST \
        --url 'https://<site_name>.atlassian.net/rest/api/3/project' \
        --header 'Authorization: Basic <base64_code>' \
        --header 'Content-Type: application/json' \
        --data '{
      	"key": "ABCD",
      	"name": "ABCD Project",
      	"projectTypeKey": "software",
      	"permissionScheme" : 10001,
              "notificationScheme" : 10000,
              "workflowScheme" : 10006,
              "issueTypeScreenScheme" : 10005,
              "issueTypeScheme" : 10142,
              "fieldConfigurationScheme" : 10003
      }'
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              dleng Daniel Leng (Inactive)
              Votes:
              102 Vote for this issue
              Watchers:
              82 Start watching this issue

              Dates

                Created:
                Updated: