Unable to create a Program in portfolio using REST API.

Sukrutha April 24, 2019

I am trying to create a program in portfolio using the below rest api as mentioned in portfolio document ( https://docs.atlassian.com/portfolio-for-jira-server/REST/3.0.0/jpo/#/definitions/ProgramDTO )

API END POINT : http://localhost:8080/rest/jpo-api/1.0/program

Example :          

{

  "id": "integer (int64)",

  "title": "string",

  "owner": "string",

  "description": "string"

}

Request Body :     {

  "title": "PROGRAM",

  "owner": "admin"

  "description": "DESCRIPTION"

}

I am getting the below error.

Please help me to find a solution for this.

 

Response Body : 500 Internal server error

 

{

    "error": "unexpected-error",

    "errorMessages": [],

    "exception": {

        "type": "java.lang.ClassCastException",

        "message": "com.atlassian.rm.portfolio.publicapi.interfaces.program.ProgramDTO cannot be cast to com.atlassian.rm.portfolio.publicapi.interfaces.planaware.AbstractPlanAwareDTO",

        "stackTrace": [

            {

                "className": "com.atlassian.rm.portfolio.publicapi.security.DefaultPlanAwareSecurityChecker",

                "methodName": "canCreate",

                "line": 19

            },

            {

                "className": "com.atlassian.rm.publicapi.base.api.BaseAPI",

                "methodName": "create",

                "line": 41

            },

            {

                "className": "com.atlassian.rm.portfolio.publicapi.program.ExportedProgramApi",

                "methodName": "create",

                "line": 32

            },

            {

                "className": "com.atlassian.rm.portfolio.publicapi.program.ExportedProgramApi",

                "methodName": "create",

                "line": 17

            }......................

      

1 answer

0 votes
Prashanth H April 24, 2019

I'm using 3.0.0 version of portfolio add-on and facing the same issue.

Like naveenkumarudp likes this
naveenkumarudp April 2, 2020

any update on this?

Suggest an answer

Log in or Sign up to answer