Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

Get and Post only Enumeration values - problem with POST

 I have some enumeration that I can get values through Postman GET method with this URL:

https://server:port/jazz/oslc/enumerations/projectUID/test-enum?oslc_cm.properties=dc:title

And JSON looks like this

[
    {
        "rdf:resource": "https://server:port/jazz/oslc/enumerations/projectUID/test-enum/test-enum.literal.l1",
        "dc:title": "value1"
    },
    {
        "rdf:resource": "https://server:port/jazz/oslc/enumerations/projectUID/test-enum/test-enum.literal.l2",
        "dc:title": "value 2"
    }
]

Why I can't POST some new value over old one?
I have basic authorization with accept and content-type headers as application/json.
If I use resource URL in POST method  https://server:port/jazz/oslc/enumerations/projectUID/test-enum/test-enum.literal.l1 and try to change value from "value 1" to say "value 9856 "I get message:

<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <title>Jazz - Permission Denied</title>
        <link type="text/css" rel="stylesheet" href="/jazz/web/jazz.app/internal/templates/StaticLoginWidget.css"/>
    </head>
    <body>
        <h2>Permission Denied</h2>
        <div>Your account does not have the group memberships required to access the requested resource.</div>
    </body>
</html>
As far I know, I have all permissions as Admin User.
How this can be accomplished? Is it possible to update only enumeration value with OSLC API?

0 votes



One answer

Permanent link

You cannot do that - the OSLC API has no implementation to allow you to add or modify enumeration definitions like that. The permission denied message is caused by a missing request header "X-Jazz-CSRF-Prevent" (its value should be the current JSESSIONID cookie), which is required for most if not all POST operations against CLM applications. When you get rid of the permission restriction, you should get an HTTP 405 "Method Not Allowed" response for either a PUT or POST operation.

0 votes

Comments

 How than can this be implemented? Can you point me to some direction what to look for...

You just do on using Web UI.

Your answer

Register or log in to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,955
× 481
× 235
× 17
× 5

Question asked: Feb 15 '18, 4:46 a.m.

Question was seen: 6,048 times

Last updated: Feb 21 '18, 1:10 a.m.

Confirmation Cancel Confirm