@@ -135,6 +135,50 @@ def delete(
135135 raise ApiError (status_code = _response .status_code , headers = dict (_response .headers ), body = _response .text )
136136 raise ApiError (status_code = _response .status_code , headers = dict (_response .headers ), body = _response_json )
137137
138+ def retrieve (
139+ self , id : int , * , request_options : typing .Optional [RequestOptions ] = None
140+ ) -> HttpResponse [AnnotationHistory ]:
141+ """
142+ <Card href="https://humansignal.com/goenterprise">
143+ <img style="pointer-events: none; margin-left: 0px; margin-right: 0px;" src="https://docs.humansignal.com/images/badge.svg" alt="Label Studio Enterprise badge"/>
144+ <p style="margin-top: 10px; font-size: 14px;">
145+ This endpoint is not available in Label Studio Community Edition. [Learn more about Label Studio Enterprise](https://humansignal.com/goenterprise)
146+ </p>
147+ </Card>
148+ Get one annotation history item by ID with full result. Used when FIT-720 lazy load is on and the user clicks a stubbed history item to hydrate it.
149+
150+ Parameters
151+ ----------
152+ id : int
153+
154+ request_options : typing.Optional[RequestOptions]
155+ Request-specific configuration.
156+
157+ Returns
158+ -------
159+ HttpResponse[AnnotationHistory]
160+
161+ """
162+ _response = self ._client_wrapper .httpx_client .request (
163+ f"api/annotation-history/{ jsonable_encoder (id )} /" ,
164+ method = "GET" ,
165+ request_options = request_options ,
166+ )
167+ try :
168+ if 200 <= _response .status_code < 300 :
169+ _data = typing .cast (
170+ AnnotationHistory ,
171+ construct_type (
172+ type_ = AnnotationHistory , # type: ignore
173+ object_ = _response .json (),
174+ ),
175+ )
176+ return HttpResponse (response = _response , data = _data )
177+ _response_json = _response .json ()
178+ except JSONDecodeError :
179+ raise ApiError (status_code = _response .status_code , headers = dict (_response .headers ), body = _response .text )
180+ raise ApiError (status_code = _response .status_code , headers = dict (_response .headers ), body = _response_json )
181+
138182 def list_for_project (
139183 self ,
140184 id : int ,
@@ -316,6 +360,50 @@ async def delete(
316360 raise ApiError (status_code = _response .status_code , headers = dict (_response .headers ), body = _response .text )
317361 raise ApiError (status_code = _response .status_code , headers = dict (_response .headers ), body = _response_json )
318362
363+ async def retrieve (
364+ self , id : int , * , request_options : typing .Optional [RequestOptions ] = None
365+ ) -> AsyncHttpResponse [AnnotationHistory ]:
366+ """
367+ <Card href="https://humansignal.com/goenterprise">
368+ <img style="pointer-events: none; margin-left: 0px; margin-right: 0px;" src="https://docs.humansignal.com/images/badge.svg" alt="Label Studio Enterprise badge"/>
369+ <p style="margin-top: 10px; font-size: 14px;">
370+ This endpoint is not available in Label Studio Community Edition. [Learn more about Label Studio Enterprise](https://humansignal.com/goenterprise)
371+ </p>
372+ </Card>
373+ Get one annotation history item by ID with full result. Used when FIT-720 lazy load is on and the user clicks a stubbed history item to hydrate it.
374+
375+ Parameters
376+ ----------
377+ id : int
378+
379+ request_options : typing.Optional[RequestOptions]
380+ Request-specific configuration.
381+
382+ Returns
383+ -------
384+ AsyncHttpResponse[AnnotationHistory]
385+
386+ """
387+ _response = await self ._client_wrapper .httpx_client .request (
388+ f"api/annotation-history/{ jsonable_encoder (id )} /" ,
389+ method = "GET" ,
390+ request_options = request_options ,
391+ )
392+ try :
393+ if 200 <= _response .status_code < 300 :
394+ _data = typing .cast (
395+ AnnotationHistory ,
396+ construct_type (
397+ type_ = AnnotationHistory , # type: ignore
398+ object_ = _response .json (),
399+ ),
400+ )
401+ return AsyncHttpResponse (response = _response , data = _data )
402+ _response_json = _response .json ()
403+ except JSONDecodeError :
404+ raise ApiError (status_code = _response .status_code , headers = dict (_response .headers ), body = _response .text )
405+ raise ApiError (status_code = _response .status_code , headers = dict (_response .headers ), body = _response_json )
406+
319407 async def list_for_project (
320408 self ,
321409 id : int ,
0 commit comments