Forums

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

Unable to create a Program in portfolio using REST API.

Sukrutha
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 24, 2019 edited

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
TAGS
atlassian, mindful member, mindful member badge, atlassian community, community kudos, community giveaway, atlassian swag, community values, empathy and kindness, badge challenge, atlassian learning, community engagement, swag giveaway

Earn a Badge, Win a Prize 🎁

Earning the Mindful Member badge proves you know how to lead with kindness, plus it enters you into a giveaway for exclusive Atlassian swag. Take the quiz, grab the badge, and comment on our announcement article to spread the good vibes!

Start here
AUG Leaders

Atlassian Community Events