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

While creating categoryType using Rest API - I am getting 403 Error.

Using RestClient i am trying to create a category type with POST method

url:
https://localhost:9443/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/Thiru_Playground+%28Quality+Management%29/categoryType/
urn:com.ibm.rqm:categoryType

Headers:

Accept: application/rdf+xml

OSLC-Core-Version: 2.0

X-Jazz-CSRF-Prevent: 00002mT2kZHJgS67Jd5U-2PPFkU:-1

Content-Type: application/rdf+xml

In the Body i'm putting the response i got from using the below url

https://localhost:9443/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/Thiru_Playground+%28Quality+Management%29/categoryType

and performed POST operation i am getting 403 error. i may be wrong in sending the xml body for the POST operation. i could not generate slug id as well.

Kindly help me to get the xml body for POST method. Or in case if i am following wrong steps please guide me to create a category type in RQM using Rest API

0 votes

Comments

What's the detailed message in the response body? It should give you a clue what's going on.

It says Permission Denied -  403 Forbidden error

i can update a category value and category so same permissions are required for creation as well if i am not wrong.
i need to know what needs to be given in request body for performing POST method to get slug id.

i can update a category value and category so same permissions are required for creation as well if i am not wrong.
i need to know what needs to be given in request body for performing POST method to get slug id.

Slug id i cannot create using the xml representation of response from category. Whether i am trying a wrong xml?



2 answers

Permanent link
The "urn:com.ibm.rqm:categoryType" bit in the URL looks off. When you POST, you are trying to create a new entity which does not have an Id yet, so you cannot specify an Id. You should just POST to /categoryType. If you still have issues, you should show us the details of the request, including URL, headers and body.

1 vote

Comments

URL :https://localhost:9443/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/Playground+%28Quality+Management%29/category

I used GET Method and got a response


Headers:
X-Jazz-CSRF-Prevent - 0000f3-2rBvym1_iEWvJF6CWDHA:38b80db6-47d5-4c8d-9ac8-ec8b9dd4f7fd
Content-Type - application/xml
Accept - application/xml

Body : Response from the URL : https://localhost:9443/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/Playground+%28Quality+Management%29/category
 
Slug id cannot be created. 403 forbidden error

Sounds like you have the incorrect request body. The request body should consist of a single category, not a list of categories.

1 vote

Thank you so much Donald. I changed the request body to single category then it worked.


Permanent link
Hello Ast Java

You should check your permissions to this project area.
1 - Open your project
2 - Go to Administration
3 - Manage This Project Area
4 - Permissions.

Also make you sure you are a member of the project area in.

1 - Go to Administration
2 - Manage Project Area
3 - Members

Let me know if any of this helped.

0 votes

Comments

Yes Simone i have the permission and also i am member of that project area.
i can perform update using PUT Method in RestClient using Rest API and i can delete a category too but create not.

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,943
× 1,700
× 218
× 6

Question asked: Apr 12 '16, 2:36 a.m.

Question was seen: 3,825 times

Last updated: Apr 18 '16, 6:07 a.m.

Confirmation Cancel Confirm