A

Friday, December 8th, 2023 4:39 PM

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.
image
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!

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.”
}
]

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.

36 Messages

Hi @alison.coimbra95.gmail.com,
that’s interesting. I tested this morning and it worked fine with Collibra DIC Version 2023.11.

18 Messages

There is a piece of my Json with ficticial values:

[
{
“assetId”:“123123123-43ca-123123-12313-123123123”,
“typeId”:“123gg123-1222-123ggg1233-63a13b35a2e2”,
“value”:“AlisonCoimbra”
},
{
“assetId”:“00000011-11111-0000-01010101010100122”,
“typeId”:“123123-1111-4c0d-9cce-1212dd1212”,
“value”:“Collibra.”
}
]

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.
image

18 Messages

5 months ago

I do utilize Notepad++
The format seems correct for me, with the correct colors.

18 Messages

5 months ago

These " characters were generated direct from Excel hehe

18 Messages

5 months ago

I just tried to use the singular post method for attributes here, then worked…
Interesting…

Loading...