Hi,
I would like to add a field from type "Object" to an object type via the Asset REST API, but I always get an error message "The input is not valid...".
Here is my payload:
payload = {
"name": "GH Services",
"type": "1",
"description": "This is my first test column",
"typeValue": "123", ## id of the object type the field should be referenced to.
"additionalValue": "123"
}
The request itself works, e.g. in case I add a default text field.
Any idea how I could make it?
Thanks in advance!
So you want to update an object in an asset schema via the API?
What is the API you are making?
Can you also show the object and the object type attributes?
H Marc,
thanks for your reply!
Yes, I would like to add a new attribute to a given objecttype via API.
I'm using the following API "Post objecttypeattribute {objectTypeId}"
My request looks like this:
...and the attributes of objecttype with ID 141 like this:
Best regards,
Günter
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Are you sure the id of the object type you are referencing is 123
To get object type id; https://developer.atlassian.com/cloud/assets/rest/api-group-objecttype/#api-objecttype-id-get
The reference id is this also correct 123
To get the reference id: https://developer.atlassian.com/cloud/assets/rest/api-group-object/#api-object-id-referenceinfo-get
This all needs to be correct, you can't just set random numbers.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Marc,
in reality the objectTypeIDs are as follows (I only used numbers for illustration...):
1. Objekttype "Application" has the ID 141 and for this the reference field should be generated. This ID is used to define in which objectType the new field should be inserted.
2. Objecttype "Service Cataloge" has the ID 143 and should be the target objecttype from which elements should be selected for a specific application. Therefore, I used this ID to define the parameters "typeValue" and "additonalValue".
I have tested the request with these two IDs
In case I would configure the field for the "Application" objectType, it would look like this:
By the way: for me it seems that the two parameters "typeValue" and "additonalValue" are redundant for Object references, correct?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.