@@ -92,4 +92,58 @@ public void setFiwareService(String fiwareService) {
9292 public ResponseSpec createEntity (String contentType , Object body ) {
9393 return this .client .createEntity (contentType , body );
9494 }
95+
96+ /**
97+ * Retrieves an entity with the specified parameters.
98+ *
99+ * @param entityId The ID of the entity to retrieve.
100+ * @param type The type of the entity.
101+ * @param attrs Comma-separated list of attribute names to include in the response. If null, all attributes are returned.
102+ * @param metadata Comma-separated list of metadata names to include. If null, all metadata is returned.
103+ * @param options Options to modify the response format (e.g., "keyValues" for simplified representation).
104+ * @return The response specification for the entity retrieval request.
105+ *
106+ * <p>
107+ * Use this overload to fully customize the entity retrieval, including which attributes,
108+ * metadata, and options are used. The {@code options} parameter allows you to control
109+ * the response format; for example, "keyValues" returns a simplified JSON object.
110+ * </p>
111+ */
112+ public ResponseSpec getEntity (String entityId , String type , String attrs , String metadata , String options ) {
113+ return this .entities ().retrieveEntityWithResponseSpec (entityId , type , attrs , metadata , "keyValues" );
114+ }
115+
116+ /**
117+ * Retrieves an entity with the specified ID, type, and attributes.
118+ *
119+ * @param entityId The ID of the entity to retrieve.
120+ * @param type The type of the entity.
121+ * @param attrs Comma-separated list of attribute names to include in the response. If null, all attributes are returned.
122+ * @return The response specification for the entity retrieval request.
123+ *
124+ * <p>
125+ * This overload defaults {@code metadata} to {@code null} (all metadata) and {@code options} to {@code "keyValues"}
126+ * for a simplified response format.
127+ * </p>
128+ */
129+ public ResponseSpec getEntity (String entityId , String type , String attrs ) {
130+ return this .entities ().retrieveEntityWithResponseSpec (entityId , type , attrs , null , "keyValues" );
131+ }
132+
133+ /**
134+ * Retrieves an entity with the specified ID and type.
135+ *
136+ * @param entityId The ID of the entity to retrieve.
137+ * @param type The type of the entity.
138+ * @return The response specification for the entity retrieval request.
139+ *
140+ * <p>
141+ * This overload defaults {@code attrs} and {@code metadata} to {@code null} (all attributes and metadata),
142+ * and {@code options} to {@code "keyValues"} for a simplified response format.
143+ * </p>
144+ */
145+ public ResponseSpec getEntity (String entityId , String type ) {
146+ return this .entities ().retrieveEntityWithResponseSpec (entityId , type , null , null , "keyValues" );
147+ }
148+
95149}
0 commit comments