Skip to content

References missing in REST response #5224

Open
@carlesarnal

Description

@carlesarnal

Discussed in #4876

Originally posted by eskhisov July 10, 2024
I have the following piece of code to add references to the existing AVRO schema:

List<ArtifactReference> references = this.client.getArtifactReferencesByGlobalId(globalId);
references.add(new ArtifactReference(referenceGroupId, referenceArtifactId, referenceVersion,
                                 this.getArtifactName(referenceArtifactId)));
this.client.updateArtifact(this.getGroupIdById(artifactId), artifactId,
                newVersion, artifact.getName(),
                artifact.getDescription(), this.client.getLatestArtifact(groupId, artifactId), references);

When I check UI after running my code, the references are there:

image (9)
However, when I retrieve the same data with API call, references are empty:

{
  "count": 3,
  "versions": [
    {
      "name": "AgentStateSegment",
      "description": "",
      "createdOn": "2024-03-14T18:20:02.000+00:00",
      "createdBy": "",
      "type": "AVRO",
      "labels": [
        "ACD"
      ],
      "state": "ENABLED",
      "globalId": 26,
      "version": "1",
      "properties": {
        "date": "June 24"
      },
      "contentId": 19,
      "references": []
    },
    {
      "name": "AgentStateSegment",
      "description": "",
      "createdOn": "2024-07-09T19:30:56.000+00:00",
      "createdBy": "",
      "type": "AVRO",
      "labels": [
        "ACD"
      ],
      "state": "ENABLED",
      "globalId": 47,
      "version": "2",
      "properties": {
        "date": "June 24"
      },
      "contentId": 36,
      "references": []
    },
    {
      "name": "AgentStateSegment",
      "description": "",
      "createdOn": "2024-07-09T20:29:04.000+00:00",
      "createdBy": "",
      "type": "AVRO",
      "labels": [
        "ACD"
      ],
      "state": "ENABLED",
      "globalId": 48,
      "version": "3",
      "properties": {
        "date": "June 24"
      },
      "contentId": 37,
      "references": []
    }
  ]
}

Is this a bug, or am I doing something wrong?

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    Status

    Backlog

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions