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

Attribute data type POST/PUT/GET in DNG as ADMIN with REST and python

 I am trying to write a script for DNG ( me as new user), i have admin access and this script is to do below,

  1. Create new attribute data type if not present.
  2. Update data type values if data type existing
i am trying to search the template where i can post or put to create or update the data type. but unable to get it.
i am following rootservices-->catalog-->service.xml. But unable to identify any possibility as i am new to it.

Can anyone please guide me how to find links and how to create and update the attribute data type in DNG with REST python. 
i know how to implement with python, if anyone can give me some guide on how to find APIs and how to GET the schema(XML) and how to push with Headers( i got one header which i don't know what value to give "net.jazz.jfs.owning-context"). 

Please give some guidance how to find proper address to push and do get and put for attribute data type in DNG.

0 votes



3 answers

Permanent link

 Hi Durga,


Please refer the general GET, PUT examples in the below documentation.
I am not aware as how this could be implemented using Python

0 votes

Comments

i know how to implement using python , i just need how to get the api links and xml schema. where to push the xml schema so it will be created.  or updated. 


Permanent link
Durga,

I've used the following to update one.
PUT:  <base-url>/rm/types/<external_id>

Make sure to include the following in the header:
Content-Type
OSLC-Core-Version
If-Match (eTag)

I've never created one though.

-- Steve

0 votes

Comments

so, i need to do a get first to verify it's there or not, 

then if there i will update else create.

so now Q. is how i can get all the attribute types and if i want to push where should i push so the external_id will auto generate. like Slug_someID generates in QM test case create time. 


Permanent link

Hi Durga,

you can create attribute datatypes over the Rest API of the GC application.

You can take a look at: <host>:port/gc/doc/scenarios
I am also using python, it works pretty well if you have developed a proper framework

0 votes

Comments

 thank you so much for the kick start, i am very new to DNG,  so can you give some more info, how can i go with python more in this ? like what data/body should i post, and any other details please ? will help a lot to me as beginner !

Nasuh, the OP was asking about attribute data types in DNG, not GCM. The GCM REST APIs are not relevant to the OP's question.

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,936
× 478
× 116

Question asked: Jun 30 '22, 3:12 a.m.

Question was seen: 2,318 times

Last updated: Jul 14 '22, 6:42 a.m.

Confirmation Cancel Confirm