> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://docs.yunojuno.com/client-api/async-requests/retrieve/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.yunojuno.com/_mcp/server. # Retrieve an async request GET https://api.yunojuno.com/async_requests/{async_request_id}/ Retrieve the status and details of an asynchronous request. YunoJuno processes certain operations asynchronously when they involve large amounts of data that would exceed typical API request timeouts. Operations such as bulk timesheet creation, bulk project updates via file upload, and client data list updates are handled this way. When you submit one of these operations, the API immediately returns an async request identifier rather than waiting for the operation to complete. This endpoint allows you to check the progress of these background operations. The response includes the current processing state, timing information, and any error details if the operation failed. The `state` field indicates whether the request is still being processed (`SUBMITTED`), has completed successfully (`PROCESSED`), or encountered an error (`FAILED`). The `source` field identifies what type of operation created the async request, such as `CREATE_TIMESHEETS_BULK` or `UPSERT_PROJECTS_BULK_VIA_FILE`. Processing times vary based on the operation size and complexity. Small operations with fewer than 100 records typically complete within 30 seconds, while operations involving thousands of records may take several minutes. The `created_at` timestamp shows when the request was submitted, and `processed_at` indicates when processing completed (this field remains null while the request is still being processed). Reference: https://docs.yunojuno.com/client-api/async-requests/retrieve ## Authentication - `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer `, where token is your auth token. ## Request ### Path parameters - `async_request_id` (string, required) — The unique identifier of the asynchronous request. This identifier is provided in the response when submitting bulk operations such as timesheet creation or project updates. All async request IDs follow the format 'areq_' followed by a unique string. ## Response ### 200 - `data` (AsyncRequest, required) — The asynchronous request object. This object represents a request that has been submitted for further background processing. ## Types ### AsyncRequest The asynchronous request object. This object represents a request that has been submitted for further background processing. - `async_request_id` (string, required) - `async_request_url` (string, required) — Get the fully qualified URL for this async request. - `state` (string, required) - `source` (string, required) - `created_at` (string, required) - `processed_at` (string, required, nullable) — Get the timestamp when the request was processed. - `error_message` (string, required) ## Examples **Response** ```json { "data": { "async_request_id": "string", "async_request_url": "string", "state": "string", "source": "string", "created_at": "2024-01-15T09:30:00Z", "processed_at": "2024-01-15T09:30:00Z", "error_message": "string" } } ``` **SDK Code** ```python import requests url = "https://api.yunojuno.com/async_requests/areq_clxy9abc123def456ghi/" headers = {"Authorization": "Bearer "} response = requests.get(url, headers=headers) print(response.json()) ``` ```javascript const url = 'https://api.yunojuno.com/async_requests/areq_clxy9abc123def456ghi/'; const options = {method: 'GET', headers: {Authorization: 'Bearer '}}; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go package main import ( "fmt" "net/http" "io" ) func main() { url := "https://api.yunojuno.com/async_requests/areq_clxy9abc123def456ghi/" req, _ := http.NewRequest("GET", url, nil) req.Header.Add("Authorization", "Bearer ") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby require 'uri' require 'net/http' url = URI("https://api.yunojuno.com/async_requests/areq_clxy9abc123def456ghi/") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Get.new(url) request["Authorization"] = 'Bearer ' response = http.request(request) puts response.read_body ``` ```java import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.get("https://api.yunojuno.com/async_requests/areq_clxy9abc123def456ghi/") .header("Authorization", "Bearer ") .asString(); ``` ```php request('GET', 'https://api.yunojuno.com/async_requests/areq_clxy9abc123def456ghi/', [ 'headers' => [ 'Authorization' => 'Bearer ', ], ]); echo $response->getBody(); ``` ```csharp using RestSharp; var client = new RestClient("https://api.yunojuno.com/async_requests/areq_clxy9abc123def456ghi/"); var request = new RestRequest(Method.GET); request.AddHeader("Authorization", "Bearer "); IRestResponse response = client.Execute(request); ``` ```swift import Foundation let headers = ["Authorization": "Bearer "] let request = NSMutableURLRequest(url: NSURL(string: "https://api.yunojuno.com/async_requests/areq_clxy9abc123def456ghi/")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "GET" request.allHTTPHeaderFields = headers let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ```