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

Create Project Area in DNG via OSLC REST Apis

Hi,

I'm looking for a way to programmatically create a project area in DNG but I have not found instructions on how this can be achieved.  I've found sets of tips for CLM versions several major versions ago. 

https://jazz.net/wiki/bin/view/Main/DraftTeamProcessRestApi?sortcol=3;table=3;up=0#POST_project_areas_collection

This seems to be the closest instruction I can find, however my post is returning a 201 Created status (success) but I then cannot view that project area in the DNG web UI.

Any tips or hints for me?

-Avery

3

0 votes



2 answers

Permanent link

 That's the correct API call and it's returning the correct response. Do you have permission to view the project area? And did you use a valid template (I'd think it would return an error if you didn't but it might be worth checking). Can you find the project via the REST API via Project Area Collections? https://jazz.net/wiki/bin/view/Main/DraftTeamProcessRestApi?sortcol=3;table=3;up=0#Project_Areas_collection

0 votes

Comments

As for permission to view:  My user is a JazzAdmin at the JTS level, so I assume it should have permissions to view project areas as I can see all the project areas created by myself and others while using the web UI (this does not include the projects I've received 201 Created status via REST apis)

For better context I've performed a POST to <mydnghost>/rm/oslc_rm/catalog with the following body:
<?xml version="1.0" encoding="UTF-8"?>
<jp06:project-area xmlns="<mydnghost>/rm/" name="MyDNGTest" templateId="RRSTemplateID" jp06:templateLocale="en_US">;
    <jp06:summary>For testing with REST Client</jp06:summary>
    <jp06:description>None</jp06:description>
    <jp06:visibility jp06:access="PUBLIC"/>;
</jp06:project-area>


The response header includes a location header with a URI that returns a 404 not found exception when supplying it with a GET. 

The returned "location" looks quite funny - it is like "https://clm603.example.com:9443/rm/linkTypes/_BPLCoUE1EeeiU_FP2rtfzg". So it is definitely incorrect. I'm pretty sure the namespace being used is incorrect, but I don't know what should be used, yet.

Thanks for the tip Donald, I've double checked the documentation and noticed the namespace:

I've retried the POST call with both namespaces and gotten the same 201 Created response with the linkTypes uri for the resource location.  So unfortunately it looks like the same false positive response.



Permanent link

 I don't see a <visibility> tag in your request body. I don't know what this value defaults to. If you login as something other than a JAZZ_ADMIN and the "access" param is not "public", you wouldn't see the projects. Are you logging into the web UI as a JAZZ_ADMIN or as the user from the auth header of your POST? See the request body example of the POST from the link you provided.

0 votes

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
× 516
× 137
× 116
× 38
× 17

Question asked: May 24 '17, 10:55 a.m.

Question was seen: 3,374 times

Last updated: May 31 '17, 11:41 a.m.

Confirmation Cancel Confirm