Solved

Valid value for updated_by

  • 17 October 2023
  • 3 replies
  • 35 views

Is there any way I can get a valid value for the attribute ‘updated_by’ ? By using the Automation hub I am publishing the entries to AWS SQS queues and consuming them in a different application.

I need to do some validations based on the ‘updated_by’ field, but I am getting only the ID for the user. ("updated_by": "blt*******40a").

@shailesh Mishra, any help or suggestions are appreciated.

icon

Best answer by shailesh Mishra 17 October 2023, 19:06

View original

3 replies

Userlevel 1

@lalatendu Based on previous experience, Assuming that you are using the Java Management SDK in your project. If that is the case, you can use the following code snippet for your request:

import contentstack;
Contentstack contentstack = new Contentstack.Builder().build();
Entry entry = contentstack.stack().entry();
entry.addParam("query", {"updated_by": "blt********"});
Call<ResponseBody> response = entry.find().execute();
if (response.isSuccessful) {
System.out.println("Response" + response);
}

Let me know if this works for you, or in case you have any other questions.

@shailesh Mishra Thank you and appreciate your quick response.

@shailesh Mishra 

Sorry for the question again. Actually, my initial requirement was I wanted the user name instead of the user ID. 

 

Example :

Instead of this - "updated_by": "blt*******40a"

 

How can I get - "updated_by": "lalatendu"

Reply