Open icj217 opened 2 months ago
I believe the V3 metadata schema's owner property does not match what the API expects. The schema expects to be given an object with a name property e.g. "owner": { "name": "my-team" } but when I try to provide that in an API request I get an error:
owner
"owner": { "name": "my-team" }
{ "errors": [ { "title": "Generic Error", "detail": "rpc error: code = Unknown desc = failed parsing step: failed parsing step: json: offset 2: invalid character '-' in numeric literal" } ] }
If I replace the object with a string e.g. "owner": "my-team" the API call succeeds.
"owner": "my-team"
Full API calls for reference
Fails:
curl --location 'https://api.datadoghq.com/api/unstable/catalog/definition' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --data '{ "apiVersion": "v3", "kind": "service", "metadata": { "name": "test-project", "owner": { "name": "my-team" } } }'
Succeeds:
curl --location 'https://api.datadoghq.com/api/unstable/catalog/definition' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --data '{ "apiVersion": "v3", "kind": "service", "metadata": { "name": "test-project", "owner": "my-team" } }'
This issue is also present on the new POST /api/v2/catalog/entity endpoint as well.
POST /api/v2/catalog/entity
I believe the V3 metadata schema's
owner
property does not match what the API expects. The schema expects to be given an object with a name property e.g."owner": { "name": "my-team" }
but when I try to provide that in an API request I get an error:If I replace the object with a string e.g.
"owner": "my-team"
the API call succeeds.Full API calls for reference
Fails:
Succeeds: