Class: Kombo::General
- Inherits:
-
Object
- Object
- Kombo::General
- Extended by:
- T::Sig
- Defined in:
- lib/kombo/general.rb
Instance Method Summary collapse
- #check_api_key(timeout_ms: nil) ⇒ Object
- #create_reconnection_link(body:, integration_id:, timeout_ms: nil) ⇒ Object
- #delete_integration(body:, integration_id:, timeout_ms: nil) ⇒ Object
- #get_custom_fields(integration_id:, cursor: nil, page_size: nil, timeout_ms: nil) ⇒ Object
- #get_integration_details(integration_id:, timeout_ms: nil) ⇒ Object
- #get_integration_fields(integration_id:, cursor: nil, page_size: nil, timeout_ms: nil) ⇒ Object
- #get_tools(category:, timeout_ms: nil) ⇒ Object
- #get_url(base_url:, url_variables: nil) ⇒ Object
-
#initialize(sdk_config) ⇒ General
constructor
A new instance of General.
- #send_passthrough_request(body:, tool:, api:, integration_id: nil, timeout_ms: nil) ⇒ Object
- #set_integration_enabled(body:, integration_id:, timeout_ms: nil) ⇒ Object
- #trigger_sync(body:, integration_id: nil, timeout_ms: nil) ⇒ Object
- #update_custom_field_mapping(body:, integration_id:, custom_field_id:, timeout_ms: nil) ⇒ Object
- #update_integration_field(body:, integration_id:, integration_field_id:, timeout_ms: nil) ⇒ Object
Constructor Details
#initialize(sdk_config) ⇒ General
Returns a new instance of General.
22 23 24 25 |
# File 'lib/kombo/general.rb', line 22 def initialize(sdk_config) @sdk_configuration = sdk_config end |
Instance Method Details
#check_api_key(timeout_ms: nil) ⇒ Object
44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 |
# File 'lib/kombo/general.rb', line 44 def check_api_key(timeout_ms: nil) # check_api_key - Check API key # Check whether your API key is working properly. url, params = @sdk_configuration.get_server_details base_url = Utils.template_url(url, params) url = "#{base_url}/check-api-key" headers = {} headers = T.cast(headers, T::Hash[String, String]) headers['Accept'] = 'application/json' headers['user-agent'] = @sdk_configuration.user_agent security = @sdk_configuration.security_source&.call timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? timeout ||= @sdk_configuration.timeout connection = @sdk_configuration.client hook_ctx = SDKHooks::HookContext.new( config: @sdk_configuration, base_url: base_url, oauth2_scopes: nil, operation_id: 'GetCheckApiKey', security_source: @sdk_configuration.security_source ) error = T.let(nil, T.nilable(StandardError)) http_response = T.let(nil, T.nilable(Faraday::Response)) begin http_response = T.must(connection).get(url) do |req| req.headers.merge!(headers) req..timeout = timeout unless timeout.nil? Utils.configure_request_security(req, security) @sdk_configuration.hooks.before_request( hook_ctx: SDKHooks::BeforeRequestHookContext.new( hook_ctx: hook_ctx ), request: req ) end rescue StandardError => e error = e ensure if http_response.nil? || Utils.error_status?(http_response.status) http_response = @sdk_configuration.hooks.after_error( error: error, hook_ctx: SDKHooks::AfterErrorHookContext.new( hook_ctx: hook_ctx ), response: http_response ) else http_response = @sdk_configuration.hooks.after_success( hook_ctx: SDKHooks::AfterSuccessHookContext.new( hook_ctx: hook_ctx ), response: http_response ) end if http_response.nil? raise error if !error.nil? raise 'no response' end end content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') if Utils.match_status_code(http_response.status, ['200']) if Utils.match_content_type(content_type, 'application/json') http_response = @sdk_configuration.hooks.after_success( hook_ctx: SDKHooks::AfterSuccessHookContext.new( hook_ctx: hook_ctx ), response: http_response ) response_data = http_response.env.response_body obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Shared::GetCheckApiKeyPositiveResponse) response = Models::Operations::GetCheckApiKeyResponse.new( status_code: http_response.status, content_type: content_type, raw_response: http_response, get_check_api_key_positive_response: T.unsafe(obj) ) return response else raise ::Kombo::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' end else if Utils.match_content_type(content_type, 'application/json') http_response = @sdk_configuration.hooks.after_success( hook_ctx: SDKHooks::AfterSuccessHookContext.new( hook_ctx: hook_ctx ), response: http_response ) response_data = http_response.env.response_body obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::KomboGeneralError) obj.raw_response = http_response raise obj else raise ::Kombo::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' end end end |
#create_reconnection_link(body:, integration_id:, timeout_ms: nil) ⇒ Object
1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 |
# File 'lib/kombo/general.rb', line 1009 def create_reconnection_link(body:, integration_id:, timeout_ms: nil) # create_reconnection_link - Create reconnection link # Create a link that will allow the user to reconnect an integration. This is useful if you want to allow your users to update the credentials if the old ones for example expired. # # Embed this the same way you would [embed the connect link](/connect/embedded-flow). By default, the link will be valid for 1 hour. # # ### Example Request Body # # ```json # { # "language": "en", # "scope_config_id": "9Pv6aCFwNDEzPNmwjSsY9SQx", # "link_type": "EMBEDDED" # } # ``` request = Models::Operations::PostIntegrationsIntegrationIdRelinkRequest.new( integration_id: integration_id, body: body ) url, params = @sdk_configuration.get_server_details base_url = Utils.template_url(url, params) url = Utils.generate_url( Models::Operations::PostIntegrationsIntegrationIdRelinkRequest, base_url, '/integrations/{integration_id}/relink', request, @sdk_configuration.globals ) headers = {} headers = T.cast(headers, T::Hash[String, String]) req_content_type, data, form = Utils.serialize_request_body(request, false, false, :body, :json) headers['content-type'] = req_content_type raise StandardError, 'request body is required' if data.nil? && form.nil? if form body = Utils.encode_form(form) elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded') body = URI.encode_www_form(T.cast(data, T::Hash[Symbol, Object])) else body = data end headers['Accept'] = 'application/json' headers['user-agent'] = @sdk_configuration.user_agent security = @sdk_configuration.security_source&.call timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? timeout ||= (300_000.to_f / 1000) connection = @sdk_configuration.client hook_ctx = SDKHooks::HookContext.new( config: @sdk_configuration, base_url: base_url, oauth2_scopes: nil, operation_id: 'PostIntegrationsIntegrationIdRelink', security_source: @sdk_configuration.security_source ) error = T.let(nil, T.nilable(StandardError)) http_response = T.let(nil, T.nilable(Faraday::Response)) begin http_response = T.must(connection).post(url) do |req| req.body = body req.headers.merge!(headers) req..timeout = timeout unless timeout.nil? Utils.configure_request_security(req, security) @sdk_configuration.hooks.before_request( hook_ctx: SDKHooks::BeforeRequestHookContext.new( hook_ctx: hook_ctx ), request: req ) end rescue StandardError => e error = e ensure if http_response.nil? || Utils.error_status?(http_response.status) http_response = @sdk_configuration.hooks.after_error( error: error, hook_ctx: SDKHooks::AfterErrorHookContext.new( hook_ctx: hook_ctx ), response: http_response ) else http_response = @sdk_configuration.hooks.after_success( hook_ctx: SDKHooks::AfterSuccessHookContext.new( hook_ctx: hook_ctx ), response: http_response ) end if http_response.nil? raise error if !error.nil? raise 'no response' end end content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') if Utils.match_status_code(http_response.status, ['200']) if Utils.match_content_type(content_type, 'application/json') http_response = @sdk_configuration.hooks.after_success( hook_ctx: SDKHooks::AfterSuccessHookContext.new( hook_ctx: hook_ctx ), response: http_response ) response_data = http_response.env.response_body obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Shared::PostIntegrationsIntegrationIdRelinkPositiveResponse) response = Models::Operations::PostIntegrationsIntegrationIdRelinkResponse.new( status_code: http_response.status, content_type: content_type, raw_response: http_response, post_integrations_integration_id_relink_positive_response: T.unsafe(obj) ) return response else raise ::Kombo::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' end else if Utils.match_content_type(content_type, 'application/json') http_response = @sdk_configuration.hooks.after_success( hook_ctx: SDKHooks::AfterSuccessHookContext.new( hook_ctx: hook_ctx ), response: http_response ) response_data = http_response.env.response_body obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::KomboGeneralError) obj.raw_response = http_response raise obj else raise ::Kombo::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' end end end |
#delete_integration(body:, integration_id:, timeout_ms: nil) ⇒ Object
615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 |
# File 'lib/kombo/general.rb', line 615 def delete_integration(body:, integration_id:, timeout_ms: nil) # delete_integration - Delete integration # Delete the specified integration. # **⚠️ This can not be undone!** request = Models::Operations::DeleteIntegrationsIntegrationIdRequest.new( integration_id: integration_id, body: body ) url, params = @sdk_configuration.get_server_details base_url = Utils.template_url(url, params) url = Utils.generate_url( Models::Operations::DeleteIntegrationsIntegrationIdRequest, base_url, '/integrations/{integration_id}', request, @sdk_configuration.globals ) headers = {} headers = T.cast(headers, T::Hash[String, String]) req_content_type, data, form = Utils.serialize_request_body(request, false, false, :body, :json) headers['content-type'] = req_content_type raise StandardError, 'request body is required' if data.nil? && form.nil? if form body = Utils.encode_form(form) elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded') body = URI.encode_www_form(T.cast(data, T::Hash[Symbol, Object])) else body = data end headers['Accept'] = 'application/json' headers['user-agent'] = @sdk_configuration.user_agent security = @sdk_configuration.security_source&.call timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? timeout ||= @sdk_configuration.timeout connection = @sdk_configuration.client hook_ctx = SDKHooks::HookContext.new( config: @sdk_configuration, base_url: base_url, oauth2_scopes: nil, operation_id: 'DeleteIntegrationsIntegrationId', security_source: @sdk_configuration.security_source ) error = T.let(nil, T.nilable(StandardError)) http_response = T.let(nil, T.nilable(Faraday::Response)) begin http_response = T.must(connection).delete(url) do |req| req.body = body req.headers.merge!(headers) req..timeout = timeout unless timeout.nil? Utils.configure_request_security(req, security) @sdk_configuration.hooks.before_request( hook_ctx: SDKHooks::BeforeRequestHookContext.new( hook_ctx: hook_ctx ), request: req ) end rescue StandardError => e error = e ensure if http_response.nil? || Utils.error_status?(http_response.status) http_response = @sdk_configuration.hooks.after_error( error: error, hook_ctx: SDKHooks::AfterErrorHookContext.new( hook_ctx: hook_ctx ), response: http_response ) else http_response = @sdk_configuration.hooks.after_success( hook_ctx: SDKHooks::AfterSuccessHookContext.new( hook_ctx: hook_ctx ), response: http_response ) end if http_response.nil? raise error if !error.nil? raise 'no response' end end content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') if Utils.match_status_code(http_response.status, ['200']) if Utils.match_content_type(content_type, 'application/json') http_response = @sdk_configuration.hooks.after_success( hook_ctx: SDKHooks::AfterSuccessHookContext.new( hook_ctx: hook_ctx ), response: http_response ) response_data = http_response.env.response_body obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Shared::DeleteIntegrationsIntegrationIdPositiveResponse) response = Models::Operations::DeleteIntegrationsIntegrationIdResponse.new( status_code: http_response.status, content_type: content_type, raw_response: http_response, delete_integrations_integration_id_positive_response: T.unsafe(obj) ) return response else raise ::Kombo::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' end else if Utils.match_content_type(content_type, 'application/json') http_response = @sdk_configuration.hooks.after_success( hook_ctx: SDKHooks::AfterSuccessHookContext.new( hook_ctx: hook_ctx ), response: http_response ) response_data = http_response.env.response_body obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::KomboGeneralError) obj.raw_response = http_response raise obj else raise ::Kombo::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' end end end |
#get_custom_fields(integration_id:, cursor: nil, page_size: nil, timeout_ms: nil) ⇒ Object
1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 |
# File 'lib/kombo/general.rb', line 1436 def get_custom_fields(integration_id:, cursor: nil, page_size: nil, timeout_ms: nil) # get_custom_fields - Get custom fields with current mappings # Get all custom fields available on the specified integration. # **This includes the mapping to the corresponding integration field if applicable* request = Models::Operations::GetIntegrationsIntegrationIdCustomFieldsRequest.new( integration_id: integration_id, cursor: cursor, page_size: page_size ) url, params = @sdk_configuration.get_server_details base_url = Utils.template_url(url, params) url = Utils.generate_url( Models::Operations::GetIntegrationsIntegrationIdCustomFieldsRequest, base_url, '/integrations/{integration_id}/custom-fields', request, @sdk_configuration.globals ) headers = {} headers = T.cast(headers, T::Hash[String, String]) query_params = Utils.get_query_params(Models::Operations::GetIntegrationsIntegrationIdCustomFieldsRequest, request, nil, @sdk_configuration.globals) headers['Accept'] = 'application/json' headers['user-agent'] = @sdk_configuration.user_agent security = @sdk_configuration.security_source&.call timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? timeout ||= @sdk_configuration.timeout connection = @sdk_configuration.client hook_ctx = SDKHooks::HookContext.new( config: @sdk_configuration, base_url: base_url, oauth2_scopes: nil, operation_id: 'GetIntegrationsIntegrationIdCustomFields', security_source: @sdk_configuration.security_source ) error = T.let(nil, T.nilable(StandardError)) http_response = T.let(nil, T.nilable(Faraday::Response)) begin http_response = T.must(connection).get(url) do |req| req.headers.merge!(headers) req..timeout = timeout unless timeout.nil? req.params = query_params Utils.configure_request_security(req, security) @sdk_configuration.hooks.before_request( hook_ctx: SDKHooks::BeforeRequestHookContext.new( hook_ctx: hook_ctx ), request: req ) end rescue StandardError => e error = e ensure if http_response.nil? || Utils.error_status?(http_response.status) http_response = @sdk_configuration.hooks.after_error( error: error, hook_ctx: SDKHooks::AfterErrorHookContext.new( hook_ctx: hook_ctx ), response: http_response ) else http_response = @sdk_configuration.hooks.after_success( hook_ctx: SDKHooks::AfterSuccessHookContext.new( hook_ctx: hook_ctx ), response: http_response ) end if http_response.nil? raise error if !error.nil? raise 'no response' end end content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') if Utils.match_status_code(http_response.status, ['200']) if Utils.match_content_type(content_type, 'application/json') http_response = @sdk_configuration.hooks.after_success( hook_ctx: SDKHooks::AfterSuccessHookContext.new( hook_ctx: hook_ctx ), response: http_response ) response_data = http_response.env.response_body obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Shared::GetIntegrationsIntegrationIdCustomFieldsPositiveResponse) response = Models::Operations::GetIntegrationsIntegrationIdCustomFieldsResponse.new( status_code: http_response.status, content_type: content_type, raw_response: http_response, get_integrations_integration_id_custom_fields_positive_response: T.unsafe(obj) ) sdk = self response.next_page = proc do next_cursor = Janeway.enum_for('$.data.next', JSON.parse(response_data)).search if next_cursor.nil? next nil else next_cursor = next_cursor[0] if next_cursor.nil? next nil end end sdk.get_custom_fields( integration_id: integration_id, cursor: next_cursor, page_size: page_size ) end return response else raise ::Kombo::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' end else if Utils.match_content_type(content_type, 'application/json') http_response = @sdk_configuration.hooks.after_success( hook_ctx: SDKHooks::AfterSuccessHookContext.new( hook_ctx: hook_ctx ), response: http_response ) response_data = http_response.env.response_body obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::KomboGeneralError) obj.raw_response = http_response raise obj else raise ::Kombo::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' end end end |
#get_integration_details(integration_id:, timeout_ms: nil) ⇒ Object
750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 |
# File 'lib/kombo/general.rb', line 750 def get_integration_details(integration_id:, timeout_ms: nil) # get_integration_details - Get integration details # Get the specified integration with everything you need to display it to your customer. request = Models::Operations::GetIntegrationsIntegrationIdRequest.new( integration_id: integration_id ) url, params = @sdk_configuration.get_server_details base_url = Utils.template_url(url, params) url = Utils.generate_url( Models::Operations::GetIntegrationsIntegrationIdRequest, base_url, '/integrations/{integration_id}', request, @sdk_configuration.globals ) headers = {} headers = T.cast(headers, T::Hash[String, String]) headers['Accept'] = 'application/json' headers['user-agent'] = @sdk_configuration.user_agent security = @sdk_configuration.security_source&.call timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? timeout ||= @sdk_configuration.timeout connection = @sdk_configuration.client hook_ctx = SDKHooks::HookContext.new( config: @sdk_configuration, base_url: base_url, oauth2_scopes: nil, operation_id: 'GetIntegrationsIntegrationId', security_source: @sdk_configuration.security_source ) error = T.let(nil, T.nilable(StandardError)) http_response = T.let(nil, T.nilable(Faraday::Response)) begin http_response = T.must(connection).get(url) do |req| req.headers.merge!(headers) req..timeout = timeout unless timeout.nil? Utils.configure_request_security(req, security) @sdk_configuration.hooks.before_request( hook_ctx: SDKHooks::BeforeRequestHookContext.new( hook_ctx: hook_ctx ), request: req ) end rescue StandardError => e error = e ensure if http_response.nil? || Utils.error_status?(http_response.status) http_response = @sdk_configuration.hooks.after_error( error: error, hook_ctx: SDKHooks::AfterErrorHookContext.new( hook_ctx: hook_ctx ), response: http_response ) else http_response = @sdk_configuration.hooks.after_success( hook_ctx: SDKHooks::AfterSuccessHookContext.new( hook_ctx: hook_ctx ), response: http_response ) end if http_response.nil? raise error if !error.nil? raise 'no response' end end content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') if Utils.match_status_code(http_response.status, ['200']) if Utils.match_content_type(content_type, 'application/json') http_response = @sdk_configuration.hooks.after_success( hook_ctx: SDKHooks::AfterSuccessHookContext.new( hook_ctx: hook_ctx ), response: http_response ) response_data = http_response.env.response_body obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Shared::GetIntegrationsIntegrationIdPositiveResponse) response = Models::Operations::GetIntegrationsIntegrationIdResponse.new( status_code: http_response.status, content_type: content_type, raw_response: http_response, get_integrations_integration_id_positive_response: T.unsafe(obj) ) return response else raise ::Kombo::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' end else if Utils.match_content_type(content_type, 'application/json') http_response = @sdk_configuration.hooks.after_success( hook_ctx: SDKHooks::AfterSuccessHookContext.new( hook_ctx: hook_ctx ), response: http_response ) response_data = http_response.env.response_body obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::KomboGeneralError) obj.raw_response = http_response raise obj else raise ::Kombo::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' end end end |
#get_integration_fields(integration_id:, cursor: nil, page_size: nil, timeout_ms: nil) ⇒ Object
1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 |
# File 'lib/kombo/general.rb', line 1155 def get_integration_fields(integration_id:, cursor: nil, page_size: nil, timeout_ms: nil) # get_integration_fields - Get integration fields # Get all fields available on the specified integration. # **This includes the mapping to your custom fields** request = Models::Operations::GetIntegrationsIntegrationIdIntegrationFieldsRequest.new( integration_id: integration_id, cursor: cursor, page_size: page_size ) url, params = @sdk_configuration.get_server_details base_url = Utils.template_url(url, params) url = Utils.generate_url( Models::Operations::GetIntegrationsIntegrationIdIntegrationFieldsRequest, base_url, '/integrations/{integration_id}/integration-fields', request, @sdk_configuration.globals ) headers = {} headers = T.cast(headers, T::Hash[String, String]) query_params = Utils.get_query_params(Models::Operations::GetIntegrationsIntegrationIdIntegrationFieldsRequest, request, nil, @sdk_configuration.globals) headers['Accept'] = 'application/json' headers['user-agent'] = @sdk_configuration.user_agent security = @sdk_configuration.security_source&.call timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? timeout ||= @sdk_configuration.timeout connection = @sdk_configuration.client hook_ctx = SDKHooks::HookContext.new( config: @sdk_configuration, base_url: base_url, oauth2_scopes: nil, operation_id: 'GetIntegrationsIntegrationIdIntegrationFields', security_source: @sdk_configuration.security_source ) error = T.let(nil, T.nilable(StandardError)) http_response = T.let(nil, T.nilable(Faraday::Response)) begin http_response = T.must(connection).get(url) do |req| req.headers.merge!(headers) req..timeout = timeout unless timeout.nil? req.params = query_params Utils.configure_request_security(req, security) @sdk_configuration.hooks.before_request( hook_ctx: SDKHooks::BeforeRequestHookContext.new( hook_ctx: hook_ctx ), request: req ) end rescue StandardError => e error = e ensure if http_response.nil? || Utils.error_status?(http_response.status) http_response = @sdk_configuration.hooks.after_error( error: error, hook_ctx: SDKHooks::AfterErrorHookContext.new( hook_ctx: hook_ctx ), response: http_response ) else http_response = @sdk_configuration.hooks.after_success( hook_ctx: SDKHooks::AfterSuccessHookContext.new( hook_ctx: hook_ctx ), response: http_response ) end if http_response.nil? raise error if !error.nil? raise 'no response' end end content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') if Utils.match_status_code(http_response.status, ['200']) if Utils.match_content_type(content_type, 'application/json') http_response = @sdk_configuration.hooks.after_success( hook_ctx: SDKHooks::AfterSuccessHookContext.new( hook_ctx: hook_ctx ), response: http_response ) response_data = http_response.env.response_body obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Shared::GetIntegrationsIntegrationIdIntegrationFieldsPositiveResponse) response = Models::Operations::GetIntegrationsIntegrationIdIntegrationFieldsResponse.new( status_code: http_response.status, content_type: content_type, raw_response: http_response, get_integrations_integration_id_integration_fields_positive_response: T.unsafe(obj) ) sdk = self response.next_page = proc do next_cursor = Janeway.enum_for('$.data.next', JSON.parse(response_data)).search if next_cursor.nil? next nil else next_cursor = next_cursor[0] if next_cursor.nil? next nil end end sdk.get_integration_fields( integration_id: integration_id, cursor: next_cursor, page_size: page_size ) end return response else raise ::Kombo::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' end else if Utils.match_content_type(content_type, 'application/json') http_response = @sdk_configuration.hooks.after_success( hook_ctx: SDKHooks::AfterSuccessHookContext.new( hook_ctx: hook_ctx ), response: http_response ) response_data = http_response.env.response_body obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::KomboGeneralError) obj.raw_response = http_response raise obj else raise ::Kombo::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' end end end |
#get_tools(category:, timeout_ms: nil) ⇒ Object
1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 |
# File 'lib/kombo/general.rb', line 1717 def get_tools(category:, timeout_ms: nil) # get_tools - Get tools # Get a list of the tools (i.e., integrations) enabled in your environment. # This can (in combination with the `integration_tool` parameter of [the "Create Link" endpoint](/v1/post-create-link)) be used to, for example, display a custom list or grid of available integrations to your end users instead of exposing Kombo Connect's standard tool selector. request = Models::Operations::GetToolsCategoryRequest.new( category: category ) url, params = @sdk_configuration.get_server_details base_url = Utils.template_url(url, params) url = Utils.generate_url( Models::Operations::GetToolsCategoryRequest, base_url, '/tools/{category}', request, @sdk_configuration.globals ) headers = {} headers = T.cast(headers, T::Hash[String, String]) headers['Accept'] = 'application/json' headers['user-agent'] = @sdk_configuration.user_agent security = @sdk_configuration.security_source&.call timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? timeout ||= @sdk_configuration.timeout connection = @sdk_configuration.client hook_ctx = SDKHooks::HookContext.new( config: @sdk_configuration, base_url: base_url, oauth2_scopes: nil, operation_id: 'GetToolsCategory', security_source: @sdk_configuration.security_source ) error = T.let(nil, T.nilable(StandardError)) http_response = T.let(nil, T.nilable(Faraday::Response)) begin http_response = T.must(connection).get(url) do |req| req.headers.merge!(headers) req..timeout = timeout unless timeout.nil? Utils.configure_request_security(req, security) @sdk_configuration.hooks.before_request( hook_ctx: SDKHooks::BeforeRequestHookContext.new( hook_ctx: hook_ctx ), request: req ) end rescue StandardError => e error = e ensure if http_response.nil? || Utils.error_status?(http_response.status) http_response = @sdk_configuration.hooks.after_error( error: error, hook_ctx: SDKHooks::AfterErrorHookContext.new( hook_ctx: hook_ctx ), response: http_response ) else http_response = @sdk_configuration.hooks.after_success( hook_ctx: SDKHooks::AfterSuccessHookContext.new( hook_ctx: hook_ctx ), response: http_response ) end if http_response.nil? raise error if !error.nil? raise 'no response' end end content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') if Utils.match_status_code(http_response.status, ['200']) if Utils.match_content_type(content_type, 'application/json') http_response = @sdk_configuration.hooks.after_success( hook_ctx: SDKHooks::AfterSuccessHookContext.new( hook_ctx: hook_ctx ), response: http_response ) response_data = http_response.env.response_body obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Shared::GetToolsCategoryPositiveResponse) response = Models::Operations::GetToolsCategoryResponse.new( status_code: http_response.status, content_type: content_type, raw_response: http_response, get_tools_category_positive_response: T.unsafe(obj) ) return response else raise ::Kombo::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' end else if Utils.match_content_type(content_type, 'application/json') http_response = @sdk_configuration.hooks.after_success( hook_ctx: SDKHooks::AfterSuccessHookContext.new( hook_ctx: hook_ctx ), response: http_response ) response_data = http_response.env.response_body obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::KomboGeneralError) obj.raw_response = http_response raise obj else raise ::Kombo::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' end end end |
#get_url(base_url:, url_variables: nil) ⇒ Object
28 29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/kombo/general.rb', line 28 def get_url(base_url:, url_variables: nil) sd_base_url, = @sdk_configuration.get_server_details if base_url.nil? base_url = sd_base_url end if url_variables.nil? url_variables = end return Utils.template_url base_url, url_variables end |
#send_passthrough_request(body:, tool:, api:, integration_id: nil, timeout_ms: nil) ⇒ Object
286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 |
# File 'lib/kombo/general.rb', line 286 def send_passthrough_request(body:, tool:, api:, integration_id: nil, timeout_ms: nil) # send_passthrough_request - Send passthrough request # Send a request to the specified integration's native API. # # At Kombo we put a lot of work into making sure that our unified API covers all our customers' use cases and that they never have to think about integration-specific logic again. There are cases, however, where our customers want to build features that are very integration-specific. That's where this endpoint comes in. # # Pass in details about the request you want to make to the integration's API and we'll forward it for you. We'll also take care of setting the right base URL and authenticating your requests. # # To get started, please pick the relevant API (some tools provide multiple to due different base URLs or authentication schemes) from the table below and pass in the `{tool}/{api}` identifier as part of the path. # # |Integration|`{tool}/{api}`|Description| # |---|---|---| # |360Learning|`360learning/v2`|360Learning [API v2](https://360learning.readme.io/docs). We automatically handle authentication and use `https://app.360learning.com/api/v2/` as the base URL.| # |a3innuva Nómina|`a3innuvanomina/laboral`|a3innuva Nómina API [docs](https://a3developers.wolterskluwer.es/). Requests are automatically authenticated using OAuth access tokens (refreshed when needed). Base URL: `https://a3api.wolterskluwer.es/Laboral/api`.| # |Abacus Umantis|`abacusumantis/v1`|[Umantis API v1](https://recruitingapp-91005709.umantis.com/api/v1/swagger-ui). We automatically authenticate all requests and use `https://\{subdomain\}.umantis.com/api/v1` as the base URL.| # |Abacus|`abacus/api`|Abacus [REST API](https://apihub.abacus.ch/). We automatically authenticate all requests and use `https://\{\{abacusUrl\}\}/api/entity/v1/mandants/\{\{mandantId\}\}` as the base URL.| # |Absence.io|`absenceio/v2`|Absence.io [API](https://docs.absence.io/). We automatically authenticate all requests and use `https://app.absence.io/api/v2` as the base URL.| # |ADP Workforce Now|`adpworkforcenow/default`|[ADP Workforce Now API v2](https://developers.adp.com/build/api-explorer/hcm-offrg-wfn). We automatically authenticate all requests and use the correct subdomain.| # |AFAS Software|`afas/api`|AFAS' [API](https://connect.afas.nl/rest/get). We automatically authenticate all requests and use `https://\{domain\}/ProfitRestServices` as the base URL.| # |AlexisHR|`alexishr/v1`|[AlexisHR's v1 API](https://docs.alexishr.com/) We automatically authenticate all requests and use `https://\{subdomain\}.alexishr.com` as base URL.| # |ApplicantStack|`applicantstack/api`|ApplicantStack's [API](https://helpas.payrollservers.info/s/article/API-Integration-Guide). We automatically authenticate all requests and use `https://\{subdomain\}.applicantstack.com/api/` as the base URL.| # |Apploi|`apploi/rest-api`|The [Apploi API](https://integrate.apploi.com/). We automatically authenticate all requests and use `https://partners.apploi.com/` as the base URL.| # |Ashby|`ashby/v1`|Ashby's [V1 API](https://developers.ashbyhq.com/reference/introduction). We automatically authenticate all requests with the provided credentials and use `https://api.ashbyhq.com` as the base URL. Please note that Ashby uses an RPC-style API. Please check [the Ashby API documentation](https://developers.ashbyhq.com/reference/introduction) for details on how to use it.| # |Asymbl|`asymbl/v63`|We use `https://\{subdomain\}.my.salesforce.com` as the base URL. Find the official docs [here](https://asymblinc.github.io/ats/ats.html).| # |Avature|`avature/custom-api`|Avatures's Custom API. Call `Get /openapi` to retrieve the specific custom API schema. We automatically authenticate all requests and use the instance specific custom API URL as the base URL.| # |Avionté|`avionte/front-office-v1`|Avionte's API. We automatically authenticate all requests and use `https://api.avionte.com/front-office/v1` as the base URL. Documentation for the BOLD Front Office API: https://developer.avionte.com/reference/get-all-talent-tags| # |BambooHR|`bamboohr/v1`|BambooHR's [API](https://documentation.bamboohr.com/reference/get-employee). We automatically authenticate all requests using the customer credentials `https://api.bamboohr.com/api/gateway.php/\{subdomain\}/v1` as the base URL.| # |BITE|`bite/v1`|[Bite's v1 API](https://api.b-ite.io/docs/#/). We automatically authenticate all requests and use 'https://api.b-ite.io/v1' as base URL.| # |BoondManager|`boondmanager/api`|BoondManager [REST API](https://ui.boondmanager.com/administrator/developer/apisandbox). We automatically authenticate all requests and use `https://ui.boondmanager.com/api` as the base URL.| # |Breezy HR|`breezyhr/v3`|[BreezyHR's v3 API](https://developer.breezy.hr/reference/overview). We automatically authenticate all requests and use "https://api.breezy.hr/v3/" as the base URL.| # |Bullhorn|`bullhorn/default`|[Bullhorn's API](https://bullhorn.github.io/rest-api-docs/index.html). We automatically use the right `https://rest.bullhornstaffing.com/rest-services/\{corpToken\}` base URL.| # |CareerPlug|`careerplug/api`|We use `https://api.careerplug.com` as the base URL. Find the official docs [here](https://api.careerplug.com/docs#api).| # |Carerix|`carerix/api`|Carerix [REST API](https://docs.carerix.io/rest/introduction). We automatically authenticate all requests and use `https://api.carerix.com` as the base URL. Please note that Carerix uses XML for request and response bodies.| # |CEGID TalentSoft Customer|`talentsoftcustomer/v1`|Cegid Talentsoft Recruiting FrontOffice API: [API Documentation](https://developers.cegid.com/api-details#api=cegid-talentsoft-recruiting-frontoffice) We automatically authenticate all requests and use `https://\{customer_subdomain\}.talent-soft.com/api/v1` as the base URL.| # |CEGID TalentSoft FrontOffice|`talentsoft/v2`|Cegid Talentsoft Recruiting FrontOffice [API](https://developers.cegid.com/api-details). We automatically authenticate all requests using the provided credentials and use `https://\{domain\}/api/v2` as the base URL.| # |Ceipal|`ceipal/v1`|We use `https://api.ceipal.com/v1` as the base URL. Find the official docs [here](https://developer.ceipal.com/ceipal-ats-version-one/ceipal-ats-v1-api-reference).| # |Cezanne HR|`cezannehr/dataservice`|[CezanneHR's v7 dataservice API](https://api.cezannehr.com/).We automatically authenticate all requests and use the base URL `https://subdomain.cezanneondemand.com/cezanneondemand/v7/dataservice.svc`| # |Compleet|`compleetpitcher/pitcher`|Compleet's Pitcher API. We automatically authenticate all requests and use the configured base URL.| # |Connexys By Bullhorn|`connexys/api`|[Connexy's API](https://api.conexsys.com/client/v2/docs/#section/Overview). We automatically authenticate all requests and use `https://\{connexys_domain\}/` as the base URL.| # |Cornerstone OnDemand|`cornerstoneondemand/learning`|Cornerstone's [Learning API](https://csod.dev/reference/learning/). We automatically authenticate all requests using the client ID and secret and use `https://\{your_domain\}.csod.com/services/api` as the base URL.| # |Cornerstone OnDemand|`cornerstoneondemand/recruiting`|Cornerstone's [Recruiting API](https://csod.dev/reference/recruiting/). We automatically authenticate all requests using the client ID and secret and use `https://\{your_domain\}.csod.com/services/api` as the base URL.| # |Cornerstone TalentLink|`cornerstonetalentlink/apply`|Cornerstone TalentLink's Apply API. We automatically authenticate all requests using the provided credentials and API key, and use `https://apiproxy.shared.lumessetalentlink.com/apply` as the base URL.| # |Cornerstone TalentLink|`cornerstonetalentlink/rest`|Cornerstone TalentLink's [REST API](https://developer.lumesse-talenthub.com/rest-api-developers-guide/1.21.33/index.html?page=rest-api&subpage=introduction). We automatically authenticate all requests using the provided credentials and API key, and use `https://apiproxy.shared.lumessetalentlink.com/tlk/rest` as the base URL.| # |Coveto (legacy SOAP API)|`coveto/public`|We automatically use `https://\{subdomain\}.coveto.de` as the base URL.| # |Coveto (REST API)|`covetorest/v1`|We automatically use `https://\{subdomain\}.coveto.de/public/api/v1` as the base URL. https://demo.coveto.de/swagger-ui/index.html#/| # |Crelate|`crelate/api`|Crelate [REST API](https://app.crelate.com/api3/docs/index.html). We automatically authenticate all requests and use `https://app.crelate.com/api3` as the base URL.| # |d.vinci admin|`dvinciadmin/odata-api`|[DVinci ODATA API](https://dvinci.freshdesk.com/en/support/solutions/articles/75000059523-odata-reporting-api).| # |d.vinci admin|`dvinciadmin/rest-api`|[DVinci REST API](https://static.dvinci-easy.com/files/d.vinci%20rest-api.html).| # |d.vinci|`dvinci/apply-api`|The [DVinci Apply API](https://static.dvinci-easy.com/files/d.vinci%20application-apply-api.html). All requests are authenticated by Kombo and use `https://\{dvinci_domain\}/p/\{portal_path\}/` as the base URL.| # |d.vinci|`dvinci/rest-api`|The [DVinci REST API](https://static.dvinci-easy.com/files/d.vinci%20rest-api.html). All requests are authenticated by Kombo and use `https://\{dvinci_domain\}/restApi/` as the base URL.| # |DATEV LAUDS|`datevlauds/lauds`|DATEV's [hr-exchange](https://developer.datev.de/de/product-detail/hr-exchange/1.0.0/overview). We automatically authenticate all requests and use `https://hr-exchange.api.datev.de/\{platform|platform-sandbox\}/v1/clients/\{client-id\}` as the base URL.| # |DATEV LODAS|`datev/eau`|DATEV's [eau](https://developer.datev.de/en/product-detail/eau-api/1.0.0/overview) API. We automatically authenticate all requests and use `https://eau.api.datev.de/\{platform|platform-sandbox\}/v1/clients/\{client-id\}/` as the base URL.| # |DATEV|`datevhr/eau`|DATEV's [eau](https://developer.datev.de/en/product-detail/eau-api/1.0.0/overview) API. We automatically authenticate all requests and use `https://eau.api.datev.de/\{platform|platform-sandbox\}/v1/clients/\{client-id\}/` as the base URL.| # |DATEV|`datevhr/hr-exports`|DATEV's [hr-exports](https://developer.datev.de/en/product-detail/hr-exports/1.0.0/overview). We automatically authenticate all requests and use `https://hr-exports.api.datev.de/\{platform|platform-sandbox\}/v1/clients/\{client-id\}` as the base URL.| # |DATEV|`datevhr/hr:payrollreports`|DATEV's [hr:payrollreports](https://developer.datev.de/en/product-detail/hr-payrollreports/2.0.0/overview) API. We automatically authenticate all requests and use `https://hr-payrollreports.api.datev.de/\{platform|platform-sandbox\}/v1/clients/\{client-id\}/` as the base URL.| # |Dayforce|`dayforce/V1`|[Dayforce's API](https://developers.dayforce.com/Build/Home.aspx). We automatically authenticate all requests and use `\{\{baseUrl\}\}/Api/\{\{clientNamespace\}\}/V1` as the base URL| # |Deel|`deel/api`|Deel's [API](https://developer.deel.com/reference/). We automatically authenticate all requests using the provided credentials and use `https://\{api_domain\}/rest` as the base URL.| # |Digital Recruiters|`digitalrecruiters/api`|Cegid Digital Recruiters [Talent Acquisition API](https://cegid-hr-developers.talentsoft.net/docs/tutorial-basics/Talent%20Acquisition/Getting%20Started). We automatically authenticate all requests by replacing `:token` in the request URL with your configured access token and use your configured Digital Recruiters domain as the base URL.| # |Eightfold|`eightfold/api`|Eightfold's [API](https://apidocs.eightfold.ai/). We automatically authenticate all requests and use `https://apiv2.\{region\}/api/v2/core/` as the base URL.| # |Employment Hero|`employmenthero/default`|EmploymentHero [API](https://developer.employmenthero.com/api-references/#icon-book-open-introduction). We automatically authenticate all requests using the credentials supplied by the customer and use `https://api.employmenthero.com/api` as the base URL.| # |Eploy|`eploy/api`|Eploy's [API](https://www.eploy.com/resources/developers/api-documentation/). We automatically authenticate all requests. The base URL is `https://\{hostname\}/api`, where `\{hostname\}` is either `\{subdomain\}.eploy.net` or your full custom hostname when applicable.| # |eRecruiter|`erecruiter/api`|[eRecruiter's API](https://api.erecruiter.net/swagger/ui/index). We automatically authenticate all requests and use `https://\{domain\}/Api` as the base URL.| # |Eurécia|`eurecia/api`|Eurécia [REST API](https://api.eurecia.com/eurecia/fw/swagger/index.html#/) We automatically authenticate all requests and use `https://\{domain\}/eurecia/rest` as the base URL.| # |Factorial|`factorial/api`|Factorial's [API](https://apidoc.factorialhr.com/). We automatically authenticate all requests and use `https://api.factorialhr.com/api` or `https://api.demo.factorial.dev/api` as the base URL, depending on the connected instance.| # |Flatchr|`flatchr/api`|Flatchr's [API](https://developers.flatchr.io/docs/getting_started). We automatically authenticate all requests and use `https://api.flatchr.io` as the base URL.| # |Flatchr|`flatchr/career`|Flatchr's [Career API](https://developers.flatchr.io/docs/QuickStart/Candidats/Creer_un_candidat). We automatically authenticate all requests and use `https://career.flatchr.io` as the base URL.| # |Fountain|`fountain/v2`|Fountain's [Hire API](https://developer.fountain.com/reference/get_v2-applicants). We automatically authenticate all requests and use `https://api.fountain.com/v2` as the base URL.| # |Fourth|`fourth/uk-employee`|Fourth [UK Employee API](https://developer.fourth.com/en-gb/docs/uk-employee-api/reference) We automatically authenticate all requests and use `https://api.fourth.com/hr/organisations/\{organisation_id\}/` as the base URL. We also enforce the required query params for all requests.| # |Gem|`gem/api`|Gem's [ATS API](https://api.gem.com/ats/v0/reference) We automatically authenticate all requests.| # |Google Workspace|`googleworkspace/admin`|[Googles's API](https://developers.google.com/admin-sdk/directory/reference/rest). We automatically authenticate all requests and use 'https://admin.googleapis.com' as the base URL.| # |Google Workspace|`googleworkspace/people`|[Googles's API](https://developers.google.com/people/api/rest). We automatically authenticate all requests and use 'https://people.googleapis.com' as the base URL.| # |Greenhouse Job Board|`greenhousejobboard/boards-api`|[Greenhouse Job Board API](https://developers.greenhouse.io/job-board). We automatically authenticate all requests and use 'https://boards-api.greenhouse.io/v1/boards/\{job_board_token\}' as the base URL. Optionally, you can provide a custom job_board_token to use a different job board.| # |Greenhouse|`greenhouse/harvest-v2`|Greenhouse [Harvest API v2](https://developers.greenhouse.io/harvest.html). We automatically authenticate all requests using the API key and use `https://harvest.greenhouse.io/v2` as the base URL.| # |Greenhouse|`greenhouse/harvest`|Greenhouse [Harvest API v1](https://developers.greenhouse.io/harvest.html). We automatically authenticate all requests using the API key and use `https://harvest.greenhouse.io/v1` as the base URL.| # |GuideCom|`guidecom/api`|GuideCom's API. We automatically authenticate all requests and use the configured API base URL.| # |Gusto|`gusto/v1`|[Gusto API](https://docs.gusto.com/app-integrations/docs/introduction). We automatically authenticate all requests with OAuth and use `\{api_base_url\}/v1` as the base URL (`https://api.gusto.com/v1` in production, `https://api.gusto-demo.com/v1` in development).| # |Hailey HR|`haileyhr/api`|Hailey HR's [API](https://api.haileyhr.app/docs/index.html). We automatically authenticate all requests using the provided credentials and use `https://api.haileyhr.app` as the base URL.| # |Hansalog|`hansalog/vision`|Hansalog's [Vision API](https://hansalog-vision.document360.io/docs/). We automatically authenticate all requests and use `https://\{subdomain\}.hansalog-cloud.de/vision` as the base URL.| # |Haufe Umantis|`umantis/v1`|[Umantis API v1](https://recruitingapp-91005709.umantis.com/api/v1/swagger-ui). We automatically authenticate all requests and use `https://\{subdomain\}.umantis.com/api/v1` as the base URL.| # |HeavenHR|`heavenhr/v2`|[HeavenHR API](https://api.heavenhr.com/). We automatically authenticate all requests using the provided credentials and use `https://api.heavenhr.com/api/v2` as the base URL.| # |Heyrecruit|`heyrecruit/v2`|[Heyrecruit's v2 API](https://documenter.getpostman.com/view/23241256/2s9YysBLcf#47e271ac-47c8-4c75-9cc6-b8c506e9dad6). We automatically authenticate all requests using the client ID and secret and use `https://app.heyrecruit.de/api/v2` as the base URL.| # |HiBob|`hibob/docs`|This passthrough is only used for fetching employee documents in HiBob. It is present as a workaround while we are working on a new endpoint for fetching documents in HRIS. It should not be used for any other purpose. We automatically authenticate all requests using the service user credentials and use `https://app.hibob.com/api/docs/employees/` as the base URL.| # |HiBob|`hibob/hire`|[HiBob's Hire API](https://apidocs.hibob.com/docs/how-to-integrate-with-ats-hire-api). We automatically authenticate all requests using the hire service user credentials. The base URL is configured during the integration setup.| # |HiBob|`hibob/v1`|[HiBob's v1 API](https://apidocs.hibob.com/reference/get_people). We automatically authenticate all requests using the service user credentials (or, for old integrations, the API key) and use `https://api.hibob.com/v1` as the base URL.| # |HoorayHR|`hoorayhr/api`|[HoorayHR API](https://api.hoorayhr.io/documentation/). We automatically authenticate all requests and use `https://api.hoorayhr.io` as the base URL.| # |HR Office|`hroffice/soap`|[HROffice SOAP API](https://api.hroffice.nl/HROfficeCoreService.asmx). We automatically authenticate all requests and wrap them in a SOAP envelope. Build the request `Body` with the raw XML parameters for your operation (e.g., `\<languageId\>1\</languageId\>`). Use `/` as your `path`. Set your `method` to `POST`. You need to specify the `api_options` object and set `operation_name` to the SOAP operation you want to call (e.g., `GetAllJobByLanguage`).| # |HR WORKS|`hrworks/v2`|HRWorks's v2 [API](https://developers.hrworks.de/2.0/endpoints). We automatically authenticate all requests using the customer credentials.| # |HR4YOU|`hr4you/v2`|[HR4YOU's v2 API](https://apiprodemo.hr4you.org/api2/docs). We automatically authenticate all requests and use the customers provided base URL (e.g., https://`\{base_url\}`/ or https://`\{subdomain\}.hr4you.org`/).| # |Humaans|`humaans/api`|Humaans' [API](https://docs.humaans.io/api/). We automatically authenticate all requests using the API key and use `https://app.humaans.io/api` as the base URL.| # |iCIMS|`icims/default`|[iCIMS Default API](https://developer-community.icims.com/). We automatically authenticate all requests and use `https://api.icims.com/customers/\{customer_id\}` as the base url.| # |InRecruiting by Zucchetti|`inrecruiting/default`|[inRecruiting's v3 API](https://inrecruiting.intervieweb.it/api-docs/). We automatically authenticate all requests and use the customers domain as base URL| # |Insperity|`insperity/api`|Insperity [APIs](https://developer.insperity.com/) We automatically authenticate all requests and use `https://api.insperity.com` as the base URL. For staging environments, we use `https://apistage.insperity.com`. Note that all requests require the company ID to be specified in the path or body.| # |IRIS Cascade|`iriscascade/v2`|IRIS Cascade HR [API](https://swagger.hrapi.co.uk/). We automatically authenticate all requests using the provided credentials and use `https://api.iris.co.uk/hr/v2` as the base URL.| # |JazzHR|`jazzhr/v1`|[JazzHR's v1 API](https://www.resumatorapi.com/v1/#!`).We automatically authenticate all requests and use "https://api.resumatorapi.com/v1/" as the base URL.| # |JobDiva|`jobdiva/api`|We automatically authenticate all requests and use `https://api.jobdiva.com` as the base URL.| # |Jobvite|`jobvite/api`|We automatically authenticate all requests and use 'https://api.jobvite.com/api/v2' as the base URL.| # |Jobvite|`jobvite/v2`|We use `https://api.jobvite.com/api/v2` as the base URL. Find the official docs [here](https://help.jobvite.com/hc/en-us/articles/8870636608925-Jobvite-API).| # |Jobylon|`jobylon/feed`|The [Jobylon Feed API](https://developer.jobylon.com/feed-api/). We automatically authenticate all requests and use `https://\{subdomain\}.jobylon.com/feeds/\{job_hash\}` as the base URL.| # |Jobylon|`jobylon/push`|The [Jobylon Push API](https://developer.jobylon.com/push-api-and-webhooks/). We automatically authenticate all requests and use `https://\{subdomain\}.jobylon.com/p1` as the base URL.| # |JOIN|`join/v2`|Join's [V2 API](https://docs.join.com/reference/getting-started). We automatically authenticate all requests and use `https://api.join.com/v2` as the base URL.| # |Kenjo|`kenjo/api`|Kenjo's [API](https://kenjo.readme.io/reference/generate-the-api-key). We automatically authenticate all requests using the API key and use `https://api.kenjo.io/` as the base URL.| # |Lattice Talent|`latticetalent/talent`|Lattice's [Talent API](https://developers.lattice.com/reference/introduction). We automatically authenticate all requests using API key credentials with `https://api.latticehq.com` as the base URL.| # |Lattice|`lattice/passthrough`|Lattice's [API](https://developers.lattice.com/v2/docs/base-url-1). We automatically authenticate all requests using OAuth credentials with `https://api.latticehq.com` as the base URL.| # |Lattice|`lattice/talent`|Lattice's [Talent API](https://developers.lattice.com/docs/introduction-1). We automatically authenticate all requests using OAuth credentials with `https://api.latticehq.com` as the base URL.| # |Laura|`laura/api`|We automatically authenticate all requests and use `https://\{subdomain\}.rekrytointi.com/api/v1.2` as the base URL.| # |Leapsome|`leapsome/scim`|Leapsome [SCIM API](https://api.leapsome.com/scim/v1/api-docs/). We automatically authenticate all requests using the credentials supplied by the customer and use `https://api.leapsome.com/scim/v1` as the base URL.| # |Leapsome|`leapsome/v1`|Leapsome [API](https://api.leapsome.com/v1/api-docs/). We automatically authenticate all requests using the credentials supplied by the customer and use `https://api.leapsome.com/v1` as the base URL.| # |Lever|`lever/v1`|[Lever's v1 API](https://hire.lever.co/developer/documentation). We automatically authenticate all requests using the partner credentials which have been configured in the Lever tool settings (this uses Kombo's partner credentials by default).| # |LinkedIn Learning|`linkedinlearning/v2`|LinkedIn Learning [API v2](https://learn.microsoft.com/en-us/linkedin/learning/). We automatically handle authentication and use `https://api.linkedin.com/v2` as the base URL.| # |Loket|`loket/api`|[Loket's REST API](https://developers.loket.nl/). We automatically authenticate all requests and use `https://\{api_domain\}` as the base URL, where `api_domain` is the API domain configured during integration setup (e.g. `api.loket.nl`).| # |Loxo|`loxo/v1`|[Loxo's API](https://loxo.readme.io/reference/loxo-api). We automatically authenticate all requests and use 'https://app.loxo.co/api/\{agency_slug\}' as base URL.| # |Lucca|`lucca/api`|[Luccas's API](https://developers.lucca.fr/api-reference/legacy/introduction). We automatically authenticate all requests and use 'https://\{account\}.\{ilucca|ilucca-demo\}.\{region\}/' as the base URL.| # |Manatal|`manatal/career-page`|Manatal's Career Page API. We use `https://api.manatal.com/open/v3/career-page/\{client_slug\}` as the base URL.| # |Manatal|`manatal/open-api-v3`|[Manatal's Open API v3](https://developers.manatal.com/reference/getting-started). We automatically authenticate all requests and use `https://api.manatal.com/open/v3` as the base URL.| # |Mercury|`mercury/v1`|Mercury's [V1 API](https://apim-uks-thirdpartyintegration-prod.azure-api.net/swagger/index.html?urls.primaryName=V1). We automatically authenticate all requests with the `subscription-key` and `tenant-id` headers and use the configured server URL with `/api/v1` as the base URL.| # |Mercury|`mercury/v2`|Mercury's [V2 API](https://apim-uks-thirdpartyintegration-prod.azure-api.net/swagger/index.html?urls.primaryName=V2). We automatically authenticate all requests with the `subscription-key` and `tenant-id` headers and use the configured server URL with `/api/v2` as the base URL.| # |Mercury|`mercury/v3`|Mercury's [V3 API](https://apim-uks-thirdpartyintegration-prod.azure-api.net/swagger/index.html?urls.primaryName=V3). We automatically authenticate all requests with the `subscription-key` and `tenant-id` headers and use the configured server URL with `/api/v3` as the base URL.| # |MHR People First|`peoplefirst/v1`|MHR People First [v1 API](https://docs.people-first.com/api/api-docs/api-docs.html). We automatically authenticate all requests using the access token and tenant/environment codes. For default environments, we use `https://\{tenant_code\}.people-first.com/api/v1` as the base URL. For non-default environments, we use `https://\{tenant_code\}-\{environment_code\}.people-first.com/api/v1`.| # |Microsoft Azure AD|`azuread/v1`|[AzureAD's API](https://learn.microsoft.com/en-us/graph/api/resources/identity-network-access-overview?view=graph-rest-1.0). We automatically authenticate all requests.| # |Microsoft Entra ID|`entraid/v1`|[AzureAD's API](https://learn.microsoft.com/en-us/graph/api/resources/identity-network-access-overview?view=graph-rest-1.0). We automatically authenticate all requests.| # |Moodle|`moodle/rest`|Moodle REST Web Services API. All calls go to `/webservice/rest/server.php` with `wsfunction` and `wstoken` parameters. We automatically handle authentication and use `\{site_url\}/webservice/rest/server.php` as the base URL. | # |Mysolution|`mysolution/default`|[Mysolution's API](https://swagger.mysolution.nl/). We automatically authenticate all requests and use the customer's domain as base URL.| # |Nmbrs|`nmbrs/soap`|[Nmbrs SOAP API](https://api.nmbrs.nl/soap/v3/). We automatically authenticate all requests and use `https://api.nmbrs.nl/soap/v3/` as the base URL. Set `data` to your raw XML string (the content that will be placed inside the `\<soap:Body\>` tag). Use `/` as your `path`, as we will always send requests to `https://api.nmbrs.nl/soap/v3/\{service_name\}.asmx`. Set your `method` to `POST`. You need to specify the `api_options` object and set `service_name` to the name of the service you want to call. Available services include `EmployeeService` and `CompanyService`.| # |Odoo|`odoo/json2`|Odoo's [JSON-2 API](https://www.odoo.com/documentation/19.0/developer/reference/external_api.html). We automatically authenticate all requests and use `https://\{domain\}.odoo.com/json/2` as the base URL. Odoo JSON-2 requests are always `POST` requests and use paths like `/\{model\}/\{method\}` (e.g. `/res.partner/search_read`).| # |Okta|`okta/v1`|[Okta's API](https://developer.okta.com/docs/api/openapi/okta-management/management/tag/ApiServiceIntegrations/). We automatically authenticate all request ans use 'https://\<your-okta-domain\>/api/v1' as the base URL.| # |Onlyfy|`onlyfy/v1`|Onlyfy's [Public v1 REST API](https://onlyfy.io/doc/v1#section/Introduction). We automatically authenticate all requests using the `apikey` header and use `https://api.prescreenapp.io/v1` as the base URL.| # |Oracle HCM|`oraclehcm/api`|Oracle HCM Cloud [REST API](https://docs.oracle.com/en/cloud/saas/human-resources/24d/farws/index.html). We automatically authenticate all requests and use `https://\{domain\}/` as the base URL, where domain is your Oracle Cloud domain.| # |Oracle Recruiting Cloud|`oraclerecruiting/rest`|[Oracle's REST API](https://docs.oracle.com/en/cloud/saas/human-resources/24d/farws/rest-endpoints.html). We automatically authenticate all requests and use 'https://\{company_url\}' as the base url.| # |Oracle Recruiting Cloud|`oraclerecruiting/rest`|[Oracles's REST API](https://docs.oracle.com/en/cloud/saas/human-resources/24d/farws/rest-endpoints.html). We automatically authenticate all requests and use 'https://\{company_url\}' as the base url.| # |Oracle Taleo|`taleo/soap`|[Taleo's API](https://docs.oracle.com/en/cloud/saas/taleo-enterprise/23b/otwsu/c-taleoapi.html). We automatically authenticate all requests and use 'https://\{your-subdomain\}.taleo.net/enterprise/soap' as base URL.| # |OTYS|`otys/json-rpc`|[OTYS JSON-RPC API](https://ows.otys.nl/info/). We authenticate with your stored API key and inject the session token as the first element of the JSON-RPC `params` array on each request (except `loginByUid`, which uses `params` as sent). Requests use `https://ows.otys.nl` as the base URL (for example `POST /jservice.php` with the RPC method in the URL fragment, matching OTYS conventions).| # |Paradox|`paradox/v1`|We use `\{api_url\}/api/v1` as the base URL. Find the official docs [here](https://paradox.readme.io/).| # |Paradox|`paradox/v1public`|We use `\{api_url\}/api/v1/public` as the base URL. Find the official docs [here](https://paradox.readme.io/).| # |Paychex|`paychex/api`|Paychex [REST API](https://developer.paychex.com/documentation). We automatically authenticate all requests and use `https://api.paychex.com` as the base URL.| # |Paycom|`paycom/v1`|Paycom's REST API. We automatically authenticate all requests using the provided SID and API Token and use `https://api.paycomonline.net/v4/rest/index.php/api/v1` as the base URL.| # |Paycor|`paycor/v1`|[Paycors's v1 API](https://developers.paycor.com/explore#section/Getting-Started). We automatically authenticate all requests and use 'https://apis.paycor.com'.| # |PayFit|`payfitcustomer/api`|PayFit [Partner API](https://developers.payfit.io/reference). We automatically authenticate all requests using the provided API key and use `https://partner-api.payfit.com` as the base URL.| # |PayFit|`payfitpartner/partner-api`|PayFit [Partner API](https://developers.payfit.io/reference). We automatically authenticate all requests using the OAuth access token and use `https://partner-api.payfit.com` as the base URL.| # |Paylocity|`paylocity/default`|[Paylocity's Weblink API](https://developer.paylocity.com/integrations/reference/authentication-weblink). We automatically authenticate all requests and use 'https://\{api|dc1demogw\}.paylocity.com/' as the base URL.| # |Paylocity|`paylocity/next-gen`|[Paylocity's NextGen API](https://developer.paylocity.com/integrations/reference/authentication). We automatically authenticate all requests and use 'https://dc1prodgwext.paylocity.com/' as the base URL.| # |PeopleHR|`peoplehr/default`|[PeopleHR's API](https://apidocs.peoplehr.com/#). We automatically authenticate all request ans use 'https://api.peoplehr.net' as the base URL.| # |PeopleXD|`peoplexd/b2b`|PeopleXD's [B2B API](https://documenter.getpostman.com/view/3101638/TzeTHUDu#intro). We automatically authenticate all requests and use `https://api.corehr.com/ws/\{tenant_id\}/corehr` or `https://uatapi.corehr.com/ws/\{tenant_id\}/corehr` as the base URL.| # |Personio|`personio/jobboard`|API endpoints exposed on Personio's public job board pages ([currently just the XML feed](https://developer.personio.de/reference/get_xml)). We automatically use the right `https://\{company\}.jobs.personio.de` base URL.| # |Personio|`personio/personnel`|Personio's [Personnel Data API](https://developer.personio.de/reference/get_company-employees). We automatically authenticate all requests using the client ID and secret and use `https://api.personio.de/v1` as the base URL.| # |Personio|`personio/personnelv2`|Personio's [V2 Personnel Data API](https://developer.personio.de/v2.0/reference/introduction). We automatically authenticate all requests using the client ID and secret and use `https://api.personio.de/v2` as the base URL.| # |Personio|`personio/recruiting`|Personio's [Recruiting API](https://developer.personio.de/reference/get_company-employees). We automatically authenticate all requests using the Recruiting access token and use `https://api.personio.de/v1/recruiting` as the base URL.| # |Personio|`personio/recruitingV2`|Personio's [V2 Recruiting API](https://developer.personio.de/reference/get_v2-recruiting-applications). We automatically authenticate all requests using the Recruiting access token, send the `Beta` header and use `https://api.personio.de/v2/recruiting` as the base URL.| # |Phenom|`phenom/rest-api`|The [Phenom API](https://developer.phenom.com/). We automatically authenticate all requests and use `https://api-stg.phenompro.com` as the base URL.| # |Pinpoint|`pinpoint/v1`|Pinpoint's [JSON:API](https://developers.pinpointhq.com/docs). We automatically authenticate all requests using the `X-API-KEY` header and use `https://\{subdomain\}.pinpointhq.com/api/v1` as the base URL.| # |Planday|`planday/api`|Planday's [HR API v1.0](https://openapi.planday.com/api/hr?version=v1.0). We automatically authenticate all requests and use `https://openapi.planday.com` as the base URL.| # |Recruit CRM|`recruitcrm/api`|We use `https://api.recruitcrm.io` as the base URL. Find the official docs [here](https://docs.recruitcrm.io/docs/rcrm-api-reference/ZG9jOjMyNzk0NA-getting-started).| # |Recruitee|`recruitee/default`|The [Recruitee API](https://api.recruitee.com/docs/index.html). We automatically authenticate all requests and use `https://api.recruitee.com/c/\{company_id\}` as the base URL.| # |Recruitee|`recruitee/v1`|We use `https://api.recruitee.com/c/\{company_id\}` as the base URL. Find the official docs [here](https://docs.recruitee.com/reference).| # |RecruiterFlow|`recruiterflow/v1`|RecruiterFlow API [docs](https://docs.recruiterflow.com/). We automatically authenticate all requests using the RF-Api-Key header and use `https://api.recruiterflow.com` as the base URL.| # |Remote|`remotecom/default`|Remote's [API](https://remote.com/resources/api/getting-started). We automatically authenticate all requests using provided credentials.| # |rexx systems|`rexx/default`|Rexx's HRIS export API. There is only one endpoint: `Get /`| # |Rippling|`rippling/api`|Rippling's [API](https://developer.rippling.com/documentation). We automatically authenticate all requests and use `https://api.rippling.com/platform/api` or`https://rest.ripplingapis.com` as the base URL.| # |Sage HR|`sagehr/api`|Sage HR's [API](https://developer.sage.com/hr/reference/api-ref). We automatically authenticate all requests and use `https://\{subdomain\}.sage.hr/api` as the base URL.| # |Sage People|`sagepeople/salesforce-rest-api`|Sage People is built on Salesforce's [API](https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/intro_what_is_rest_api.htm). We automatically authenticate all requests and use `https://\{customer_name\}.my.salesforce.com/` as the base URL.| # |SAP SuccessFactors|`successfactors/lms-odata-v4`|We use `https://\{api_domain\}/learning/odatav4` as the base URL. Find the official docs [here](https://help.sap.com/docs/successfactors-learning/sap-successfactors-learning-odata-apis).| # |SAP SuccessFactors|`successfactors/odata-v2`|[SuccessFactors' OData V2 API](https://help.sap.com/doc/74597e67f54d4f448252bad4c2b601c9/2211/en-US/SF_HCM_OData_API_REF_en.pdf). We automatically authenticate all requests and use `https://\{api_domain\}\{path?\}/odata/v2` as the base URL (the optional `\{path\}` is used when connecting via proxied/gateway domains).| # |SD Worx|`sdworx/default`|SD Worx's [OData API](https://apistaging.cobra.sdworx.com/Resources). We automatically authenticate all requests using the client ID and secret and use `\{api_url\}` as the base URL.| # |Silae|`silae/rest`|[Silae's REST API](https://silae-api.document360.io/docs). We automatically authenticate all requests and use 'https://payroll-api.silae.fr/payroll' as the base URL.| # |Simployer|`simployer/v1`|[AlexisHR's v1 API](https://docs.alexishr.com/) We automatically authenticate all requests and use `https://\{subdomain\}.alexishr.com` as base URL.| # |SmartRecruiters|`smartrecruiters/default`|Smartrecruiters [API](https://developers.smartrecruiters.com/reference/apply-api). We automatically authenticate all requests using OAuth and use `https://api.smartrecruiters.com` as the base URL.| # |SmartRecruiters|`smartrecruiters/default`|Smartrecruiters [API](https://developers.smartrecruiters.com/reference/apply-api). We automatically authenticate all requests using the credentials supplied by the customer and use `https://api.smartrecruiters.com` as the base URL.| # |Softgarden|`softgarden/apply-api`|[Softgarden's Apply API](https://dev.softgarden.de/apply-api/). We automatically authenticate all requests and use 'https://jobdb.softgarden.de/jobdb/public' as base URL.| # |Softgarden|`softgarden/frontend-v3`|[Softgarden's Frontend API v3](https://dev.softgarden.de/frontend-v3/. We automatically authenticate all requests and use 'https://api.softgarden.io/api/rest' as base URL.| # |Spark Hire Recruit|`comeet/api`|[Spark Hire Recruit's API.](https://developers.comeet.com/reference/recruiting-api-overview)We automatically authenticate all requests and use `https://api.comeet.com` as the base URL.| # |Spott|`spott/protected`|The [Spott API](https://docs.gospott.com). We automatically authenticate all requests and use `https://api.gospott.com` as the base URL.| # |Sympa|`sympa/api`|Sympa's [API](https://documenter.getpostman.com/view/33639379/2sA3kXG1vX#intro). We automatically authenticate all requests and use `https://api.sympahr.net/api/` as the base URL.| # |Taleez|`taleez/0`|[Taleez's API](https://api.taleez.com/swagger-ui/index.html). We automatically authenticate all requests and use `https://api.taleez.com/0` as the base URL.| # |Talention|`talention/v1`|Talention's API. We automatically authenticate all requests and use `https://\{api_domain\}/tms/\{account_id\}/external/api/1.0` as the base URL. Documentation is provided privately by Talention. Contact Kombo support for assistance with specific endpoints.| # |TalentLMS|`talentlms/v2`|We use `https://\{subdomain\}.talentlms.com/api/v2` as the base URL.| # |Teamtailor Job Boards|`teamtailorjobboards/direct-apply`|Teamtailor's [Job Board Direct Apply API](https://partner.teamtailor.com/job_boards/direct_apply/#direct-apply). We automatically authenticate all requests and use `https://5qbn6o9x4h.execute-api.eu-west-1.amazonaws.com/production` as the base URL. All requests are automatically signed with HMAC-SHA256 signature.| # |Teamtailor|`teamtailor/v1`|We use `https://api.teamtailor.com/v1` as the base URL. Find the official docs [here](https://docs.teamtailor.com/).| # |TRAFFIT|`traffit/v2`|Traffit's [v2 API](https://api.traffit.com). We authenticate all requests with the Traffit API key and use the base URL `https://yourdomain.traffit.com/api/integration/v2`.| # |TriNet PEO|`trinetpeo/v1`|We use `https://api.trinet.com` as the base URL. Find the official docs [here](https://developers.trinet.com).| # |Udemy Business|`udemy/learning`|Udemy Business REST API. We automatically handle authentication and use `https://\{account_name\}.udemy.com/api-2.0/organizations/\{account_id\}/` as the base URL.| # |UKG Pro|`ukgpro/default`|[UKG Pro's HRIS API](https://developer.ukg.com/hcm/reference/get_personnel-v1-person-details). We automatically authenticate all requests and use `https://\{hostname\}` as the base URL.| # |UKG Pro|`ukgpro/recruting`|[UKG Pro's Recruiting API](https://developer.ukg.com/hcm/reference/retrieveapplications). We automatically authenticate all requests and use `https://\{hostname\}/talent/recruiting/v2/\{tenantalias\}/api` as the base URL.| # |UKG Ready|`ukgready/api`|UKG Ready [API](https://secure.saashr.com/ta/docs/rest/public/). We automatically authenticate all requests using the provided credentials and use `https://\{api_domain\}` as the base URL.| # |Visma Peple|`peple/hrm`|[Visma Payroll Reporting API](https://api.analytics1.hrm.visma.net/docs/openapi.html). We automatically authenticate all requests using the client credentials and use 'https://api.analytics1.hrm.visma.net' as the base URL.| # |Visma Raet - Youforce|`youforce/v1.0`|[Youforce's basic v1.0 API](https://vr-api-integration.github.io/youforce-api-documentation/postman_collections.html). We automatically authenticate all requests and use 'https://api.youforce.com' as base URL.| # |Visma YouServe|`youserve/learning`|Visma YouServe [Learning API](https://youserve-domain-api.github.io/SwaggerUI/learning.html). We automatically authenticate all requests using OAuth 2.0 with the provided credentials and use `https://api.youserve.nl/learning/v1.0` as the base URL.| # |Workable|`workable/v1`|**Deprecated: Use `v3` instead.** Workable's [API](https://workable.readme.io/reference/generate-an-access-token). We automatically authenticate all requests using the client ID and secret and use `https://\{subdomain\}.\{environment\}.com/spi/v3` as the base URL.| # |Workable|`workable/v3`|Workable's [API](https://workable.readme.io/reference/generate-an-access-token). We automatically authenticate all requests using the client ID and secret and use `https://\{subdomain\}.\{environment\}.com/spi/v3` as the base URL.| # |Workday|`workday/rest`|[Workday's REST API](https://community.workday.com/sites/default/files/file-hosting/restapi/index.html). We automatically authenticate all requests and use the correct Workday REST base URL for your tenant. The base URL follows the format: https://\{domain\}/api/\{service_name\}/\{version\}/\{tenant\}. You can specify any valid REST endpoint and method. See the Workday REST API documentation for available endpoints. You must specify the `api_options` object and set `service_name` to the name of the service you want to call. You can also specify the `version` (e.g., "v1", "v2"); if omitted, it defaults to "v1".| # |Workday|`workday/soap`|[Workday's SOAP API](https://community.workday.com/sites/default/files/file-hosting/productionapi/index.html). We automatically authenticate all requests. Set `data` to your raw xml string. Use `/` as your `path`, as we will always send requests to `https://\{domain\}/ccx/service/\{tenant\}/\{service_name\}`. Set your `method` to `POST`. You need to specify the `api_options` object and set `service_name` to the name of the service you want to call. Find all available services [here](https://community.workday.com/sites/default/files/file-hosting/productionapi/versions/v41.0/index.html). The string that you submit as `data` will be the content of the `soapenv:Body` tag in the request. You can set the `service_version` to any valid Workday service version (the default is `38.2`).| # |workforce.com|`workforcecom/api`|Workforce.com [API](https://my.workforce.com/api/v2/documentation). We automatically authenticate all requests using the provided credentials and use `https://my.tanda.co` as the base URL.| # |Zelt|`zelt/partner`|Zelt's [Partner API](https://go.zelt.app/apiv2/swagger). We automatically authenticate all requests using the connected OAuth credentials and use `https://go.zelt.app/apiv2/partner` as the base URL.| # |Zoho Recruit|`zohorecruit/v2`|Zoho Recruit's [V2 API](https://www.zoho.com/recruit/developer-guide/apiv2/modules-api.html). We automatically authenticate all requests and use `https://recruit.\{domain\}/recruit/v2` as the base URL.| # |Zvoove Recruit|`zvooverecruit/applicants`|[Zvoove Recruit's Applicants API](https://api.zvoove.com/docs/). We automatically authenticate all requests using the applicants API key and use 'https://\{domain\}/api/public' as base URL.| # |Zvoove Recruit|`zvooverecruit/jobs`|[Zvoove Recruit's Jobs API](https://api.zvoove.com/docs/). We automatically authenticate all requests using the jobs API key and use 'https://\{domain\}/api/public' as base URL.| # # <Note>Please note that the passthrough API endpoints are only meant for edge cases. That's why we only expose them for new integrations after understanding a concrete customer use case. If you have such a use case in mind, please reach out to Kombo.</Note> request = Models::Operations::PostPassthroughToolApiRequest.new( tool: tool, api: api, body: body, integration_id: integration_id ) url, params = @sdk_configuration.get_server_details base_url = Utils.template_url(url, params) url = Utils.generate_url( Models::Operations::PostPassthroughToolApiRequest, base_url, '/passthrough/{tool}/{api}', request, @sdk_configuration.globals ) headers = Utils.get_headers(request, @sdk_configuration.globals) headers = T.cast(headers, T::Hash[String, String]) req_content_type, data, form = Utils.serialize_request_body(request, false, false, :body, :json) headers['content-type'] = req_content_type raise StandardError, 'request body is required' if data.nil? && form.nil? if form body = Utils.encode_form(form) elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded') body = URI.encode_www_form(T.cast(data, T::Hash[Symbol, Object])) else body = data end headers['Accept'] = 'application/json' headers['user-agent'] = @sdk_configuration.user_agent security = @sdk_configuration.security_source&.call timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? timeout ||= (300_000.to_f / 1000) connection = @sdk_configuration.client hook_ctx = SDKHooks::HookContext.new( config: @sdk_configuration, base_url: base_url, oauth2_scopes: nil, operation_id: 'PostPassthroughToolApi', security_source: @sdk_configuration.security_source ) error = T.let(nil, T.nilable(StandardError)) http_response = T.let(nil, T.nilable(Faraday::Response)) begin http_response = T.must(connection).post(url) do |req| req.body = body req.headers.merge!(headers) req..timeout = timeout unless timeout.nil? Utils.configure_request_security(req, security) @sdk_configuration.hooks.before_request( hook_ctx: SDKHooks::BeforeRequestHookContext.new( hook_ctx: hook_ctx ), request: req ) end rescue StandardError => e error = e ensure if http_response.nil? || Utils.error_status?(http_response.status) http_response = @sdk_configuration.hooks.after_error( error: error, hook_ctx: SDKHooks::AfterErrorHookContext.new( hook_ctx: hook_ctx ), response: http_response ) else http_response = @sdk_configuration.hooks.after_success( hook_ctx: SDKHooks::AfterSuccessHookContext.new( hook_ctx: hook_ctx ), response: http_response ) end if http_response.nil? raise error if !error.nil? raise 'no response' end end content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') if Utils.match_status_code(http_response.status, ['200']) if Utils.match_content_type(content_type, 'application/json') http_response = @sdk_configuration.hooks.after_success( hook_ctx: SDKHooks::AfterSuccessHookContext.new( hook_ctx: hook_ctx ), response: http_response ) response_data = http_response.env.response_body obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Shared::PostPassthroughToolApiPositiveResponse) response = Models::Operations::PostPassthroughToolApiResponse.new( status_code: http_response.status, content_type: content_type, raw_response: http_response, post_passthrough_tool_api_positive_response: T.unsafe(obj) ) return response else raise ::Kombo::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' end else if Utils.match_content_type(content_type, 'application/json') http_response = @sdk_configuration.hooks.after_success( hook_ctx: SDKHooks::AfterSuccessHookContext.new( hook_ctx: hook_ctx ), response: http_response ) response_data = http_response.env.response_body obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::KomboGeneralError) obj.raw_response = http_response raise obj else raise ::Kombo::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' end end end |
#set_integration_enabled(body:, integration_id:, timeout_ms: nil) ⇒ Object
871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 |
# File 'lib/kombo/general.rb', line 871 def set_integration_enabled(body:, integration_id:, timeout_ms: nil) # set_integration_enabled - Set integration enabled # Enable or disable the specified integration. When disabling, all currently running syncs will be cancelled. # # All authentication credentials and configuration are preserved. Syncs can be resumed by re-enabling the integration. # # You may use this to, for example, pause syncing for customers that are temporarily not using the integration. request = Models::Operations::PutIntegrationsIntegrationIdEnabledRequest.new( integration_id: integration_id, body: body ) url, params = @sdk_configuration.get_server_details base_url = Utils.template_url(url, params) url = Utils.generate_url( Models::Operations::PutIntegrationsIntegrationIdEnabledRequest, base_url, '/integrations/{integration_id}/enabled', request, @sdk_configuration.globals ) headers = {} headers = T.cast(headers, T::Hash[String, String]) req_content_type, data, form = Utils.serialize_request_body(request, false, false, :body, :json) headers['content-type'] = req_content_type raise StandardError, 'request body is required' if data.nil? && form.nil? if form body = Utils.encode_form(form) elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded') body = URI.encode_www_form(T.cast(data, T::Hash[Symbol, Object])) else body = data end headers['Accept'] = 'application/json' headers['user-agent'] = @sdk_configuration.user_agent security = @sdk_configuration.security_source&.call timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? timeout ||= @sdk_configuration.timeout connection = @sdk_configuration.client hook_ctx = SDKHooks::HookContext.new( config: @sdk_configuration, base_url: base_url, oauth2_scopes: nil, operation_id: 'PutIntegrationsIntegrationIdEnabled', security_source: @sdk_configuration.security_source ) error = T.let(nil, T.nilable(StandardError)) http_response = T.let(nil, T.nilable(Faraday::Response)) begin http_response = T.must(connection).put(url) do |req| req.body = body req.headers.merge!(headers) req..timeout = timeout unless timeout.nil? Utils.configure_request_security(req, security) @sdk_configuration.hooks.before_request( hook_ctx: SDKHooks::BeforeRequestHookContext.new( hook_ctx: hook_ctx ), request: req ) end rescue StandardError => e error = e ensure if http_response.nil? || Utils.error_status?(http_response.status) http_response = @sdk_configuration.hooks.after_error( error: error, hook_ctx: SDKHooks::AfterErrorHookContext.new( hook_ctx: hook_ctx ), response: http_response ) else http_response = @sdk_configuration.hooks.after_success( hook_ctx: SDKHooks::AfterSuccessHookContext.new( hook_ctx: hook_ctx ), response: http_response ) end if http_response.nil? raise error if !error.nil? raise 'no response' end end content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') if Utils.match_status_code(http_response.status, ['200']) if Utils.match_content_type(content_type, 'application/json') http_response = @sdk_configuration.hooks.after_success( hook_ctx: SDKHooks::AfterSuccessHookContext.new( hook_ctx: hook_ctx ), response: http_response ) response_data = http_response.env.response_body obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Shared::PutIntegrationsIntegrationIdEnabledPositiveResponse) response = Models::Operations::PutIntegrationsIntegrationIdEnabledResponse.new( status_code: http_response.status, content_type: content_type, raw_response: http_response, put_integrations_integration_id_enabled_positive_response: T.unsafe(obj) ) return response else raise ::Kombo::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' end else if Utils.match_content_type(content_type, 'application/json') http_response = @sdk_configuration.hooks.after_success( hook_ctx: SDKHooks::AfterSuccessHookContext.new( hook_ctx: hook_ctx ), response: http_response ) response_data = http_response.env.response_body obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::KomboGeneralError) obj.raw_response = http_response raise obj else raise ::Kombo::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' end end end |
#trigger_sync(body:, integration_id: nil, timeout_ms: nil) ⇒ Object
156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 |
# File 'lib/kombo/general.rb', line 156 def trigger_sync(body:, integration_id: nil, timeout_ms: nil) # trigger_sync - Trigger sync # Trigger a sync for a specific integration. # # <Warning>Please note that it is **not** necessary nor recommended to call this endpoint periodically on your side. Kombo already performs periodic syncs for you and you should only trigger syncs yourself in special cases (like when a user clicks on a "Sync" button in your app).</Warning> request = Models::Operations::PostForceSyncRequest.new( body: body, integration_id: integration_id ) url, params = @sdk_configuration.get_server_details base_url = Utils.template_url(url, params) url = "#{base_url}/force-sync" headers = Utils.get_headers(request, @sdk_configuration.globals) headers = T.cast(headers, T::Hash[String, String]) req_content_type, data, form = Utils.serialize_request_body(request, false, false, :body, :json) headers['content-type'] = req_content_type raise StandardError, 'request body is required' if data.nil? && form.nil? if form body = Utils.encode_form(form) elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded') body = URI.encode_www_form(T.cast(data, T::Hash[Symbol, Object])) else body = data end headers['Accept'] = 'application/json' headers['user-agent'] = @sdk_configuration.user_agent security = @sdk_configuration.security_source&.call timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? timeout ||= (300_000.to_f / 1000) connection = @sdk_configuration.client hook_ctx = SDKHooks::HookContext.new( config: @sdk_configuration, base_url: base_url, oauth2_scopes: nil, operation_id: 'PostForceSync', security_source: @sdk_configuration.security_source ) error = T.let(nil, T.nilable(StandardError)) http_response = T.let(nil, T.nilable(Faraday::Response)) begin http_response = T.must(connection).post(url) do |req| req.body = body req.headers.merge!(headers) req..timeout = timeout unless timeout.nil? Utils.configure_request_security(req, security) @sdk_configuration.hooks.before_request( hook_ctx: SDKHooks::BeforeRequestHookContext.new( hook_ctx: hook_ctx ), request: req ) end rescue StandardError => e error = e ensure if http_response.nil? || Utils.error_status?(http_response.status) http_response = @sdk_configuration.hooks.after_error( error: error, hook_ctx: SDKHooks::AfterErrorHookContext.new( hook_ctx: hook_ctx ), response: http_response ) else http_response = @sdk_configuration.hooks.after_success( hook_ctx: SDKHooks::AfterSuccessHookContext.new( hook_ctx: hook_ctx ), response: http_response ) end if http_response.nil? raise error if !error.nil? raise 'no response' end end content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') if Utils.match_status_code(http_response.status, ['200']) if Utils.match_content_type(content_type, 'application/json') http_response = @sdk_configuration.hooks.after_success( hook_ctx: SDKHooks::AfterSuccessHookContext.new( hook_ctx: hook_ctx ), response: http_response ) response_data = http_response.env.response_body obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Shared::PostForceSyncPositiveResponse) response = Models::Operations::PostForceSyncResponse.new( status_code: http_response.status, content_type: content_type, raw_response: http_response, post_force_sync_positive_response: T.unsafe(obj) ) return response else raise ::Kombo::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' end else if Utils.match_content_type(content_type, 'application/json') http_response = @sdk_configuration.hooks.after_success( hook_ctx: SDKHooks::AfterSuccessHookContext.new( hook_ctx: hook_ctx ), response: http_response ) response_data = http_response.env.response_body obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::KomboGeneralError) obj.raw_response = http_response raise obj else raise ::Kombo::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' end end end |
#update_custom_field_mapping(body:, integration_id:, custom_field_id:, timeout_ms: nil) ⇒ Object
1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 |
# File 'lib/kombo/general.rb', line 1582 def update_custom_field_mapping(body:, integration_id:, custom_field_id:, timeout_ms: nil) # update_custom_field_mapping - Put custom field mappings # Updates the mapping of a given custom field. If the custom field is already mapped, it will be updated. request = Models::Operations::PutIntegrationsIntegrationIdCustomFieldsCustomFieldIdRequest.new( integration_id: integration_id, custom_field_id: custom_field_id, body: body ) url, params = @sdk_configuration.get_server_details base_url = Utils.template_url(url, params) url = Utils.generate_url( Models::Operations::PutIntegrationsIntegrationIdCustomFieldsCustomFieldIdRequest, base_url, '/integrations/{integration_id}/custom-fields/{custom_field_id}', request, @sdk_configuration.globals ) headers = {} headers = T.cast(headers, T::Hash[String, String]) req_content_type, data, form = Utils.serialize_request_body(request, false, false, :body, :json) headers['content-type'] = req_content_type raise StandardError, 'request body is required' if data.nil? && form.nil? if form body = Utils.encode_form(form) elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded') body = URI.encode_www_form(T.cast(data, T::Hash[Symbol, Object])) else body = data end headers['Accept'] = 'application/json' headers['user-agent'] = @sdk_configuration.user_agent security = @sdk_configuration.security_source&.call timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? timeout ||= @sdk_configuration.timeout connection = @sdk_configuration.client hook_ctx = SDKHooks::HookContext.new( config: @sdk_configuration, base_url: base_url, oauth2_scopes: nil, operation_id: 'PutIntegrationsIntegrationIdCustomFieldsCustomFieldId', security_source: @sdk_configuration.security_source ) error = T.let(nil, T.nilable(StandardError)) http_response = T.let(nil, T.nilable(Faraday::Response)) begin http_response = T.must(connection).put(url) do |req| req.body = body req.headers.merge!(headers) req..timeout = timeout unless timeout.nil? Utils.configure_request_security(req, security) @sdk_configuration.hooks.before_request( hook_ctx: SDKHooks::BeforeRequestHookContext.new( hook_ctx: hook_ctx ), request: req ) end rescue StandardError => e error = e ensure if http_response.nil? || Utils.error_status?(http_response.status) http_response = @sdk_configuration.hooks.after_error( error: error, hook_ctx: SDKHooks::AfterErrorHookContext.new( hook_ctx: hook_ctx ), response: http_response ) else http_response = @sdk_configuration.hooks.after_success( hook_ctx: SDKHooks::AfterSuccessHookContext.new( hook_ctx: hook_ctx ), response: http_response ) end if http_response.nil? raise error if !error.nil? raise 'no response' end end content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') if Utils.match_status_code(http_response.status, ['200']) if Utils.match_content_type(content_type, 'application/json') http_response = @sdk_configuration.hooks.after_success( hook_ctx: SDKHooks::AfterSuccessHookContext.new( hook_ctx: hook_ctx ), response: http_response ) response_data = http_response.env.response_body obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Shared::PutIntegrationsIntegrationIdCustomFieldsCustomFieldIdPositiveResponse) response = Models::Operations::PutIntegrationsIntegrationIdCustomFieldsCustomFieldIdResponse.new( status_code: http_response.status, content_type: content_type, raw_response: http_response, put_integrations_integration_id_custom_fields_custom_field_id_positive_response: T.unsafe(obj) ) return response else raise ::Kombo::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' end else if Utils.match_content_type(content_type, 'application/json') http_response = @sdk_configuration.hooks.after_success( hook_ctx: SDKHooks::AfterSuccessHookContext.new( hook_ctx: hook_ctx ), response: http_response ) response_data = http_response.env.response_body obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::KomboGeneralError) obj.raw_response = http_response raise obj else raise ::Kombo::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' end end end |
#update_integration_field(body:, integration_id:, integration_field_id:, timeout_ms: nil) ⇒ Object
1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 |
# File 'lib/kombo/general.rb', line 1301 def update_integration_field(body:, integration_id:, integration_field_id:, timeout_ms: nil) # update_integration_field - Updates an integration fields passthrough setting # When enabled, the integration field will be passed as part of the `integration_fields` array on the specific model endpoint. Providing false will disable the passthrough for the specified field. request = Models::Operations::PatchIntegrationsIntegrationIdIntegrationFieldsIntegrationFieldIdRequest.new( integration_id: integration_id, integration_field_id: integration_field_id, body: body ) url, params = @sdk_configuration.get_server_details base_url = Utils.template_url(url, params) url = Utils.generate_url( Models::Operations::PatchIntegrationsIntegrationIdIntegrationFieldsIntegrationFieldIdRequest, base_url, '/integrations/{integration_id}/integration-fields/{integration_field_id}', request, @sdk_configuration.globals ) headers = {} headers = T.cast(headers, T::Hash[String, String]) req_content_type, data, form = Utils.serialize_request_body(request, false, false, :body, :json) headers['content-type'] = req_content_type raise StandardError, 'request body is required' if data.nil? && form.nil? if form body = Utils.encode_form(form) elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded') body = URI.encode_www_form(T.cast(data, T::Hash[Symbol, Object])) else body = data end headers['Accept'] = 'application/json' headers['user-agent'] = @sdk_configuration.user_agent security = @sdk_configuration.security_source&.call timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil? timeout ||= @sdk_configuration.timeout connection = @sdk_configuration.client hook_ctx = SDKHooks::HookContext.new( config: @sdk_configuration, base_url: base_url, oauth2_scopes: nil, operation_id: 'PatchIntegrationsIntegrationIdIntegrationFieldsIntegrationFieldId', security_source: @sdk_configuration.security_source ) error = T.let(nil, T.nilable(StandardError)) http_response = T.let(nil, T.nilable(Faraday::Response)) begin http_response = T.must(connection).patch(url) do |req| req.body = body req.headers.merge!(headers) req..timeout = timeout unless timeout.nil? Utils.configure_request_security(req, security) @sdk_configuration.hooks.before_request( hook_ctx: SDKHooks::BeforeRequestHookContext.new( hook_ctx: hook_ctx ), request: req ) end rescue StandardError => e error = e ensure if http_response.nil? || Utils.error_status?(http_response.status) http_response = @sdk_configuration.hooks.after_error( error: error, hook_ctx: SDKHooks::AfterErrorHookContext.new( hook_ctx: hook_ctx ), response: http_response ) else http_response = @sdk_configuration.hooks.after_success( hook_ctx: SDKHooks::AfterSuccessHookContext.new( hook_ctx: hook_ctx ), response: http_response ) end if http_response.nil? raise error if !error.nil? raise 'no response' end end content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream') if Utils.match_status_code(http_response.status, ['200']) if Utils.match_content_type(content_type, 'application/json') http_response = @sdk_configuration.hooks.after_success( hook_ctx: SDKHooks::AfterSuccessHookContext.new( hook_ctx: hook_ctx ), response: http_response ) response_data = http_response.env.response_body obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Shared::PatchIntegrationsIntegrationIdIntegrationFieldsIntegrationFieldIdPositiveResponse) response = Models::Operations::PatchIntegrationsIntegrationIdIntegrationFieldsIntegrationFieldIdResponse.new( status_code: http_response.status, content_type: content_type, raw_response: http_response, patch_integrations_integration_id_integration_fields_integration_field_id_positive_response: T.unsafe(obj) ) return response else raise ::Kombo::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' end else if Utils.match_content_type(content_type, 'application/json') http_response = @sdk_configuration.hooks.after_success( hook_ctx: SDKHooks::AfterSuccessHookContext.new( hook_ctx: hook_ctx ), response: http_response ) response_data = http_response.env.response_body obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::KomboGeneralError) obj.raw_response = http_response raise obj else raise ::Kombo::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received' end end end |