Get audit application info - Null values

cancel
Showing results for 
Search instead for 
Did you mean: 
renatoc1
Active Member II

Get audit application info - Null values

I created an API that will consume Alfresco APIs. Why am I getting null values when i consume the endpoint from my service?

The endpoint 

http://localhost:8080/alfresco/api/-default-/public/alfresco/versions/1/audit-applications/tagging

return 

{
    "entry": {
        "isEnabled": true,
        "name": "Alfresco Tagging Service",
        "id": "tagging"
    }
}

But when i call 

localhost:8081/api/v1/audit-applications/tagging

that will consume Alfresco by Feign Client return

{
    "id": null,
    "name": null,
    "isEnabled": true
}

 AuditApp:

@Validated
@Builder
@Data
@AllArgsConstructor
@NoArgsConstructor
public class AuditApp implements Serializable {
	
	private static final long serialVersionUID = 3711249989390965220L;

	@NotNull
	private String id;

	private String name;

	@Builder.Default
	private Boolean isEnabled = true;

}

The Feign Client:

@GetMapping(value = "/audit-applications/{auditApplicationId}")
ResponseEntity<AuditApp> getAuditApp(@PathVariable("auditApplicationId") String auditApplicationId,
		@RequestParam(value = "fields", required = false) List<String> fields);

The Controller:

@GetMapping("/audit-applications/{auditApplicationId}")
public ResponseEntity<AuditApp> getAuditApp(@PathVariable("auditApplicationId") String auditApplicationId,
		@RequestParam(value = "fields", required = false) List<String> fields) {
	ResponseEntity<AuditApp> auditApp = auditApiClient.getAuditApp(auditApplicationId, fields);
	return new ResponseEntity<AuditApp>(auditApp.getBody(), HttpStatus.OK);
}

 

1 Reply
renatoc1
Active Member II

Re: Get audit application info - Null values

Up