18 Messages
Post bulk attributes in Collibra REST API
Hello Citizens.
I need to POST some attributes into my dev enviroment, to do that, Im going to REST API, then using the POST method /attributes/bulk.
But, im getting Bad Request since my structure isnt fit correctly into JSON pattern, because i dont really know how I can structure the “value” field.
My unsuccessfull attempts trying to fill that field:
“value”: “3fa85f64-5717-4562-b3fc-2c963f66afa6”}]
“value”:{“3fa85f64-5717-4562-b3fc-2c963f66afa6”}}]
“value”:{“description”:“3fa85f64-5717-4562-b3fc-2c963f66afa6”}}]
“value”:{“valueType”:“string”,“description”:“3fa85f64-5717-4562-b3fc-2c963f66afa6”}}]
Theres no examples that I can follow at the Collibra REST API page.
Can someone give me a hint? Thanks in advance!
laurenzhiller
36 Messages
5 months ago
Hi @alison.coimbra95.gmail.com,
based on your description, I’m not 100% sure what you are trying to achieve as you are using the same id for assetId, typeId and value.
I assume that you want to add an attribute value to an existing asset, e.g. a definition “This is my customer definition” for the asset Customer of type “Business Term”,
This works as follows:
[
{
“assetId”: “Id of the Customer Business Term (can be retrieved from Browser URL)”,
“typeId”: “Id of the Definition Attribute (can be retrieved from Collibra Settings > Operating Model > Attributes > Resource Id Column)”,
“value”: “Your description”
}
]
With real values:
[
{
“assetId”: “ef306292-52da-4461-a455-8d8de16c9dd4”,
“typeId”: “00000000-0000-0000-0000-000000000202”,
“value”: “This is the customer definition.”
}
]
0
0
alisoncoimbra
18 Messages
5 months ago
Hi Laurenz, thanks for your reply!
Yes, I want to add real attributes. I just put the default Api values in the example.
As I said, I already tried to use your sample structure with real values.
It is returning me the 400 code error.
2
0
laurenzhiller
36 Messages
5 months ago
Hi @alison.coimbra95.gmail.com,
could be related to your "-characters . Try pasting it into JSON Online Validator and Formatter - JSON Lint and check if the json is valid.
0
alisoncoimbra
18 Messages
5 months ago
I do utilize Notepad++
The format seems correct for me, with the correct colors.
0
0
alisoncoimbra
18 Messages
5 months ago
These " characters were generated direct from Excel hehe
0
0
alisoncoimbra
18 Messages
5 months ago
I just tried to use the singular post method for attributes here, then worked…
Interesting…
0
0