Question - API validation errors occurred

Hi all!

I am trying to use the API to create assets in Eramba. I am using the following JSON:

{‘name’: ‘teste’, ‘description’: ‘teste2’, ‘asset_label_id’: 1, ‘asset_media_type_id’: 1, ‘review’: ‘2023-11-14’, ‘created’: ‘2023-05-18’, ‘edited’: ‘2023-05-18’, ‘asset_owners’: [‘Group-40’], ‘asset_guardians’: [‘Group-40’], ‘asset_users’: [‘Group-40’], ‘business_units’: [9], ‘legals’: [7], ‘related_assets’: [1], ‘asset_classifications_1’: [‘2 - Restrita’]}

however, I am receiving this error:

{“exception”:“ValidationException”,“message”:“8 validation errors occurred: asset_owners.isArray - The provided value is invalid; business_units.belongsToMany - This field cannot be left empty; business_units.isArray - The provided value is invalid; related_assets.isArray - The provided value is invalid; legals.isArray - The provided value is invalid; asset_guardians.isArray - The provided value is invalid; asset_users.isArray - The provided value is invalid; asset_classifications_1.isArray - The provided value is invalid; “,“url”:”/api/assets/add”,“error”:{},“code”:422}

Does anybody knows how can I send these fields?

If i copy paste your JSON to an online validator:

you are mixing up quote strings for sure, there might be something else. please use the documentation, we have an extensive library of examples.