Uploaded image for project: 'Jira Software Cloud'
  1. Jira Software Cloud
  2. JSWCLOUD-17392 Next-Gen projects
  3. JSWCLOUD-17970

It should be possible to set Next-Gen project access (open, private or limited) via REST API

    XMLWordPrintable

    Details

    • Type: Sub-task
    • Status: Open (View Workflow)
    • Priority: Medium
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: next-gen, REST API
    • Labels:
      None

      Description

      Summary

      At this current point in time it is not possible to set a Next-Gen access property (the one you can set in Project Settings > Details) via REST API, neither when creating the project nor afterwards.

      Workaround

      There is an internal endpoint that you can currently use to change the project access setting but this is not documented, not supported and it can change without prior notice: /rest/internal/simplified/1.0/projects/PROJECT-ID/summary

      In order to change the access settings you have to sent a PUT request to the /rest/internal/simplified/1.0/projects/PROJECT-ID/summary specifying:
      accessLevel: "OPEN", "PRIVATE" or "LIMITED"
      avatarId: avatar id of the project
      key: project key
      name: project name

       

      Example:

      1. Call https://XXXXX.atlassian.net/rest/api/3/project endpoint to get project info:
        // https://xxxxxxxx.atlassian.net/rest/api/3/project
        
          {
            "expand": "description,lead,issueTypes,url,projectKeys,permissions",
            "self": "https://xxxxxx.atlassian.net/rest/api/3/project/10303",
            "id": "10303",
            "key": "TSMN",
            "name": "Test Scrum Migration NextGen",
        .....
        
      2. change the access settings to the above project by sending a PUT request to https://xxxxxxx.atlassian.net/rest/internal/simplified/1.0/projects/10303/summary:
        curl -u EMAIL:API-TOKEN -H "Accept: application/json" -H "Content-Type: application/json" -d '{"key": "TSMN", "name": "Test Scrum Migration NextGen", "avatarId": 10722, "accessLevel": "PRIVATE"}' -X PUT https://xxxxxxx.atlassian.net/rest/internal/simplified/1.0/projects/10303/summary
        
        {"returnUrl":"/browse/TSMN","id":10303,"key":"TSMN","name":"Test Scrum Migration NextGen","accessLevel":{"value":"PRIVATE","displayName":"Private","description":"Only people added to the project can create and edit issues. Issues in this project don't appear in search results.","iconName":"private"},"avatarId":10201}
        

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            dbonotto Dario B
            Votes:
            5 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated: