Hi Siva,
Yes, I understand. Custom attribute are handled exactly the same like regular attributes with the API. Let me give you an example.
If you go to that link that I included for you previously then you'll see the WSAPI with the object model where you can test the CRUD queries. I prepared an example for you on the Defect artifact where I created a custom field named: "c_SagiSingledValued". The prefix "c_" is what's automatically added to all custom fields. So, let me show you how it works. In that page if you go to the Defect artifact you'll see:
This shows you the endpoints for each of your CRUD operations for Defect. So , let me walk you through testing it for a custom field. Here is my custom field:
Your custom fields show up in the list of fields of the artifact , along side the regular fields. So, in this case, if you scrolled a little down while on that page for Defect then you'll see all fields and one of them is this one.
So, now let's perform CRUD for this field:
Performing Read:
This returns 3 defects which I have that meet this query, here is the result. Later on down the JSON response you will see all 3.
So, let's take one of these results and update it. To update, you can see in the above endpoint we need the ObjectID. Here it is:
So, let's do Update. For that I'll use PostMan (you can use any tool that allows you the use POST to that endpoint).
That worked, you can see it down at the body of the returned JSON, but you can also query that same defect again as earlier and you'll see the value was updated:
Now let's do Create:
I'll use PostMan again and make a PUT call to the create endpoint:
And I can see it was created with the correct name and value for my custom field:
And finally , let's Delete the defect we created:
We need the ObjectID of the defect, I'll take it from the JSON we just received for the created defect:
Now, let's delete the defect:
Return code is 200 (success):
As you can tell you work with a custom field in the same manner any other field.
I hope this is more clear. Please let me know if further questions.
Thanks,
Sagi