Hari Haran R
07/07/2025, 7:57 AM{
"status": 500,
"body": {
"message": "An error has occurred.",
"exceptionMessage": "The number of concurrent API logins specified for your user account on the Users (SM201010) form has been reached.",
"exceptionType": "PX.Data.PXException",
"stackTrace": " at PX.LicensePolicy.PXLicensePolicy.CheckApiUsersLimits(HttpContextBase c)\r\n at PX.Data.PXLogin.LoginUserImpl(HttpContext httpContext, String userName, String password)\r\n at PX.Data.PXLogin.PX.Data.IPXLogin.LoginUser(String& userName, String password)\r\n at PX.Api.Services.LoginService.PX.Api.Services.ILoginService.Login(String login, String password, String company, String branch, String locale, String prefix)\r\n at PX.Api.ContractBased.ILoginServiceExtensions.LoginForSoapApi(ILoginService loginService, IMultiFactorService multiFactorService, String login, String password, String company, String branch, String locale)\r\n at PX.Api.ContractBased.WebApi.Controllers.AuthController.Login(Credentials credentials)\r\n at lambda_method(Closure , Object , Object[] )\r\n at Microsoft.AspNetCore.Mvc.Internal.ActionMethodExecutor.SyncActionResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)\r\n at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.<InvokeActionMethodAsync>d__12.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.<InvokeNextActionFilterAsync>d__10.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Rethrow(ActionExecutedContext context)\r\n at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)\r\n at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.<InvokeInnerFilterAsync>d__13.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.<InvokeNextExceptionFilterAsync>d__24.MoveNext()"
},
"headers": {
"Cache-Control": "private",
"Content-Type": "application/json; charset=utf-8",
"Content-Encoding": "gzip",
"Vary": "Accept-Encoding",
"Set-Cookie": "ASP.NET_SessionId=0trnb0
how to use this methodskapa.ai
07/07/2025, 7:57 AMHttpAuthenticator and manually extract the cookie from the response headers, as shown in the example below: python class CookieAuthenticator(HttpAuthenticator): def __init__(self, config): self.cookie_jar = self.login(config["username"], config["password"]) def login(self, username, password): login_url = "https://your.api/login" resp = requests.post(url=login_url, json={"username": username, "password": password}) resp.raise_for_status() return resp.cookies def get_auth_header(self) -> Mapping[str, Any]: return {"cookie": "; ".join([f"{k}={v}" for k, v in requests.utils.dict_from_cookiejar(self.cookie_jar).items()])} You would then pass this authenticator to your custom stream [[Forum: Cookie-based authentication](https://discuss.airbyte.io/t/549)]. Summary: - The Connector Builder UI does not currently support extracting session tokens from response headers like Set-Cookie. - For this use case, you must use a custom Python connector and authenticator. If you need further guidance on implementing this in a custom connector, let me know!Hari Haran R
07/07/2025, 7:58 AMkapa.ai
07/07/2025, 7:58 AMkapa.ai
07/07/2025, 7:58 AMjinja {{ parameters.name }} This expression will interpolate the value of the name key from the parameters context. For example, if you have: yaml some_object: $parameters: name: "airbyte" inner_object: key: "Hello {{ parameters.name }}" At runtime, key will evaluate to "Hello airbyte" [see documentation](https://docs.airbyte.com/platform/connector-development/config-based/advanced-topics/string-interpolation). You can also use bracket notation: jinja {{ parameters['name'] }} Both notations are interchangeable in Airbyte's Jinja context [see documentation](https://docs.airbyte.com/platform/connector-development/config-based/advanced-topics/string-interpolation).Hari Haran R
07/07/2025, 7:59 AMheaders['Set-Cookie'].split('ASP.NET_SessionId=')[1].split(';')[0]kapa.ai
07/07/2025, 7:59 AMkapa.ai
07/07/2025, 7:59 AMheaders and use filters like regex_search, but there is no explicit support for using Python-like string methods (such as .split()) directly in Jinja expressions within Airbyte YAML files. To extract a value from a header, you should use the regex_search filter. For example, to extract the ASP.NET_SessionId from the Set-Cookie header, you can use: jinja {{ headers['Set-Cookie'] | regex_search('ASP.NET_SessionId=([^;]+)') }} This will return the value of ASP.NET_SessionId from the Set-Cookie header, as long as the header contains that pattern. The regex_search filter is documented as the way to extract values using regular expressions in Airbyte's Jinja context [see YAML Reference: Interpolation filters](https://docs.airbyte.com/platform/connector-development/config-based/understanding-the-yaml-file/reference#filters). Summary: - Your example using .split() will not work in Airbyte Jinja expressions. - Use the regex_search filter as shown above to achieve the desired result.Hari Haran R
07/07/2025, 8:00 AMkapa.ai
07/07/2025, 8:01 AMkapa.ai
07/07/2025, 8:01 AMjinja {{ headers['Set-Cookie'] | regex_search('ASP.NET_SessionId=([^", "]+)') }} is not correct for extracting the ASP.NET_SessionId from the Set-Cookie header in Airbyte. Issues: - The regular expression 'ASP.NET_SessionId=([^", "]+)' is not appropriate for matching the session ID. The ASP.NET part is unnecessary and will not match the actual header. - The character class [^", "]+ is also incorrect for this use case. Correct Approach: According to Airbyte documentation, you should use the regex_search filter with a regular expression that matches the session ID value after ASP.NET_SessionId= and before the next semicolon. Here is the correct Jinja expression: jinja {{ headers['Set-Cookie'] | regex_search('ASP.NET_SessionId=([^;]+)') }} This will extract the value of ASP.NET_SessionId from the Set-Cookie header, as documented in the [YAML Reference: Interpolation filters](https://docs.airbyte.com/platform/connector-development/config-based/understanding-the-yaml-file/reference#filters). Summary: - Use regex_search('ASP.NET_SessionId=([^;]+)') to extract the session ID. - Do not use Python string methods or unnecessary regex patterns in Airbyte Jinja expressions. If you continue to see errors, check the logs for the exact header content and ensure the header is present in the response.Hari Haran R
07/07/2025, 8:04 AMkapa.ai
07/07/2025, 8:04 AMkapa.ai
07/07/2025, 8:04 AMSet-Cookie header value using a Jinja expression in Airbyte's config-based connector builder. The documentation and examples focus on extracting specific values from headers using regex, but do not mention a method to return the full header value as-is. If you want to extract the entire value of the Set-Cookie header, you would typically reference it as: jinja {{ headers['Set-Cookie'] }} However, the documentation does not confirm that this is supported or will work in all contexts within Airbyte's config-based connectors. If you encounter issues, it may be due to current limitations in the connector builder's support for header access, as discussed in the knowledge sources [[Session Token Path cannot reference plain/text body response](https://github.com/airbytehq/airbyte/issues/43320)]. If you need more advanced handling of headers (such as always retrieving Set-Cookie), you may need to implement a custom Python connector, as the config-based builder may not support this use case fully at this time.